Commit f264da4
authored
[lsr][term-fold] Restrict transform to low cost expansions (#74747)
This is a follow up to an item I noted in my submission comment for
e947f95. I don't have a real world example where this is triggering
unprofitably, but avoiding the transform when we estimate the loop to be
short running from profiling seems quite reasonable. It's also now come
up as a possibility in a regression twice in two days, so I'd like to
get this in to close out the possibility if nothing else.
The original review dropped the threshold for short trip count loops. I
will return to that in a separate review if this lands.1 parent db68e92 commit f264da4
File tree
2 files changed
+16
-17
lines changed- llvm
- lib/Transforms/Scalar
- test/Transforms/LoopStrengthReduce
2 files changed
+16
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6762 | 6762 | | |
6763 | 6763 | | |
6764 | 6764 | | |
6765 | | - | |
| 6765 | + | |
6766 | 6766 | | |
6767 | 6767 | | |
6768 | 6768 | | |
| |||
6820 | 6820 | | |
6821 | 6821 | | |
6822 | 6822 | | |
| 6823 | + | |
6823 | 6824 | | |
6824 | 6825 | | |
6825 | 6826 | | |
| |||
6861 | 6862 | | |
6862 | 6863 | | |
6863 | 6864 | | |
| 6865 | + | |
| 6866 | + | |
| 6867 | + | |
| 6868 | + | |
| 6869 | + | |
| 6870 | + | |
| 6871 | + | |
| 6872 | + | |
| 6873 | + | |
6864 | 6874 | | |
6865 | 6875 | | |
6866 | 6876 | | |
| |||
6986 | 6996 | | |
6987 | 6997 | | |
6988 | 6998 | | |
6989 | | - | |
| 6999 | + | |
6990 | 7000 | | |
6991 | 7001 | | |
6992 | 7002 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
599 | 599 | | |
600 | 600 | | |
601 | 601 | | |
602 | | - | |
603 | | - | |
604 | | - | |
605 | | - | |
606 | | - | |
607 | | - | |
608 | | - | |
609 | | - | |
610 | | - | |
611 | | - | |
612 | | - | |
613 | | - | |
614 | | - | |
615 | 602 | | |
616 | 603 | | |
617 | 604 | | |
| 605 | + | |
618 | 606 | | |
| 607 | + | |
619 | 608 | | |
620 | | - | |
621 | | - | |
| 609 | + | |
| 610 | + | |
622 | 611 | | |
623 | 612 | | |
624 | 613 | | |
| |||
0 commit comments