[PATCH] D25763: Add end location of loop to loop metadata.

Hal Finkel via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 24 14:14:15 PDT 2016


hfinkel added inline comments.


================
Comment at: lib/Analysis/LoopInfo.cpp:319
+          Start = DebugLoc(L);
+          End = DebugLoc(L);
+        } else {
----------------
I'd rather just leave this unset if we don't have an ending location. This makes it easy to differentiate when we don't have an ending location from when we do (and adjust our messaging accordingly).


================
Comment at: lib/Analysis/LoopInfo.cpp:321
+        } else {
+          End = DebugLoc(L);
+        }
----------------
I suggest that you add a 'break;' here, and then also add a comment above saying that the first debug location is taken to be the start of the loop, and the second taken to be the end of the loop.


https://reviews.llvm.org/D25763





More information about the llvm-commits mailing list