[PATCH] D42566: [InstCombine] Preserve debug values for eliminable casts
Adrian Prantl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 26 09:14:51 PST 2018
aprantl requested changes to this revision.
aprantl added a comment.
This revision now requires changes to proceed.
Could you achieve a reasonably similar effect with less code by invoking salvageDebugInfo() when the cast is actually eliminated?
================
Comment at: lib/Transforms/InstCombine/InstCombineCasts.cpp:280
+ Res, DII->getVariable(), DII->getExpression(),
+ DII->getDebugLoc().get(), &*std::next(CI.getIterator()));
+ }
----------------
The insertion point should be directly before or after DII. The position of the dbg.value intrinsic is significant as it determines when the variable will be visible in the debugger.
https://reviews.llvm.org/D42566
More information about the llvm-commits
mailing list