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:
Matthias Braun
2016-10-28 18:05:05 +00:00
parent c4fbbcf9ed
commit 35a024fe0f

View File

@@ -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);