ARMScheduleA57WriteRes.td 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325
  1. //=- ARMScheduleA57WriteRes.td - ARM Cortex-A57 Write Res ---*- 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. // 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.
  13. // Prefix: A57Write
  14. // Latency: #cyc
  15. // MicroOp Count/Types: #(B|I|M|L|S|X|W|V)
  16. //
  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
  19. // four to V pipes.
  20. //
  21. //===----------------------------------------------------------------------===//
  22. //===----------------------------------------------------------------------===//
  23. // Define Generic 1 micro-op types
  24. def A57Write_5cyc_1M : SchedWriteRes<[A57UnitM]> { let Latency = 5; }
  25. def A57Write_5cyc_1V : SchedWriteRes<[A57UnitV]> { let Latency = 5; }
  26. def A57Write_5cyc_1W : SchedWriteRes<[A57UnitW]> { let Latency = 5; }
  27. def A57Write_10cyc_1V : SchedWriteRes<[A57UnitV]> { let Latency = 10; }
  28. def A57Write_17cyc_1W : SchedWriteRes<[A57UnitW]> { let Latency = 17;
  29. let ResourceCycles = [17]; }
  30. def A57Write_18cyc_1X : SchedWriteRes<[A57UnitX]> { let Latency = 18;
  31. let ResourceCycles = [18]; }
  32. def A57Write_19cyc_1M : SchedWriteRes<[A57UnitM]> { let Latency = 19;
  33. let ResourceCycles = [19]; }
  34. def A57Write_20cyc_1M : SchedWriteRes<[A57UnitM]> { let Latency = 20;
  35. let ResourceCycles = [20]; }
  36. def A57Write_1cyc_1B : SchedWriteRes<[A57UnitB]> { let Latency = 1; }
  37. def A57Write_1cyc_1I : SchedWriteRes<[A57UnitI]> { let Latency = 1;
  38. let ResourceCycles = [1]; }
  39. def A57Write_2cyc_1I : SchedWriteRes<[A57UnitI]> { let Latency = 2;
  40. let ResourceCycles = [1]; }
  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. let ResourceCycles = [1]; }
  47. def A57Write_32cyc_1W : SchedWriteRes<[A57UnitW]> { let Latency = 32;
  48. let ResourceCycles = [32]; }
  49. def A57Write_32cyc_1X : SchedWriteRes<[A57UnitX]> { let Latency = 32;
  50. let ResourceCycles = [32]; }
  51. def A57Write_35cyc_1M : SchedWriteRes<[A57UnitM]> { let Latency = 35;
  52. let ResourceCycles = [35]; }
  53. def A57Write_3cyc_1M : SchedWriteRes<[A57UnitM]> { let Latency = 3; }
  54. def A57Write_3cyc_1V : SchedWriteRes<[A57UnitV]> { let Latency = 3; }
  55. def A57Write_3cyc_1W : SchedWriteRes<[A57UnitW]> { let Latency = 3; }
  56. 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]> {
  60. let Latency = Lat;
  61. }
  62. }
  63. // A57Write_4cyc_1S - A57Write_16cyc_1S
  64. foreach Lat = 4-16 in {
  65. def A57Write_#Lat#cyc_1S : SchedWriteRes<[A57UnitS]> {
  66. let Latency = Lat;
  67. }
  68. }
  69. def A57Write_4cyc_1M : SchedWriteRes<[A57UnitM]> { let Latency = 4; }
  70. def A57Write_4cyc_1X : SchedWriteRes<[A57UnitX]> { let Latency = 4; }
  71. def A57Write_4cyc_1W : SchedWriteRes<[A57UnitW]> { let Latency = 4; }
  72. def A57Write_5cyc_1X : SchedWriteRes<[A57UnitX]> { let Latency = 5; }
  73. def A57Write_6cyc_1X : SchedWriteRes<[A57UnitX]> { let Latency = 6; }
  74. def A57Write_6cyc_1W : SchedWriteRes<[A57UnitW]> { let Latency = 6; }
  75. def A57Write_8cyc_1V : SchedWriteRes<[A57UnitV]> { let Latency = 8; }
  76. def A57Write_9cyc_1V : SchedWriteRes<[A57UnitV]> { let Latency = 9; }
  77. def A57Write_6cyc_1M : SchedWriteRes<[A57UnitM]> { let Latency = 6; }
  78. def A57Write_6cyc_1V : SchedWriteRes<[A57UnitV]> { let Latency = 6; }
  79. //===----------------------------------------------------------------------===//
  80. // Define Generic 2 micro-op types
  81. def A57Write_64cyc_2X : SchedWriteRes<[A57UnitX, A57UnitX]> {
  82. let Latency = 64;
  83. let NumMicroOps = 2;
  84. let ResourceCycles = [32, 32];
  85. }
  86. def A57Write_6cyc_1I_1L : SchedWriteRes<[A57UnitI,
  87. A57UnitL]> {
  88. let Latency = 6;
  89. let NumMicroOps = 2;
  90. }
  91. def A57Write_6cyc_1V_1X : SchedWriteRes<[A57UnitV,
  92. A57UnitX]> {
  93. let Latency = 6;
  94. let NumMicroOps = 2;
  95. }
  96. def A57Write_7cyc_1V_1X : SchedWriteRes<[A57UnitV,
  97. A57UnitX]> {
  98. let Latency = 7;
  99. let NumMicroOps = 2;
  100. }
  101. def A57Write_8cyc_1L_1V : SchedWriteRes<[A57UnitL,
  102. A57UnitV]> {
  103. let Latency = 8;
  104. let NumMicroOps = 2;
  105. }
  106. def A57Write_9cyc_1L_1V : SchedWriteRes<[A57UnitL,
  107. A57UnitV]> {
  108. let Latency = 9;
  109. let NumMicroOps = 2;
  110. }
  111. def A57Write_9cyc_2V : SchedWriteRes<[A57UnitV, A57UnitV]> {
  112. let Latency = 9;
  113. let NumMicroOps = 2;
  114. }
  115. def A57Write_8cyc_2X : SchedWriteRes<[A57UnitX, A57UnitX]> {
  116. let Latency = 8;
  117. let NumMicroOps = 2;
  118. }
  119. def A57Write_6cyc_2L : SchedWriteRes<[A57UnitL, A57UnitL]> {
  120. let Latency = 6;
  121. let NumMicroOps = 2;
  122. }
  123. def A57Write_6cyc_2V : SchedWriteRes<[A57UnitV, A57UnitV]> {
  124. let Latency = 6;
  125. let NumMicroOps = 2;
  126. }
  127. def A57Write_6cyc_2W : SchedWriteRes<[A57UnitW, A57UnitW]> {
  128. let Latency = 6;
  129. let NumMicroOps = 2;
  130. }
  131. def A57Write_5cyc_1I_1L : SchedWriteRes<[A57UnitI,
  132. A57UnitL]> {
  133. let Latency = 5;
  134. let NumMicroOps = 2;
  135. }
  136. def A57Write_5cyc_1I_1M : SchedWriteRes<[A57UnitI,
  137. A57UnitM]> {
  138. let Latency = 5;
  139. let NumMicroOps = 2;
  140. }
  141. def A57Write_5cyc_2V : SchedWriteRes<[A57UnitV, A57UnitV]> {
  142. let Latency = 5;
  143. let NumMicroOps = 2;
  144. }
  145. def A57Write_5cyc_2X : SchedWriteRes<[A57UnitX, A57UnitX]> {
  146. let Latency = 5;
  147. let NumMicroOps = 2;
  148. }
  149. def A57Write_10cyc_1L_1V : SchedWriteRes<[A57UnitL,
  150. A57UnitV]> {
  151. let Latency = 10;
  152. let NumMicroOps = 2;
  153. }
  154. def A57Write_10cyc_2V : SchedWriteRes<[A57UnitV, A57UnitV]> {
  155. let Latency = 10;
  156. let NumMicroOps = 2;
  157. }
  158. def A57Write_1cyc_1B_1I : SchedWriteRes<[A57UnitB,
  159. A57UnitI]> {
  160. let Latency = 1;
  161. let NumMicroOps = 2;
  162. }
  163. def A57Write_1cyc_1I_1S : SchedWriteRes<[A57UnitI,
  164. A57UnitS]> {
  165. let Latency = 1;
  166. let NumMicroOps = 2;
  167. }
  168. def A57Write_1cyc_1S_1I : SchedWriteRes<[A57UnitS,
  169. A57UnitI]> {
  170. let Latency = 1;
  171. let NumMicroOps = 2;
  172. }
  173. def A57Write_2cyc_1S_1I : SchedWriteRes<[A57UnitS,
  174. A57UnitI]> {
  175. let Latency = 2;
  176. let NumMicroOps = 2;
  177. }
  178. def A57Write_3cyc_1S_1I : SchedWriteRes<[A57UnitS,
  179. A57UnitI]> {
  180. let Latency = 3;
  181. let NumMicroOps = 2;
  182. }
  183. def A57Write_1cyc_1S_1M : SchedWriteRes<[A57UnitS,
  184. A57UnitM]> {
  185. let Latency = 1;
  186. let NumMicroOps = 2;
  187. }
  188. def A57Write_2cyc_1B_1I : SchedWriteRes<[A57UnitB,
  189. A57UnitI]> {
  190. let Latency = 2;
  191. let NumMicroOps = 2;
  192. }
  193. def A57Write_3cyc_1B_1I : SchedWriteRes<[A57UnitB,
  194. A57UnitI]> {
  195. let Latency = 3;
  196. let NumMicroOps = 2;
  197. }
  198. def A57Write_6cyc_1B_1L : SchedWriteRes<[A57UnitB,
  199. A57UnitI]> {
  200. let Latency = 6;
  201. let NumMicroOps = 2;
  202. }
  203. def A57Write_2cyc_1I_1M : SchedWriteRes<[A57UnitI,
  204. A57UnitM]> {
  205. let Latency = 2;
  206. let NumMicroOps = 2;
  207. }
  208. def A57Write_2cyc_2S : SchedWriteRes<[A57UnitS, A57UnitS]> {
  209. let Latency = 2;
  210. let NumMicroOps = 2;
  211. }
  212. def A57Write_2cyc_2V : SchedWriteRes<[A57UnitV, A57UnitV]> {
  213. let Latency = 2;
  214. let NumMicroOps = 2;
  215. }
  216. def A57Write_36cyc_2X : SchedWriteRes<[A57UnitX, A57UnitX]> {
  217. let Latency = 36;
  218. let NumMicroOps = 2;
  219. let ResourceCycles = [18, 18];
  220. }
  221. def A57Write_3cyc_1I_1M : SchedWriteRes<[A57UnitI,
  222. A57UnitM]> {
  223. let Latency = 3;
  224. let NumMicroOps = 2;
  225. }
  226. def A57Write_4cyc_1I_1M : SchedWriteRes<[A57UnitI,
  227. A57UnitM]> {
  228. let Latency = 4;
  229. let NumMicroOps = 2;
  230. }
  231. // A57Write_3cyc_1L_1I - A57Write_20cyc_1L_1I
  232. foreach Lat = 3-20 in {
  233. def A57Write_#Lat#cyc_1L_1I : SchedWriteRes<[A57UnitL, A57UnitI]> {
  234. let Latency = Lat; let NumMicroOps = 2;
  235. }
  236. }
  237. def A57Write_3cyc_1I_1S : SchedWriteRes<[A57UnitI,
  238. A57UnitS]> {
  239. let Latency = 3;
  240. let NumMicroOps = 2;
  241. }
  242. def A57Write_3cyc_1S_1V : SchedWriteRes<[A57UnitS,
  243. A57UnitV]> {
  244. let Latency = 3;
  245. let NumMicroOps = 2;
  246. }
  247. def A57Write_4cyc_1S_1V : SchedWriteRes<[A57UnitS,
  248. A57UnitV]> {
  249. let Latency = 4;
  250. let NumMicroOps = 2;
  251. }
  252. def A57Write_3cyc_2V : SchedWriteRes<[A57UnitV, A57UnitV]> {
  253. let Latency = 3;
  254. let NumMicroOps = 2;
  255. }
  256. // A57Write_4cyc_1S_1I - A57Write_16cyc_1S_1I
  257. foreach Lat = 4-16 in {
  258. def A57Write_#Lat#cyc_1S_1I : SchedWriteRes<[A57UnitS, A57UnitI]> {
  259. let Latency = Lat; let NumMicroOps = 2;
  260. }
  261. }
  262. def A57Write_4cyc_2X : SchedWriteRes<[A57UnitX, A57UnitX]> {
  263. let Latency = 4;
  264. let NumMicroOps = 2;
  265. }
  266. //===----------------------------------------------------------------------===//
  267. // Define Generic 3 micro-op types
  268. def A57Write_10cyc_3V : SchedWriteRes<[A57UnitV, A57UnitV, A57UnitV]> {
  269. let Latency = 10;
  270. let NumMicroOps = 3;
  271. }
  272. def A57Write_2cyc_1I_2S : SchedWriteRes<[A57UnitI,
  273. A57UnitS, A57UnitS]> {
  274. let Latency = 2;
  275. let NumMicroOps = 3;
  276. }
  277. def A57Write_3cyc_1I_1S_1V : SchedWriteRes<[A57UnitI,
  278. A57UnitS,
  279. A57UnitV]> {
  280. let Latency = 3;
  281. let NumMicroOps = 3;
  282. }
  283. def A57Write_3cyc_1S_1V_1I : SchedWriteRes<[A57UnitS,
  284. A57UnitV,
  285. A57UnitI]> {
  286. let Latency = 3;
  287. let NumMicroOps = 3;
  288. }
  289. def A57Write_4cyc_1S_1V_1I : SchedWriteRes<[A57UnitS,
  290. A57UnitV,
  291. A57UnitI]> {
  292. let Latency = 4;
  293. let NumMicroOps = 3;
  294. }
  295. def A57Write_4cyc_1I_1L_1M : SchedWriteRes<[A57UnitI, A57UnitL, A57UnitM]> {
  296. let Latency = 4;
  297. let NumMicroOps = 3;
  298. }
  299. def A57Write_8cyc_1L_1V_1I : SchedWriteRes<[A57UnitL,
  300. A57UnitV,
  301. A57UnitI]> {
  302. let Latency = 8;
  303. let NumMicroOps = 3;
  304. }
  305. def A57Write_9cyc_1L_1V_1I : SchedWriteRes<[A57UnitL,
  306. A57UnitV,
  307. A57UnitI]> {
  308. let Latency = 9;
  309. let NumMicroOps = 3;
  310. }