Commit ac1ba1f
authored
[CodeGen] Introduce a VirtRegOrUnit class to hold virtual reg or physical reg unit. NFC (llvm#123768)
LiveIntervals and MachineVerifier were previously using Register to
store this, but reg units are different than physical registers. One
important difference is that 0 is a valid reg unit number, but it is not
a valid phyiscal register.
This patch introduces a new VirtRegOrUnit class that is distinct from
Register. It can be be converted to/from a virtual Register or a
MCRegUnit. I've made all conversions explicit and used assertions to
check the validity.
I also fixed a place in MachineVerifier that was ignoring reg unit 0.1 parent 3b35b4c commit ac1ba1f
File tree
4 files changed
+144
-104
lines changed- llvm
- include/llvm/CodeGen
- lib/CodeGen
4 files changed
+144
-104
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
163 | 194 | | |
164 | 195 | | |
165 | 196 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
466 | 466 | | |
467 | 467 | | |
468 | 468 | | |
469 | | - | |
| 469 | + | |
470 | 470 | | |
471 | | - | |
| 471 | + | |
472 | 472 | | |
473 | 473 | | |
474 | 474 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1080 | 1080 | | |
1081 | 1081 | | |
1082 | 1082 | | |
1083 | | - | |
| 1083 | + | |
1084 | 1084 | | |
1085 | 1085 | | |
1086 | | - | |
| 1086 | + | |
1087 | 1087 | | |
1088 | 1088 | | |
1089 | 1089 | | |
| |||
1110 | 1110 | | |
1111 | 1111 | | |
1112 | 1112 | | |
1113 | | - | |
| 1113 | + | |
1114 | 1114 | | |
1115 | 1115 | | |
1116 | 1116 | | |
| |||
1119 | 1119 | | |
1120 | 1120 | | |
1121 | 1121 | | |
1122 | | - | |
| 1122 | + | |
| 1123 | + | |
1123 | 1124 | | |
1124 | 1125 | | |
1125 | 1126 | | |
1126 | 1127 | | |
1127 | | - | |
1128 | | - | |
| 1128 | + | |
| 1129 | + | |
1129 | 1130 | | |
1130 | 1131 | | |
1131 | 1132 | | |
1132 | | - | |
| 1133 | + | |
1133 | 1134 | | |
1134 | 1135 | | |
1135 | 1136 | | |
1136 | 1137 | | |
1137 | 1138 | | |
1138 | 1139 | | |
1139 | | - | |
| 1140 | + | |
1140 | 1141 | | |
1141 | 1142 | | |
1142 | 1143 | | |
| |||
1316 | 1317 | | |
1317 | 1318 | | |
1318 | 1319 | | |
1319 | | - | |
| 1320 | + | |
| 1321 | + | |
1320 | 1322 | | |
1321 | 1323 | | |
1322 | 1324 | | |
| |||
1340 | 1342 | | |
1341 | 1343 | | |
1342 | 1344 | | |
1343 | | - | |
| 1345 | + | |
1344 | 1346 | | |
1345 | 1347 | | |
1346 | 1348 | | |
| |||
1498 | 1500 | | |
1499 | 1501 | | |
1500 | 1502 | | |
1501 | | - | |
| 1503 | + | |
1502 | 1504 | | |
1503 | | - | |
| 1505 | + | |
1504 | 1506 | | |
1505 | | - | |
| 1507 | + | |
| 1508 | + | |
1506 | 1509 | | |
1507 | 1510 | | |
1508 | 1511 | | |
| |||
1545 | 1548 | | |
1546 | 1549 | | |
1547 | 1550 | | |
1548 | | - | |
| 1551 | + | |
1549 | 1552 | | |
1550 | 1553 | | |
1551 | 1554 | | |
| |||
0 commit comments