mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-15 23:57:48 +00:00
Added option -align-loops=<true/false> to disable loop aligner pass.
llvm-svn: 47736
This commit is contained in:
parent
15e03a8950
commit
ea1f2d1110
@ -37,6 +37,9 @@ static cl::opt<bool>
|
||||
EnableSinking("enable-sinking", cl::init(false), cl::Hidden,
|
||||
cl::desc("Perform sinking on machine code"));
|
||||
static cl::opt<bool>
|
||||
AlignLoops("align-loops", cl::init(true), cl::Hidden,
|
||||
cl::desc("Align loop headers"));
|
||||
static cl::opt<bool>
|
||||
PerformLICM("machine-licm",
|
||||
cl::init(false), cl::Hidden,
|
||||
cl::desc("Perform loop-invariant code motion on machine code"));
|
||||
@ -132,6 +135,9 @@ LLVMTargetMachine::addPassesToEmitFile(FunctionPassManager &PM,
|
||||
if (addPreEmitPass(PM, Fast) && PrintMachineCode)
|
||||
PM.add(createMachineFunctionPrinterPass(cerr));
|
||||
|
||||
if (AlignLoops)
|
||||
PM.add(createLoopAlignerPass());
|
||||
|
||||
switch (FileType) {
|
||||
default:
|
||||
break;
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include "llvm/CodeGen/Passes.h"
|
||||
#include "llvm/Target/TargetLowering.h"
|
||||
#include "llvm/Target/TargetMachine.h"
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
#include "llvm/Support/Compiler.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
using namespace llvm;
|
||||
|
@ -164,13 +164,6 @@ bool X86TargetMachine::addPostRegAlloc(FunctionPassManager &PM, bool Fast) {
|
||||
return true; // -print-machineinstr should print after this.
|
||||
}
|
||||
|
||||
bool X86TargetMachine::addPreEmitPass(FunctionPassManager &PM, bool Fast) {
|
||||
if (Fast) return false;
|
||||
|
||||
PM.add(createLoopAlignerPass());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool X86TargetMachine::addAssemblyEmitter(FunctionPassManager &PM, bool Fast,
|
||||
std::ostream &Out) {
|
||||
PM.add(createX86CodePrinterPass(Out, *this));
|
||||
|
@ -63,7 +63,6 @@ public:
|
||||
// Set up the pass pipeline.
|
||||
virtual bool addInstSelector(FunctionPassManager &PM, bool Fast);
|
||||
virtual bool addPostRegAlloc(FunctionPassManager &PM, bool Fast);
|
||||
virtual bool addPreEmitPass(FunctionPassManager &PM, bool Fast);
|
||||
virtual bool addAssemblyEmitter(FunctionPassManager &PM, bool Fast,
|
||||
std::ostream &Out);
|
||||
virtual bool addCodeEmitter(FunctionPassManager &PM, bool Fast,
|
||||
|
Loading…
Reference in New Issue
Block a user