Commit 2c4f14b
committed
[ShrinkBorrowScope] Replaced check with assertion.
Previously, it was checked whether a barrier terminator was actually a
control flow terminator before adding end_borrows at the beginnings of
its successors. But it can't actually happen that a terminator is
classified as a barrier without the beginnings of all of its
predecessors having been reached because the BackwardReachability data
flow is pessimistic and only visits the end of a block (i.e. its
terminator) if it reached the beginnings of all of that block's
successors (see BackwardReachability::meetOverSuccessors and where the
data flow calls it).1 parent 208743c commit 2c4f14b
1 file changed
+10
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
336 | 336 | | |
337 | 337 | | |
338 | 338 | | |
339 | | - | |
340 | | - | |
341 | | - | |
342 | | - | |
343 | | - | |
344 | | - | |
345 | | - | |
346 | | - | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
347 | 345 | | |
348 | 346 | | |
349 | 347 | | |
350 | | - | |
351 | | - | |
352 | | - | |
353 | | - | |
354 | | - | |
355 | | - | |
356 | | - | |
357 | | - | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
358 | 352 | | |
359 | 353 | | |
360 | 354 | | |
| |||
0 commit comments