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

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 22 04:11:53 PDT 2016


fhahn added a comment.

I agree that the loop header should enough to identify the loop as a user given the source code. By having the end location is metadata however, we could present the information explicitly to the user.

One thing I was thinking about was using this information to display the whole loop when emitting vectorization remarks, instead of just the loop header.  This should be fairly straight forward and I could probably come up with a patch in the next couple of days. We could also use the range information to visually mark loops in the HTML optimization reports. Another thing we could do with the information is folding/hiding "cold" loop bodies in optimization reports per default.

I think that source range information could be useful to improve diagnostics for other constructs besides loops, but adding it to loops first seems like a good way to see if people think it's useful at all.


https://reviews.llvm.org/D25763





More information about the llvm-commits mailing list