From b02208ceb24e6c050d5e132c2aae2b4b8fbd8315 Mon Sep 17 00:00:00 2001 From: Daniel Ehrenberg Date: Mon, 3 May 2010 17:54:46 -0500 Subject: [PATCH] Some fixes to merge scheduling --- .../compiler/cfg/dependence/dependence.factor | 34 ++++++------------- .../cfg/finalization/finalization.factor | 2 +- basis/compiler/cfg/height/height.factor | 2 +- 3 files changed, 12 insertions(+), 26 deletions(-) diff --git a/basis/compiler/cfg/dependence/dependence.factor b/basis/compiler/cfg/dependence/dependence.factor index 086de1fa90..6e07336217 100644 --- a/basis/compiler/cfg/dependence/dependence.factor +++ b/basis/compiler/cfg/dependence/dependence.factor @@ -49,25 +49,14 @@ M: node hashcode* nip number>> ; node insn>> uses-vregs [ definers at [ node +data+ precedes ] when* ] each ] each ; -UNION: stack-read-write ##peek ##replace ; +UNION: stack-insn ##peek ##replace ##replace-imm ; -UNION: ##alien-read - ##alien-double ##alien-float ##alien-cell ##alien-vector - ##alien-signed-1 ##alien-signed-2 ##alien-signed-4 - ##alien-unsigned-1 ##alien-unsigned-2 ##alien-unsigned-4 ; - -UNION: ##alien-write - ##set-alien-double ##set-alien-float ##set-alien-cell ##set-alien-vector - ##set-alien-integer-1 ##set-alien-integer-2 ##set-alien-integer-4 ; - -UNION: slot-memory-insn +UNION: slot-insn ##read ##write ; -UNION: alien-memory-insn - ##alien-read ##alien-write ; - -UNION: string-memory-insn - ##string-nth ##set-string-nth-fast ; +UNION: memory-insn + ##load-memory ##load-memory-imm + ##store-memory ##store-memory-imm ; UNION: alien-call-insn ##save-context @@ -82,17 +71,14 @@ UNION: alien-call-insn GENERIC: add-control-edge ( node insn -- ) -M: stack-read-write add-control-edge +M: stack-insn add-control-edge loc>> chain ; -M: alien-memory-insn add-control-edge - drop alien-memory-insn chain ; +M: memory-insn add-control-edge + drop memory-insn chain ; -M: slot-memory-insn add-control-edge - drop slot-memory-insn chain ; - -M: string-memory-insn add-control-edge - drop string-memory-insn chain ; +M: slot-insn add-control-edge + drop slot-insn chain ; M: alien-call-insn add-control-edge drop alien-call-insn chain ; diff --git a/basis/compiler/cfg/finalization/finalization.factor b/basis/compiler/cfg/finalization/finalization.factor index 5440ba6eef..aca45fe099 100644 --- a/basis/compiler/cfg/finalization/finalization.factor +++ b/basis/compiler/cfg/finalization/finalization.factor @@ -8,7 +8,7 @@ IN: compiler.cfg.finalization : finalize-cfg ( cfg -- cfg' ) select-representations - schedule-instructions + ! schedule-instructions insert-gc-checks insert-save-contexts destruct-ssa diff --git a/basis/compiler/cfg/height/height.factor b/basis/compiler/cfg/height/height.factor index a782d2d4bc..0b9c253c58 100644 --- a/basis/compiler/cfg/height/height.factor +++ b/basis/compiler/cfg/height/height.factor @@ -52,4 +52,4 @@ M: insn normalize-height* ; rs-height get dup 0 = [ drop ] [ \ ##inc-r new-insn prefix ] if ; : normalize-height ( cfg -- cfg' ) - [ height-step ] local-optimization ; + [ height-step ] simple-optimization ;