[PATCH] D24451: [LoopUnroller] Replace UnrollingPreferences::Force with ForceMaxCount + SystemZ getUnrollingPreferences().
Evgeny Stupachenko via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 26 19:02:40 PDT 2016
evstupac added a comment.
The solution in general part is much better. I like it.
I've made only few general comments in SystemZ specific part. If someone working on SystemZ can review it that would be very good.
Unroll part LGTM.
================
Comment at: include/llvm/Analysis/TargetTransformInfo.h:268
@@ +267,3 @@
+ /// Default unroll count for loops with run-time trip count if
+ /// -unroll-count is not set.
+ unsigned DefaultUnrollRuntimeCount;
----------------
> if -unroll-count is not set
We should mention #pragma as well or nothing.
================
Comment at: lib/Target/SystemZ/SystemZTargetTransformInfo.cpp:247
@@ +246,3 @@
+ unsigned NumStores = 0;
+ for (Loop::block_iterator I = L->block_begin(), E = L->block_end();
+ I != E; ++I) {
----------------
according to the latest commits the following (or smth similar in your case) looks better:
```
for (auto &BB : L->blocks())
for (auto &I : *BB)
```
================
Comment at: lib/Target/SystemZ/SystemZTargetTransformInfo.cpp:261
@@ +260,3 @@
+ }
+ else { // indirect call.
+ HasCall = true;
----------------
should be one 1 line
} else {
https://reviews.llvm.org/D24451
More information about the llvm-commits
mailing list