Author: void Date: Fri Jan 4 02:11:03 2008 New Revision: 45572 URL: http://llvm.org/viewvc/llvm-project?rev=45572&view=rev Log: Move option to enable machine LICM into LLVMTargetMachine.cpp.
Modified: llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp llvm/trunk/lib/CodeGen/MachineLICM.cpp Modified: llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp?rev=45572&r1=45571&r2=45572&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp (original) +++ llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp Fri Jan 4 02:11:03 2008 @@ -33,7 +33,10 @@ 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 @@ if (PrintMachineCode) PM.add(createMachineFunctionPrinterPass(cerr)); - PM.add(createMachineLICMPass()); + if (PerformLICM) + PM.add(createMachineLICMPass()); if (EnableSinking) PM.add(createMachineSinkingPass()); @@ -187,7 +191,8 @@ 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()); Modified: llvm/trunk/lib/CodeGen/MachineLICM.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineLICM.cpp?rev=45572&r1=45571&r2=45572&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/MachineLICM.cpp (original) +++ llvm/trunk/lib/CodeGen/MachineLICM.cpp Fri Jan 4 02:11:03 2008 @@ -28,14 +28,6 @@ using namespace llvm; -namespace { - // Hidden options to help debugging - cl::opt<bool> - PerformLICM("machine-licm", - cl::init(false), cl::Hidden, - cl::desc("Perform loop-invariant code motion on machine code")); -} - STATISTIC(NumHoisted, "Number of machine instructions hoisted out of loops"); namespace { @@ -167,8 +159,6 @@ /// loop. /// bool MachineLICM::runOnMachineFunction(MachineFunction &MF) { - if (!PerformLICM) return false; // For debugging. - DOUT << "******** Machine LICM ********\n"; Changed = false; _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits