[llvm-commits] [llvm] r97627 - /llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp
Evan Cheng
evan.cheng at apple.com
Tue Mar 2 17:38:36 PST 2010
Author: evancheng
Date: Tue Mar 2 19:38:35 2010
New Revision: 97627
URL: http://llvm.org/viewvc/llvm-project?rev=97627&view=rev
Log:
Add an option to enable machine cse (it's not doing anything yet.
Modified:
llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp
Modified: llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp?rev=97627&r1=97626&r2=97627&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp (original)
+++ llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp Tue Mar 2 19:38:35 2010
@@ -67,6 +67,9 @@
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 @@
if (OptLevel != CodeGenOpt::None) {
PM.add(createOptimizeExtsPass());
+ if (EnableMachineCSE)
+ PM.add(createMachineCSEPass());
if (!DisableMachineLICM)
PM.add(createMachineLICMPass());
if (!DisableMachineSink)
More information about the llvm-commits
mailing list