[llvm] [DebugInfo] Make DIArgList inherit from Metadata and always unique (PR #72147)
Stephen Tozer via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 17 03:49:29 PST 2023
SLTozer wrote:
> Urgh -- an extra dbg.value from an underlying metadata change shows something is majorly wrong. Although I'd hazard a guess that it isn't this patch, it's something else being exercised. (I'll dig into it).
There is a practical reason to expect a metadata change - prior to this patch, we have the possibility that a DIArgList will be made distinct, and so an equivalent DIArgList that has been properly uniqued will exist at a different address. Since we generally assume DIArgLists are uniqued (as with ValueAsMetadata), all the checks for equality are tests for pointer equality. This change ensures that DIArgLists are actually always uniqued, so value equality will always mean pointer equality, so we may see situations where we correctly identify two locations as being equal when previously we wouldn't. There are probably passes where this results in a debug info change - albeit very rarely, since the distinct case seems to have been quite rare to begin with.
https://github.com/llvm/llvm-project/pull/72147
More information about the llvm-commits
mailing list