[llvm] Globalopt pass produces invalid debug info (PR #100654)
Stephen Tozer via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 5 09:14:32 PDT 2024
================
@@ -1338,6 +1338,7 @@ deleteIfDead(GlobalValue &GV,
if (DeleteFnCallback)
DeleteFnCallback(*F);
}
+ ReplaceableMetadataImpl::SalvageDebugInfo(GV);
----------------
SLTozer wrote:
It might be more appropriate to put this into `removeDeadConstantUsers` then, after the loop - I think we'd want to perform the salvage step for any constant that dies with debug users regardless of the pass that does it. However, that might end up affecting other tests; if so it can easily be left for another patch.
https://github.com/llvm/llvm-project/pull/100654
More information about the llvm-commits
mailing list