[llvm] [RegAlloc] Account for use availability when applying rematerializable weight discount (PR #159180)
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 17 08:57:28 PDT 2025
preames wrote:
I think there's a simpler alternative here which should be considered. Instead of attempting to extend the reasoning to handle live intervals, we should simply update the code to explicitly bail out for any vreg uses. This is non-functional with the current code structure, and would keep this code path performing the same heuristic when combined with your second change.
I'm open to being convinced that the complexity of actually checking liveness is needed, but I think that needs explicitly justified. I believe weights aren't recalculated, so there's some complexity/staleness risk as we run through the allocation queue. I don't actually think this is wrong, but if we don't *have to* have the complexity, I'd rather not.
https://github.com/llvm/llvm-project/pull/159180
More information about the llvm-commits
mailing list