[PATCH] D87494: [WIP] Improve LSR debug-info
Markus Lavin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 10 23:12:37 PDT 2020
markus added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:5878
+
+ NewPHIs = set_difference(NewPHIs, OldPHIs);
+
----------------
There must be a better way to get hold of these. I would assume that LSR itself keeps track of the phi-node instructions it builds
================
Comment at: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:5884
+ MaybeDead.insert(&PN);
+ if (collectCyclicDead(PN.getIncomingValueForBlock(L->getHeader()), &PN,
+ MaybeDead)) {
----------------
There must be a better way to do this. Perhaps we can modify `DeleteDeadPHIs` to accept an additional `std::function` argument that replaces the `salvageDebugInfo` call. It would still default to `salvageDebugInfo` but would allow us to pass a lambda here that does the SCEV comparison (and possible replace) on the dbg-uses right before an instruction is about to be removed.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87494/new/
https://reviews.llvm.org/D87494
More information about the llvm-commits
mailing list