Add an option to enable machine cse (it's not doing anything yet.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97627 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng 2010-03-03 01:38:35 +00:00
parent 9066f4c6fc
commit d89347cb49

View File

@ -67,6 +67,9 @@ static cl::opt<bool> VerifyMachineCode("verify-machineinstrs", cl::Hidden,
cl::desc("Verify generated machine code"), cl::desc("Verify generated machine code"),
cl::init(getenv("LLVM_VERIFY_MACHINEINSTRS")!=NULL)); cl::init(getenv("LLVM_VERIFY_MACHINEINSTRS")!=NULL));
static cl::opt<bool> EnableMachineCSE("machine-cse", cl::Hidden,
cl::desc("Enable Machine CSE"));
static cl::opt<cl::boolOrDefault> static cl::opt<cl::boolOrDefault>
AsmVerbose("asm-verbose", cl::desc("Add comments to directives."), AsmVerbose("asm-verbose", cl::desc("Add comments to directives."),
cl::init(cl::BOU_UNSET)); cl::init(cl::BOU_UNSET));
@ -317,6 +320,8 @@ bool LLVMTargetMachine::addCommonCodeGenPasses(PassManagerBase &PM,
if (OptLevel != CodeGenOpt::None) { if (OptLevel != CodeGenOpt::None) {
PM.add(createOptimizeExtsPass()); PM.add(createOptimizeExtsPass());
if (EnableMachineCSE)
PM.add(createMachineCSEPass());
if (!DisableMachineLICM) if (!DisableMachineLICM)
PM.add(createMachineLICMPass()); PM.add(createMachineLICMPass());
if (!DisableMachineSink) if (!DisableMachineSink)