Debian Codegraph @

doc/guide/src/LoopInvariant.adoc

raw
1 = LoopInvariant
2
3 <<LoopInvariant#>> is an optimization pass for the <<SSA#>>
4 <<IntermediateLanguage#>>, invoked from <<SSASimplify#>>.
5
6 == Description
7
8 This pass removes loop invariant arguments to local loops.
9
10 ----
11 loop (x, y)
12 ...
13 ...
14 loop (x, z)
15 ...
16 ----
17
18 becomes
19
20 ----
21 loop' (x, y)
22 loop (y)
23 loop (y)
24 ...
25 ...
26 loop (z)
27 ...
28 ----
29
30 == Implementation
31
32 * https://github.com/MLton/mlton/blob/master/mlton/ssa/loop-invariant.fun[`loop-invariant.fun`]
33
34 == Details and Notes
35
36 {empty}