[PATCH] D99169: [DebugInfo] Replace debug uses in replaceUsesOutsideBlock
Orlando Cazalet-Hyams via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 6 06:20:57 PDT 2021
Orlando added a comment.
In D99169#2670983 <https://reviews.llvm.org/D99169#2670983>, @djtodoro wrote:
> Thanks for this! The results are amazing.
Thanks for taking a look. And thanks to @jmorse for pointing out this bug to me offline!
================
Comment at: llvm/lib/IR/Value.cpp:547-553
+ // Replace dbg.* uses of MetadataAsValue(ValueAsMetadata(this)) outside BB.
+ SmallVector<DbgVariableIntrinsic *> DbgUsers;
+ findDbgUsers(DbgUsers, this);
+ for (auto *DVI : DbgUsers) {
+ if (DVI->getParent() != BB)
+ DVI->replaceVariableLocationOp(this, New);
+ }
----------------
djtodoro wrote:
> Can we factor out this into a separate predicate?
Just to check I understand - your suggestion is to change `replaceUsesWithIf` to accept a new additional predicate which handles these debug uses?
================
Comment at: llvm/test/DebugInfo/Generic/instcombine-replaced-select-with-operand.ll:108-111
+!36 = !{!37, !37, i64 0}
+!37 = !{!"any pointer", !38, i64 0}
+!38 = !{!"omnipotent char", !39, i64 0}
+!39 = !{!"Simple C++ TBAA"}
----------------
djtodoro wrote:
> I guess we don't need tbaa
Probably not, I'll remove it in the next update.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99169/new/
https://reviews.llvm.org/D99169
More information about the llvm-commits
mailing list