From d6641eddb3ef6e8891deae4c3d729b75221fdf62 Mon Sep 17 00:00:00 2001 From: Alex Vondrak Date: Sat, 18 Jun 2011 15:32:53 -0700 Subject: [PATCH] compiler.cfg.gvn: with the change to vreg>vn, must check-redundancy on *any* insn that defs a vreg --- extra/compiler/cfg/gvn/gvn.factor | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/extra/compiler/cfg/gvn/gvn.factor b/extra/compiler/cfg/gvn/gvn.factor index c4192652e5..bc63fd0f99 100644 --- a/extra/compiler/cfg/gvn/gvn.factor +++ b/extra/compiler/cfg/gvn/gvn.factor @@ -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