Commit 851bfeb
committed
Fix copy_value to have 'None' side-effects.
Copies can be moved as much as you like as long as OSSA is legal.
This fixes some instruction deletion utilities for OSSA and any other
utilities that check side effects. Copies are common.
It also finally allows pure functions to be CSE'd!1 parent b001b0b commit 851bfeb
File tree
3 files changed
+15
-9
lines changed- include/swift/SIL
- test/SILOptimizer
3 files changed
+15
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
582 | 582 | | |
583 | 583 | | |
584 | 584 | | |
| 585 | + | |
| 586 | + | |
585 | 587 | | |
586 | | - | |
| 588 | + | |
587 | 589 | | |
588 | 590 | | |
589 | 591 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| |||
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
172 | | - | |
| 172 | + | |
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
772 | 772 | | |
773 | 773 | | |
774 | 774 | | |
775 | | - | |
| 775 | + | |
| 776 | + | |
776 | 777 | | |
777 | 778 | | |
778 | 779 | | |
779 | 780 | | |
780 | 781 | | |
781 | 782 | | |
782 | | - | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
783 | 787 | | |
784 | 788 | | |
785 | 789 | | |
| |||
0 commit comments