 
 : gen-name ( vreg -- vreg' )
     [ next-vreg dup ] dip
-    dup pushed get 2dup key?
+    dup pushed get 2dup in?
     [ 2drop stacks get at set-last ]
-    [ conjoin stacks get push-at ]
+    [ adjoin stacks get push-at ]
     if ;
 
 : (top-name) ( vreg -- vreg' )


: compute-phis ( -- )
    H{ } clone inserting-phis set
    defs-multi get defs get '[ _ at compute-phis-for ] assoc-each ;

! Maps vregs to ##phi instructions
SYMBOL: phis

    [ successors>> ] keep '[ _ rename-successor-phis ] each ;

: pop-stacks ( -- )
    pushed get members stacks get '[ _ at pop* ] each ;

: rename-in-block ( bb -- )
    HS{ } clone pushed set
    {
        [ rename-phis ]
        [ rename-insns ]
