Commit eaaa7fd
committed
[ARM] Reduce loop unroll when low overhead branching is available
For processors with low overhead branching (LOB), runtime unrolling the
innermost loop is often detrimental to performance.
In these cases the loop remainder gets unrolled into a series of
compare-and-jump blocks, which in deeply nested loops get executed multiple
times, negating the benefits of LOB.
This is particularly noticable when the loop trip count of the innermost
loop varies within the outer loop, such as in the case of triangular matrix
decompositions.
In these cases we will prefer to not unroll the innermost loop, with the
intention for it to be executed as a low overhead loop.1 parent da439d3 commit eaaa7fd
File tree
2 files changed
+40
-10
lines changed- llvm
- lib/Target/ARM
- test/Transforms/LoopUnroll/ARM
2 files changed
+40
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2592 | 2592 | | |
2593 | 2593 | | |
2594 | 2594 | | |
| 2595 | + | |
| 2596 | + | |
| 2597 | + | |
| 2598 | + | |
| 2599 | + | |
| 2600 | + | |
| 2601 | + | |
| 2602 | + | |
| 2603 | + | |
| 2604 | + | |
| 2605 | + | |
| 2606 | + | |
| 2607 | + | |
| 2608 | + | |
| 2609 | + | |
| 2610 | + | |
| 2611 | + | |
| 2612 | + | |
| 2613 | + | |
| 2614 | + | |
| 2615 | + | |
2595 | 2616 | | |
2596 | 2617 | | |
2597 | 2618 | | |
2598 | 2619 | | |
2599 | | - | |
| 2620 | + | |
2600 | 2621 | | |
2601 | 2622 | | |
2602 | 2623 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
13 | 18 | | |
14 | 19 | | |
| 20 | + | |
15 | 21 | | |
16 | 22 | | |
17 | 23 | | |
| |||
20 | 26 | | |
21 | 27 | | |
22 | 28 | | |
23 | | - | |
| 29 | + | |
24 | 30 | | |
25 | 31 | | |
26 | 32 | | |
| |||
61 | 67 | | |
62 | 68 | | |
63 | 69 | | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
0 commit comments