Skip to content

Commit

Permalink
Normalize based on instructions not cfg outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
harkal committed Dec 1, 2023
1 parent b00a413 commit 37ed3bf
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions vyper/venom/passes/normalization.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ class NormalizationPass(IRPass):
def _split_basic_block(self, bb: IRBasicBlock) -> None:
# Iterate over the predecessors of the basic block
for in_bb in list(bb.cfg_in):
# We are only splitting on conditional jumps
if len(in_bb.cfg_out) <= 1:
continue

jump_inst = in_bb.instructions[-1]
assert bb in in_bb.cfg_out

Expand All @@ -29,7 +25,7 @@ def _split_basic_block(self, bb: IRBasicBlock) -> None:
elif jump_inst.opcode == "jmp" and isinstance(jump_inst.operands[0], IRVariable):
self._split_for_dynamic_branch(bb, in_bb)
else:
raise CompilerPanic("Unexpected termination instruction during normalization")
continue

self.changes += 1

Expand Down

0 comments on commit 37ed3bf

Please sign in to comment.