Commit 1e82006
committed
[ShrinkBorrowScope] Don't hoist over begin_borrows.
While it is sometimes valid to hoist over begin_borrows of copies of the
borrowee, it is not always valid, as the test case committed here
illustrates. As a future optimization, we can reenable this hoisting
with the appropriate condition.1 parent 9285965 commit 1e82006
File tree
2 files changed
+26
-18
lines changed- lib/SILOptimizer/Utils
- test/SILOptimizer
2 files changed
+26
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | 127 | | |
131 | 128 | | |
132 | 129 | | |
| |||
153 | 150 | | |
154 | 151 | | |
155 | 152 | | |
156 | | - | |
| 153 | + | |
157 | 154 | | |
158 | 155 | | |
159 | 156 | | |
| |||
221 | 218 | | |
222 | 219 | | |
223 | 220 | | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
| 221 | + | |
230 | 222 | | |
231 | 223 | | |
232 | 224 | | |
| |||
244 | 236 | | |
245 | 237 | | |
246 | 238 | | |
247 | | - | |
248 | 239 | | |
249 | 240 | | |
250 | 241 | | |
| |||
259 | 250 | | |
260 | 251 | | |
261 | 252 | | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | 253 | | |
266 | 254 | | |
267 | 255 | | |
| |||
318 | 306 | | |
319 | 307 | | |
320 | 308 | | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | 309 | | |
326 | 310 | | |
327 | 311 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
953 | 953 | | |
954 | 954 | | |
955 | 955 | | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
956 | 980 | | |
957 | 981 | | |
958 | 982 | | |
0 commit comments