Skip to content

Commit 81c3f3d

Browse files
josephsavonapull[bot]
authored andcommitted
Improve MergeConsecutiveScopes
Rewrites the core logic of MergeConsecutiveScopes to be easier to follow and fix bugs. We now do a two-pass approach: * First we iterate block instructions to identify scopes which can be merged, without actually merging the instructions themselves. * Then we iterate again, copying instructions from the block either into the new output block, or into their merged scope, as appropriate. I think the simplicity here is worth the performance cost, and we can always revisit later as necessary.
1 parent 581a5e5 commit 81c3f3d

File tree

3 files changed

+250
-181
lines changed

3 files changed

+250
-181
lines changed

0 commit comments

Comments
 (0)