MLton 20070826 Useless
Home  Index  
Useless is an optimization pass for the SSA IntermediateLanguage, invoked from SSASimplify.

Description

This pass:

If a useful tuple is coerced to another useful tuple, then all of their components must agree (exactly). It is trivial to convert a useful value to a useless one.

Implementation

[WWW]useless.sig [WWW]useless.fun

Details and Notes

It is also trivial to convert a useful tuple to one of its useful components -- but this seems hard.

Suppose that you have a ref/array/vector that is useful, but the components aren't -- then the components are converted to type unit, and any primitive args must be as well.

Unify all handler arguments so that raise/handle has a consistent calling convention.


Last edited on 2006-11-02 17:56:21 by MatthewFluet.