Commit b22030d
committed
AllocBoxToStack: Remove bodies of closure functions left unused after specialization.
We can't remove the functions at this point in case they might have other function
passes enqueued to run on them, but we can at least remove the function contents
that are now unnecessary. We need to do this in cases when move-only types are
involved, since the semantics of the move checker rely on unescaped captures being
promoted before the pass runs, and we leave behind invalid SIL in the unpromoted code.
rdar://1106753521 parent 1777e9b commit b22030d
File tree
3 files changed
+56
-8
lines changed- lib/SILOptimizer/Transforms
- test/SILOptimizer
3 files changed
+56
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1213 | 1213 | | |
1214 | 1214 | | |
1215 | 1215 | | |
1216 | | - | |
1217 | | - | |
| 1216 | + | |
| 1217 | + | |
1218 | 1218 | | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
| 1245 | + | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
1219 | 1261 | | |
1220 | 1262 | | |
1221 | 1263 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
651 | 651 | | |
652 | 652 | | |
653 | 653 | | |
654 | | - | |
655 | | - | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
656 | 658 | | |
| 659 | + | |
| 660 | + | |
657 | 661 | | |
658 | 662 | | |
659 | 663 | | |
| |||
664 | 668 | | |
665 | 669 | | |
666 | 670 | | |
667 | | - | |
668 | 671 | | |
669 | 672 | | |
670 | 673 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
751 | 751 | | |
752 | 752 | | |
753 | 753 | | |
754 | | - | |
755 | | - | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
756 | 758 | | |
| 759 | + | |
| 760 | + | |
757 | 761 | | |
758 | 762 | | |
759 | 763 | | |
| |||
764 | 768 | | |
765 | 769 | | |
766 | 770 | | |
767 | | - | |
768 | 771 | | |
769 | 772 | | |
770 | 773 | | |
| |||
0 commit comments