[PATCH] D24790: [LoopUnroll] Use the upper bound of the loop trip count to completely unroll loops

Michael Zolotukhin via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 22 16:17:49 PDT 2016


mzolotukhin added a comment.

Hi,

This makes total sense to me. But I think there is no need in introducing yet another knob in loop-unroller: have you measured the effect of the change on benchmarks (LLVM testsuite/SPEC/others)? I think it should be correct to unroll a loop with a small trip count even if it's not exactly known: the effect of this transformation would be not worse then from unrolling a similar loop with a constant, but equal to upper bound, trip-count. The benchmark results would help confirming or rejecting this assumption.

Thanks,
Michael


================
Comment at: lib/Transforms/Scalar/LoopUnrollPass.cpp:934
@@ -907,2 +933,3 @@
                << "] Loop %" << L->getHeader()->getName() << "\n");
+
   if (HasUnrollDisablePragma(L)) {
----------------
Unnecessary change.


Repository:
  rL LLVM

https://reviews.llvm.org/D24790





More information about the llvm-commits mailing list