mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
Provide a place for targets to insert ILP optimization passes.
Move the early if-conversion pass into this group. ILP optimizations usually need to find the right balance between register pressure and ILP using the MachineTraceMetrics analysis to identify critical paths and estimate other costs. Such passes should run together so they can share dominator tree and loop info analyses. Besides if-conversion, future passes to run here here could include expression height reduction and ARM's MLxExpansion pass. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172687 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -151,6 +151,7 @@ public:
|
||||
}
|
||||
|
||||
virtual bool addInstSelector();
|
||||
virtual bool addILPOpts();
|
||||
virtual bool addPreRegAlloc();
|
||||
virtual bool addPostRegAlloc();
|
||||
virtual bool addPreEmitPass();
|
||||
@@ -158,12 +159,7 @@ public:
|
||||
} // namespace
|
||||
|
||||
TargetPassConfig *X86TargetMachine::createPassConfig(PassManagerBase &PM) {
|
||||
X86PassConfig *PC = new X86PassConfig(this, PM);
|
||||
|
||||
if (X86EarlyIfConv && Subtarget.hasCMov())
|
||||
PC->enablePass(&EarlyIfConverterID);
|
||||
|
||||
return PC;
|
||||
return new X86PassConfig(this, PM);
|
||||
}
|
||||
|
||||
bool X86PassConfig::addInstSelector() {
|
||||
@@ -181,6 +177,14 @@ bool X86PassConfig::addInstSelector() {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool X86PassConfig::addILPOpts() {
|
||||
if (X86EarlyIfConv && getX86Subtarget().hasCMov()) {
|
||||
addPass(&EarlyIfConverterID);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool X86PassConfig::addPreRegAlloc() {
|
||||
return false; // -print-machineinstr shouldn't print after this.
|
||||
}
|
||||
|
Reference in New Issue
Block a user