[PATCH] D27468: When GVN removes a redundant load, it should not modify the debug location of the dominating load.

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 6 12:38:27 PST 2016


aprantl added a comment.

This makes sense to me. Are there other cases where we should invoke the mergeDebugLoc API that we've been discussing in https://reviews.llvm.org/D26256?



================
Comment at: lib/Transforms/Scalar/GVN.cpp:1704
+      // If we have a fully redundant load LI dominated by a single value I,
+      // then don't update the debug location of I.
+      if (LI->getDebugLoc() && ValuesPerBlock.size() != 1)
----------------
This comment repeats what the code is doing but doesn't really say why this is important. Can you add some of the the rationale from the review here?


https://reviews.llvm.org/D27468





More information about the llvm-commits mailing list