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 let ResourceCycles = [1]; }
41 def A57Write_2cyc_1I : SchedWriteRes<[A57UnitI]> { let Latency = 2;
42 let ResourceCycles = [1]; }
43 def A57Write_3cyc_1I : SchedWriteRes<[A57UnitI]> { let Latency = 3; }
44 def A57Write_1cyc_1S : SchedWriteRes<[A57UnitS]> { let Latency = 1; }
45 def A57Write_2cyc_1S : SchedWriteRes<[A57UnitS]> { let Latency = 2; }
46 def A57Write_3cyc_1S : SchedWriteRes<[A57UnitS]> { let Latency = 3; }
47 def A57Write_2cyc_1M : SchedWriteRes<[A57UnitM]> { let Latency = 2;
48 let ResourceCycles = [1]; }
49 def A57Write_32cyc_1W : SchedWriteRes<[A57UnitW]> { let Latency = 32;
50 let ResourceCycles = [32]; }
51 def A57Write_32cyc_1X : SchedWriteRes<[A57UnitX]> { let Latency = 32;
52 let ResourceCycles = [32]; }
53 def A57Write_35cyc_1M : SchedWriteRes<[A57UnitM]> { let Latency = 35;
54 let ResourceCycles = [35]; }
55 def A57Write_3cyc_1M : SchedWriteRes<[A57UnitM]> { let Latency = 3; }
56 def A57Write_3cyc_1V : SchedWriteRes<[A57UnitV]> { let Latency = 3; }
57 def A57Write_3cyc_1W : SchedWriteRes<[A57UnitW]> { let Latency = 3; }
58 def A57Write_3cyc_1X : SchedWriteRes<[A57UnitX]> { let Latency = 3; }
60 // A57Write_3cyc_1L - A57Write_20cyc_1L
61 foreach Lat = 3-20 in {
62 def A57Write_#Lat#cyc_1L : SchedWriteRes<[A57UnitL]> {
67 // A57Write_4cyc_1S - A57Write_16cyc_1S
68 foreach Lat = 4-16 in {
69 def A57Write_#Lat#cyc_1S : SchedWriteRes<[A57UnitS]> {
74 def A57Write_4cyc_1M : SchedWriteRes<[A57UnitM]> { let Latency = 4; }
75 def A57Write_4cyc_1X : SchedWriteRes<[A57UnitX]> { let Latency = 4; }
76 def A57Write_4cyc_1W : SchedWriteRes<[A57UnitW]> { let Latency = 4; }
77 def A57Write_5cyc_1X : SchedWriteRes<[A57UnitX]> { let Latency = 5; }
78 def A57Write_6cyc_1X : SchedWriteRes<[A57UnitX]> { let Latency = 6; }
79 def A57Write_6cyc_1W : SchedWriteRes<[A57UnitW]> { let Latency = 6; }
80 def A57Write_8cyc_1V : SchedWriteRes<[A57UnitV]> { let Latency = 8; }
81 def A57Write_9cyc_1V : SchedWriteRes<[A57UnitV]> { let Latency = 9; }
82 def A57Write_6cyc_1M : SchedWriteRes<[A57UnitM]> { let Latency = 6; }
83 def A57Write_6cyc_1V : SchedWriteRes<[A57UnitV]> { let Latency = 6; }
86 //===----------------------------------------------------------------------===//
87 // Define Generic 2 micro-op types
89 def A57Write_64cyc_2X : SchedWriteRes<[A57UnitX, A57UnitX]> {
92 let ResourceCycles = [32, 32];
94 def A57Write_6cyc_1I_1L : SchedWriteRes<[A57UnitI,
99 def A57Write_6cyc_1V_1X : SchedWriteRes<[A57UnitV,
104 def A57Write_7cyc_1V_1X : SchedWriteRes<[A57UnitV,
109 def A57Write_8cyc_1L_1V : SchedWriteRes<[A57UnitL,
114 def A57Write_9cyc_1L_1V : SchedWriteRes<[A57UnitL,
119 def A57Write_9cyc_2V : SchedWriteRes<[A57UnitV, A57UnitV]> {
123 def A57Write_8cyc_2X : SchedWriteRes<[A57UnitX, A57UnitX]> {
127 def A57Write_6cyc_2L : SchedWriteRes<[A57UnitL, A57UnitL]> {
131 def A57Write_6cyc_2V : SchedWriteRes<[A57UnitV, A57UnitV]> {
135 def A57Write_6cyc_2W : SchedWriteRes<[A57UnitW, A57UnitW]> {
139 def A57Write_5cyc_1I_1L : SchedWriteRes<[A57UnitI,
144 def A57Write_5cyc_1I_1M : SchedWriteRes<[A57UnitI,
149 def A57Write_5cyc_2V : SchedWriteRes<[A57UnitV, A57UnitV]> {
153 def A57Write_5cyc_2X : SchedWriteRes<[A57UnitX, A57UnitX]> {
157 def A57Write_10cyc_1L_1V : SchedWriteRes<[A57UnitL,
162 def A57Write_10cyc_2V : SchedWriteRes<[A57UnitV, A57UnitV]> {
166 def A57Write_1cyc_1B_1I : SchedWriteRes<[A57UnitB,
171 def A57Write_1cyc_1I_1S : SchedWriteRes<[A57UnitI,
176 def A57Write_1cyc_1S_1I : SchedWriteRes<[A57UnitS,
181 def A57Write_2cyc_1S_1I : SchedWriteRes<[A57UnitS,
186 def A57Write_3cyc_1S_1I : SchedWriteRes<[A57UnitS,
191 def A57Write_1cyc_1S_1M : SchedWriteRes<[A57UnitS,
196 def A57Write_2cyc_1B_1I : SchedWriteRes<[A57UnitB,
201 def A57Write_3cyc_1B_1I : SchedWriteRes<[A57UnitB,
206 def A57Write_6cyc_1B_1L : SchedWriteRes<[A57UnitB,
211 def A57Write_2cyc_1I_1M : SchedWriteRes<[A57UnitI,
216 def A57Write_2cyc_2S : SchedWriteRes<[A57UnitS, A57UnitS]> {
220 def A57Write_2cyc_2V : SchedWriteRes<[A57UnitV, A57UnitV]> {
224 def A57Write_36cyc_2X : SchedWriteRes<[A57UnitX, A57UnitX]> {
227 let ResourceCycles = [18, 18];
229 def A57Write_3cyc_1I_1M : SchedWriteRes<[A57UnitI,
234 def A57Write_4cyc_1I_1M : SchedWriteRes<[A57UnitI,
240 // A57Write_3cyc_1L_1I - A57Write_20cyc_1L_1I
241 foreach Lat = 3-20 in {
242 def A57Write_#Lat#cyc_1L_1I : SchedWriteRes<[A57UnitL, A57UnitI]> {
243 let Latency = Lat; let NumMicroOps = 2;
247 def A57Write_3cyc_1I_1S : SchedWriteRes<[A57UnitI,
252 def A57Write_3cyc_1S_1V : SchedWriteRes<[A57UnitS,
257 def A57Write_4cyc_1S_1V : SchedWriteRes<[A57UnitS,
262 def A57Write_3cyc_2V : SchedWriteRes<[A57UnitV, A57UnitV]> {
267 // A57Write_4cyc_1S_1I - A57Write_16cyc_1S_1I
268 foreach Lat = 4-16 in {
269 def A57Write_#Lat#cyc_1S_1I : SchedWriteRes<[A57UnitS, A57UnitI]> {
270 let Latency = Lat; let NumMicroOps = 2;
274 def A57Write_4cyc_2X : SchedWriteRes<[A57UnitX, A57UnitX]> {
280 //===----------------------------------------------------------------------===//
281 // Define Generic 3 micro-op types
283 def A57Write_10cyc_3V : SchedWriteRes<[A57UnitV, A57UnitV, A57UnitV]> {
287 def A57Write_2cyc_1I_2S : SchedWriteRes<[A57UnitI,
288 A57UnitS, A57UnitS]> {
292 def A57Write_3cyc_1I_1S_1V : SchedWriteRes<[A57UnitI,
298 def A57Write_3cyc_1S_1V_1I : SchedWriteRes<[A57UnitS,
304 def A57Write_4cyc_1S_1V_1I : SchedWriteRes<[A57UnitS,
310 def A57Write_4cyc_1I_1L_1M : SchedWriteRes<[A57UnitI, A57UnitL, A57UnitM]> {
314 def A57Write_8cyc_1L_1V_1I : SchedWriteRes<[A57UnitL,
320 def A57Write_9cyc_1L_1V_1I : SchedWriteRes<[A57UnitL,