[PATCH] D55396: [DebugInfo] Make sure CodeGenPrepare does not drop MD references to locals.

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 6 16:32:48 PST 2018


aprantl added inline comments.


================
Comment at: lib/CodeGen/CodeGenPrepare.cpp:2365
     SmallVector<InstructionAndIdx, 4> OriginalUses;
+    /// When the instruction is used by Metadata, keep track of the replacement
+    /// value.
----------------
I find `is used by Metadata` confusing, because then I'm thinking of an actual numbered MDNode. Perhaps say `by a DbgInfoIntrinsic` instead, since this is what we are really interested in?


================
Comment at: lib/CodeGen/CodeGenPrepare.cpp:2382
+      // If the instruction is used by Metadata, RAUW will also replace the
+      // MD uses. To undo these replacements, we perform the reverse RAUW,
+      // provided that the replacement value does not have any MD uses itself
----------------
Can you also add a sentence about why we would want to undo those replacements?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55396/new/

https://reviews.llvm.org/D55396





More information about the llvm-commits mailing list