* Rewrite the flonum lap-generation rules to perform register-reusing,
authorChris Hanson <org/chris-hanson/cph>
Thu, 26 Oct 1989 07:41:21 +0000 (07:41 +0000)
committerChris Hanson <org/chris-hanson/cph>
Thu, 26 Oct 1989 07:41:21 +0000 (07:41 +0000)
commit0750f6c4b2e6ea9969ec058ab23ff1b5a59f0efb
treefbab471568b688f041144b51a1a50e97e8089ea5
parentbd9fb2f3ed6da775d0989047184f5a321056f2a5
* Rewrite the flonum lap-generation rules to perform register-reusing,
as is already the case for fixnum rules.  Generalize some tools so
that most code can be shared between fixnum and flonum rules.

* Implement assorted changes to conform to new R4RS arithmetic.

* Redesign closure-analysis/procedure-undrifting.  New design should
perform better than old, and I believe that this one is substantially
more correct.

* Add "variable indirections", which come into play when the a
variable is known to be bound to the value of another variable which
is bound in an ancestor frame of the first variable (i.e. the first
variable can be considered an alias for the second).

* Don't inline-code procedures with rest variables.

* New pass notices when two returns are equivalent, and merges them.
Another new pass notices when the tails of two basic blocks are
equivalent, and merges them.  These two work together to eliminate
multiple copies of suffixes in various cases (most notably
predicates).

* Introduce concept that certain procedures are "boolean-valued" and
can be treated specially if they appear in the predicate of a
disjunction.

* Disconnect registerizable-parameter code because it introduces
instability in the three-stage compilation test.  This code doesn't
seem to be doing much right now anyway.

* Fix bug in "remote links": must use another addressing-mode when the
offset is too large to fit in 16 bits.

* Add rule to permit static-links to be pushed in two instructions
instead of three on the 68020.

* Change RTL constructors to reduce the number of intermediate
registers generated for trivial expressions.  Improve definition of
"trivial expression" to include certain kinds of constants.

* Change open-coded combinations in the case where they appear in
reduction position, and where the open-coding of the combination will
include a close-coded call.  The new strategy is to setup the
arguments as if the combination was close-coded, then open-code
assuming the arguments are in those positions.  This has the advantage
of allowing the internal close-coded call to be transformed into a
jump with no clumsy argument manipulation required.

* Change RTL CSE to treat small (8-bit) numeric constants as cheaper
than registers.
54 files changed:
v7/src/compiler/back/lapgn1.scm
v7/src/compiler/back/lapgn2.scm
v7/src/compiler/back/linear.scm
v7/src/compiler/back/syntax.scm
v7/src/compiler/base/blocks.scm
v7/src/compiler/base/cfg1.scm
v7/src/compiler/base/cfg2.scm
v7/src/compiler/base/cfg3.scm
v7/src/compiler/base/crstop.scm
v7/src/compiler/base/ctypes.scm
v7/src/compiler/base/debug.scm
v7/src/compiler/base/infnew.scm
v7/src/compiler/base/lvalue.scm
v7/src/compiler/base/object.scm
v7/src/compiler/base/proced.scm
v7/src/compiler/base/toplev.scm
v7/src/compiler/base/utils.scm
v7/src/compiler/fggen/fggen.scm
v7/src/compiler/fgopt/blktyp.scm
v7/src/compiler/fgopt/closan.scm
v7/src/compiler/fgopt/contan.scm
v7/src/compiler/fgopt/delint.scm
v7/src/compiler/fgopt/operan.scm
v7/src/compiler/fgopt/order.scm
v7/src/compiler/fgopt/param.scm
v7/src/compiler/fgopt/reuse.scm
v7/src/compiler/fgopt/simple.scm
v7/src/compiler/fgopt/subfre.scm
v7/src/compiler/machines/bobcat/compiler.pkg
v7/src/compiler/machines/bobcat/dassm1.scm
v7/src/compiler/machines/bobcat/dassm2.scm
v7/src/compiler/machines/bobcat/decls.scm
v7/src/compiler/machines/bobcat/insmac.scm
v7/src/compiler/machines/bobcat/insutl.scm
v7/src/compiler/machines/bobcat/lapgen.scm
v7/src/compiler/machines/bobcat/make.scm-68040
v7/src/compiler/machines/bobcat/rules1.scm
v7/src/compiler/machines/bobcat/rules2.scm
v7/src/compiler/machines/bobcat/rules3.scm
v7/src/compiler/machines/bobcat/rules4.scm
v7/src/compiler/rtlbase/rgraph.scm
v7/src/compiler/rtlbase/rtlcfg.scm
v7/src/compiler/rtlbase/rtlcon.scm
v7/src/compiler/rtlbase/rtlexp.scm
v7/src/compiler/rtlbase/rtline.scm
v7/src/compiler/rtlbase/rtlty2.scm
v7/src/compiler/rtlgen/fndvar.scm
v7/src/compiler/rtlgen/opncod.scm
v7/src/compiler/rtlgen/rgcomb.scm
v7/src/compiler/rtlgen/rgretn.scm
v7/src/compiler/rtlgen/rgrval.scm
v7/src/compiler/rtlgen/rtlgen.scm
v7/src/compiler/rtlopt/rcse2.scm
v7/src/compiler/rtlopt/rcseht.scm