Commit 173c010
committed
[Mem2Reg] RAUW undef lexical lifetime phis.
Previously, if it was determined that a proactive phi was unnecessary,
it was removed, along with the phis for the lifetime and the original
value of which the proactive phi was a copy. The uses of only one of
the three phis (namely, the proactive phi) was RAUW undef. In the case
where the only usage of the phi was to branch back to the block that
took the phi as an argument, that was a problem. Here, that is fixed by
giving all three phis the same treatment. To avoid duplicating code,
that treatment is pulled out into a new lambda.
This was exposed by adding lifetime versions of some OSSA versions of
mem2reg tests that had been missed previously.1 parent 5d0bfee commit 173c010
File tree
4 files changed
+1723
-4
lines changed- lib/SILOptimizer/Transforms
- test/SILOptimizer
4 files changed
+1723
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1028 | 1028 | | |
1029 | 1029 | | |
1030 | 1030 | | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
1031 | 1037 | | |
1032 | 1038 | | |
1033 | 1039 | | |
1034 | 1040 | | |
1035 | | - | |
1036 | | - | |
| 1041 | + | |
1037 | 1042 | | |
1038 | | - | |
1039 | | - | |
| 1043 | + | |
| 1044 | + | |
1040 | 1045 | | |
1041 | 1046 | | |
1042 | 1047 | | |
| |||
0 commit comments