Commit 2a03cc8
[TailDuplication] Add option to enable tail duplication of fallthrough BBs
During the TailDuplication pass, fallthrough BBs are
not duplicated. This is generally acceptable, but in
scenarios where a loop contains a large switch case
and the latch BB is a fallthrough, duplicating the
latch BB can eliminate jump instructions in its
predecessors. This patch introduces the
`tail-dup-fallthrough-bbs` option to enable the
duplication of fallthrough BBs.
PR: #727.
Signed-off-by: Vladimir Radosavljevic <[email protected]>1 parent e3e4c2f commit 2a03cc8
File tree
2 files changed
+13
-9
lines changed- llvm
- lib/CodeGen
- test/CodeGen/EraVM
2 files changed
+13
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
79 | 86 | | |
80 | 87 | | |
81 | 88 | | |
| |||
559 | 566 | | |
560 | 567 | | |
561 | 568 | | |
562 | | - | |
| 569 | + | |
| 570 | + | |
563 | 571 | | |
| 572 | + | |
564 | 573 | | |
565 | 574 | | |
566 | 575 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | 18 | | |
25 | 19 | | |
26 | 20 | | |
27 | 21 | | |
28 | | - | |
| 22 | + | |
| 23 | + | |
29 | 24 | | |
30 | 25 | | |
31 | 26 | | |
| |||
0 commit comments