From 6ea5949a93840eb1ae127e60b1423178c05878d4 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Wed, 7 Apr 2010 00:41:17 +0000 Subject: Post regalloc LICM. Work in progress. llvm-svn: 100592 --- llvm/lib/CodeGen/LLVMTargetMachine.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'llvm/lib/CodeGen/LLVMTargetMachine.cpp') diff --git a/llvm/lib/CodeGen/LLVMTargetMachine.cpp b/llvm/lib/CodeGen/LLVMTargetMachine.cpp index ed57f4cb101..ced6664c4a3 100644 --- a/llvm/lib/CodeGen/LLVMTargetMachine.cpp +++ b/llvm/lib/CodeGen/LLVMTargetMachine.cpp @@ -66,6 +66,9 @@ static cl::opt VerifyMachineCode("verify-machineinstrs", cl::Hidden, cl::desc("Verify generated machine code"), cl::init(getenv("LLVM_VERIFY_MACHINEINSTRS")!=NULL)); +static cl::opt PostRAMachineLICM("postra-machine-licm", cl::Hidden, + cl::desc("Enable post-regalloc Machine LICM")); + static cl::opt 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. -- cgit v1.2.3