MLton 20051202 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 2005-12-02 03:09:00 by StephenWeeks.