1 //=- ARMScheduleA57WriteRes.td - ARM Cortex-A57 Write Res ---*- 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 // Contains all of the Cortex-A57 specific SchedWriteRes types. The approach
10 // below is to define a generic SchedWriteRes for every combination of
11 // latency and microOps. The naming conventions is to use a prefix, one field
12 // for latency, and one or more microOp count/type designators.
15 // MicroOp Count/Types: #(B|I|M|L|S|X|W|V)
17 // e.g. A57Write_6cyc_1I_6S_4V means the total latency is 6 and there are
18 // 11 micro-ops to be issued as follows: one to I pipe, six to S pipes and
21 //===----------------------------------------------------------------------===//
23 //===----------------------------------------------------------------------===//
24 // Define Generic 1 micro-op types
26 def A57Write_5cyc_1M : SchedWriteRes<[A57UnitM]> { let Latency = 5; }
27 def A57Write_5cyc_1V : SchedWriteRes<[A57UnitV]> { let Latency = 5; }
28 def A57Write_5cyc_1W : SchedWriteRes<[A57UnitW]> { let Latency = 5; }
29 def A57Write_10cyc_1V : SchedWriteRes<[A57UnitV]> { let Latency = 10; }
30 def A57Write_17cyc_1W : SchedWriteRes<[A57UnitW]> { let Latency = 17;
31 let ResourceCycles = [17]; }
32 def A57Write_18cyc_1X : SchedWriteRes<[A57UnitX]> { let Latency = 18;
33 let ResourceCycles = [18]; }
34 def A57Write_19cyc_1M : SchedWriteRes<[A57UnitM]> { let Latency = 19;
35 let ResourceCycles = [19]; }
36 def A57Write_20cyc_1M : SchedWriteRes<[A57UnitM]> { let Latency = 20;
37 let ResourceCycles = [20]; }
38 def A57Write_1cyc_1B : SchedWriteRes<[A57UnitB]> { let Latency = 1; }
39 def A57Write_1cyc_1I : SchedWriteRes<[A57UnitI]> { let Latency = 1; }
40 def A57Write_2cyc_1I : SchedWriteRes<[A57UnitI]> { let Latency = 2; }
41 def A57Write_3cyc_1I : SchedWriteRes<[A57UnitI]> { let Latency = 3; }
42 def A57Write_1cyc_1S : SchedWriteRes<[A57UnitS]> { let Latency = 1; }
43 def A57Write_2cyc_1S : SchedWriteRes<[A57UnitS]> { let Latency = 2; }
44 def A57Write_3cyc_1S : SchedWriteRes<[A57UnitS]> { let Latency = 3; }
45 def A57Write_2cyc_1M : SchedWriteRes<[A57UnitM]> { let Latency = 2; }
46 def A57Write_32cyc_1W : SchedWriteRes<[A57UnitW]> { let Latency = 32;
47 let ResourceCycles = [32]; }
48 def A57Write_32cyc_1X : SchedWriteRes<[A57UnitX]> { let Latency = 32;
49 let ResourceCycles = [32]; }
50 def A57Write_35cyc_1M : SchedWriteRes<[A57UnitM]> { let Latency = 35;
51 let ResourceCycles = [35]; }
52 def A57Write_3cyc_1M : SchedWriteRes<[A57UnitM]> { let Latency = 3; }
53 def A57Write_3cyc_1V : SchedWriteRes<[A57UnitV]> { let Latency = 3; }
54 def A57Write_3cyc_1W : SchedWriteRes<[A57UnitW]> { let Latency = 3; }
55 def A57Write_3cyc_1X : SchedWriteRes<[A57UnitX]> { let Latency = 3; }
57 // A57Write_3cyc_1L - A57Write_20cyc_1L
58 foreach Lat = 3-20 in {
59 def A57Write_#Lat#cyc_1L : SchedWriteRes<[A57UnitL]> {
64 // A57Write_4cyc_1S - A57Write_16cyc_1S
65 foreach Lat = 4-16 in {
66 def A57Write_#Lat#cyc_1S : SchedWriteRes<[A57UnitS]> {
71 def A57Write_4cyc_1M : SchedWriteRes<[A57UnitL]> { let Latency = 4; }
72 def A57Write_4cyc_1X : SchedWriteRes<[A57UnitX]> { let Latency = 4; }
73 def A57Write_4cyc_1W : SchedWriteRes<[A57UnitW]> { let Latency = 4; }
74 def A57Write_5cyc_1X : SchedWriteRes<[A57UnitX]> { let Latency = 5; }
75 def A57Write_6cyc_1X : SchedWriteRes<[A57UnitX]> { let Latency = 6; }
76 def A57Write_6cyc_1W : SchedWriteRes<[A57UnitW]> { let Latency = 6; }
77 def A57Write_8cyc_1V : SchedWriteRes<[A57UnitV]> { let Latency = 8; }
78 def A57Write_9cyc_1V : SchedWriteRes<[A57UnitV]> { let Latency = 9; }
79 def A57Write_6cyc_1M : SchedWriteRes<[A57UnitM]> { let Latency = 6; }
80 def A57Write_6cyc_1V : SchedWriteRes<[A57UnitV]> { let Latency = 6; }
83 //===----------------------------------------------------------------------===//
84 // Define Generic 2 micro-op types
86 def A57Write_64cyc_2X : SchedWriteRes<[A57UnitX, A57UnitX]> {
89 let ResourceCycles = [32, 32];
91 def A57Write_6cyc_1I_1L : SchedWriteRes<[A57UnitI,
96 def A57Write_6cyc_1V_1X : SchedWriteRes<[A57UnitV,
101 def A57Write_7cyc_1V_1X : SchedWriteRes<[A57UnitV,
106 def A57Write_8cyc_1L_1V : SchedWriteRes<[A57UnitL,
111 def A57Write_9cyc_1L_1V : SchedWriteRes<[A57UnitL,
116 def A57Write_9cyc_2V : SchedWriteRes<[A57UnitV, A57UnitV]> {
120 def A57Write_8cyc_2X : SchedWriteRes<[A57UnitX, A57UnitX]> {
124 def A57Write_6cyc_2L : SchedWriteRes<[A57UnitL, A57UnitL]> {
128 def A57Write_6cyc_2V : SchedWriteRes<[A57UnitV, A57UnitV]> {
132 def A57Write_6cyc_2W : SchedWriteRes<[A57UnitW, A57UnitW]> {
136 def A57Write_5cyc_1I_1L : SchedWriteRes<[A57UnitI,
141 def A57Write_5cyc_1I_1M : SchedWriteRes<[A57UnitI,
146 def A57Write_5cyc_2V : SchedWriteRes<[A57UnitV, A57UnitV]> {
150 def A57Write_5cyc_2X : SchedWriteRes<[A57UnitX, A57UnitX]> {
154 def A57Write_10cyc_1L_1V : SchedWriteRes<[A57UnitL,
159 def A57Write_10cyc_2V : SchedWriteRes<[A57UnitV, A57UnitV]> {
163 def A57Write_1cyc_1B_1I : SchedWriteRes<[A57UnitB,
168 def A57Write_1cyc_1I_1S : SchedWriteRes<[A57UnitI,
173 def A57Write_1cyc_1S_1I : SchedWriteRes<[A57UnitS,
178 def A57Write_2cyc_1S_1I : SchedWriteRes<[A57UnitS,
183 def A57Write_3cyc_1S_1I : SchedWriteRes<[A57UnitS,
188 def A57Write_1cyc_1S_1M : SchedWriteRes<[A57UnitS,
193 def A57Write_2cyc_1B_1I : SchedWriteRes<[A57UnitB,
198 def A57Write_3cyc_1B_1I : SchedWriteRes<[A57UnitB,
203 def A57Write_6cyc_1B_1L : SchedWriteRes<[A57UnitB,
208 def A57Write_2cyc_1I_1M : SchedWriteRes<[A57UnitI,
213 def A57Write_2cyc_2S : SchedWriteRes<[A57UnitS, A57UnitS]> {
217 def A57Write_2cyc_2V : SchedWriteRes<[A57UnitV, A57UnitV]> {
221 def A57Write_36cyc_2X : SchedWriteRes<[A57UnitX, A57UnitX]> {
224 let ResourceCycles = [18, 18];
226 def A57Write_3cyc_1I_1M : SchedWriteRes<[A57UnitI,
231 def A57Write_4cyc_1I_1M : SchedWriteRes<[A57UnitI,
237 // A57Write_3cyc_1L_1I - A57Write_20cyc_1L_1I
238 foreach Lat = 3-20 in {
239 def A57Write_#Lat#cyc_1L_1I : SchedWriteRes<[A57UnitL, A57UnitI]> {
240 let Latency = Lat; let NumMicroOps = 2;
244 def A57Write_3cyc_1I_1S : SchedWriteRes<[A57UnitI,
249 def A57Write_3cyc_1S_1V : SchedWriteRes<[A57UnitS,
254 def A57Write_4cyc_1S_1V : SchedWriteRes<[A57UnitS,
259 def A57Write_3cyc_2V : SchedWriteRes<[A57UnitV, A57UnitV]> {
264 // A57Write_4cyc_1S_1I - A57Write_16cyc_1S_1I
265 foreach Lat = 4-16 in {
266 def A57Write_#Lat#cyc_1S_1I : SchedWriteRes<[A57UnitS, A57UnitI]> {
267 let Latency = Lat; let NumMicroOps = 2;
271 def A57Write_4cyc_2X : SchedWriteRes<[A57UnitX, A57UnitX]> {
277 //===----------------------------------------------------------------------===//
278 // Define Generic 3 micro-op types
280 def A57Write_10cyc_3V : SchedWriteRes<[A57UnitV, A57UnitV, A57UnitV]> {
284 def A57Write_2cyc_1I_2S : SchedWriteRes<[A57UnitI,
285 A57UnitS, A57UnitS]> {
289 def A57Write_3cyc_1I_1S_1V : SchedWriteRes<[A57UnitI,
295 def A57Write_3cyc_1S_1V_1I : SchedWriteRes<[A57UnitS,
301 def A57Write_4cyc_1S_1V_1I : SchedWriteRes<[A57UnitS,
307 def A57Write_4cyc_1I_1L_1M : SchedWriteRes<[A57UnitI, A57UnitL, A57UnitM]> {
311 def A57Write_8cyc_1L_1V_1I : SchedWriteRes<[A57UnitL,
317 def A57Write_9cyc_1L_1V_1I : SchedWriteRes<[A57UnitL,