Skip to content

Commit

Permalink
A note about reassemble
Browse files Browse the repository at this point in the history
  • Loading branch information
sampsyo committed Sep 30, 2020
1 parent cba98ce commit ca8aa0c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions examples/to_ssa.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ def insert_phis(blocks, phi_args, phi_dests, types):


def reassemble(blocks):
"""Flatten a CFG into an instruction list."""
# This could optimize slightly by opportunistically eliminating
# `jmp .next` and `ret` terminators where it is allowed.
instrs = []
for name, block in blocks.items():
instrs.append({'label': name})
Expand Down

0 comments on commit ca8aa0c

Please sign in to comment.