Skip to content

Commit 61ec8fc

Browse files
authored
[NFC][PowerPC] clang-format spill and restore opcodes (#141675)
Reformat spill and restore opCode lists.
1 parent 7f78ebf commit 61ec8fc

File tree

1 file changed

+136
-48
lines changed

1 file changed

+136
-48
lines changed

llvm/lib/Target/PowerPC/PPCInstrInfo.h

Lines changed: 136 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -102,68 +102,156 @@ enum PPCMachineCombinerPattern : unsigned {
102102
// Define list of load and store spill opcodes.
103103
#define NoInstr PPC::INSTRUCTION_LIST_END
104104
#define Pwr8LoadOpcodes \
105-
{ \
106-
PPC::LWZ, PPC::LD, PPC::LFD, PPC::LFS, PPC::RESTORE_CR, \
107-
PPC::RESTORE_CRBIT, PPC::LVX, PPC::LXVD2X, PPC::LXSDX, PPC::LXSSPX, \
108-
PPC::SPILLTOVSR_LD, NoInstr, NoInstr, NoInstr, NoInstr, PPC::EVLDD, \
109-
PPC::RESTORE_QUADWORD \
110-
}
105+
{PPC::LWZ, \
106+
PPC::LD, \
107+
PPC::LFD, \
108+
PPC::LFS, \
109+
PPC::RESTORE_CR, \
110+
PPC::RESTORE_CRBIT, \
111+
PPC::LVX, \
112+
PPC::LXVD2X, \
113+
PPC::LXSDX, \
114+
PPC::LXSSPX, \
115+
PPC::SPILLTOVSR_LD, \
116+
NoInstr, \
117+
NoInstr, \
118+
NoInstr, \
119+
NoInstr, \
120+
PPC::EVLDD, \
121+
PPC::RESTORE_QUADWORD}
111122

112123
#define Pwr9LoadOpcodes \
113-
{ \
114-
PPC::LWZ, PPC::LD, PPC::LFD, PPC::LFS, PPC::RESTORE_CR, \
115-
PPC::RESTORE_CRBIT, PPC::LVX, PPC::LXV, PPC::DFLOADf64, \
116-
PPC::DFLOADf32, PPC::SPILLTOVSR_LD, NoInstr, NoInstr, NoInstr, \
117-
NoInstr, NoInstr, PPC::RESTORE_QUADWORD \
118-
}
124+
{PPC::LWZ, \
125+
PPC::LD, \
126+
PPC::LFD, \
127+
PPC::LFS, \
128+
PPC::RESTORE_CR, \
129+
PPC::RESTORE_CRBIT, \
130+
PPC::LVX, \
131+
PPC::LXV, \
132+
PPC::DFLOADf64, \
133+
PPC::DFLOADf32, \
134+
PPC::SPILLTOVSR_LD, \
135+
NoInstr, \
136+
NoInstr, \
137+
NoInstr, \
138+
NoInstr, \
139+
NoInstr, \
140+
PPC::RESTORE_QUADWORD}
119141

120142
#define Pwr10LoadOpcodes \
121-
{ \
122-
PPC::LWZ, PPC::LD, PPC::LFD, PPC::LFS, PPC::RESTORE_CR, \
123-
PPC::RESTORE_CRBIT, PPC::LVX, PPC::LXV, PPC::DFLOADf64, \
124-
PPC::DFLOADf32, PPC::SPILLTOVSR_LD, PPC::LXVP, PPC::RESTORE_ACC, \
125-
PPC::RESTORE_UACC, NoInstr, NoInstr, PPC::RESTORE_QUADWORD \
126-
}
143+
{PPC::LWZ, \
144+
PPC::LD, \
145+
PPC::LFD, \
146+
PPC::LFS, \
147+
PPC::RESTORE_CR, \
148+
PPC::RESTORE_CRBIT, \
149+
PPC::LVX, \
150+
PPC::LXV, \
151+
PPC::DFLOADf64, \
152+
PPC::DFLOADf32, \
153+
PPC::SPILLTOVSR_LD, \
154+
PPC::LXVP, \
155+
PPC::RESTORE_ACC, \
156+
PPC::RESTORE_UACC, \
157+
NoInstr, \
158+
NoInstr, \
159+
PPC::RESTORE_QUADWORD}
127160

128161
#define FutureLoadOpcodes \
129-
{ \
130-
PPC::LWZ, PPC::LD, PPC::LFD, PPC::LFS, PPC::RESTORE_CR, \
131-
PPC::RESTORE_CRBIT, PPC::LVX, PPC::LXV, PPC::DFLOADf64, \
132-
PPC::DFLOADf32, PPC::SPILLTOVSR_LD, PPC::LXVP, PPC::RESTORE_ACC, \
133-
PPC::RESTORE_UACC, PPC::RESTORE_WACC, NoInstr, PPC::RESTORE_QUADWORD \
134-
}
162+
{PPC::LWZ, \
163+
PPC::LD, \
164+
PPC::LFD, \
165+
PPC::LFS, \
166+
PPC::RESTORE_CR, \
167+
PPC::RESTORE_CRBIT, \
168+
PPC::LVX, \
169+
PPC::LXV, \
170+
PPC::DFLOADf64, \
171+
PPC::DFLOADf32, \
172+
PPC::SPILLTOVSR_LD, \
173+
PPC::LXVP, \
174+
PPC::RESTORE_ACC, \
175+
PPC::RESTORE_UACC, \
176+
PPC::RESTORE_WACC, \
177+
NoInstr, \
178+
PPC::RESTORE_QUADWORD}
135179

136180
#define Pwr8StoreOpcodes \
137-
{ \
138-
PPC::STW, PPC::STD, PPC::STFD, PPC::STFS, PPC::SPILL_CR, PPC::SPILL_CRBIT, \
139-
PPC::STVX, PPC::STXVD2X, PPC::STXSDX, PPC::STXSSPX, \
140-
PPC::SPILLTOVSR_ST, NoInstr, NoInstr, NoInstr, NoInstr, PPC::EVSTDD, \
141-
PPC::SPILL_QUADWORD \
142-
}
181+
{PPC::STW, \
182+
PPC::STD, \
183+
PPC::STFD, \
184+
PPC::STFS, \
185+
PPC::SPILL_CR, \
186+
PPC::SPILL_CRBIT, \
187+
PPC::STVX, \
188+
PPC::STXVD2X, \
189+
PPC::STXSDX, \
190+
PPC::STXSSPX, \
191+
PPC::SPILLTOVSR_ST, \
192+
NoInstr, \
193+
NoInstr, \
194+
NoInstr, \
195+
NoInstr, \
196+
PPC::EVSTDD, \
197+
PPC::SPILL_QUADWORD}
143198

144199
#define Pwr9StoreOpcodes \
145-
{ \
146-
PPC::STW, PPC::STD, PPC::STFD, PPC::STFS, PPC::SPILL_CR, PPC::SPILL_CRBIT, \
147-
PPC::STVX, PPC::STXV, PPC::DFSTOREf64, PPC::DFSTOREf32, \
148-
PPC::SPILLTOVSR_ST, NoInstr, NoInstr, NoInstr, NoInstr, NoInstr, \
149-
PPC::SPILL_QUADWORD \
150-
}
200+
{PPC::STW, \
201+
PPC::STD, \
202+
PPC::STFD, \
203+
PPC::STFS, \
204+
PPC::SPILL_CR, \
205+
PPC::SPILL_CRBIT, \
206+
PPC::STVX, \
207+
PPC::STXV, \
208+
PPC::DFSTOREf64, \
209+
PPC::DFSTOREf32, \
210+
PPC::SPILLTOVSR_ST, \
211+
NoInstr, \
212+
NoInstr, \
213+
NoInstr, \
214+
NoInstr, \
215+
NoInstr, \
216+
PPC::SPILL_QUADWORD}
151217

152218
#define Pwr10StoreOpcodes \
153-
{ \
154-
PPC::STW, PPC::STD, PPC::STFD, PPC::STFS, PPC::SPILL_CR, PPC::SPILL_CRBIT, \
155-
PPC::STVX, PPC::STXV, PPC::DFSTOREf64, PPC::DFSTOREf32, \
156-
PPC::SPILLTOVSR_ST, PPC::STXVP, PPC::SPILL_ACC, PPC::SPILL_UACC, \
157-
NoInstr, NoInstr, PPC::SPILL_QUADWORD \
158-
}
219+
{PPC::STW, \
220+
PPC::STD, \
221+
PPC::STFD, \
222+
PPC::STFS, \
223+
PPC::SPILL_CR, \
224+
PPC::SPILL_CRBIT, \
225+
PPC::STVX, \
226+
PPC::STXV, \
227+
PPC::DFSTOREf64, \
228+
PPC::DFSTOREf32, \
229+
PPC::SPILLTOVSR_ST, \
230+
PPC::STXVP, \
231+
PPC::SPILL_ACC, \
232+
PPC::SPILL_UACC, \
233+
NoInstr, \
234+
NoInstr, \
235+
PPC::SPILL_QUADWORD}
159236

160237
#define FutureStoreOpcodes \
161-
{ \
162-
PPC::STW, PPC::STD, PPC::STFD, PPC::STFS, PPC::SPILL_CR, PPC::SPILL_CRBIT, \
163-
PPC::STVX, PPC::STXV, PPC::DFSTOREf64, PPC::DFSTOREf32, \
164-
PPC::SPILLTOVSR_ST, PPC::STXVP, PPC::SPILL_ACC, PPC::SPILL_UACC, \
165-
PPC::SPILL_WACC, NoInstr, PPC::SPILL_QUADWORD \
166-
}
238+
{PPC::STW, \
239+
PPC::STD, \
240+
PPC::STFD, \
241+
PPC::STFS, \
242+
PPC::SPILL_CR, \
243+
PPC::SPILL_CRBIT, \
244+
PPC::STVX, \
245+
PPC::STXV, \
246+
PPC::DFSTOREf64, \
247+
PPC::DFSTOREf32, \
248+
PPC::SPILLTOVSR_ST, \
249+
PPC::STXVP, \
250+
PPC::SPILL_ACC, \
251+
PPC::SPILL_UACC, \
252+
PPC::SPILL_WACC, \
253+
NoInstr, \
254+
PPC::SPILL_QUADWORD}
167255

168256
// Initialize arrays for load and store spill opcodes on supported subtargets.
169257
#define StoreOpcodesForSpill \

0 commit comments

Comments
 (0)