[PATCH] D24451: [LoopUnroller] Replace UnrollingPreferences::Force with ForceMaxCount + SystemZ getUnrollingPreferences().

Evgeny Stupachenko via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 12 17:27:40 PDT 2016


evstupac added a comment.

Hi,

Overall, I don't like that Force unroll has its own MAX counter, but Partial and Runtime do not.
What is your case where you need to bound Force unroll counter, but Runtime is ok?
If you want to introduce a bound for Forced unroll, Threshold bound looks more general.

Do you have a test case to add?

Thanks,
Evgeny


================
Comment at: lib/Target/SystemZ/SystemZTargetTransformInfo.cpp:262
@@ +261,3 @@
+        }
+        else // indirect call.
+          HasCall = true;
----------------
"else" with brackets is better here

================
Comment at: lib/Transforms/Utils/LoopUnroll.cpp:308
@@ -306,1 +307,3 @@
       RuntimeTripCount = false;
+      Count = std::min(Count, ForceMaxCount);
+    }
----------------
Is this possible to move "Count" change to /Scalar/ part?
This will also rewrite unroll count set by user (pragma unroll or -unroll-count option).

================
Comment at: lib/Transforms/Utils/LoopUnroll.cpp:310
@@ -307,2 +309,3 @@
+    }
     else
       return false;
----------------
Same. "else" with brackets is better here.


https://reviews.llvm.org/D24451





More information about the llvm-commits mailing list