]> granicus.if.org Git - llvm/commitdiff
IPRA: Run RegUsageInfoPropagate much later
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Mon, 14 Aug 2017 19:54:45 +0000 (19:54 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Mon, 14 Aug 2017 19:54:45 +0000 (19:54 +0000)
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310875 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/TargetPassConfig.cpp

index de0d2264de229cb9a76e7438828b4e2453102a5f..75a565e898f4f53eb5ba85a3a0e46af45bdf5ebd 100644 (file)
@@ -779,9 +779,6 @@ 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);
 
@@ -794,6 +791,9 @@ void TargetPassConfig::addMachinePasses() {
     addPass(&LocalStackSlotAllocationID, false);
   }
 
+  if (TM->Options.EnableIPRA)
+    addPass(createRegUsageInfoPropPass());
+
   // Run pre-ra passes.
   addPreRegAlloc();