[PATCH] D36695: IPRA: Run RegUsageInfoPropagate much later

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 14 09:46:53 PDT 2017


arsenm created this revision.
Herald added subscribers: tpr, wdng.

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.


https://reviews.llvm.org/D36695

Files:
  lib/CodeGen/TargetPassConfig.cpp


Index: lib/CodeGen/TargetPassConfig.cpp
===================================================================
--- lib/CodeGen/TargetPassConfig.cpp
+++ 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();
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D36695.111012.patch
Type: text/x-patch
Size: 672 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170814/6b41e64d/attachment.bin>


More information about the llvm-commits mailing list