[llvm] [DirectX] Fixes for generation of DISubprogram (PR #194418)
Harald van Dijk via llvm-commits
llvm-commits at lists.llvm.org
Wed May 6 09:19:01 PDT 2026
================
@@ -20,5 +22,29 @@ DXILDebugInfoMap DXILDebugInfoPass::run(Module &M) {
DebugInfoFinder DIF;
DIF.processModule(M);
+ std::multimap<const DICompileUnit *, const Metadata *> CUSubprograms;
----------------
hvdijk wrote:
We need the order of the values to be preserved to avoid unstable IR generation (where the same compilation done multiple times produces different results, if the addresses of metadata changes across the compilations), but we should be able to achieve that by just doing a stable sort that only compares the keys (or, after your suggestion, the pair's first value). Personally, I don't think it would have much of an effect on simplicity/readability, neither positive nor negative, but that holds both ways, that also means I don't mind making that change. Plus I think you're probably right about efficiency. Will do, thanks.
https://github.com/llvm/llvm-project/pull/194418
More information about the llvm-commits
mailing list