• 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
74
75def WriteFMovF32ToI32     : SchedWrite;
76def WriteFMovI32ToF32     : SchedWrite;
77def WriteFMovF64ToI64     : SchedWrite;    // RV64I only
78def WriteFMovI64ToF64     : SchedWrite;    // RV64I only
79
80def WriteFMov32       : SchedWrite;    // 32-bit floating point move
81def WriteFMov64       : SchedWrite;    // 64-bit floating point move
82def WriteFLD32        : SchedWrite;    // Floating point sp load
83def WriteFLD64        : SchedWrite;    // Floating point dp load
84def WriteFST32        : SchedWrite;    // Floating point sp store
85def WriteFST64        : SchedWrite;    // Floating point dp store
86
87/// Define scheduler resources associated with use operands.
88def ReadJmp         : SchedRead;
89def ReadJalr        : SchedRead;
90def ReadCSR         : SchedRead;
91def ReadMemBase     : SchedRead;
92def ReadStoreData   : SchedRead;
93def ReadIALU        : SchedRead;
94def ReadIALU32      : SchedRead;    // 32-bit integer ALU operations on RV64I
95def ReadShift       : SchedRead;
96def ReadShift32     : SchedRead;    // 32-bit shift operations on RV64Ix
97def ReadIDiv        : SchedRead;
98def ReadIDiv32      : SchedRead;
99def ReadIMul        : SchedRead;
100def ReadIMul32      : SchedRead;
101def ReadAtomicWA    : SchedRead;
102def ReadAtomicWD    : SchedRead;
103def ReadAtomicDA    : SchedRead;
104def ReadAtomicDD    : SchedRead;
105def ReadAtomicLDW   : SchedRead;    // Atomic load word
106def ReadAtomicLDD   : SchedRead;    // Atomic load double word
107def ReadAtomicSTW   : SchedRead;    // Atomic store word
108def ReadAtomicSTD   : SchedRead;    // Atomic store double word
109def ReadFALU32      : SchedRead;    // FP 32-bit computation
110def ReadFALU64      : SchedRead;    // FP 64-bit computation
111def ReadFMul32      : SchedRead;    // 32-bit floating point multiply
112def ReadFMulAdd32   : SchedRead;    // 32-bit floating point multiply add
113def ReadFMulSub32   : SchedRead;    // 32-bit floating point multiply sub
114def ReadFMul64      : SchedRead;    // 64-bit floating point multiply
115def ReadFMulAdd64   : SchedRead;    // 64-bit floating point multiply add
116def ReadFMulSub64   : SchedRead;    // 64-bit floating point multiply sub
117def ReadFDiv32      : SchedRead;    // 32-bit floating point divide
118def ReadFDiv64      : SchedRead;    // 64-bit floating point divide
119def ReadFSqrt32     : SchedRead;    // 32-bit floating point sqrt
120def ReadFSqrt64     : SchedRead;    // 64-bit floating point sqrt
121def ReadFCmp32      : SchedRead;
122def ReadFCmp64      : SchedRead;
123def ReadFCvtF32ToI32     : SchedRead;
124def ReadFCvtF32ToI64     : SchedRead;
125def ReadFCvtF64ToI32     : SchedRead;
126def ReadFCvtF64ToI64     : SchedRead;
127def ReadFCvtI32ToF32     : SchedRead;
128def ReadFCvtI32ToF64     : SchedRead;
129def ReadFCvtI64ToF32     : SchedRead;
130def ReadFCvtI64ToF64     : SchedRead;
131def ReadFMovF32ToI32     : SchedRead;
132def ReadFMovI32ToF32     : SchedRead;
133def ReadFMovF64ToI64     : SchedRead;
134def ReadFMovI64ToF64     : SchedRead;
135def ReadFCvtF32ToF64     : SchedRead;
136def ReadFCvtF64ToF32     : SchedRead;
137def ReadFClass32         : SchedRead;
138def ReadFClass64         : SchedRead;
139