[PATCH] D78398: [DebugInfo] Factor out SalvageDebugInfoForDbgValues() from InstCombine
Vedant Kumar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 7 11:55:29 PDT 2020
vsk added a comment.
I think this is in good shape.
================
Comment at: llvm/lib/Transforms/InstCombine/InstructionCombining.cpp:3442
+ // We update arguments of so that the instruction does not point into sunk
+ // instruction.
----------------
nit, 'arguments of' -> 'dbg.declare arguments'?
================
Comment at: llvm/lib/Transforms/InstCombine/InstructionCombining.cpp:3445
+ auto updateDbgDeclare = [&I](DbgVariableIntrinsic *DII) {
+ if (isa<DbgDeclareInst>(DII)) {
+ if (isa<CastInst>(I))
----------------
nit, (if I'm reading this correctly) it should be possible to remove a level of nesting by doing both isa checks in the first `if`
================
Comment at: llvm/lib/Transforms/InstCombine/InstructionCombining.cpp:3465
+ // here).
+ if (!(User->getParent() == SrcBlock) || updateDbgDeclare(User))
+ continue;
----------------
nit: !=
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78398/new/
https://reviews.llvm.org/D78398
More information about the llvm-commits
mailing list