[llvm] r285422 - TargetPassConfig: Move addPass of IPRA RegUsageInfoProp down.
Matthias Braun via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 28 11:05:05 PDT 2016
Author: matze
Date: Fri Oct 28 13:05:05 2016
New Revision: 285422
URL: http://llvm.org/viewvc/llvm-project?rev=285422&view=rev
Log:
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.
Modified:
llvm/trunk/lib/CodeGen/TargetPassConfig.cpp
Modified: llvm/trunk/lib/CodeGen/TargetPassConfig.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/TargetPassConfig.cpp?rev=285422&r1=285421&r2=285422&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/TargetPassConfig.cpp (original)
+++ llvm/trunk/lib/CodeGen/TargetPassConfig.cpp Fri Oct 28 13:05:05 2016
@@ -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);
More information about the llvm-commits
mailing list