Commit 84497c6
authored
[SimplifyCFG] Remove limitation on sinking of load/store of alloca (#104788)
This is a followup to #104579
to remove the limitation on sinking loads/stores of allocas entirely,
even if this would introduce a phi node.
Nowadays, SROA supports speculating load/store over select/phi.
Additionally, SimplifyCFG with sinking only runs at the end of the
function simplification pipeline, after SROA. I checked that the two
tests modified here still successfully SROA after the SimplifyCFG
transform.
We should, however, keep the limitation on lifetime intrinsics. SROA
does not have speculation support for these, and I've also found that
the way these are handled in the backend is very problematic
(#104776), so I think we
should leave them alone.1 parent 28fe6dd commit 84497c6
File tree
2 files changed
+10
-30
lines changed- llvm
- lib/Transforms/Utils
- test/Transforms/SimplifyCFG/X86
2 files changed
+10
-30
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2051 | 2051 | | |
2052 | 2052 | | |
2053 | 2053 | | |
2054 | | - | |
2055 | | - | |
2056 | | - | |
2057 | | - | |
2058 | | - | |
2059 | | - | |
2060 | | - | |
2061 | | - | |
2062 | | - | |
2063 | | - | |
2064 | | - | |
2065 | | - | |
2066 | | - | |
2067 | | - | |
2068 | | - | |
| 2054 | + | |
| 2055 | + | |
| 2056 | + | |
| 2057 | + | |
2069 | 2058 | | |
2070 | 2059 | | |
2071 | 2060 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
801 | 801 | | |
802 | 802 | | |
803 | 803 | | |
804 | | - | |
805 | | - | |
806 | | - | |
807 | | - | |
808 | | - | |
809 | | - | |
810 | | - | |
811 | | - | |
| 804 | + | |
| 805 | + | |
812 | 806 | | |
813 | 807 | | |
814 | 808 | | |
| |||
834 | 828 | | |
835 | 829 | | |
836 | 830 | | |
837 | | - | |
| 831 | + | |
838 | 832 | | |
839 | 833 | | |
840 | | - | |
841 | | - | |
842 | | - | |
843 | | - | |
844 | 834 | | |
845 | 835 | | |
846 | | - | |
847 | | - | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
848 | 839 | | |
849 | 840 | | |
850 | 841 | | |
| |||
0 commit comments