MLton 20100608 DeepFlatten
Home  Index  
Deep flatten is an optimization pass for the SSA2 IntermediateLanguage, invoked from SSA2Simplify.

Description

This pass flattens into mutable fields of objects and into vectors.

For example, an (int * int) ref is represented by a 2 word object, and an (int * int) array contains pairs of ints, rather than pointers to pairs of ints.

Implementation

[WWW]deep-flatten.sig [WWW]deep-flatten.fun

Details and Notes

There are some performance issues with the deep flatten pass, where it consumes an excessive amount of memory.

A number of applications require compilation with -drop-pass deepFlatten to avoid exceeding available memory. It is often asked whether the deep flatten pass usually has a significant impact on performance. The standard benchmark suite was run with and without the deep flatten pass enabled when the pass was first introduced:

The conclusion is that it does not have a significant impact. However, these are micro benchmarks; other applications may derive greater benefit from the pass.


Last edited on 2010-06-01 17:13:13 by MatthewFluet.