IPRA: Run RegUsageInfoPropagate much later
This was running immediately after isel, before
isel pseudos were even expanded which is really
unreasonable. Move this to before pre-reglloc
passes in case some other pre-regalloc pass wants to
use the updated regmask info.
Fixes one of the reasons IPRA doesn't do anything on
AMDGPU currently. Tests will be included with future
patch after a few more are fixed.
llvm-svn: 310875
diff --git a/llvm/lib/CodeGen/TargetPassConfig.cpp b/llvm/lib/CodeGen/TargetPassConfig.cpp
index de0d226..75a565e 100644
--- a/llvm/lib/CodeGen/TargetPassConfig.cpp
+++ b/llvm/lib/CodeGen/TargetPassConfig.cpp
@@ -779,9 +779,6 @@
// Print the instruction selected machine code...
printAndVerify("After Instruction Selection");
- if (TM->Options.EnableIPRA)
- addPass(createRegUsageInfoPropPass());
-
// Expand pseudo-instructions emitted by ISel.
addPass(&ExpandISelPseudosID);
@@ -794,6 +791,9 @@
addPass(&LocalStackSlotAllocationID, false);
}
+ if (TM->Options.EnableIPRA)
+ addPass(createRegUsageInfoPropPass());
+
// Run pre-ra passes.
addPreRegAlloc();