[PATCH] D56788: [DebugInfo][InstCombine] Prefer salvaging dbg.values over sinking them
Bjorn Pettersson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 14 01:31:55 PST 2019
bjope added inline comments.
================
Comment at: llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp:3122
+ Value *Undef = UndefValue::get(I->getType());
+ DII->setOperand(0, MetadataAsValue::get(DII->getContext(),
+ ValueAsMetadata::get(Undef)));
----------------
(post commit comment)
I see things like this in the IR after this:
call void @llvm.dbg.value(metadata %foo * undef, metadata !2292, metadata !DIExpression(DW_OP_plus_uconst, 3, DW_OP_stack_value)), !dbg !2760
It doesn't fill any purpose to have a complicated DIExpression when being based on an undef value afaict.
Maybe we should strip away the DIExpression right away here, or what do you think?
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56788/new/
https://reviews.llvm.org/D56788
More information about the llvm-commits
mailing list