[PATCH] D34874: [ArgumentPromotion] Change use of removed argument in llvm.dbg.value to undef

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 9 06:14:46 PDT 2017


rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.

lgtm



================
Comment at: lib/Transforms/IPO/ArgumentPromotion.cpp:128
+
+      // Calls to llvm.dbg.value do not exist in the use list of the function
+      // arguments even if the argument is used in the call. Therefore we need
----------------
This shorter comment should suffice:
  // There may be remaining metadata uses of the argument for things like llvm.dbg.value. Replace them with undef.

I think the reason this is special is that for some reason the Function isn't being deleted (is it leaked?), and the Argument isn't being deleted, which would trigger removal from the ValuesAsMetadata map.


https://reviews.llvm.org/D34874





More information about the llvm-commits mailing list