[PATCH] D50063: [UnJ] Pull code out into a separate function NFC
Michael Kruse via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 9 14:41:55 PDT 2018
Meinersbur accepted this revision.
Meinersbur added a comment.
This revision is now accepted and ready to land.
In https://reviews.llvm.org/D50063#1193750, @SjoerdMeijer wrote:
> Ah, sorry, I now see HasConsistentIterationCounts has been suggested in that other ticket. Oh well, as I said, I was bike shedding names (but still think 'invariant' is better :-)) Anyway, please ignore if you disagree.
I suggested the name because the term 'consistent' was used in the https://reviews.llvm.org/D50062 function's comment (which seems to have been replicated here). That is, invariant could have been used in that original comment as well.
I am fine if using 'invariant', I don't have a preference.
Overall, LGTM in either case.
================
Comment at: include/llvm/Transforms/Utils/LoopUtils.h:493
+/// Check inner loop (L) backedge count is known to be consistent on all iterations
+/// of its outer loop. If the loop has no parent, this is trivially true.
----------------
SjoerdMeijer wrote:
> Bike shedding names: I was wondering if "consistent" is the right word here. I think what this function does is best described in the implementation:
>
> // Get whether count is invariant to the outer loop
>
> I think "invariant" is describing it better.
I suggested the name because the term 'consistent' was used in the D50062 function's comment (which seems to have been replicated here). 'Invariant' would be ok as well.
https://reviews.llvm.org/D50063
More information about the llvm-commits
mailing list