]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/compiler/cfg/ssa/destruction/destruction-tests.factor
compiler.cfg.ssa.destruction.coalescing: new vocab to refactor and
[factor.git] / basis / compiler / cfg / ssa / destruction / destruction-tests.factor
index 661d567d4152a06b1d9f6ac5aa19fc3f7f5f29fb..2549134884e8b2196d453bf0b0217af29353864a 100644 (file)
@@ -1,11 +1,8 @@
-USING: alien.syntax assocs compiler.cfg.def-use
-compiler.cfg.instructions compiler.cfg.registers
+USING: alien.syntax compiler.cfg.instructions compiler.cfg.registers
 compiler.cfg.ssa.destruction compiler.cfg.ssa.destruction.leaders
 compiler.cfg.ssa.destruction.private compiler.cfg.utilities
-cpu.architecture cpu.x86.assembler.operands grouping kernel make math
-math.functions math.order math.ranges namespaces random sequences
-tools.test ;
-QUALIFIED: sets
+cpu.architecture cpu.x86.assembler.operands kernel make namespaces
+sequences tools.test ;
 IN: compiler.cfg.ssa.destruction.tests
 
 ! cleanup-insn
@@ -30,15 +27,6 @@ IN: compiler.cfg.ssa.destruction.tests
     [ cleanup-insn ] V{ } make
 ] unit-test
 
-! init-coalescing
-{
-    H{ { 123 123 } { 77 77 } }
-} [
-    H{ { 123 "bb1" } { 77 "bb2" } } defs set
-    init-coalescing
-    leader-map get
-] unit-test
-
 ! destruct-ssa
 { } [
     H{ { 36 23 } { 23 23 } } leader-map set
@@ -65,45 +53,3 @@ IN: compiler.cfg.ssa.destruction.tests
         }
     } 0 insns>block block>cfg destruct-ssa
 ] unit-test
-
-! try-eliminate-copy
-{ } [
-    10 10 f try-eliminate-copy
-] unit-test
-
-! prepare-insn
-{ V{ { 2 1 } } } [
-    V{ } clone copies set
-    T{ ##copy { src 1 } { dst 2 } { rep int-rep } } prepare-insn
-    copies get
-] unit-test
-
-{ V{ { 3 4 } { 7 8 } } } [
-    V{ } clone copies set
-    T{ ##parallel-copy { values V{ { 3 4 } { 7 8 } } } } prepare-insn
-    copies get
-] unit-test
-
-! All this work to make the 'values' order non-deterministic.
-: make-phi-inputs ( -- assoc )
-    H{ } clone [
-        { 2287 2288 } [
-            10 iota 1 sample first rot set-at
-        ] with each
-    ] keep ;
-
-{ t } [
-    10 [
-        { 2286 2287 2288 } sets:unique leader-map set
-        2286 make-phi-inputs ##phi new-insn
-        prepare-insn
-        2286 leader
-    ] replicate all-equal?
-] unit-test
-
-! Test is just to ensure the my-euler word compiles. See #1345
-: my-euler-step ( min m n -- min' )
-    dup sqrt 1 mod [ - min ] [ 2drop ] if ; inline
-
-: my-euler ( -- answer )
-    33 2500 [1,b] [ dup [1,b] [ my-euler-step ] with each ] each ;