From e160c35c9ec69c099daeffdbca3cf4c94d3e05b9 Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Wed, 26 Feb 2025 15:31:48 +0700 Subject: Reapply "RegAlloc: Fix verifier error after failed allocation (#119690)" (#128400) Reapply "RegAlloc: Fix verifier error after failed allocation (#119690)" This reverts commit 0c50054820799578be8f62b6fd2cc3fbc751c01e. Reapply with more fixes to avoid expensive_checks failures. Make sure to call splitSeparateComponents after shrinkToUses, and update the VirtRegMap with the split registers. Also set undef on all physical register aliases to the assigned register. Move physreg handling. Not sure if necessary Remove intervals from regunits. Not sure if necessary --- llvm/lib/CodeGen/RegAllocBasic.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'llvm/lib/CodeGen/RegAllocBasic.cpp') diff --git a/llvm/lib/CodeGen/RegAllocBasic.cpp b/llvm/lib/CodeGen/RegAllocBasic.cpp index 51e047b2fa3f..d240bf916ac0 100644 --- a/llvm/lib/CodeGen/RegAllocBasic.cpp +++ b/llvm/lib/CodeGen/RegAllocBasic.cpp @@ -329,6 +329,7 @@ bool RABasic::runOnMachineFunction(MachineFunction &mf) { allocatePhysRegs(); postOptimization(); + cleanupFailedVRegs(); // Diagnostic output before rewriting LLVM_DEBUG(dbgs() << "Post alloc VirtRegMap:\n" << *VRM << "\n"); -- cgit v1.2.3