]> gitweb.factorcode.org Git - factor.git/commitdiff
compiler.cfg.gvn.math: re-enable distribution for final pass
authorAlex Vondrak <ajvondrak@csupomona.edu>
Thu, 8 Sep 2011 17:03:34 +0000 (10:03 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Wed, 12 Sep 2012 22:14:11 +0000 (15:14 -0700)
extra/compiler/cfg/gvn/math/math.factor

index 56bfb2da2f1a1e5f2a1f2dc1d598da3fb6bde10e..0b5804acec9bde7a656f2d95ded29f0871b2428f 100644 (file)
@@ -123,12 +123,14 @@ M: ##sub-imm rewrite sub-imm>add-imm ;
     ] [ f ] if ; inline
 
 : distribute-over-add? ( insn -- ? )
-    drop f ;
-    ! src1>> vreg>insn [ ##add-imm? ] with-available-uses? ;
+    final-iteration? get [
+        src1>> vreg>insn [ ##add-imm? ] with-available-uses?
+    ] [ drop f ] if ;
 
 : distribute-over-sub? ( insn -- ? )
-    drop f ;
-    ! src1>> vreg>insn [ ##sub-imm? ] with-available-uses? ;
+    final-iteration? get [
+        src1>> vreg>insn [ ##sub-imm? ] with-available-uses?
+    ] [ drop f ] if ;
 
 ! XXX next-vreg makes vregs>vns change on every iteration
 : distribute ( insn add-op mul-op -- new-insns/f )