[PATCH] D42541: [DeadArgumentElimination] Preserve llvm.dbg.values's first argument

Djordje Todorovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 25 10:54:53 PST 2018


djtodoro added a comment.

I agree with you, that is the reason I started conversation. I saw how it was done in https://reviews.llvm.org/D27471 (where the problem in general is different but it has similarity with this one) and I have made similar solution.

In general, RAUW replaces all uses of 'this' with 'MD'. But, in handleRAUW() (Metadata.cpp:384) when it is detected that Function is changed it replaces all uses with nullptr. That is the piece of LLVM source code where in optimized code we lose debug loc about those arguments.


https://reviews.llvm.org/D42541





More information about the llvm-commits mailing list