Standard ML of New Jersey
Version 110.19, July 8, 1999

/cm/cs/what/smlnj/index.html

Warning

This version is intended for compiler hackers. We are in the midst of substantial structural changes, and this is a snapshot.

Summary:

This version has a large number of MLRISC changes done primarily by Allen Leung. Salient features are:

Other Changes include:


MLRISC Changes

MLTree

Register encodings

EXTREMELY IMPORTANT: The encoding of physical registers has been changed. All physical registers are now encoded uniquely. For example, on the Sparc, %g0 is encoding as 0 and %f0 is encoding as 32. Previously %f0 was encoded as 0. An MLRISC client should use the function Reg provided by the CELLS interface to compute these new encoding.
	   val Reg : cellkind -> int -> register
      
For example, to describe %f0, use
	  SparcCells.Reg SparcCells.FP 0
      

Annotations

There is a new mechanism to inject client-defined annotations into the program. Annotations can be attached to instructions, basic blocks, control flow edges or an entire cluster/CFG.

These MLTREE constructors:

inject instruction level annotations. (See MLRISC/instructions/insnProps.sig)

The term

	 BLOCK_ANNOTATION of Annotations.annotation
	
inject a basic block level annotation.

Finally,

	 ENDCLUSTER of int Intmap.intmap * Annotations.annotations
	 
can be used to attach a list of cluster level annotations.

Certain annotations are interpreted specially by the MLRISC system. For example, there is an annotation that specifies branch probability, another that specifies control-dependence etc. (See MLRISC/instructions/basicAnnotations.sig). Annotations are not restricted to the ones that we have predefined; an MLRISC client can freely define its own annotations (annotations are just ML exceptions). Client-defined annotations are propagated and are semantically null -- unless you write a new optimization phase to recognize a new annotation.

Execution time

Compilation and execution time on the HPPA, which has been the most finely tuned architecture in this release, improves from 0-20% depending on the benchmark. Your mileage with other architectures will vary, however, their fine tuning has been deferred to the next version. All other architecture should eventually improve, as a result of the generic multiplication/division by constants, and strength reduction. Currently 110.19 is 6% slower at compiling the compiler than 110.18 on the DEC Alpha.

Machine Descriptions

Nearly all the target specific MLRISC files are generated from a machine description. (See MLRISC/[arch]/[arch].md, where [arch] is one of sparc, hppa, alpha, ppc, or x86). This borrows several ideas from the New Jersey Machine Code Toolkit, and others. The files that process the machine descriptions have not been included in this release.

Regions

Please see the files aliasing/mlriscRegion.{sig,sml} for details.

Multiplication/Division

Strength reduction is performed for integer multiplications and divisions by constants (except on the x86 platform). This almost always leads to faster code. The algorithm that we currently use for strength reduction is very simple; more improvements are possible.

Documentation

Preliminary documentation is included in this version, but is not ready for prime time use. It can be accessed by pointing to . This documentation will be continually updated, and the following page should be used for the latest documentation:
	/cm/cs/what/smlnj/MLRISC
	

See Also

For architecture specific changes, please see the files MLRISC/[arch]/README.[arch] where [arch] is the name of the architecture. For detailed changes to MLRISC, please see the files MLRISC/README and MLRISC/CHANGES.

Other Changes

Alpha32x

The DEC Alpha under OSF 3.2 is no longer supported. A special code generator was required for this because the OS would not emulate certain floating point instructions. For example, for floating point subtraction, FSUB with the /SUD extension is generated. (/SUD for software completion, underflow enabled, and dynamic rounding mode). Instead OSF 3.2 would generate an illegal instruction error.
Lal George
Last modified: Mon Jul 12 16:01:06 EDT 1999