[PATCH] D69809: Wrong debug info generated at -O2 (-O0 is correct)
Davide Italiano via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 4 10:18:55 PST 2019
davide requested changes to this revision.
davide added inline comments.
This revision now requires changes to proceed.
================
Comment at: llvm/lib/Transforms/InstCombine/InstructionCombining.cpp:3215-3223
+ SmallVector<DbgVariableIntrinsic *, 1> DbgUsers;
+ findDbgUsers(DbgUsers, I);
+ if (!DbgUsers.empty()) {
+ for (auto *DII : DbgUsers) {
+ Value *Undef = UndefValue::get(I->getType());
+ DII->setOperand(0, MetadataAsValue::get(DII->getContext(),
+ ValueAsMetadata::get(Undef)));
----------------
I think there should be an utility to do this. Did you check what other callers of `isInstructionTriviallyDead` do? e.g. `EarlyCSE` ?
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69809/new/
https://reviews.llvm.org/D69809
More information about the llvm-commits
mailing list