Skip to content

Commit

Permalink
refactor[venom]: remove unused method in make_ssa.py (#4012)
Browse files Browse the repository at this point in the history
  • Loading branch information
harkal authored May 9, 2024
1 parent f213655 commit a72185b
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions vyper/venom/passes/make_ssa.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,24 +67,6 @@ def _place_phi(self, var: IRVariable, basic_block: IRBasicBlock):

basic_block.insert_instruction(IRInstruction("phi", args, var), 0)

def _add_phi(self, var: IRVariable, basic_block: IRBasicBlock) -> bool:
for inst in basic_block.instructions:
if inst.opcode == "phi" and inst.output is not None and inst.output.name == var.name:
return False

args: list[IROperand] = []
for bb in basic_block.cfg_in:
if bb == basic_block:
continue

args.append(bb.label)
args.append(var)

phi = IRInstruction("phi", args, var)
basic_block.instructions.insert(0, phi)

return True

def _rename_vars(self, basic_block: IRBasicBlock):
"""
Rename variables. This follows the placement of phi nodes.
Expand Down

0 comments on commit a72185b

Please sign in to comment.