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