[PATCH] D56788: [DebugInfo][InstCombine] Prefer salvaging dbg.values over sinking them
Adrian Prantl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 12 10:05:14 PST 2019
aprantl accepted this revision.
aprantl added inline comments.
This revision is now accepted and ready to land.
================
Comment at: lib/Transforms/InstCombine/InstructionCombining.cpp:3110
if (DII->getParent() == SrcBlock) {
- DII->moveBefore(&*InsertPos);
- LLVM_DEBUG(dbgs() << "SINK: " << *DII << '\n');
+ // dbg.value is local to sunk inst, see if we can salvage it. Clone a new
+ // copy of the instruction: on success we need both salvaged and
----------------
"is local to" -> is in the same basic block ?
================
Comment at: lib/Transforms/InstCombine/InstructionCombining.cpp:3123
+ DII->setOperand(0, MetadataAsValue::get(DII->getContext(),
+ ValueAsMetadata::get(Undef)));
+ } else {
----------------
Should we add a `replaceWithUndef` method to DebugInfoIntrinsicInst?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56788/new/
https://reviews.llvm.org/D56788
More information about the llvm-commits
mailing list