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: src/mir/passes.md
+7-9
Original file line number
Diff line number
Diff line change
@@ -2,8 +2,8 @@
2
2
3
3
If you would like to get the MIR:
4
4
5
-
- for a function - you can use the `optimized_mir(def_id)` query;
6
-
- for a promoted - you can use the `promoted_mir(def_id)` query.
5
+
- for a function - you can use the `optimized_mir` query (typically used by codegen) or the `mir_for_ctfe` query (typically used by compile time function evaluation, i.e., *CTFE*);
6
+
- for a promoted - you can use the `promoted_mir` query.
7
7
8
8
These will give you back the final, optimized MIR. For foreign def-ids, we simply read the MIR
9
9
from the other crate's metadata. But for local def-ids, the query will
@@ -13,8 +13,8 @@ This section describes how those queries and passes work and how you can extend
13
13
14
14
To produce the optimized MIR for a given def-id `D`, `optimized_mir(D)`
15
15
goes through several suites of passes, each grouped by a
16
-
query. Each suite consists of passes which perform analysis, transformation or optimization.
17
-
Each query represent a useful intermediate point
16
+
query. Each suite consists of passes which perform linting, analysis, transformation or
17
+
optimization. Each query represent a useful intermediate point
18
18
where we can access the MIR dialect for type checking or other purposes:
19
19
20
20
-`mir_built(D)` – it gives the initial MIR just after it's built;
0 commit comments