summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/LLVMTargetMachine.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2008-01-04 08:11:03 +0000
committerBill Wendling <isanbard@gmail.com>2008-01-04 08:11:03 +0000
commit66470d02c3baee7d6e0dd849cd550fc8372f21db (patch)
treedaacd95a96af0473708593715d9e299b1269869e /llvm/lib/CodeGen/LLVMTargetMachine.cpp
parentd86569701631e2892af018c96bd06f68fe756341 (diff)
downloadbcm5719-llvm-66470d02c3baee7d6e0dd849cd550fc8372f21db.tar.gz
bcm5719-llvm-66470d02c3baee7d6e0dd849cd550fc8372f21db.zip
Move option to enable machine LICM into LLVMTargetMachine.cpp.
llvm-svn: 45572
Diffstat (limited to 'llvm/lib/CodeGen/LLVMTargetMachine.cpp')
-rw-r--r--llvm/lib/CodeGen/LLVMTargetMachine.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/LLVMTargetMachine.cpp b/llvm/lib/CodeGen/LLVMTargetMachine.cpp
index 6a8e775e6b2..15c1d67f3fc 100644
--- a/llvm/lib/CodeGen/LLVMTargetMachine.cpp
+++ b/llvm/lib/CodeGen/LLVMTargetMachine.cpp
@@ -33,7 +33,10 @@ static cl::opt<bool> PrintEmittedAsm("print-emitted-asm", cl::Hidden,
static cl::opt<bool>
EnableSinking("enable-sinking", cl::init(false), cl::Hidden,
cl::desc("Perform sinking on machine code"));
-
+static cl::opt<bool>
+PerformLICM("machine-licm",
+ cl::init(false), cl::Hidden,
+ cl::desc("Perform loop-invariant code motion on machine code"));
FileModel::Model
LLVMTargetMachine::addPassesToEmitFile(FunctionPassManager &PM,
@@ -73,7 +76,8 @@ LLVMTargetMachine::addPassesToEmitFile(FunctionPassManager &PM,
if (PrintMachineCode)
PM.add(createMachineFunctionPrinterPass(cerr));
- PM.add(createMachineLICMPass());
+ if (PerformLICM)
+ PM.add(createMachineLICMPass());
if (EnableSinking)
PM.add(createMachineSinkingPass());
@@ -187,7 +191,8 @@ bool LLVMTargetMachine::addPassesToEmitMachineCode(FunctionPassManager &PM,
if (PrintMachineCode)
PM.add(createMachineFunctionPrinterPass(cerr));
- PM.add(createMachineLICMPass());
+ if (PerformLICM)
+ PM.add(createMachineLICMPass());
// Perform register allocation to convert to a concrete x86 representation
PM.add(createRegisterAllocator());
OpenPOWER on IntegriCloud