[PATCH] D30919: Salvage debug info from instructions about to be deleted
Adrian Prantl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 14 09:54:10 PDT 2017
aprantl added a comment.
Working on an updated version now...
================
Comment at: lib/Transforms/Utils/Local.cpp:1366-1375
+ if (auto *BitCast = dyn_cast<BitCastInst>(&I)) {
+ // Bitcasts are entirely irrelevant for debug info. Rewrite the dbg.value to
+ // use the cast's source.
+ findDbgValues(DbgValues, &I);
+ for (auto *DVI : DbgValues) {
+ DVI->setOperand(0, MDWrap(I.getOperand(0)));
+ DEBUG(dbgs() << "SALVAGE: " << *DVI << '\n');
----------------
majnemer wrote:
> Any idea on the perf impact of this change?
I made a fairly unscientific test by compiling running time ninja llc (building a stage2 llc Release+Assert using a Release+Assert compiler) on my iMac and the time difference between with and without this patch is well within the noise.
I also captured the resulting .dSYM bundles and ran dwarfdump | grep -c AT_location on it and it showed a 20% increase of variables with a location (993456/827467).
https://reviews.llvm.org/D30919
More information about the llvm-commits
mailing list