Machine-independent intermediate languages
David Keppel
pardo at june.cs.washington.edu
Wed Oct 5 02:58:53 AEST 1988
djones at goofy.megatest.UUCP (Dave Jones) writes:
>[ the HIIL compiler should(n't)... ]
Uh, great, now we have: HLL, HIIL, MIIL. What's HIIL?
>[ global optimizations are machine-independent ]
I think that there are probably a *lot* of global optimizations that
*are* machine dependent. Proof by authority: William Wulf said so.
Proof by trivialization: certain global variables may have their
concrete type assigned based on machine depndencies, and these in turn
will affect local computation; the concrete type assignment may in
some cases be available only after certain kinds of global
analysis[*].
Eventually you take a hit.
[*] Consider a language that supports two types of integers, a
hardware-supported type and an arbitrary-precision type. The
variable may be declared with values outside the hardware type for
some machines, inside the hardware type for other machines. Even
knowing whether the *declaration* fits may not be enough. If the
declaration doesn't fit the machine type and the *usage* is always
within the machine type (which may be determined in at least some
cases by looking at every assignment to the variable), then
failure to do this (machine-dependent) global optimization will
cause the compiler to allocate the arbitrary-preciesion type,
which will generally be far less efficient.
;-D on ( Suboptimal reality ) Pardo
--
pardo at cs.washington.edu
{rutgers,cornell,ucsd,ubc-cs,tektronix}!uw-beaver!june!pardo
More information about the Comp.lang.c
mailing list