This repository was archived by the owner on Jan 7, 2022. It is now read-only.
Commit aba3df7
committed
Start converting MIR to SSA TIR.
This change:
- Starts adding support for statements to TIR.
Only simple assignments are translated. Everything else is made into
an "unimplemented" statement.
- Does the first part of the SSA conversion, namely:
* Computes the dominance frontier.
* Inserts PHI nodes in the right place and for the correct TIR variables.
So what we get is a CFG with PHIs, but which is not yet in SSA. The
remaining step is to walk the dominator tree and assign each definition
of a variable with a new SSA variable name.
Manual inspection of CFG graphs with assignments and PHIs shown
look good, but tests will follow later.1 parent 579fb1d commit aba3df7
File tree
6 files changed
+336
-29
lines changed- src
- librustc_yk_sections
- tools/tidy/src
6 files changed
+336
-29
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
8 | 11 | | |
9 | | - | |
10 | | - | |
| 12 | + | |
| 13 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3062 | 3062 | | |
3063 | 3063 | | |
3064 | 3064 | | |
| 3065 | + | |
3065 | 3066 | | |
3066 | 3067 | | |
| 3068 | + | |
3067 | 3069 | | |
3068 | 3070 | | |
3069 | 3071 | | |
| |||
4044 | 4046 | | |
4045 | 4047 | | |
4046 | 4048 | | |
4047 | | - | |
| 4049 | + | |
4048 | 4050 | | |
4049 | 4051 | | |
4050 | 4052 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
16 | 18 | | |
17 | 19 | | |
0 commit comments