Commit 2d7ea71
committed
[AMDGPU] Use std::variant in ArgDescriptor.
This replaces the 2 bool flags and the anonymous union. This also
removes an implicit conversion from Register to unsigned and a
call to MCRegister::id().
The ArgDescriptor constructor was always assigning the union through
the MCRegister field even for stack offsets.
The change to SIMachineFunctionInfo.h fixes a case where getRegister
was being called on an unset ArgDescriptor. Since it was only this
case, it seemed cleaner to fix it at the caller. The other option would
be to make getRegister() return MCRegister() for an unset ArgDescriptor.1 parent 630dfc9 commit 2d7ea71
File tree
2 files changed
+22
-24
lines changed- llvm/lib/Target/AMDGPU
2 files changed
+22
-24
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
| 31 | + | |
34 | 32 | | |
35 | 33 | | |
36 | 34 | | |
37 | 35 | | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | 36 | | |
42 | | - | |
43 | | - | |
44 | | - | |
| 37 | + | |
45 | 38 | | |
46 | 39 | | |
47 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
48 | 43 | | |
49 | 44 | | |
50 | 45 | | |
51 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
52 | 49 | | |
53 | 50 | | |
54 | 51 | | |
55 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
59 | | - | |
60 | | - | |
| 58 | + | |
61 | 59 | | |
62 | 60 | | |
63 | 61 | | |
64 | 62 | | |
65 | 63 | | |
66 | | - | |
67 | | - | |
68 | | - | |
| 64 | + | |
69 | 65 | | |
70 | 66 | | |
71 | | - | |
72 | | - | |
| 67 | + | |
| 68 | + | |
73 | 69 | | |
74 | 70 | | |
75 | 71 | | |
76 | | - | |
77 | | - | |
| 72 | + | |
| 73 | + | |
78 | 74 | | |
79 | 75 | | |
80 | 76 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1014 | 1014 | | |
1015 | 1015 | | |
1016 | 1016 | | |
1017 | | - | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
1018 | 1020 | | |
1019 | 1021 | | |
1020 | 1022 | | |
| |||
0 commit comments