Commit Graph

8 Commits

Author SHA1 Message Date
Evgeny Stupachenko
1369b53da1 The patch refactors unroll pass.
Summary:
Unroll factor (Count) calculations moved to a new function.
Early exits on pragma and "-unroll-count" defined factor added.
New type of unrolling "Force" introduced (previously used implicitly).
New unroll preference "AllowRemainder" introduced and set "true" by default.
(should be set to false for architectures that suffers from it).

Reviewers: hfinkel, mzolotukhin, zzheng

Differential Revision: http://reviews.llvm.org/D19553

From: Evgeny Stupachenko <evstupac@gmail.com>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271071 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-27 23:15:06 +00:00
Michael Zolotukhin
4b1e009d8e Re-enable "[LoopUnroll] Enable advanced unrolling analysis by default" one more time.
This reverts commit r270577.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270630 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-24 23:00:05 +00:00
Hans Wennborg
79d5d94f04 Revert r270518, which re-enabled "[LoopUnroll] Enable advanced unrolling analysis by default.
Chromium builds are still hitting the assert in PR27874.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270577 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-24 16:10:12 +00:00
Michael Zolotukhin
01a4a3e2cc Revert "Revert r270478 "[LoopUnroll] Enable advanced unrolling analysis by default.""
This reverts commit r270512 and reapplies r270478. Originally it caused
PR27847, but it was fixed in r270517.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270518 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-24 01:22:20 +00:00
Hans Wennborg
f82506b889 Revert r270478 "[LoopUnroll] Enable advanced unrolling analysis by default."
This caused PR27847.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270512 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-23 23:42:35 +00:00
Michael Zolotukhin
4b3e216784 [LoopUnroll] Enable advanced unrolling analysis by default.
Summary:
This patch turns on LoopUnrollAnalyzer by default. To mitigate compile
time regressions, I chose very conservative thresholds for now. Later we
can make them more aggressive, but it might require being smarter in
which loops we're optimizing. E.g. currently the biggest issue is that
with more agressive thresholds we unroll many cold loops, which
increases compile time for no performance benefit (performance of those
loops is improved, but it doesn't matter since they are cold).

Test results for compile time(using 4 samples to reduce noise):
```
MultiSource/Benchmarks/VersaBench/ecbdes/ecbdes 5.19%
SingleSource/Benchmarks/Polybench/medley/reg_detect/reg_detect  4.19%
MultiSource/Benchmarks/FreeBench/fourinarow/fourinarow  3.39%
MultiSource/Applications/JM/lencod/lencod 1.47%
MultiSource/Benchmarks/Fhourstones-3_1/fhourstones3_1 -6.06%
```

I didn't see any performance changes in the testsuite, but it improves
some internal tests.

Reviewers: hfinkel, chandlerc

Subscribers: llvm-commits, mzolotukhin

Differential Revision: http://reviews.llvm.org/D20482

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270478 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-23 19:10:19 +00:00
Fiona Glaser
93b72547c0 LoopUnroll: only allow non-modulo Partial unrolling when Runtime=true
Patch by Evgeny Stupachenko <evstupac@gmail.com>.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265558 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-06 16:43:45 +00:00
Zia Ansari
06022d8db1 Enable unroll for constant bound loops when TripCount is not modulo of unroll factor, reducing it to maximum power-of-2 that satisfies threshold limit.
Commit for Evgeny Stupachenko (evstupac@gmail.com)

Differential Revision: http://reviews.llvm.org/D18290



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265337 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-04 19:24:46 +00:00