diff --git a/vyper/venom/ir_node_to_venom.py b/vyper/venom/ir_node_to_venom.py index 3b45c90ce0..0456dafe55 100644 --- a/vyper/venom/ir_node_to_venom.py +++ b/vyper/venom/ir_node_to_venom.py @@ -127,7 +127,11 @@ def ir_node_to_venom(ir: IRnode) -> IRContext: ctx.chain_basic_blocks() - # errors in make_ssa whether this is commented or not + # float allocas to the front of the function. we could probably move + # them to the immediate dominator of the basic block defining the alloca + # instead of the entry (which dominates all basic blocks), but this is + # done for expedience. without this step, sccp fails, possibly because + # dominators are not guaranteed to be traversed first. ctx.float_allocas() return ctx