[llvm] [IR] Use persistent metadata IDs for pass snapshots (PR #216838)
Alexis Engelke via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 20 02:14:33 PDT 2026
https://github.com/aengelke commented:
I still dislike the configuration option. In addition to the complexity this adds to the code, I don't think it's a good idea to have two different modes of printing metadata numbers -- IMO, each MDNode should have *one* number, which is the number stored inside its header, and we should only ever print *that* number. This number should replace SlotTracker's own numbering logic (and also eliminate the ShouldInitializeAllMetadata parameter).
If we want a dense numbering at the end, we can have a separate function that renumbers before printing assembly output in our tools. (What would be the impact if we don't do this? How many tests would fail?)
https://github.com/llvm/llvm-project/pull/216838
More information about the llvm-commits
mailing list