From 173f7c08691c94fb2fad108de633a0cf294b7cd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Lindqvist?= Date: Mon, 15 Dec 2014 07:13:43 +0100 Subject: [PATCH] compiler.cfg.scheduling: refactoring to use the simple-optimization combinator --- basis/compiler/cfg/scheduling/scheduling.factor | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/basis/compiler/cfg/scheduling/scheduling.factor b/basis/compiler/cfg/scheduling/scheduling.factor index e23726e081..65e2a8e75b 100644 --- a/basis/compiler/cfg/scheduling/scheduling.factor +++ b/basis/compiler/cfg/scheduling/scheduling.factor @@ -69,13 +69,5 @@ conditional-branch-insn : reorder ( insns -- insns' ) split-insns first3 [ reorder-body ] dip 3append ; -: schedule-block ( bb -- ) - [ reorder ] change-instructions drop ; - : schedule-instructions ( cfg -- ) - [ number-instructions ] - [ - reverse-post-order - [ kill-block?>> not ] filter - [ schedule-block ] each - ] bi ; + [ number-instructions ] [ [ reorder ] simple-optimization ] bi ;