aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/LLVMTargetMachine.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2010-04-07 00:41:17 +0000
committerEvan Cheng <evan.cheng@apple.com>2010-04-07 00:41:17 +0000
commitd94671a25e65918557a2c03c0fc12a60a5d138bf (patch)
tree485126a7ddce555f3d9411e575a505724e2c7943 /lib/CodeGen/LLVMTargetMachine.cpp
parent5f0940002ac4f0601bf53ae9688c2f49045331e2 (diff)
Post regalloc LICM. Work in progress.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100592 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LLVMTargetMachine.cpp')
-rw-r--r--lib/CodeGen/LLVMTargetMachine.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/CodeGen/LLVMTargetMachine.cpp b/lib/CodeGen/LLVMTargetMachine.cpp
index ed57f4cb10..ced6664c4a 100644
--- a/lib/CodeGen/LLVMTargetMachine.cpp
+++ b/lib/CodeGen/LLVMTargetMachine.cpp
@@ -66,6 +66,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> PostRAMachineLICM("postra-machine-licm", cl::Hidden,
+ cl::desc("Enable post-regalloc Machine LICM"));
+
static cl::opt<cl::boolOrDefault>
AsmVerbose("asm-verbose", cl::desc("Add comments to directives."),
cl::init(cl::BOU_UNSET));
@@ -343,6 +346,10 @@ bool LLVMTargetMachine::addCommonCodeGenPasses(PassManagerBase &PM,
// kill markers.
PM.add(createStackSlotColoringPass(false));
printAndVerify(PM, "After StackSlotColoring");
+
+ // Run post-ra machine LICM to hoist reloads / remats.
+ if (PostRAMachineLICM)
+ PM.add(createMachineLICMPass(false));
}
// Run post-ra passes.