diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2025-02-26 15:34:47 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-02-26 15:34:47 +0700 |
commit | 1a114fa302b48fc761a58a8d3be5962d92fa581b (patch) | |
tree | 7ffaae3824a09adaa0a998200886274b55113e5a /llvm/lib/CodeGen/RegAllocBasic.cpp | |
parent | e160c35c9ec69c099daeffdbca3cf4c94d3e05b9 (diff) | |
download | llvm-1a114fa302b48fc761a58a8d3be5962d92fa581b.zip llvm-1a114fa302b48fc761a58a8d3be5962d92fa581b.tar.gz llvm-1a114fa302b48fc761a58a8d3be5962d92fa581b.tar.bz2 |
RegAlloc: Use new approach to handling failed allocations (#128469)
This fixes an assert after allocation failure.
Rather than collecting failed virtual registers and hacking
on the uses after the fact, directly hack on the uses and rewrite
the registers to the dummy assignment immediately.
Previously we were bypassing LiveRegMatrix and directly assigning
in the VirtRegMap. This resulted in inconsistencies where illegal
overlapping assignments were missing. Rather than try to hack in
some system to manage these in LiveRegMatrix (i.e. hacking around
cases with invalid iterators), avoid this by directly using the
physreg. This should also allow removal of special casing in
virtregrewriter for failed allocations.
Diffstat (limited to 'llvm/lib/CodeGen/RegAllocBasic.cpp')
-rw-r--r-- | llvm/lib/CodeGen/RegAllocBasic.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/RegAllocBasic.cpp b/llvm/lib/CodeGen/RegAllocBasic.cpp index d240bf9..51e047b 100644 --- a/llvm/lib/CodeGen/RegAllocBasic.cpp +++ b/llvm/lib/CodeGen/RegAllocBasic.cpp @@ -329,7 +329,6 @@ bool RABasic::runOnMachineFunction(MachineFunction &mf) { allocatePhysRegs(); postOptimization(); - cleanupFailedVRegs(); // Diagnostic output before rewriting LLVM_DEBUG(dbgs() << "Post alloc VirtRegMap:\n" << *VRM << "\n"); |