[PATCH] D19738: Look for a loop's starting location in the llvm.loop metadata

Adam Nemet via llvm-commits llvm-commits at lists.llvm.org
Tue May 10 17:39:25 PDT 2016


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

LGTM, some minor suggestions below.


================
Comment at: lib/Analysis/LoopInfo.cpp:318
@@ +317,3 @@
+  if (MDNode *LoopID = getLoopID())
+    for (unsigned i = 1, ie = LoopID->getNumOperands(); i < ie; ++i)
+      if (DILocation *L = dyn_cast<DILocation>(LoopID->getOperand(i)))
----------------
Capitalize the variables?

================
Comment at: test/Transforms/LoopVectorize/X86/vectorization-remarks-loopid-dbg.ll:5-7
@@ +4,5 @@
+
+; RUN: llc < %s -mtriple x86_64-pc-linux-gnu -o - | FileCheck -check-prefix=DEBUG-OUTPUT %s
+; DEBUG-OUTPUT-NOT: .loc
+; DEBUG-OUTPUT-NOT: {{.*}}.debug_info
+
----------------
Here, are you just making sure that the location didn't leak into the generated debug info?  Perhaps a comment would help.


http://reviews.llvm.org/D19738





More information about the llvm-commits mailing list