File tree Expand file tree Collapse file tree 5 files changed +447
-0
lines changed Expand file tree Collapse file tree 5 files changed +447
-0
lines changed Original file line number Diff line number Diff line change @@ -92,6 +92,13 @@ There are essentially four kinds of representations one might want of an express
92
92
* ` Operand ` is an argument to e.g. a ` + ` operation or a function call
93
93
* a temporary variable containing a copy of the value
94
94
95
+ These following image depicts a general overview of the interactions between the
96
+ representations:
97
+
98
+ <img src =" mir_overview.svg " >
99
+
100
+ [ Click here for a more detailed view] ( mir_detailed.svg )
101
+
95
102
We start out with lowering the function body to an ` Rvalue ` so we can create an
96
103
assignment to ` RETURN_PLACE ` , This ` Rvalue ` lowering will in turn trigger lowering to
97
104
` Operand ` for its arguments (if any). ` Operand ` lowering either produces a ` const `
Original file line number Diff line number Diff line change
1
+ digraph G {
2
+ Operand -> Constant
3
+ Operand -> Place [taillabel =" read" ]
4
+ Place -> Projection
5
+ Projection -> Place
6
+ Place -> LocalId
7
+ Rvalue -> " Rvalue\n Aggregate"
8
+ Rvalue -> " Rvalue\n BinaryOp"
9
+ Rvalue -> " Rvalue\n UnaryOp"
10
+ Rvalue -> " Rvalue\n ..."
11
+ " Rvalue\n Aggregate" -> Operand [headlabel =" *" ]
12
+ " Rvalue\n BinaryOp" -> Operand [headlabel =" 2" ]
13
+ " Rvalue\n UnaryOp" -> Operand
14
+ " Statement\n Assignment" -> Place [taillabel =" write" ]
15
+ " Statement\n Assignment" -> Rvalue
16
+ Statement -> " Statement\n Assignment"
17
+ Statement -> " Statement\n ..."
18
+ Block -> Statement [headlabel =" *" ]
19
+ Block -> Terminator
20
+ Terminator -> " Terminator\n SwitchInt"
21
+ " Terminator\n SwitchInt" -> Operand
22
+ " Terminator\n SwitchInt" -> Constant [headlabel =" *" ]
23
+ " Terminator\n SwitchInt" -> BlockId [headlabel =" *" ]
24
+ Terminator -> " Terminator\n ..."
25
+ Mir -> Block [headlabel =" *" ]
26
+ Mir -> Local [headlabel =" *" ]
27
+ }
Original file line number Diff line number Diff line change
1
+ digraph G {
2
+ Operand -> Constant
3
+ Operand -> Place
4
+ Place -> Projection
5
+ Projection -> Place
6
+ Place -> Local
7
+ Rvalue -> Operand
8
+ Assignment -> Place
9
+ Assignment -> Operand
10
+ }
You can’t perform that action at this time.
0 commit comments