[llvm] [RegAlloc] Add register allocation anti-hints infrastructure (PR #218071)

Lukas Sommer via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 1 23:01:36 PDT 2026


https://github.com/sommerlukas commented:

Implementation looks good to me, but there might be an issue with how much of the order that was reshuffled based on anti-hints is actually iterated by register allocators, see here: 
https://github.com/llvm/llvm-project/blob/945e3e825b3ee88a8c1fed0da2dc88d6b2114e37/llvm/lib/CodeGen/RegAllocGreedy.cpp#L684-L690

If `getLastCostChange` isn't updated after anti-hints (which I don't think it is), we might not iterate all registers that meet the cost criteria after reshuffling based on anti-hints.

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


More information about the llvm-commits mailing list