]> gitweb.factorcode.org Git - factor.git/commitdiff
compiler.cfg.gvn: with the change to vreg>vn, must check-redundancy on *any* insn...
authorAlex Vondrak <ajvondrak@csupomona.edu>
Sat, 18 Jun 2011 22:32:53 +0000 (15:32 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Wed, 12 Sep 2012 22:14:07 +0000 (15:14 -0700)
extra/compiler/cfg/gvn/gvn.factor

index c4192652e54a1250b6a790851f99ed89f20e932a..bc63fd0f99203aee0aca05e2a5d10caa02541b27 100644 (file)
@@ -36,9 +36,6 @@ GENERIC: process-instruction ( insn -- insn' )
     [ redundant-instruction ] [ useful-instruction ] ?if ;
 
 M: insn process-instruction
-    dup rewrite [ process-instruction ] [ ] ?if ;
-
-M: foldable-insn process-instruction
     dup rewrite
     [ process-instruction ]
     [ dup defs-vregs length 1 = [ check-redundancy ] when ] ?if ;
@@ -46,17 +43,13 @@ M: foldable-insn process-instruction
 M: ##copy process-instruction
     dup [ src>> vreg>vn ] [ dst>> ] bi set-vn ;
 
-M: ##phi process-instruction
-    dup rewrite
-    [ process-instruction ] [ check-redundancy ] ?if ;
-
 M: array process-instruction
     [ process-instruction ] map ;
 
 : value-numbering-step ( insns -- insns' )
     [ process-instruction ] map flatten ;
 
-! XXX there's going to be trouble with certain rewrites that
+! FIXME there's going to be trouble with certain rewrites that
 ! modify the cfg / instructions destructively; namely those in
 ! comparisons.factor, alien.factor, and slots.factor