Skip to content

Commit

Permalink
Lint cleanup in to_ssa
Browse files Browse the repository at this point in the history
  • Loading branch information
sampsyo committed Aug 23, 2021
1 parent 6a9ae62 commit 4d7b4eb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/test/ssa_roundtrip/if-const.bril
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
# the order that basic blocks get renamed.
.zexit:
print a;
}
}
4 changes: 1 addition & 3 deletions examples/to_ssa.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from cfg import block_map, successors, add_terminators, add_entry, reassemble
from form_blocks import form_blocks
from dom import get_dom, dom_fronts, dom_tree, map_inv
from dom import get_dom, dom_fronts, dom_tree


def def_blocks(blocks):
Expand Down Expand Up @@ -91,7 +91,6 @@ def _rename(block):
return phi_args, phi_dests



def insert_phis(blocks, phi_args, phi_dests, types):
for block, instrs in blocks.items():
for dest, pairs in sorted(phi_args[block].items()):
Expand Down Expand Up @@ -121,7 +120,6 @@ def func_to_ssa(func):
add_entry(blocks)
add_terminators(blocks)
succ = {name: successors(block[-1]) for name, block in blocks.items()}
pred = map_inv(succ)
dom = get_dom(succ, list(blocks.keys())[0])

df = dom_fronts(dom, succ)
Expand Down

0 comments on commit 4d7b4eb

Please sign in to comment.