[llvm] [DebugInfo][RemoveDIs] Maintain DPValues on skipped instrs in CGP (PR #74602)
Orlando Cazalet-Hyams via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 6 08:29:29 PST 2023
================
@@ -6986,6 +6987,11 @@ bool CodeGenPrepare::optimizeSelectInst(SelectInst *SI) {
// Increment the current iterator to skip all the rest of select instructions
// because they will be either "not lowered" or "all lowered" to branch.
CurInstIterator = std::next(LastSI->getIterator());
+ // Examine any debug-info attached to those instructions, which won't be seen
+ // elsewhere. But only do it once we return and have potentially rewritten
+ // valeus.
+ for (SelectInst *SI : ArrayRef(ASI).drop_front())
----------------
OCHyams wrote:
SGTM
> But only do it once we return and have potentially rewritten valeus.
nit: typo, and also I am not 100% sure what "once we return" means in this context - is there any way to rewrite this slightly?
https://github.com/llvm/llvm-project/pull/74602
More information about the llvm-commits
mailing list