From 24ca0e3160935f8d21e2e5864f6e6b8d881106a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Lindqvist?= Date: Wed, 22 Apr 2015 17:56:14 +0200 Subject: [PATCH] compiler.cfg.*: reverting the commit 5fd9e61bc04b054d58b8eeecbe9b5c59f68f2195, caused bad regressions in SIMD code --- .../cfg/ssa/destruction/destruction-tests.factor | 9 --------- basis/compiler/cfg/stacks/finalize/finalize.factor | 3 ++- basis/compiler/cfg/stacks/local/local-tests.factor | 1 - basis/compiler/cfg/stacks/local/local.factor | 6 ++---- 4 files changed, 4 insertions(+), 15 deletions(-) diff --git a/basis/compiler/cfg/ssa/destruction/destruction-tests.factor b/basis/compiler/cfg/ssa/destruction/destruction-tests.factor index 6757ef733c..e225709e0c 100644 --- a/basis/compiler/cfg/ssa/destruction/destruction-tests.factor +++ b/basis/compiler/cfg/ssa/destruction/destruction-tests.factor @@ -25,12 +25,3 @@ IN: compiler.cfg.ssa.destruction.tests T{ ##parallel-copy { values V{ } } } [ cleanup-insn ] V{ } make ] unit-test - -! coalesce-leaders -{ - H{ { 30 60 } } -} [ - H{ } clone leader-map set - 30 60 coalesce-leaders - leader-map get -] unit-test diff --git a/basis/compiler/cfg/stacks/finalize/finalize.factor b/basis/compiler/cfg/stacks/finalize/finalize.factor index 9b26728fbc..210c978772 100644 --- a/basis/compiler/cfg/stacks/finalize/finalize.factor +++ b/basis/compiler/cfg/stacks/finalize/finalize.factor @@ -27,7 +27,8 @@ ERROR: bad-peek dst loc ; [ dup n>> 0 < [ bad-peek ] [ ##peek, ] if ] each-insertion ; : insert-replaces ( from to -- ) - 2drop ; + [ inserting-replaces ] keep + [ dup n>> 0 < [ 2drop ] [ ##replace, ] if ] each-insertion ; : visit-edge ( from to -- ) ! If both blocks are subroutine calls, don't bother diff --git a/basis/compiler/cfg/stacks/local/local-tests.factor b/basis/compiler/cfg/stacks/local/local-tests.factor index d9e5ab7ef5..87a23a9d7f 100644 --- a/basis/compiler/cfg/stacks/local/local-tests.factor +++ b/basis/compiler/cfg/stacks/local/local-tests.factor @@ -60,7 +60,6 @@ IN: compiler.cfg.stacks.local.tests { V{ T{ ##copy { dst 1 } { src 3 } { rep any-rep } } - T{ ##replace { src 1 } { loc D 0 } } "eh" } } [ diff --git a/basis/compiler/cfg/stacks/local/local.factor b/basis/compiler/cfg/stacks/local/local.factor index f6d354dc62..71eb9c25a0 100644 --- a/basis/compiler/cfg/stacks/local/local.factor +++ b/basis/compiler/cfg/stacks/local/local.factor @@ -65,11 +65,9 @@ SYMBOLS: local-peek-set replaces ; [ loc>> n>> 0 >= ] filter ; : changes>insns ( replaces height-state -- insns ) - [ drop replaces>copy-insns ] - [ nip height-state>insns ] - [ replaces>replace-insns ] 2tri 3append ; + [ replaces>copy-insns ] [ height-state>insns ] bi* append ; -: emit-changes ( replaces height-state -- ) +: emit-changes ( replaces state -- ) building get pop -rot changes>insns % , ; : peek-loc ( loc -- vreg )