diff options
author | Evan Cheng <evan.cheng@apple.com> | 2010-03-03 01:38:35 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2010-03-03 01:38:35 +0000 |
commit | 68dabc70589c592afac5037cabb73408631a5910 (patch) | |
tree | d05c75e42ab19216ef45aae1b893b4b3f3b94583 /llvm/lib/CodeGen/LLVMTargetMachine.cpp | |
parent | 8f31e355ca7540f2e0431454bd9776b5a9c2a532 (diff) | |
download | bcm5719-llvm-68dabc70589c592afac5037cabb73408631a5910.tar.gz bcm5719-llvm-68dabc70589c592afac5037cabb73408631a5910.zip |
Add an option to enable machine cse (it's not doing anything yet.
llvm-svn: 97627
Diffstat (limited to 'llvm/lib/CodeGen/LLVMTargetMachine.cpp')
-rw-r--r-- | llvm/lib/CodeGen/LLVMTargetMachine.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/LLVMTargetMachine.cpp b/llvm/lib/CodeGen/LLVMTargetMachine.cpp index 57930b79323..fd442db27a2 100644 --- a/llvm/lib/CodeGen/LLVMTargetMachine.cpp +++ b/llvm/lib/CodeGen/LLVMTargetMachine.cpp @@ -67,6 +67,9 @@ static cl::opt<bool> VerifyMachineCode("verify-machineinstrs", cl::Hidden, cl::desc("Verify generated machine code"), 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> AsmVerbose("asm-verbose", cl::desc("Add comments to directives."), cl::init(cl::BOU_UNSET)); @@ -317,6 +320,8 @@ bool LLVMTargetMachine::addCommonCodeGenPasses(PassManagerBase &PM, if (OptLevel != CodeGenOpt::None) { PM.add(createOptimizeExtsPass()); + if (EnableMachineCSE) + PM.add(createMachineCSEPass()); if (!DisableMachineLICM) PM.add(createMachineLICMPass()); if (!DisableMachineSink) |