[PATCH] D18670: LoopUnroll: some small fixes/tweaks to make it more useful for partial unrolling

Z. Zheng via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 31 16:57:43 PDT 2016


zzheng added a subscriber: zzheng.
zzheng added a comment.

Updates in partial unrolling logic looks reasonable to me... just don't understand about limiting full unroll, and seems it's not limited in this patch.


================
Comment at: lib/Transforms/Scalar/LoopUnrollPass.cpp:110
@@ -109,2 +109,3 @@
   UP.MaxCount = UINT_MAX;
+  UP.FullUnrollMaxCount = UINT_MAX;
   UP.Partial = false;
----------------
Where's FullUnrollMaxCount used?

If I understand your description correctly, full unroll and partial unroll are limited by the same max unroll count ('A iterations') but different thresholds ('threshold X' and 'threshold Y')?

I don't quiet understand the term 'put a cap on full unrolling'... If we can't unroll by compile-time-known tripcount, it becomes partial unrolling, right?

getUnrollingPreferences() in TTI can update UP.Count, UP.MaxCount and UP.PartialThreshold to bound partial unrolling.


Repository:
  rL LLVM

http://reviews.llvm.org/D18670





More information about the llvm-commits mailing list