mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-02 09:33:59 +00:00
Move option to enable machine LICM into LLVMTargetMachine.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45572 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b082c6f5d9
commit
cc8f603f53
@ -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());
|
||||
|
@ -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 @@ FunctionPass *llvm::createMachineLICMPass() { return new MachineLICM(); }
|
||||
/// loop.
|
||||
///
|
||||
bool MachineLICM::runOnMachineFunction(MachineFunction &MF) {
|
||||
if (!PerformLICM) return false; // For debugging.
|
||||
|
||||
DOUT << "******** Machine LICM ********\n";
|
||||
|
||||
Changed = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user