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

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 25 10:43:36 PST 2018


aprantl added inline comments.


================
Comment at: lib/IR/Metadata.cpp:413
     }
-    if (getLocalFunction(From) && getLocalFunction(To) &&
         getLocalFunction(From) != getLocalFunction(To)) {
----------------
I would really like to understand the motivation behind this condition in the original code.


================
Comment at: lib/IR/Metadata.cpp:415
         getLocalFunction(From) != getLocalFunction(To)) {
       // Function changed.
       MD->replaceAllUsesWith(nullptr);
----------------
... and this comment and the next statement.


https://reviews.llvm.org/D42541





More information about the llvm-commits mailing list