## MLton 20241230+git20251029+dfsg-5

# LoopInvariant

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

## Description

This pass removes loop invariant arguments to local loops.

      loop (x, y)
        ...
      ...
        loop (x, z)
      ...

becomes

      loop' (x, y)
        loop (y)
      loop (y)
        ...
      ...
        loop (z)
      ...

## Implementation

- `loop-invariant.fun`

## Details and Notes