TargetPassConfig: Move addPass of IPRA RegUsageInfoProp down.
TargetPassConfig::addMachinePasses() does some housekeeping first: Handling the -print-machineinstrs flag and doing an initial printing "After Instruction Selection". There is no reason for RegUsageInfoProp to run before those two steps. llvm-svn: 285422
This commit is contained in:
@@ -570,9 +570,6 @@ void TargetPassConfig::addISelPrepare() {
|
||||
void TargetPassConfig::addMachinePasses() {
|
||||
AddingMachinePasses = true;
|
||||
|
||||
if (TM->Options.EnableIPRA)
|
||||
addPass(createRegUsageInfoPropPass());
|
||||
|
||||
// Insert a machine instr printer pass after the specified pass.
|
||||
if (!StringRef(PrintMachineInstrs.getValue()).equals("") &&
|
||||
!StringRef(PrintMachineInstrs.getValue()).equals("option-unspecified")) {
|
||||
@@ -588,6 +585,9 @@ void TargetPassConfig::addMachinePasses() {
|
||||
// Print the instruction selected machine code...
|
||||
printAndVerify("After Instruction Selection");
|
||||
|
||||
if (TM->Options.EnableIPRA)
|
||||
addPass(createRegUsageInfoPropPass());
|
||||
|
||||
// Expand pseudo-instructions emitted by ISel.
|
||||
addPass(&ExpandISelPseudosID);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user