You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/src/devdocs/EscapeAnalysis.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# `EscapeAnalysis`
2
2
3
-
`Core.Compiler.EscapeAnalysis` is a compiler utility module that aims to analyze
3
+
`Compiler.EscapeAnalysis` is a compiler utility module that aims to analyze
4
4
escape information of [Julia's SSA-form IR](@ref Julia-SSA-form-IR) a.k.a. `IRCode`.
5
5
6
6
This escape analysis aims to:
@@ -59,7 +59,7 @@ The symbols on the side of each call argument and SSA statements represent the f
59
59
-`✓` (green or cyan): this value never escapes (`has_no_escape(result.state[x])` holds), colored blue if it has arg escape also (`has_arg_escape(result.state[x])` holds)
60
60
-`↑` (blue or yellow): this value can escape to the caller via return (`has_return_escape(result.state[x])` holds), colored yellow if it has unhandled thrown escape also (`has_thrown_escape(result.state[x])` holds)
61
61
-`X` (red): this value can escape to somewhere the escape analysis can't reason about like escapes to a global memory (`has_all_escape(result.state[x])` holds)
62
-
-`*` (bold): this value's escape state is between the `ReturnEscape` and `AllEscape` in the partial order of [`EscapeInfo`](@refCore.Compiler.EscapeAnalysis.EscapeInfo), colored yellow if it has unhandled thrown escape also (`has_thrown_escape(result.state[x])` holds)
62
+
-`*` (bold): this value's escape state is between the `ReturnEscape` and `AllEscape` in the partial order of [`EscapeInfo`](@refBase.Compiler.EscapeAnalysis.EscapeInfo), colored yellow if it has unhandled thrown escape also (`has_thrown_escape(result.state[x])` holds)
63
63
-`′`: this value has additional object field / array element information in its `AliasInfo` property
64
64
65
65
Escape information of each call argument and SSA value can be inspected programmatically as like:
@@ -74,7 +74,7 @@ result.state[Core.SSAValue(3)] # get EscapeInfo of `r3`
74
74
### Lattice Design
75
75
76
76
`EscapeAnalysis` is implemented as a [data-flow analysis](https://en.wikipedia.org/wiki/Data-flow_analysis)
77
-
that works on a lattice of [`x::EscapeInfo`](@refCore.Compiler.EscapeAnalysis.EscapeInfo),
77
+
that works on a lattice of [`x::EscapeInfo`](@refBase.Compiler.EscapeAnalysis.EscapeInfo),
78
78
which is composed of the following properties:
79
79
-`x.Analyzed::Bool`: not formally part of the lattice, only indicates `x` has not been analyzed or not
80
80
-`x.ReturnEscape::BitSet`: records SSA statements where `x` can escape to the caller via return
@@ -366,9 +366,9 @@ More interestingly, it is also valid to use `IPO EA` escape information for type
366
366
e.g., inference accuracy can be improved by forming `Const`/`PartialStruct`/`MustAlias` of mutable object.
0 commit comments