]> gitweb.factorcode.org Git - factor.git/commitdiff
compiler.cfg.branch-splitting: now that we do SSA construction we can split branches...
authorSlava Pestov <slava@shill.local>
Thu, 23 Jul 2009 23:02:29 +0000 (18:02 -0500)
committerSlava Pestov <slava@shill.local>
Thu, 23 Jul 2009 23:02:29 +0000 (18:02 -0500)
basis/compiler/cfg/branch-splitting/branch-splitting.factor

index 2ab476e20c97248152028cf1105dbae66477a6e8..89e3604aec44b1a66546aa59a1a3299459772506 100644 (file)
@@ -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 -- ? )
     {