[llvm] [LiveDebugVariables] Stop holding SlotIndexes for erased instructions (PR #224467)
Petar Jovanovic via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 27 18:10:17 PDT 2026
petar-jovanovic wrote:
> This overall looks good -- I've got a few questions though. `SlotIndexes::canonicalizeIndex` always produces a `Slot_Register` slot, however I believe LiveDebugVariables produces at least one EarlyClobber slot index, does this need to be considered?
Thank you for the review! The EC indexes I found are all [<n>B;<n>e) from addDef() at block starts, never as an interval start, across 425 AMDGPU functions. Those are not stale so they pass through untouched, and once an index is stale its slot points at an instruction that is gone, so there is nothing to preserve. Register on output is deliberate though: a collapsed interval uses Start.getNextSlot() and needs it on the same entry, Register gives Dead, whereas Dead would step to the next entry, which might be stale itself.
> If you have access to llvm-compile-time-tracker.com, it's best to give this a test there to check performance. x86 doesn't use LiveDebugVariables any more though, I thiiiinnkk aarch64 does though.
I do not have access to llvm-compile-time-tracker.com, but we can ask @nikic to try it out.
> I'll be back on Monday, but wanted to get this partial review out.
Thanks! It is very much appreciated!
https://github.com/llvm/llvm-project/pull/224467
More information about the llvm-commits
mailing list