[llvm] [AMDGPU][WIP] Optimize SGPR spills (PR #93668)
Christudasan Devadasan via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 3 01:44:07 PDT 2024
================
@@ -1406,6 +1406,12 @@ bool GCNPassConfig::addRegAssignAndRewriteOptimized() {
// since FastRegAlloc does the replacements itself.
addPass(createVirtRegRewriter(false));
+ // As by this point SGPR's RA is done introducing SGPR spills to stack frame
----------------
cdevadas wrote:
```suggestion
// As by this point SGPR's RA is done introducing SGPR spills to stack frame
// through SGPRAllocPass. So, invoking StackSlotColoring here, may allow these
// SGPR spills to re-use stack slots, before these spills is further lowered
// down via SILowerSGPRSpills(i.e. equivalent of PEI for SGPRs).
```
// At this point, the sgpr-regalloc has been done and it is good to have the stack
// slot coloring to try to optimize the SGPR spill stack indices before attempting
// the custom SGPR spill lowering.
https://github.com/llvm/llvm-project/pull/93668
More information about the llvm-commits
mailing list