compiler.cfg.branch-splitting: now that we do SSA construction we can split branches with fixnum overflow ops (which have a live-out)
parent
7f87335afe
commit
93c58a8bb5
|
@ -6,18 +6,8 @@ compiler.cfg.def-use compiler.cfg compiler.cfg.rpo
|
|||
compiler.cfg.renaming compiler.cfg.instructions compiler.cfg.utilities ;
|
||||
IN: compiler.cfg.branch-splitting
|
||||
|
||||
: clone-renamings ( insns -- assoc )
|
||||
[ defs-vregs ] map concat [ dup fresh-vreg ] H{ } map>assoc ;
|
||||
|
||||
: clone-instructions ( insns -- insns' )
|
||||
dup clone-renamings renamings [
|
||||
[
|
||||
clone
|
||||
dup rename-insn-defs
|
||||
dup rename-insn-uses
|
||||
dup fresh-insn-temps
|
||||
] map
|
||||
] with-variable ;
|
||||
[ clone dup fresh-insn-temps ] map ;
|
||||
|
||||
: clone-basic-block ( bb -- bb' )
|
||||
! The new block gets the same RPO number as the old one.
|
||||
|
@ -62,10 +52,7 @@ IN: compiler.cfg.branch-splitting
|
|||
|
||||
UNION: irrelevant ##peek ##replace ##inc-d ##inc-r ;
|
||||
|
||||
: split-instructions? ( insns -- ? )
|
||||
[ [ irrelevant? not ] count 5 <= ]
|
||||
[ last ##fixnum-overflow? not ]
|
||||
bi and ;
|
||||
: split-instructions? ( insns -- ? ) [ irrelevant? not ] count 5 <= ;
|
||||
|
||||
: split-branch? ( bb -- ? )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue