[llvm] Reapply "RegAlloc: Fix verifier error after failed allocation (#119690)" (PR #128400)

Shilei Tian via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 29 08:06:45 PDT 2025


shiltian wrote:

The PR might break the assumption that live intervals remain unchanged during allocation. In `RAGreedy`, the `InterferenceCache` contains pointers to `LiveRange` that could be freed if allocation fails during `cleanupFailedVReg`. This creates dangling pointers in the `InterferenceCache`, potentially causing crashes.

I'm trying to figure out how to notify the `InterferenceCache` in an overridden version of `cleanupFailedVReg`, but the current API doesn't seem to provide an easy mechanism for this.

https://github.com/llvm/llvm-project/pull/128400


More information about the llvm-commits mailing list