Commit 62ac736
Hal Finkel
Optionally enable more-aggressive FMA formation in DAGCombine
The heuristic used by DAGCombine to form FMAs checks that the FMUL has only one
use, but this is overly-conservative on some systems. Specifically, if the FMA
and the FADD have the same latency (and the FMA does not compete for resources
with the FMUL any more than the FADD does), there is no need for the
restriction, and furthermore, forming the FMA leaving the FMUL can still allow
for higher overall throughput and decreased critical-path length.
Here we add a new TLI callback, enableAggressiveFMAFusion, false by default, to
elide the hasOneUse check. This is enabled for PowerPC by default, as most
PowerPC systems will benefit.
Patch by Olivier Sallenave, thanks!
llvm-svn: 2181201 parent 3549ea1 commit 62ac736
File tree
5 files changed
+45
-8
lines changed- llvm
- include/llvm/Target
- lib
- CodeGen/SelectionDAG
- Target/PowerPC
- test/CodeGen/PowerPC
5 files changed
+45
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
268 | 268 | | |
269 | 269 | | |
270 | 270 | | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
271 | 278 | | |
272 | 279 | | |
273 | 280 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6684 | 6684 | | |
6685 | 6685 | | |
6686 | 6686 | | |
6687 | | - | |
| 6687 | + | |
| 6688 | + | |
6688 | 6689 | | |
6689 | 6690 | | |
6690 | 6691 | | |
6691 | 6692 | | |
6692 | 6693 | | |
6693 | | - | |
| 6694 | + | |
| 6695 | + | |
6694 | 6696 | | |
6695 | 6697 | | |
6696 | 6698 | | |
| |||
6762 | 6764 | | |
6763 | 6765 | | |
6764 | 6766 | | |
6765 | | - | |
| 6767 | + | |
| 6768 | + | |
6766 | 6769 | | |
6767 | 6770 | | |
6768 | 6771 | | |
6769 | 6772 | | |
6770 | 6773 | | |
6771 | 6774 | | |
6772 | | - | |
| 6775 | + | |
| 6776 | + | |
6773 | 6777 | | |
6774 | 6778 | | |
6775 | 6779 | | |
| |||
6778 | 6782 | | |
6779 | 6783 | | |
6780 | 6784 | | |
6781 | | - | |
| 6785 | + | |
| 6786 | + | |
6782 | 6787 | | |
6783 | 6788 | | |
6784 | 6789 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
826 | 826 | | |
827 | 827 | | |
828 | 828 | | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
829 | 834 | | |
830 | 835 | | |
831 | 836 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
360 | 360 | | |
361 | 361 | | |
362 | 362 | | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
363 | 368 | | |
364 | 369 | | |
365 | 370 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
3 | 7 | | |
4 | 8 | | |
5 | | - | |
| 9 | + | |
6 | 10 | | |
7 | 11 | | |
8 | 12 | | |
| |||
18 | 22 | | |
19 | 23 | | |
20 | 24 | | |
21 | | - | |
| 25 | + | |
22 | 26 | | |
23 | 27 | | |
24 | 28 | | |
25 | | - | |
| 29 | + | |
26 | 30 | | |
27 | 31 | | |
28 | 32 | | |
29 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
30 | 45 | | |
31 | 46 | | |
32 | 47 | | |
| |||
0 commit comments