[all-commits] [llvm/llvm-project] 5c4639: RegAlloc: Fix verifier error after failed allocation
Matt Arsenault via All-commits
all-commits at lists.llvm.org
Thu Dec 12 02:47:20 PST 2024
Branch: refs/heads/users/arsenm/regalloc-fix-verifier-error-after-fail
Home: https://github.com/llvm/llvm-project
Commit: 5c46398f907ca23c93a06d59c99863697271f3c4
https://github.com/llvm/llvm-project/commit/5c46398f907ca23c93a06d59c99863697271f3c4
Author: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: 2024-12-12 (Thu, 12 Dec 2024)
Changed paths:
M llvm/lib/CodeGen/RegAllocBase.cpp
M llvm/lib/CodeGen/RegAllocBase.h
M llvm/lib/CodeGen/RegAllocBasic.cpp
M llvm/lib/CodeGen/RegAllocGreedy.cpp
M llvm/test/CodeGen/AMDGPU/illegal-eviction-assert.mir
M llvm/test/CodeGen/AMDGPU/issue48473.mir
M llvm/test/CodeGen/AMDGPU/regalloc-failure-overlapping-insert-assert.mir
A llvm/test/CodeGen/AMDGPU/register-killed-error-after-alloc-failure0.mir
A llvm/test/CodeGen/AMDGPU/register-killed-error-after-alloc-failure1.ll
M llvm/test/CodeGen/AMDGPU/remaining-virtual-register-operands.ll
Log Message:
-----------
RegAlloc: Fix verifier error after failed allocation
In some cases after reporting an allocation failure, this would fail
the verifier. It picks the first allocatable register and assigns it,
but didn't update the liveness appropriately. When VirtRegRewriter
relied on the liveness to set kill flags, it would incorrectly add
kill flags if there was another overlapping kill of the virtual
register.
We can't properly assign the register to an overlapping range, so
break the liveness of the failing register (and any other interfering
registers) instead. Give the virtual register dummy liveness by
effectively deleting all the uses by setting them to undef.
The edge case not tested here which I'm worried about is if the read
of the register is a def of a subregister. I've been unable to come up
with a test where this occurs.
https://reviews.llvm.org/D122616
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list