[PATCH] D27471: [BDCE/DebugInfo] Preserve llvm.dbg.value's argument
Davide Italiano via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 6 13:09:14 PST 2016
davide added inline comments.
================
Comment at: lib/Transforms/Scalar/BDCE.cpp:45
+ if (I.mayHaveSideEffects() && !I.hasNUsesOrMore(1))
+ continue;
+
----------------
efriedma wrote:
> davide wrote:
> > aprantl wrote:
> > > It looks like this alters the behavior of the optimization beyond debug info. It would be great if someone else could sign off on this change.
> > I discussed this with David M. and he was OK with this solution. I'm still a little nervous this may break optimizations, so I'll be more confident to get this in if Hal signs it off.
> I don't think this alters visible behavior without debug info: if the instruction has no uses, RAUW is a no-op, and if mayHaveSideEffects() is true, isInstructionDead() is false. So this looks fine, I think.
Thanks for your review, Eli!
https://reviews.llvm.org/D27471
More information about the llvm-commits
mailing list