## MLton 20241230+git20251029+dfsg-5

# Contify

Contify is an optimization pass for the SSA IntermediateLanguage, invoked from SSASimplify.

## Description

Contification is a compiler optimization that turns a function that always returns to the same place into a continuation. This exposes control-flow information that is required by many optimizations, including traditional loop optimizations.

## Implementation

- `contify.fun`

## Details and Notes

See Contification Using Dominators. The intermediate language described in that paper has since evolved to the SSA IntermediateLanguage; hence, the complication described in Section 6.1 is no longer relevant.