1 //===-- X86Schedule.td - X86 Scheduling Definitions --------*- tablegen -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 //===----------------------------------------------------------------------===//
10 // InstrSchedModel annotations for out-of-order CPUs.
12 // Instructions with folded loads need to read the memory operand immediately,
13 // but other register operands don't have to be read until the load is ready.
14 // These operands are marked with ReadAfterLd.
15 def ReadAfterLd : SchedRead;
16 def ReadAfterVecLd : SchedRead;
17 def ReadAfterVecXLd : SchedRead;
18 def ReadAfterVecYLd : SchedRead;
20 // Instructions that move data between general purpose registers and vector
21 // registers may be subject to extra latency due to data bypass delays.
22 // This SchedRead describes a bypass delay caused by data being moved from the
23 // integer unit to the floating point unit.
24 def ReadInt2Fpu : SchedRead;
26 // Instructions with both a load and a store folded are modeled as a folded
28 def WriteRMW : SchedWrite;
30 // Helper to set SchedWrite ExePorts/Latency/ResourceCycles/NumMicroOps.
31 multiclass X86WriteRes<SchedWrite SchedRW,
32 list<ProcResourceKind> ExePorts,
33 int Lat, list<int> Res, int UOps> {
34 def : WriteRes<SchedRW, ExePorts> {
36 let ResourceCycles = Res;
37 let NumMicroOps = UOps;
41 // Most instructions can fold loads, so almost every SchedWrite comes in two
42 // variants: With and without a folded load.
43 // An X86FoldableSchedWrite holds a reference to the corresponding SchedWrite
44 // with a folded load.
45 class X86FoldableSchedWrite : SchedWrite {
46 // The SchedWrite to use when a load is folded into the instruction.
48 // The SchedRead to tag register operands than don't need to be ready
49 // until the folded load has completed.
50 SchedRead ReadAfterFold;
53 // Multiclass that produces a linked pair of SchedWrites.
54 multiclass X86SchedWritePair<SchedRead ReadAfter = ReadAfterLd> {
55 // Register-Memory operation.
57 // Register-Register operation.
58 def NAME : X86FoldableSchedWrite {
59 let Folded = !cast<SchedWrite>(NAME#"Ld");
60 let ReadAfterFold = ReadAfter;
64 // Helpers to mark SchedWrites as unsupported.
65 multiclass X86WriteResUnsupported<SchedWrite SchedRW> {
66 let Unsupported = 1 in {
67 def : WriteRes<SchedRW, []>;
70 multiclass X86WriteResPairUnsupported<X86FoldableSchedWrite SchedRW> {
71 let Unsupported = 1 in {
72 def : WriteRes<SchedRW, []>;
73 def : WriteRes<SchedRW.Folded, []>;
77 // Multiclass that wraps X86FoldableSchedWrite for each vector width.
78 class X86SchedWriteWidths<X86FoldableSchedWrite sScl,
79 X86FoldableSchedWrite s128,
80 X86FoldableSchedWrite s256,
81 X86FoldableSchedWrite s512> {
82 X86FoldableSchedWrite Scl = sScl; // Scalar float/double operations.
83 X86FoldableSchedWrite MMX = sScl; // MMX operations.
84 X86FoldableSchedWrite XMM = s128; // XMM operations.
85 X86FoldableSchedWrite YMM = s256; // YMM operations.
86 X86FoldableSchedWrite ZMM = s512; // ZMM operations.
89 // Multiclass that wraps X86SchedWriteWidths for each fp vector type.
90 class X86SchedWriteSizes<X86SchedWriteWidths sPH,
91 X86SchedWriteWidths sPS,
92 X86SchedWriteWidths sPD> {
93 X86SchedWriteWidths PH = sPH;
94 X86SchedWriteWidths PS = sPS;
95 X86SchedWriteWidths PD = sPD;
98 // Multiclass that wraps move/load/store triple for a vector width.
99 class X86SchedWriteMoveLS<SchedWrite MoveRR,
101 SchedWrite StoreMR> {
102 SchedWrite RR = MoveRR;
103 SchedWrite RM = LoadRM;
104 SchedWrite MR = StoreMR;
107 // Multiclass that wraps masked load/store writes for a vector width.
108 class X86SchedWriteMaskMove<SchedWrite LoadRM, SchedWrite StoreMR> {
109 SchedWrite RM = LoadRM;
110 SchedWrite MR = StoreMR;
113 // Multiclass that wraps X86SchedWriteMoveLS for each vector width.
114 class X86SchedWriteMoveLSWidths<X86SchedWriteMoveLS sScl,
115 X86SchedWriteMoveLS s128,
116 X86SchedWriteMoveLS s256,
117 X86SchedWriteMoveLS s512> {
118 X86SchedWriteMoveLS Scl = sScl; // Scalar float/double operations.
119 X86SchedWriteMoveLS MMX = sScl; // MMX operations.
120 X86SchedWriteMoveLS XMM = s128; // XMM operations.
121 X86SchedWriteMoveLS YMM = s256; // YMM operations.
122 X86SchedWriteMoveLS ZMM = s512; // ZMM operations.
125 // Loads, stores, and moves, not folded with other operations.
126 def WriteLoad : SchedWrite;
127 def WriteStore : SchedWrite;
128 def WriteStoreNT : SchedWrite;
129 def WriteMove : SchedWrite;
130 def WriteVecMaskedGatherWriteback : SchedWrite;
131 def WriteCopy : WriteSequence<[WriteLoad, WriteStore]>; // mem->mem copy
134 defm WriteALU : X86SchedWritePair; // Simple integer ALU op.
135 defm WriteADC : X86SchedWritePair; // Integer ALU + flags op.
136 def WriteALURMW : WriteSequence<[WriteALULd, WriteRMW]>;
137 def WriteADCRMW : WriteSequence<[WriteADCLd, WriteRMW]>;
138 def WriteLEA : SchedWrite; // LEA instructions can't fold loads.
140 // Integer multiplication
141 defm WriteIMul8 : X86SchedWritePair; // Integer 8-bit multiplication.
142 defm WriteIMul16 : X86SchedWritePair; // Integer 16-bit multiplication.
143 defm WriteIMul16Imm : X86SchedWritePair; // Integer 16-bit multiplication by immediate.
144 defm WriteIMul16Reg : X86SchedWritePair; // Integer 16-bit multiplication by register.
145 defm WriteIMul32 : X86SchedWritePair; // Integer 32-bit multiplication.
146 defm WriteIMul32Imm : X86SchedWritePair; // Integer 32-bit multiplication by immediate.
147 defm WriteIMul32Reg : X86SchedWritePair; // Integer 32-bit multiplication by register.
148 defm WriteIMul64 : X86SchedWritePair; // Integer 64-bit multiplication.
149 defm WriteIMul64Imm : X86SchedWritePair; // Integer 64-bit multiplication by immediate.
150 defm WriteIMul64Reg : X86SchedWritePair; // Integer 64-bit multiplication by register.
151 defm WriteMULX32 : X86SchedWritePair; // Integer 32-bit Multiplication without affecting flags.
152 defm WriteMULX64 : X86SchedWritePair; // Integer 64-bit Multiplication without affecting flags.
153 def WriteIMulH : SchedWrite; // Integer multiplication, high part (only used by MULX).
155 def WriteBSWAP32 : SchedWrite; // Byte Order (Endianness) 32-bit Swap.
156 def WriteBSWAP64 : SchedWrite; // Byte Order (Endianness) 64-bit Swap.
157 defm WriteCMPXCHG : X86SchedWritePair; // Compare and set, compare and swap.
158 def WriteCMPXCHGRMW : SchedWrite; // Compare and set, compare and swap.
159 def WriteXCHG : SchedWrite; // Compare+Exchange - TODO RMW support.
162 defm WriteDiv8 : X86SchedWritePair;
163 defm WriteDiv16 : X86SchedWritePair;
164 defm WriteDiv32 : X86SchedWritePair;
165 defm WriteDiv64 : X86SchedWritePair;
166 defm WriteIDiv8 : X86SchedWritePair;
167 defm WriteIDiv16 : X86SchedWritePair;
168 defm WriteIDiv32 : X86SchedWritePair;
169 defm WriteIDiv64 : X86SchedWritePair;
171 defm WriteBSF : X86SchedWritePair; // Bit scan forward.
172 defm WriteBSR : X86SchedWritePair; // Bit scan reverse.
173 defm WritePOPCNT : X86SchedWritePair; // Bit population count.
174 defm WriteLZCNT : X86SchedWritePair; // Leading zero count.
175 defm WriteTZCNT : X86SchedWritePair; // Trailing zero count.
176 defm WriteCMOV : X86SchedWritePair; // Conditional move.
177 def WriteFCMOV : SchedWrite; // X87 conditional move.
178 def WriteSETCC : SchedWrite; // Set register based on condition code.
179 def WriteSETCCStore : SchedWrite;
180 def WriteLAHFSAHF : SchedWrite; // Load/Store flags in AH.
182 def WriteBitTest : SchedWrite; // Bit Test
183 def WriteBitTestImmLd : SchedWrite;
184 def WriteBitTestRegLd : SchedWrite;
186 def WriteBitTestSet : SchedWrite; // Bit Test + Set
187 def WriteBitTestSetImmLd : SchedWrite;
188 def WriteBitTestSetRegLd : SchedWrite;
189 def WriteBitTestSetImmRMW : WriteSequence<[WriteBitTestSetImmLd, WriteRMW]>;
190 def WriteBitTestSetRegRMW : WriteSequence<[WriteBitTestSetRegLd, WriteRMW]>;
192 // Integer shifts and rotates.
193 defm WriteShift : X86SchedWritePair;
194 defm WriteShiftCL : X86SchedWritePair;
195 defm WriteRotate : X86SchedWritePair;
196 defm WriteRotateCL : X86SchedWritePair;
198 // Double shift instructions.
199 def WriteSHDrri : SchedWrite;
200 def WriteSHDrrcl : SchedWrite;
201 def WriteSHDmri : SchedWrite;
202 def WriteSHDmrcl : SchedWrite;
204 // BMI1 BEXTR/BLS, BMI2 BZHI
205 defm WriteBEXTR : X86SchedWritePair;
206 defm WriteBLS : X86SchedWritePair;
207 defm WriteBZHI : X86SchedWritePair;
209 // Idioms that clear a register, like xorps %xmm0, %xmm0.
210 // These can often bypass execution ports completely.
211 def WriteZero : SchedWrite;
213 // Branches don't produce values, so they have no latency, but they still
214 // consume resources. Indirect branches can fold loads.
215 defm WriteJump : X86SchedWritePair;
217 // Floating point. This covers both scalar and vector operations.
218 def WriteFLD0 : SchedWrite;
219 def WriteFLD1 : SchedWrite;
220 def WriteFLDC : SchedWrite;
221 def WriteFLoad : SchedWrite;
222 def WriteFLoadX : SchedWrite;
223 def WriteFLoadY : SchedWrite;
224 def WriteFMaskedLoad : SchedWrite;
225 def WriteFMaskedLoadY : SchedWrite;
226 def WriteFStore : SchedWrite;
227 def WriteFStoreX : SchedWrite;
228 def WriteFStoreY : SchedWrite;
229 def WriteFStoreNT : SchedWrite;
230 def WriteFStoreNTX : SchedWrite;
231 def WriteFStoreNTY : SchedWrite;
233 def WriteFMaskedStore32 : SchedWrite;
234 def WriteFMaskedStore64 : SchedWrite;
235 def WriteFMaskedStore32Y : SchedWrite;
236 def WriteFMaskedStore64Y : SchedWrite;
238 def WriteFMove : SchedWrite;
239 def WriteFMoveX : SchedWrite;
240 def WriteFMoveY : SchedWrite;
242 defm WriteFAdd : X86SchedWritePair<ReadAfterVecLd>; // Floating point add/sub.
243 defm WriteFAddX : X86SchedWritePair<ReadAfterVecXLd>; // Floating point add/sub (XMM).
244 defm WriteFAddY : X86SchedWritePair<ReadAfterVecYLd>; // Floating point add/sub (YMM).
245 defm WriteFAddZ : X86SchedWritePair<ReadAfterVecYLd>; // Floating point add/sub (ZMM).
246 defm WriteFAdd64 : X86SchedWritePair<ReadAfterVecLd>; // Floating point double add/sub.
247 defm WriteFAdd64X : X86SchedWritePair<ReadAfterVecXLd>; // Floating point double add/sub (XMM).
248 defm WriteFAdd64Y : X86SchedWritePair<ReadAfterVecYLd>; // Floating point double add/sub (YMM).
249 defm WriteFAdd64Z : X86SchedWritePair<ReadAfterVecYLd>; // Floating point double add/sub (ZMM).
250 defm WriteFCmp : X86SchedWritePair<ReadAfterVecLd>; // Floating point compare.
251 defm WriteFCmpX : X86SchedWritePair<ReadAfterVecXLd>; // Floating point compare (XMM).
252 defm WriteFCmpY : X86SchedWritePair<ReadAfterVecYLd>; // Floating point compare (YMM).
253 defm WriteFCmpZ : X86SchedWritePair<ReadAfterVecYLd>; // Floating point compare (ZMM).
254 defm WriteFCmp64 : X86SchedWritePair<ReadAfterVecLd>; // Floating point double compare.
255 defm WriteFCmp64X : X86SchedWritePair<ReadAfterVecXLd>; // Floating point double compare (XMM).
256 defm WriteFCmp64Y : X86SchedWritePair<ReadAfterVecYLd>; // Floating point double compare (YMM).
257 defm WriteFCmp64Z : X86SchedWritePair<ReadAfterVecYLd>; // Floating point double compare (ZMM).
258 defm WriteFCom : X86SchedWritePair<ReadAfterVecLd>; // Floating point compare to flags (X87).
259 defm WriteFComX : X86SchedWritePair<ReadAfterVecLd>; // Floating point compare to flags (SSE).
260 defm WriteFMul : X86SchedWritePair<ReadAfterVecLd>; // Floating point multiplication.
261 defm WriteFMulX : X86SchedWritePair<ReadAfterVecXLd>; // Floating point multiplication (XMM).
262 defm WriteFMulY : X86SchedWritePair<ReadAfterVecYLd>; // Floating point multiplication (YMM).
263 defm WriteFMulZ : X86SchedWritePair<ReadAfterVecYLd>; // Floating point multiplication (YMM).
264 defm WriteFMul64 : X86SchedWritePair<ReadAfterVecLd>; // Floating point double multiplication.
265 defm WriteFMul64X : X86SchedWritePair<ReadAfterVecXLd>; // Floating point double multiplication (XMM).
266 defm WriteFMul64Y : X86SchedWritePair<ReadAfterVecYLd>; // Floating point double multiplication (YMM).
267 defm WriteFMul64Z : X86SchedWritePair<ReadAfterVecYLd>; // Floating point double multiplication (ZMM).
268 defm WriteFDiv : X86SchedWritePair<ReadAfterVecLd>; // Floating point division.
269 defm WriteFDivX : X86SchedWritePair<ReadAfterVecXLd>; // Floating point division (XMM).
270 defm WriteFDivY : X86SchedWritePair<ReadAfterVecYLd>; // Floating point division (YMM).
271 defm WriteFDivZ : X86SchedWritePair<ReadAfterVecYLd>; // Floating point division (ZMM).
272 defm WriteFDiv64 : X86SchedWritePair<ReadAfterVecLd>; // Floating point double division.
273 defm WriteFDiv64X : X86SchedWritePair<ReadAfterVecXLd>; // Floating point double division (XMM).
274 defm WriteFDiv64Y : X86SchedWritePair<ReadAfterVecYLd>; // Floating point double division (YMM).
275 defm WriteFDiv64Z : X86SchedWritePair<ReadAfterVecYLd>; // Floating point double division (ZMM).
276 defm WriteFSqrt : X86SchedWritePair<ReadAfterVecLd>; // Floating point square root.
277 defm WriteFSqrtX : X86SchedWritePair<ReadAfterVecXLd>; // Floating point square root (XMM).
278 defm WriteFSqrtY : X86SchedWritePair<ReadAfterVecYLd>; // Floating point square root (YMM).
279 defm WriteFSqrtZ : X86SchedWritePair<ReadAfterVecYLd>; // Floating point square root (ZMM).
280 defm WriteFSqrt64 : X86SchedWritePair<ReadAfterVecLd>; // Floating point double square root.
281 defm WriteFSqrt64X : X86SchedWritePair<ReadAfterVecXLd>; // Floating point double square root (XMM).
282 defm WriteFSqrt64Y : X86SchedWritePair<ReadAfterVecYLd>; // Floating point double square root (YMM).
283 defm WriteFSqrt64Z : X86SchedWritePair<ReadAfterVecYLd>; // Floating point double square root (ZMM).
284 defm WriteFSqrt80 : X86SchedWritePair<ReadAfterVecLd>; // Floating point long double square root.
285 defm WriteFRcp : X86SchedWritePair<ReadAfterVecLd>; // Floating point reciprocal estimate.
286 defm WriteFRcpX : X86SchedWritePair<ReadAfterVecXLd>; // Floating point reciprocal estimate (XMM).
287 defm WriteFRcpY : X86SchedWritePair<ReadAfterVecYLd>; // Floating point reciprocal estimate (YMM).
288 defm WriteFRcpZ : X86SchedWritePair<ReadAfterVecYLd>; // Floating point reciprocal estimate (ZMM).
289 defm WriteFRsqrt : X86SchedWritePair<ReadAfterVecLd>; // Floating point reciprocal square root estimate.
290 defm WriteFRsqrtX: X86SchedWritePair<ReadAfterVecXLd>; // Floating point reciprocal square root estimate (XMM).
291 defm WriteFRsqrtY: X86SchedWritePair<ReadAfterVecYLd>; // Floating point reciprocal square root estimate (YMM).
292 defm WriteFRsqrtZ: X86SchedWritePair<ReadAfterVecYLd>; // Floating point reciprocal square root estimate (ZMM).
293 defm WriteFMA : X86SchedWritePair<ReadAfterVecLd>; // Fused Multiply Add.
294 defm WriteFMAX : X86SchedWritePair<ReadAfterVecXLd>; // Fused Multiply Add (XMM).
295 defm WriteFMAY : X86SchedWritePair<ReadAfterVecYLd>; // Fused Multiply Add (YMM).
296 defm WriteFMAZ : X86SchedWritePair<ReadAfterVecYLd>; // Fused Multiply Add (ZMM).
297 defm WriteDPPD : X86SchedWritePair<ReadAfterVecXLd>; // Floating point double dot product.
298 defm WriteDPPS : X86SchedWritePair<ReadAfterVecXLd>; // Floating point single dot product.
299 defm WriteDPPSY : X86SchedWritePair<ReadAfterVecYLd>; // Floating point single dot product (YMM).
300 defm WriteDPPSZ : X86SchedWritePair<ReadAfterVecYLd>; // Floating point single dot product (ZMM).
301 defm WriteFSign : X86SchedWritePair<ReadAfterVecLd>; // Floating point fabs/fchs.
302 defm WriteFRnd : X86SchedWritePair<ReadAfterVecXLd>; // Floating point rounding.
303 defm WriteFRndY : X86SchedWritePair<ReadAfterVecYLd>; // Floating point rounding (YMM).
304 defm WriteFRndZ : X86SchedWritePair<ReadAfterVecYLd>; // Floating point rounding (ZMM).
305 defm WriteFLogic : X86SchedWritePair<ReadAfterVecXLd>; // Floating point and/or/xor logicals.
306 defm WriteFLogicY : X86SchedWritePair<ReadAfterVecYLd>; // Floating point and/or/xor logicals (YMM).
307 defm WriteFLogicZ : X86SchedWritePair<ReadAfterVecYLd>; // Floating point and/or/xor logicals (ZMM).
308 defm WriteFTest : X86SchedWritePair<ReadAfterVecXLd>; // Floating point TEST instructions.
309 defm WriteFTestY : X86SchedWritePair<ReadAfterVecYLd>; // Floating point TEST instructions (YMM).
310 defm WriteFTestZ : X86SchedWritePair<ReadAfterVecYLd>; // Floating point TEST instructions (ZMM).
311 defm WriteFShuffle : X86SchedWritePair<ReadAfterVecXLd>; // Floating point vector shuffles.
312 defm WriteFShuffleY : X86SchedWritePair<ReadAfterVecYLd>; // Floating point vector shuffles (YMM).
313 defm WriteFShuffleZ : X86SchedWritePair<ReadAfterVecYLd>; // Floating point vector shuffles (ZMM).
314 defm WriteFVarShuffle : X86SchedWritePair<ReadAfterVecXLd>; // Floating point vector variable shuffles.
315 defm WriteFVarShuffleY : X86SchedWritePair<ReadAfterVecYLd>; // Floating point vector variable shuffles (YMM).
316 defm WriteFVarShuffleZ : X86SchedWritePair<ReadAfterVecYLd>; // Floating point vector variable shuffles (ZMM).
317 defm WriteFBlend : X86SchedWritePair<ReadAfterVecXLd>; // Floating point vector blends.
318 defm WriteFBlendY : X86SchedWritePair<ReadAfterVecYLd>; // Floating point vector blends (YMM).
319 defm WriteFBlendZ : X86SchedWritePair<ReadAfterVecYLd>; // Floating point vector blends (ZMM).
320 defm WriteFVarBlend : X86SchedWritePair<ReadAfterVecXLd>; // Fp vector variable blends.
321 defm WriteFVarBlendY : X86SchedWritePair<ReadAfterVecYLd>; // Fp vector variable blends (YMM).
322 defm WriteFVarBlendZ : X86SchedWritePair<ReadAfterVecYLd>; // Fp vector variable blends (YMZMM).
324 // FMA Scheduling helper class.
325 class FMASC { X86FoldableSchedWrite Sched = WriteFAdd; }
327 // Horizontal Add/Sub (float and integer)
328 defm WriteFHAdd : X86SchedWritePair<ReadAfterVecXLd>;
329 defm WriteFHAddY : X86SchedWritePair<ReadAfterVecYLd>;
330 defm WriteFHAddZ : X86SchedWritePair<ReadAfterVecYLd>;
331 defm WritePHAdd : X86SchedWritePair<ReadAfterVecLd>;
332 defm WritePHAddX : X86SchedWritePair<ReadAfterVecXLd>;
333 defm WritePHAddY : X86SchedWritePair<ReadAfterVecYLd>;
334 defm WritePHAddZ : X86SchedWritePair<ReadAfterVecYLd>;
336 // Vector integer operations.
337 def WriteVecLoad : SchedWrite;
338 def WriteVecLoadX : SchedWrite;
339 def WriteVecLoadY : SchedWrite;
340 def WriteVecLoadNT : SchedWrite;
341 def WriteVecLoadNTY : SchedWrite;
342 def WriteVecMaskedLoad : SchedWrite;
343 def WriteVecMaskedLoadY : SchedWrite;
344 def WriteVecStore : SchedWrite;
345 def WriteVecStoreX : SchedWrite;
346 def WriteVecStoreY : SchedWrite;
347 def WriteVecStoreNT : SchedWrite;
348 def WriteVecStoreNTY : SchedWrite;
349 def WriteVecMaskedStore32 : SchedWrite;
350 def WriteVecMaskedStore64 : SchedWrite;
351 def WriteVecMaskedStore32Y : SchedWrite;
352 def WriteVecMaskedStore64Y : SchedWrite;
353 def WriteVecMove : SchedWrite;
354 def WriteVecMoveX : SchedWrite;
355 def WriteVecMoveY : SchedWrite;
356 def WriteVecMoveToGpr : SchedWrite;
357 def WriteVecMoveFromGpr : SchedWrite;
359 defm WriteVecALU : X86SchedWritePair<ReadAfterVecLd>; // Vector integer ALU op, no logicals.
360 defm WriteVecALUX : X86SchedWritePair<ReadAfterVecXLd>; // Vector integer ALU op, no logicals (XMM).
361 defm WriteVecALUY : X86SchedWritePair<ReadAfterVecYLd>; // Vector integer ALU op, no logicals (YMM).
362 defm WriteVecALUZ : X86SchedWritePair<ReadAfterVecYLd>; // Vector integer ALU op, no logicals (ZMM).
363 defm WriteVecLogic : X86SchedWritePair<ReadAfterVecLd>; // Vector integer and/or/xor logicals.
364 defm WriteVecLogicX : X86SchedWritePair<ReadAfterVecXLd>; // Vector integer and/or/xor logicals (XMM).
365 defm WriteVecLogicY : X86SchedWritePair<ReadAfterVecYLd>; // Vector integer and/or/xor logicals (YMM).
366 defm WriteVecLogicZ : X86SchedWritePair<ReadAfterVecYLd>; // Vector integer and/or/xor logicals (ZMM).
367 defm WriteVecTest : X86SchedWritePair<ReadAfterVecXLd>; // Vector integer TEST instructions.
368 defm WriteVecTestY : X86SchedWritePair<ReadAfterVecYLd>; // Vector integer TEST instructions (YMM).
369 defm WriteVecTestZ : X86SchedWritePair<ReadAfterVecYLd>; // Vector integer TEST instructions (ZMM).
370 defm WriteVecShift : X86SchedWritePair<ReadAfterVecLd>; // Vector integer shifts (default).
371 defm WriteVecShiftX : X86SchedWritePair<ReadAfterVecXLd>; // Vector integer shifts (XMM).
372 defm WriteVecShiftY : X86SchedWritePair<ReadAfterVecYLd>; // Vector integer shifts (YMM).
373 defm WriteVecShiftZ : X86SchedWritePair<ReadAfterVecYLd>; // Vector integer shifts (ZMM).
374 defm WriteVecShiftImm : X86SchedWritePair<ReadAfterVecLd>; // Vector integer immediate shifts (default).
375 defm WriteVecShiftImmX: X86SchedWritePair<ReadAfterVecXLd>; // Vector integer immediate shifts (XMM).
376 defm WriteVecShiftImmY: X86SchedWritePair<ReadAfterVecYLd>; // Vector integer immediate shifts (YMM).
377 defm WriteVecShiftImmZ: X86SchedWritePair<ReadAfterVecYLd>; // Vector integer immediate shifts (ZMM).
378 defm WriteVecIMul : X86SchedWritePair<ReadAfterVecLd>; // Vector integer multiply (default).
379 defm WriteVecIMulX : X86SchedWritePair<ReadAfterVecXLd>; // Vector integer multiply (XMM).
380 defm WriteVecIMulY : X86SchedWritePair<ReadAfterVecYLd>; // Vector integer multiply (YMM).
381 defm WriteVecIMulZ : X86SchedWritePair<ReadAfterVecYLd>; // Vector integer multiply (ZMM).
382 defm WritePMULLD : X86SchedWritePair<ReadAfterVecXLd>; // Vector PMULLD.
383 defm WritePMULLDY : X86SchedWritePair<ReadAfterVecYLd>; // Vector PMULLD (YMM).
384 defm WritePMULLDZ : X86SchedWritePair<ReadAfterVecYLd>; // Vector PMULLD (ZMM).
385 defm WriteShuffle : X86SchedWritePair<ReadAfterVecLd>; // Vector shuffles.
386 defm WriteShuffleX : X86SchedWritePair<ReadAfterVecXLd>; // Vector shuffles (XMM).
387 defm WriteShuffleY : X86SchedWritePair<ReadAfterVecYLd>; // Vector shuffles (YMM).
388 defm WriteShuffleZ : X86SchedWritePair<ReadAfterVecYLd>; // Vector shuffles (ZMM).
389 defm WriteVarShuffle : X86SchedWritePair<ReadAfterVecLd>; // Vector variable shuffles.
390 defm WriteVarShuffleX : X86SchedWritePair<ReadAfterVecXLd>; // Vector variable shuffles (XMM).
391 defm WriteVarShuffleY : X86SchedWritePair<ReadAfterVecYLd>; // Vector variable shuffles (YMM).
392 defm WriteVarShuffleZ : X86SchedWritePair<ReadAfterVecYLd>; // Vector variable shuffles (ZMM).
393 defm WriteBlend : X86SchedWritePair<ReadAfterVecXLd>; // Vector blends.
394 defm WriteBlendY : X86SchedWritePair<ReadAfterVecYLd>; // Vector blends (YMM).
395 defm WriteBlendZ : X86SchedWritePair<ReadAfterVecYLd>; // Vector blends (ZMM).
396 defm WriteVarBlend : X86SchedWritePair<ReadAfterVecXLd>; // Vector variable blends.
397 defm WriteVarBlendY : X86SchedWritePair<ReadAfterVecYLd>; // Vector variable blends (YMM).
398 defm WriteVarBlendZ : X86SchedWritePair<ReadAfterVecYLd>; // Vector variable blends (ZMM).
399 defm WritePSADBW : X86SchedWritePair<ReadAfterVecLd>; // Vector PSADBW.
400 defm WritePSADBWX : X86SchedWritePair<ReadAfterVecXLd>; // Vector PSADBW (XMM).
401 defm WritePSADBWY : X86SchedWritePair<ReadAfterVecYLd>; // Vector PSADBW (YMM).
402 defm WritePSADBWZ : X86SchedWritePair<ReadAfterVecYLd>; // Vector PSADBW (ZMM).
403 defm WriteMPSAD : X86SchedWritePair<ReadAfterVecXLd>; // Vector MPSAD.
404 defm WriteMPSADY : X86SchedWritePair<ReadAfterVecYLd>; // Vector MPSAD (YMM).
405 defm WriteMPSADZ : X86SchedWritePair<ReadAfterVecYLd>; // Vector MPSAD (ZMM).
406 defm WritePHMINPOS : X86SchedWritePair<ReadAfterVecXLd>; // Vector PHMINPOS.
408 // Vector insert/extract operations.
409 defm WriteVecInsert : X86SchedWritePair; // Insert gpr to vector element.
410 def WriteVecExtract : SchedWrite; // Extract vector element to gpr.
411 def WriteVecExtractSt : SchedWrite; // Extract vector element and store.
413 // MOVMSK operations.
414 def WriteFMOVMSK : SchedWrite;
415 def WriteVecMOVMSK : SchedWrite;
416 def WriteVecMOVMSKY : SchedWrite;
417 def WriteMMXMOVMSK : SchedWrite;
419 // Conversion between integer and float.
420 defm WriteCvtSD2I : X86SchedWritePair<ReadAfterVecLd>; // Double -> Integer.
421 defm WriteCvtPD2I : X86SchedWritePair<ReadAfterVecXLd>; // Double -> Integer (XMM).
422 defm WriteCvtPD2IY : X86SchedWritePair<ReadAfterVecYLd>; // Double -> Integer (YMM).
423 defm WriteCvtPD2IZ : X86SchedWritePair<ReadAfterVecYLd>; // Double -> Integer (ZMM).
425 defm WriteCvtSS2I : X86SchedWritePair<ReadAfterVecLd>; // Float -> Integer.
426 defm WriteCvtPS2I : X86SchedWritePair<ReadAfterVecXLd>; // Float -> Integer (XMM).
427 defm WriteCvtPS2IY : X86SchedWritePair<ReadAfterVecYLd>; // Float -> Integer (YMM).
428 defm WriteCvtPS2IZ : X86SchedWritePair<ReadAfterVecYLd>; // Float -> Integer (ZMM).
430 defm WriteCvtI2SD : X86SchedWritePair<ReadAfterVecLd>; // Integer -> Double.
431 defm WriteCvtI2PD : X86SchedWritePair<ReadAfterVecXLd>; // Integer -> Double (XMM).
432 defm WriteCvtI2PDY : X86SchedWritePair<ReadAfterVecYLd>; // Integer -> Double (YMM).
433 defm WriteCvtI2PDZ : X86SchedWritePair<ReadAfterVecYLd>; // Integer -> Double (ZMM).
435 defm WriteCvtI2SS : X86SchedWritePair<ReadAfterVecLd>; // Integer -> Float.
436 defm WriteCvtI2PS : X86SchedWritePair<ReadAfterVecXLd>; // Integer -> Float (XMM).
437 defm WriteCvtI2PSY : X86SchedWritePair<ReadAfterVecYLd>; // Integer -> Float (YMM).
438 defm WriteCvtI2PSZ : X86SchedWritePair<ReadAfterVecYLd>; // Integer -> Float (ZMM).
440 defm WriteCvtSS2SD : X86SchedWritePair<ReadAfterVecLd>; // Float -> Double size conversion.
441 defm WriteCvtPS2PD : X86SchedWritePair<ReadAfterVecXLd>; // Float -> Double size conversion (XMM).
442 defm WriteCvtPS2PDY : X86SchedWritePair<ReadAfterVecYLd>; // Float -> Double size conversion (YMM).
443 defm WriteCvtPS2PDZ : X86SchedWritePair<ReadAfterVecYLd>; // Float -> Double size conversion (ZMM).
445 defm WriteCvtSD2SS : X86SchedWritePair<ReadAfterVecLd>; // Double -> Float size conversion.
446 defm WriteCvtPD2PS : X86SchedWritePair<ReadAfterVecXLd>; // Double -> Float size conversion (XMM).
447 defm WriteCvtPD2PSY : X86SchedWritePair<ReadAfterVecYLd>; // Double -> Float size conversion (YMM).
448 defm WriteCvtPD2PSZ : X86SchedWritePair<ReadAfterVecYLd>; // Double -> Float size conversion (ZMM).
450 defm WriteCvtPH2PS : X86SchedWritePair<ReadAfterVecXLd>; // Half -> Float size conversion.
451 defm WriteCvtPH2PSY : X86SchedWritePair<ReadAfterVecYLd>; // Half -> Float size conversion (YMM).
452 defm WriteCvtPH2PSZ : X86SchedWritePair<ReadAfterVecYLd>; // Half -> Float size conversion (ZMM).
454 def WriteCvtPS2PH : SchedWrite; // // Float -> Half size conversion.
455 def WriteCvtPS2PHY : SchedWrite; // // Float -> Half size conversion (YMM).
456 def WriteCvtPS2PHZ : SchedWrite; // // Float -> Half size conversion (ZMM).
457 def WriteCvtPS2PHSt : SchedWrite; // // Float -> Half + store size conversion.
458 def WriteCvtPS2PHYSt : SchedWrite; // // Float -> Half + store size conversion (YMM).
459 def WriteCvtPS2PHZSt : SchedWrite; // // Float -> Half + store size conversion (ZMM).
461 // CRC32 instruction.
462 defm WriteCRC32 : X86SchedWritePair<ReadAfterLd>;
464 // Strings instructions.
465 // Packed Compare Implicit Length Strings, Return Mask
466 defm WritePCmpIStrM : X86SchedWritePair<ReadAfterVecXLd>;
467 // Packed Compare Explicit Length Strings, Return Mask
468 defm WritePCmpEStrM : X86SchedWritePair<ReadAfterVecXLd>;
469 // Packed Compare Implicit Length Strings, Return Index
470 defm WritePCmpIStrI : X86SchedWritePair<ReadAfterVecXLd>;
471 // Packed Compare Explicit Length Strings, Return Index
472 defm WritePCmpEStrI : X86SchedWritePair<ReadAfterVecXLd>;
475 defm WriteAESDecEnc : X86SchedWritePair<ReadAfterVecXLd>; // Decryption, encryption.
476 defm WriteAESIMC : X86SchedWritePair<ReadAfterVecXLd>; // InvMixColumn.
477 defm WriteAESKeyGen : X86SchedWritePair<ReadAfterVecXLd>; // Key Generation.
479 // Carry-less multiplication instructions.
480 defm WriteCLMul : X86SchedWritePair<ReadAfterVecXLd>;
483 def WriteEMMS : SchedWrite;
486 def WriteLDMXCSR : SchedWrite;
487 def WriteSTMXCSR : SchedWrite;
489 // Catch-all for expensive system instructions.
490 def WriteSystem : SchedWrite;
493 defm WriteFShuffle256 : X86SchedWritePair<ReadAfterVecYLd>; // Fp 256-bit width vector shuffles.
494 defm WriteFVarShuffle256 : X86SchedWritePair<ReadAfterVecYLd>; // Fp 256-bit width variable shuffles.
495 defm WriteShuffle256 : X86SchedWritePair<ReadAfterVecYLd>; // 256-bit width vector shuffles.
496 defm WriteVPMOV256 : X86SchedWritePair<ReadAfterVecYLd>; // 256-bit width packed vector width-changing move.
497 defm WriteVarShuffle256 : X86SchedWritePair<ReadAfterVecYLd>; // 256-bit width vector variable shuffles.
498 defm WriteVarVecShift : X86SchedWritePair<ReadAfterVecXLd>; // Variable vector shifts.
499 defm WriteVarVecShiftY : X86SchedWritePair<ReadAfterVecYLd>; // Variable vector shifts (YMM).
500 defm WriteVarVecShiftZ : X86SchedWritePair<ReadAfterVecYLd>; // Variable vector shifts (ZMM).
502 // Old microcoded instructions that nobody use.
503 def WriteMicrocoded : SchedWrite;
505 // Fence instructions.
506 def WriteFence : SchedWrite;
508 // Nop, not very useful expect it provides a model for nops!
509 def WriteNop : SchedWrite;
511 // Move/Load/Store wrappers.
513 : X86SchedWriteMoveLS<WriteFMove, WriteFLoad, WriteFStore>;
515 : X86SchedWriteMoveLS<WriteFMoveX, WriteFLoadX, WriteFStoreX>;
517 : X86SchedWriteMoveLS<WriteFMoveY, WriteFLoadY, WriteFStoreY>;
518 def SchedWriteFMoveLS
519 : X86SchedWriteMoveLSWidths<WriteFMoveLS, WriteFMoveLSX,
520 WriteFMoveLSY, WriteFMoveLSY>;
523 : X86SchedWriteMoveLS<WriteFMove, WriteFLoad, WriteFStoreNT>;
525 : X86SchedWriteMoveLS<WriteFMove, WriteFLoad, WriteFStoreNTX>;
527 : X86SchedWriteMoveLS<WriteFMoveY, WriteFLoadY, WriteFStoreNTY>;
528 def SchedWriteFMoveLSNT
529 : X86SchedWriteMoveLSWidths<WriteFMoveLSNT, WriteFMoveLSNTX,
530 WriteFMoveLSNTY, WriteFMoveLSNTY>;
533 : X86SchedWriteMoveLS<WriteVecMove, WriteVecLoad, WriteVecStore>;
535 : X86SchedWriteMoveLS<WriteVecMoveX, WriteVecLoadX, WriteVecStoreX>;
537 : X86SchedWriteMoveLS<WriteVecMoveY, WriteVecLoadY, WriteVecStoreY>;
538 def SchedWriteVecMoveLS
539 : X86SchedWriteMoveLSWidths<WriteVecMoveLS, WriteVecMoveLSX,
540 WriteVecMoveLSY, WriteVecMoveLSY>;
543 : X86SchedWriteMoveLS<WriteVecMove, WriteVecLoadNT, WriteVecStoreNT>;
544 def WriteVecMoveLSNTX
545 : X86SchedWriteMoveLS<WriteVecMoveX, WriteVecLoadNT, WriteVecStoreNT>;
546 def WriteVecMoveLSNTY
547 : X86SchedWriteMoveLS<WriteVecMoveY, WriteVecLoadNTY, WriteVecStoreNTY>;
548 def SchedWriteVecMoveLSNT
549 : X86SchedWriteMoveLSWidths<WriteVecMoveLSNT, WriteVecMoveLSNTX,
550 WriteVecMoveLSNTY, WriteVecMoveLSNTY>;
552 // Conditional SIMD Packed Loads and Stores wrappers.
554 : X86SchedWriteMaskMove<WriteFMaskedLoad, WriteFMaskedStore32>;
556 : X86SchedWriteMaskMove<WriteFMaskedLoad, WriteFMaskedStore64>;
557 def WriteFMaskMove32Y
558 : X86SchedWriteMaskMove<WriteFMaskedLoadY, WriteFMaskedStore32Y>;
559 def WriteFMaskMove64Y
560 : X86SchedWriteMaskMove<WriteFMaskedLoadY, WriteFMaskedStore64Y>;
561 def WriteVecMaskMove32
562 : X86SchedWriteMaskMove<WriteVecMaskedLoad, WriteVecMaskedStore32>;
563 def WriteVecMaskMove64
564 : X86SchedWriteMaskMove<WriteVecMaskedLoad, WriteVecMaskedStore64>;
565 def WriteVecMaskMove32Y
566 : X86SchedWriteMaskMove<WriteVecMaskedLoadY, WriteVecMaskedStore32Y>;
567 def WriteVecMaskMove64Y
568 : X86SchedWriteMaskMove<WriteVecMaskedLoadY, WriteVecMaskedStore64Y>;
570 // Vector width wrappers.
572 : X86SchedWriteWidths<WriteFAdd, WriteFAddX, WriteFAddY, WriteFAddZ>;
574 : X86SchedWriteWidths<WriteFAdd64, WriteFAdd64X, WriteFAdd64Y, WriteFAdd64Z>;
576 : X86SchedWriteWidths<WriteFHAdd, WriteFHAdd, WriteFHAddY, WriteFHAddZ>;
578 : X86SchedWriteWidths<WriteFCmp, WriteFCmpX, WriteFCmpY, WriteFCmpZ>;
580 : X86SchedWriteWidths<WriteFCmp64, WriteFCmp64X, WriteFCmp64Y, WriteFCmp64Z>;
582 : X86SchedWriteWidths<WriteFMul, WriteFMulX, WriteFMulY, WriteFMulZ>;
584 : X86SchedWriteWidths<WriteFMul64, WriteFMul64X, WriteFMul64Y, WriteFMul64Z>;
586 : X86SchedWriteWidths<WriteFMA, WriteFMAX, WriteFMAY, WriteFMAZ>;
588 : X86SchedWriteWidths<WriteDPPD, WriteDPPD, WriteDPPD, WriteDPPD>;
590 : X86SchedWriteWidths<WriteDPPS, WriteDPPS, WriteDPPSY, WriteDPPSZ>;
592 : X86SchedWriteWidths<WriteFDiv, WriteFDivX, WriteFDivY, WriteFDivZ>;
594 : X86SchedWriteWidths<WriteFDiv64, WriteFDiv64X, WriteFDiv64Y, WriteFDiv64Z>;
596 : X86SchedWriteWidths<WriteFSqrt, WriteFSqrtX,
597 WriteFSqrtY, WriteFSqrtZ>;
598 def SchedWriteFSqrt64
599 : X86SchedWriteWidths<WriteFSqrt64, WriteFSqrt64X,
600 WriteFSqrt64Y, WriteFSqrt64Z>;
602 : X86SchedWriteWidths<WriteFRcp, WriteFRcpX, WriteFRcpY, WriteFRcpZ>;
604 : X86SchedWriteWidths<WriteFRsqrt, WriteFRsqrtX, WriteFRsqrtY, WriteFRsqrtZ>;
606 : X86SchedWriteWidths<WriteFRnd, WriteFRnd, WriteFRndY, WriteFRndZ>;
608 : X86SchedWriteWidths<WriteFLogic, WriteFLogic, WriteFLogicY, WriteFLogicZ>;
610 : X86SchedWriteWidths<WriteFTest, WriteFTest, WriteFTestY, WriteFTestZ>;
612 def SchedWriteFShuffle
613 : X86SchedWriteWidths<WriteFShuffle, WriteFShuffle,
614 WriteFShuffleY, WriteFShuffleZ>;
615 def SchedWriteFVarShuffle
616 : X86SchedWriteWidths<WriteFVarShuffle, WriteFVarShuffle,
617 WriteFVarShuffleY, WriteFVarShuffleZ>;
619 : X86SchedWriteWidths<WriteFBlend, WriteFBlend, WriteFBlendY, WriteFBlendZ>;
620 def SchedWriteFVarBlend
621 : X86SchedWriteWidths<WriteFVarBlend, WriteFVarBlend,
622 WriteFVarBlendY, WriteFVarBlendZ>;
624 def SchedWriteCvtDQ2PD
625 : X86SchedWriteWidths<WriteCvtI2SD, WriteCvtI2PD,
626 WriteCvtI2PDY, WriteCvtI2PDZ>;
627 def SchedWriteCvtDQ2PS
628 : X86SchedWriteWidths<WriteCvtI2SS, WriteCvtI2PS,
629 WriteCvtI2PSY, WriteCvtI2PSZ>;
630 def SchedWriteCvtPD2DQ
631 : X86SchedWriteWidths<WriteCvtSD2I, WriteCvtPD2I,
632 WriteCvtPD2IY, WriteCvtPD2IZ>;
633 def SchedWriteCvtPS2DQ
634 : X86SchedWriteWidths<WriteCvtSS2I, WriteCvtPS2I,
635 WriteCvtPS2IY, WriteCvtPS2IZ>;
636 def SchedWriteCvtPS2PD
637 : X86SchedWriteWidths<WriteCvtSS2SD, WriteCvtPS2PD,
638 WriteCvtPS2PDY, WriteCvtPS2PDZ>;
639 def SchedWriteCvtPD2PS
640 : X86SchedWriteWidths<WriteCvtSD2SS, WriteCvtPD2PS,
641 WriteCvtPD2PSY, WriteCvtPD2PSZ>;
644 : X86SchedWriteWidths<WriteVecALU, WriteVecALUX, WriteVecALUY, WriteVecALUZ>;
646 : X86SchedWriteWidths<WritePHAdd, WritePHAddX, WritePHAddY, WritePHAddZ>;
647 def SchedWriteVecLogic
648 : X86SchedWriteWidths<WriteVecLogic, WriteVecLogicX,
649 WriteVecLogicY, WriteVecLogicZ>;
650 def SchedWriteVecTest
651 : X86SchedWriteWidths<WriteVecTest, WriteVecTest,
652 WriteVecTestY, WriteVecTestZ>;
653 def SchedWriteVecShift
654 : X86SchedWriteWidths<WriteVecShift, WriteVecShiftX,
655 WriteVecShiftY, WriteVecShiftZ>;
656 def SchedWriteVecShiftImm
657 : X86SchedWriteWidths<WriteVecShiftImm, WriteVecShiftImmX,
658 WriteVecShiftImmY, WriteVecShiftImmZ>;
659 def SchedWriteVarVecShift
660 : X86SchedWriteWidths<WriteVarVecShift, WriteVarVecShift,
661 WriteVarVecShiftY, WriteVarVecShiftZ>;
662 def SchedWriteVecIMul
663 : X86SchedWriteWidths<WriteVecIMul, WriteVecIMulX,
664 WriteVecIMulY, WriteVecIMulZ>;
666 : X86SchedWriteWidths<WritePMULLD, WritePMULLD,
667 WritePMULLDY, WritePMULLDZ>;
669 : X86SchedWriteWidths<WriteMPSAD, WriteMPSAD,
670 WriteMPSADY, WriteMPSADZ>;
672 : X86SchedWriteWidths<WritePSADBW, WritePSADBWX,
673 WritePSADBWY, WritePSADBWZ>;
675 def SchedWriteShuffle
676 : X86SchedWriteWidths<WriteShuffle, WriteShuffleX,
677 WriteShuffleY, WriteShuffleZ>;
678 def SchedWriteVarShuffle
679 : X86SchedWriteWidths<WriteVarShuffle, WriteVarShuffleX,
680 WriteVarShuffleY, WriteVarShuffleZ>;
682 : X86SchedWriteWidths<WriteBlend, WriteBlend, WriteBlendY, WriteBlendZ>;
683 def SchedWriteVarBlend
684 : X86SchedWriteWidths<WriteVarBlend, WriteVarBlend,
685 WriteVarBlendY, WriteVarBlendZ>;
687 // Vector size wrappers.
688 // FIXME: Currently PH uses the same schedule method as PS.
689 // We may refine them later.
690 def SchedWriteFAddSizes
691 : X86SchedWriteSizes<SchedWriteFAdd, SchedWriteFAdd, SchedWriteFAdd64>;
692 def SchedWriteFCmpSizes
693 : X86SchedWriteSizes<SchedWriteFCmp, SchedWriteFCmp, SchedWriteFCmp64>;
694 def SchedWriteFMulSizes
695 : X86SchedWriteSizes<SchedWriteFMul, SchedWriteFMul, SchedWriteFMul64>;
696 def SchedWriteFDivSizes
697 : X86SchedWriteSizes<SchedWriteFDiv, SchedWriteFDiv, SchedWriteFDiv64>;
698 def SchedWriteFSqrtSizes
699 : X86SchedWriteSizes<SchedWriteFSqrt, SchedWriteFSqrt, SchedWriteFSqrt64>;
700 def SchedWriteFLogicSizes
701 : X86SchedWriteSizes<SchedWriteFLogic, SchedWriteFLogic, SchedWriteFLogic>;
702 def SchedWriteFShuffleSizes
703 : X86SchedWriteSizes<SchedWriteFShuffle, SchedWriteFShuffle, SchedWriteFShuffle>;
705 //===----------------------------------------------------------------------===//
706 // Generic Processor Scheduler Models.
708 // IssueWidth is analogous to the number of decode units. Core and its
709 // descendents, including Nehalem and SandyBridge have 4 decoders.
710 // Resources beyond the decoder operate on micro-ops and are bufferred
711 // so adjacent micro-ops don't directly compete.
713 // MicroOpBufferSize > 1 indicates that RAW dependencies can be
714 // decoded in the same cycle. The value 32 is a reasonably arbitrary
715 // number of in-flight instructions.
717 // HighLatency=10 is optimistic. X86InstrInfo::isHighLatencyDef
718 // indicates high latency opcodes. Alternatively, InstrItinData
719 // entries may be included here to define specific operand
720 // latencies. Since these latencies are not used for pipeline hazards,
721 // they do not need to be exact.
723 // The GenericX86Model contains no instruction schedules
724 // and disables PostRAScheduler.
725 class GenericX86Model : SchedMachineModel {
727 let MicroOpBufferSize = 32;
729 let HighLatency = 10;
730 let PostRAScheduler = 0;
731 let CompleteModel = 0;
734 def GenericModel : GenericX86Model;
736 // Define a model with the PostRAScheduler enabled.
737 def GenericPostRAModel : GenericX86Model {
738 let PostRAScheduler = 1;