• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1//===-- RISCVSchedule.td - RISCV 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/// Define scheduler resources associated with def operands.
10def WriteIALU       : SchedWrite;    // 32 or 64-bit integer ALU operations
11def WriteIALU32     : SchedWrite;    // 32-bit integer ALU operations on RV64I
12def WriteShift32    : SchedWrite;    // 32-bit shift operations on RV64Ix
13def WriteShift      : SchedWrite;    // 32 or 64-bit shift operations
14def WriteIDiv       : SchedWrite;    // 32-bit or 64-bit divide and remainder
15def WriteIDiv32     : SchedWrite;    // 32-bit divide and remainder on RV64I
16def WriteIMul       : SchedWrite;    // 32-bit or 64-bit multiply
17def WriteIMul32     : SchedWrite;    // 32-bit multiply on RV64I
18def WriteJmp        : SchedWrite;    // Jump
19def WriteJal        : SchedWrite;    // Jump and link
20def WriteJalr       : SchedWrite;    // Jump and link register
21def WriteJmpReg     : SchedWrite;    // Jump register
22def WriteNop        : SchedWrite;
23def WriteLDB        : SchedWrite;    // Load byte
24def WriteLDH        : SchedWrite;    // Load half-word
25def WriteLDW        : SchedWrite;    // Load word
26def WriteLDWU       : SchedWrite;    // Load word unsigned
27def WriteLDD        : SchedWrite;    // Load double-word
28def WriteCSR        : SchedWrite;    // CSR instructions
29def WriteSTB        : SchedWrite;    // Store byte
30def WriteSTH        : SchedWrite;    // Store half-word
31def WriteSTW        : SchedWrite;    // Store word
32def WriteSTD        : SchedWrite;    // Store double-word
33def WriteAtomicW    : SchedWrite;    //Atomic memory operation word size
34def WriteAtomicD    : SchedWrite;    //Atomic memory operation double word size
35def WriteAtomicLDW  : SchedWrite;    // Atomic load word
36def WriteAtomicLDD  : SchedWrite;    // Atomic load double word
37def WriteAtomicSTW  : SchedWrite;    // Atomic store word
38def WriteAtomicSTD  : SchedWrite;    // Atomic store double word
39def WriteFALU32     : SchedWrite;    // FP 32-bit computation
40def WriteFALU64     : SchedWrite;    // FP 64-bit computation
41def WriteFMul32     : SchedWrite;    // 32-bit floating point multiply
42def WriteFMulAdd32  : SchedWrite;    // 32-bit floating point multiply add
43def WriteFMulSub32  : SchedWrite;    // 32-bit floating point multiply sub
44def WriteFMul64     : SchedWrite;    // 64-bit floating point multiply
45def WriteFMulAdd64  : SchedWrite;      // 64-bit floating point multiply add
46def WriteFMulSub64  : SchedWrite;    // 64-bit floating point multiply sub
47def WriteFDiv32     : SchedWrite;    // 32-bit floating point divide
48def WriteFDiv64     : SchedWrite;    // 64-bit floating point divide
49def WriteFSqrt32    : SchedWrite;    // 32-bit floating point sqrt
50def WriteFSqrt64    : SchedWrite;    // 64-bit floating point sqrt
51
52// Integer to float conversions
53def WriteFCvtI32ToF32  : SchedWrite;
54def WriteFCvtI32ToF64  : SchedWrite;
55def WriteFCvtI64ToF32  : SchedWrite;    // RV64I only
56def WriteFCvtI64ToF64  : SchedWrite;    // RV64I only
57
58//Float to integer conversions
59def WriteFCvtF32ToI32  : SchedWrite;
60def WriteFCvtF32ToI64  : SchedWrite;    // RV64I only
61def WriteFCvtF64ToI32  : SchedWrite;
62def WriteFCvtF64ToI64  : SchedWrite;    // RV64I only
63
64// Float to float conversions
65def WriteFCvtF32ToF64  : SchedWrite;
66def WriteFCvtF64ToF32  : SchedWrite;
67
68def WriteFConv32    : SchedWrite;    // 32-bit floating point convert
69def WriteFConv64    : SchedWrite;    // 64-bit floating point convert
70def WriteFClass32   : SchedWrite;    // 32-bit floating point classify
71def WriteFClass64   : SchedWrite;    // 64-bit floating point classify
72def WriteFCmp32     : SchedWrite;    // 32-bit floating point compare
73def WriteFCmp64     : SchedWrite;    // 64-bit floating point compare
74def WriteFSGNJ32    : SchedWrite;    // 32-bit floating point sign-injection
75def WriteFSGNJ64    : SchedWrite;    // 64-bit floating point sign-injection
76def WriteFMinMax32  : SchedWrite;    // 32-bit floating point min or max
77def WriteFMinMax64  : SchedWrite;    // 64-bit floating point min or max
78
79def WriteFMovF32ToI32     : SchedWrite;
80def WriteFMovI32ToF32     : SchedWrite;
81def WriteFMovF64ToI64     : SchedWrite;    // RV64I only
82def WriteFMovI64ToF64     : SchedWrite;    // RV64I only
83
84def WriteFMov32       : SchedWrite;    // 32-bit floating point move
85def WriteFMov64       : SchedWrite;    // 64-bit floating point move
86def WriteFLD32        : SchedWrite;    // Floating point sp load
87def WriteFLD64        : SchedWrite;    // Floating point dp load
88def WriteFST32        : SchedWrite;    // Floating point sp store
89def WriteFST64        : SchedWrite;    // Floating point dp store
90
91/// Define scheduler resources associated with use operands.
92def ReadJmp         : SchedRead;
93def ReadJalr        : SchedRead;
94def ReadCSR         : SchedRead;
95def ReadMemBase     : SchedRead;
96def ReadFMemBase    : SchedRead;
97def ReadStoreData   : SchedRead;
98def ReadIALU        : SchedRead;
99def ReadIALU32      : SchedRead;    // 32-bit integer ALU operations on RV64I
100def ReadShift       : SchedRead;
101def ReadShift32     : SchedRead;    // 32-bit shift operations on RV64Ix
102def ReadIDiv        : SchedRead;
103def ReadIDiv32      : SchedRead;
104def ReadIMul        : SchedRead;
105def ReadIMul32      : SchedRead;
106def ReadAtomicWA    : SchedRead;
107def ReadAtomicWD    : SchedRead;
108def ReadAtomicDA    : SchedRead;
109def ReadAtomicDD    : SchedRead;
110def ReadAtomicLDW   : SchedRead;    // Atomic load word
111def ReadAtomicLDD   : SchedRead;    // Atomic load double word
112def ReadAtomicSTW   : SchedRead;    // Atomic store word
113def ReadAtomicSTD   : SchedRead;    // Atomic store double word
114def ReadFALU32      : SchedRead;    // FP 32-bit computation
115def ReadFALU64      : SchedRead;    // FP 64-bit computation
116def ReadFMul32      : SchedRead;    // 32-bit floating point multiply
117def ReadFMulAdd32   : SchedRead;    // 32-bit floating point multiply add
118def ReadFMulSub32   : SchedRead;    // 32-bit floating point multiply sub
119def ReadFMul64      : SchedRead;    // 64-bit floating point multiply
120def ReadFMulAdd64   : SchedRead;    // 64-bit floating point multiply add
121def ReadFMulSub64   : SchedRead;    // 64-bit floating point multiply sub
122def ReadFDiv32      : SchedRead;    // 32-bit floating point divide
123def ReadFDiv64      : SchedRead;    // 64-bit floating point divide
124def ReadFSqrt32     : SchedRead;    // 32-bit floating point sqrt
125def ReadFSqrt64     : SchedRead;    // 64-bit floating point sqrt
126def ReadFCmp32      : SchedRead;
127def ReadFCmp64      : SchedRead;
128def ReadFSGNJ32     : SchedRead;
129def ReadFSGNJ64     : SchedRead;
130def ReadFMinMax32   : SchedRead;
131def ReadFMinMax64   : SchedRead;
132def ReadFCvtF32ToI32     : SchedRead;
133def ReadFCvtF32ToI64     : SchedRead;
134def ReadFCvtF64ToI32     : SchedRead;
135def ReadFCvtF64ToI64     : SchedRead;
136def ReadFCvtI32ToF32     : SchedRead;
137def ReadFCvtI32ToF64     : SchedRead;
138def ReadFCvtI64ToF32     : SchedRead;
139def ReadFCvtI64ToF64     : SchedRead;
140def ReadFMovF32ToI32     : SchedRead;
141def ReadFMovI32ToF32     : SchedRead;
142def ReadFMovF64ToI64     : SchedRead;
143def ReadFMovI64ToF64     : SchedRead;
144def ReadFCvtF32ToF64     : SchedRead;
145def ReadFCvtF64ToF32     : SchedRead;
146def ReadFClass32         : SchedRead;
147def ReadFClass64         : SchedRead;
148