Commit 2fa35d6
authored
[NFC] Simplify a bit of logic in RemoveUnusedBrs (#8603)
The checks in the old code were not needed: we have a block that
has a single child, another block. Any branch to the child sends a
value that flows out to the parent immediately. No circumstances
exist in which we can error.
(block $outer
(block $inner
..code and a br to $inner, which can branch to $outer instead..
)
)
Also, this code only handles blocks *without* a value, so even
subtyping is not an issue here. (Merging blocks with different
types is handled elsewhere, RemoveUnusedNames, so no
need to add new logic here.)1 parent fc43f0d commit 2fa35d6
1 file changed
+1
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1224 | 1224 | | |
1225 | 1225 | | |
1226 | 1226 | | |
1227 | | - | |
1228 | | - | |
1229 | | - | |
1230 | | - | |
1231 | | - | |
| 1227 | + | |
1232 | 1228 | | |
1233 | 1229 | | |
1234 | 1230 | | |
| |||
0 commit comments