[PATCH] D50063: [UnJ] Pull code out into a separate function NFC

Sjoerd Meijer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 9 06:24:20 PDT 2018


SjoerdMeijer added inline comments.


================
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.
----------------
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.


================
Comment at: lib/Transforms/Utils/LoopUtils.cpp:1524
 
+bool llvm::hasConsistentIterationCount(Loop *SubLoop,
+                                       ScalarEvolution &SE) {
----------------
nit: I think I would have called SubLoop InnerLoop.


https://reviews.llvm.org/D50063





More information about the llvm-commits mailing list