From: Mark Friedman Date: Mon, 22 Aug 1988 20:25:43 +0000 (+0000) Subject: There's a new expansion phase to support the open coding of generic X-Git-Tag: 20090517-FFI~12596 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=4930d18abba16138d7ab90ad5615bc08481d231b;p=mit-scheme.git There's a new expansion phase to support the open coding of generic arithmetic. It is essentially there to allow for the open coding of rtl that you want to be treated as a single statement or expression by the common subexpression eliminator. --- diff --git a/v7/src/compiler/base/toplev.scm b/v7/src/compiler/base/toplev.scm index edab28b66..605632134 100644 --- a/v7/src/compiler/base/toplev.scm +++ b/v7/src/compiler/base/toplev.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/base/toplev.scm,v 4.8 1988/07/16 21:51:09 cph Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/base/toplev.scm,v 4.9 1988/08/22 20:25:43 markf Exp $ Copyright (c) 1988 Massachusetts Institute of Technology @@ -518,7 +518,9 @@ MIT in each case. |# (set! *rtl-graphs* '()) (set! *ic-procedure-headers* '()) (initialize-machine-register-map!) - (generate/top-level (last-reference *root-expression*)) + (cleanup-noop-nodes + (lambda () + (generate/top-level (last-reference *root-expression*)))) (set! label->object (make/label->object *rtl-expression* *rtl-procedures* @@ -547,6 +549,9 @@ MIT in each case. |# (lambda () (if compiler:cse? (phase/common-subexpression-elimination)) + (cleanup-noop-nodes + (lambda () + (phase/rtl-expansion))) (phase/lifetime-analysis) (if compiler:code-compression? (phase/code-compression)) @@ -557,7 +562,12 @@ MIT in each case. |# (compiler-subphase "Eliminating Common Subexpressions" (lambda () (common-subexpression-elimination *rtl-graphs*)))) - (define (phase/lifetime-analysis) + (define (phase/rtl-expansion) + (compiler-subphase "Expanding RTL" + (lambda () + (rtl-expansion *rtl-graphs*)))) + +(define (phase/lifetime-analysis) (compiler-subphase "Lifetime Analysis" (lambda () (lifetime-analysis *rtl-graphs*))))