xref: /aosp_15_r20/external/llvm/lib/Target/Hexagon/HexagonScheduleV55.td (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker//=-HexagonScheduleV4.td - HexagonV4 Scheduling Definitions --*- tablegen -*-=//
2*9880d681SAndroid Build Coastguard Worker//
3*9880d681SAndroid Build Coastguard Worker//                     The LLVM Compiler Infrastructure
4*9880d681SAndroid Build Coastguard Worker//
5*9880d681SAndroid Build Coastguard Worker// This file is distributed under the University of Illinois Open Source
6*9880d681SAndroid Build Coastguard Worker// License. See LICENSE.TXT for details.
7*9880d681SAndroid Build Coastguard Worker//
8*9880d681SAndroid Build Coastguard Worker//===----------------------------------------------------------------------===//
9*9880d681SAndroid Build Coastguard Worker
10*9880d681SAndroid Build Coastguard Worker// There are four SLOTS (four parallel pipelines) in Hexagon V4 machine.
11*9880d681SAndroid Build Coastguard Worker// This file describes that machine information.
12*9880d681SAndroid Build Coastguard Worker
13*9880d681SAndroid Build Coastguard Worker//
14*9880d681SAndroid Build Coastguard Worker//    |===========|==================================================|
15*9880d681SAndroid Build Coastguard Worker//    | PIPELINE  |              Instruction Classes                 |
16*9880d681SAndroid Build Coastguard Worker//    |===========|==================================================|
17*9880d681SAndroid Build Coastguard Worker//    | SLOT0     |  LD       ST    ALU32     MEMOP     NV    SYSTEM |
18*9880d681SAndroid Build Coastguard Worker//    |-----------|--------------------------------------------------|
19*9880d681SAndroid Build Coastguard Worker//    | SLOT1     |  LD       ST    ALU32                            |
20*9880d681SAndroid Build Coastguard Worker//    |-----------|--------------------------------------------------|
21*9880d681SAndroid Build Coastguard Worker//    | SLOT2     |  XTYPE          ALU32     J         JR           |
22*9880d681SAndroid Build Coastguard Worker//    |-----------|--------------------------------------------------|
23*9880d681SAndroid Build Coastguard Worker//    | SLOT3     |  XTYPE          ALU32     J         CR           |
24*9880d681SAndroid Build Coastguard Worker//    |===========|==================================================|
25*9880d681SAndroid Build Coastguard Worker
26*9880d681SAndroid Build Coastguard Workerdef CJ_tc_1_SLOT23              : InstrItinClass;
27*9880d681SAndroid Build Coastguard Workerdef CJ_tc_2early_SLOT23         : InstrItinClass;
28*9880d681SAndroid Build Coastguard Workerdef COPROC_VMEM_vtc_long_SLOT01 : InstrItinClass;
29*9880d681SAndroid Build Coastguard Workerdef COPROC_VX_vtc_long_SLOT23   : InstrItinClass;
30*9880d681SAndroid Build Coastguard Workerdef COPROC_VX_vtc_SLOT23        : InstrItinClass;
31*9880d681SAndroid Build Coastguard Workerdef J_tc_3stall_SLOT2           : InstrItinClass;
32*9880d681SAndroid Build Coastguard Workerdef MAPPING_tc_1_SLOT0123       : InstrItinClass;
33*9880d681SAndroid Build Coastguard Workerdef M_tc_3stall_SLOT23          : InstrItinClass;
34*9880d681SAndroid Build Coastguard Workerdef SUBINSN_tc_1_SLOT01         : InstrItinClass;
35*9880d681SAndroid Build Coastguard Workerdef SUBINSN_tc_2early_SLOT0     : InstrItinClass;
36*9880d681SAndroid Build Coastguard Workerdef SUBINSN_tc_2early_SLOT01    : InstrItinClass;
37*9880d681SAndroid Build Coastguard Workerdef SUBINSN_tc_3stall_SLOT0     : InstrItinClass;
38*9880d681SAndroid Build Coastguard Workerdef SUBINSN_tc_ld_SLOT0         : InstrItinClass;
39*9880d681SAndroid Build Coastguard Workerdef SUBINSN_tc_ld_SLOT01        : InstrItinClass;
40*9880d681SAndroid Build Coastguard Workerdef SUBINSN_tc_st_SLOT01        : InstrItinClass;
41*9880d681SAndroid Build Coastguard Worker
42*9880d681SAndroid Build Coastguard Workerdef HexagonItinerariesV55 :
43*9880d681SAndroid Build Coastguard Worker      ProcessorItineraries<[SLOT0, SLOT1, SLOT2, SLOT3, SLOT_ENDLOOP], [], [
44*9880d681SAndroid Build Coastguard Worker        // ALU32
45*9880d681SAndroid Build Coastguard Worker        InstrItinData<ALU32_2op_tc_1_SLOT0123     ,
46*9880d681SAndroid Build Coastguard Worker                      [InstrStage<1, [SLOT0, SLOT1, SLOT2, SLOT3]>]>,
47*9880d681SAndroid Build Coastguard Worker        InstrItinData<ALU32_2op_tc_2early_SLOT0123,
48*9880d681SAndroid Build Coastguard Worker                      [InstrStage<2, [SLOT0, SLOT1, SLOT2, SLOT3]>]>,
49*9880d681SAndroid Build Coastguard Worker        InstrItinData<ALU32_3op_tc_1_SLOT0123     ,
50*9880d681SAndroid Build Coastguard Worker                      [InstrStage<1, [SLOT0, SLOT1, SLOT2, SLOT3]>]>,
51*9880d681SAndroid Build Coastguard Worker        InstrItinData<ALU32_3op_tc_2_SLOT0123     ,
52*9880d681SAndroid Build Coastguard Worker                      [InstrStage<2, [SLOT0, SLOT1, SLOT2, SLOT3]>]>,
53*9880d681SAndroid Build Coastguard Worker        InstrItinData<ALU32_3op_tc_2early_SLOT0123,
54*9880d681SAndroid Build Coastguard Worker                      [InstrStage<2, [SLOT0, SLOT1, SLOT2, SLOT3]>]>,
55*9880d681SAndroid Build Coastguard Worker        InstrItinData<ALU32_ADDI_tc_1_SLOT0123    ,
56*9880d681SAndroid Build Coastguard Worker                      [InstrStage<1, [SLOT0, SLOT1, SLOT2, SLOT3]>]>,
57*9880d681SAndroid Build Coastguard Worker
58*9880d681SAndroid Build Coastguard Worker        // ALU64
59*9880d681SAndroid Build Coastguard Worker        InstrItinData<ALU64_tc_1_SLOT23     , [InstrStage<1, [SLOT2, SLOT3]>]>,
60*9880d681SAndroid Build Coastguard Worker        InstrItinData<ALU64_tc_2_SLOT23     , [InstrStage<2, [SLOT2, SLOT3]>]>,
61*9880d681SAndroid Build Coastguard Worker        InstrItinData<ALU64_tc_2early_SLOT23, [InstrStage<2, [SLOT2, SLOT3]>]>,
62*9880d681SAndroid Build Coastguard Worker        InstrItinData<ALU64_tc_3x_SLOT23    , [InstrStage<3, [SLOT2, SLOT3]>]>,
63*9880d681SAndroid Build Coastguard Worker
64*9880d681SAndroid Build Coastguard Worker        // CR -> System
65*9880d681SAndroid Build Coastguard Worker        InstrItinData<CR_tc_2_SLOT3      , [InstrStage<2, [SLOT3]>]>,
66*9880d681SAndroid Build Coastguard Worker        InstrItinData<CR_tc_2early_SLOT3 , [InstrStage<2, [SLOT3]>]>,
67*9880d681SAndroid Build Coastguard Worker        InstrItinData<CR_tc_3x_SLOT3     , [InstrStage<3, [SLOT3]>]>,
68*9880d681SAndroid Build Coastguard Worker
69*9880d681SAndroid Build Coastguard Worker        // Jump (conditional/unconditional/return etc)
70*9880d681SAndroid Build Coastguard Worker        InstrItinData<CR_tc_2early_SLOT23, [InstrStage<2, [SLOT2, SLOT3]>]>,
71*9880d681SAndroid Build Coastguard Worker        InstrItinData<CR_tc_3x_SLOT23    , [InstrStage<3, [SLOT2, SLOT3]>]>,
72*9880d681SAndroid Build Coastguard Worker        InstrItinData<CJ_tc_1_SLOT23     , [InstrStage<1, [SLOT2, SLOT3]>]>,
73*9880d681SAndroid Build Coastguard Worker        InstrItinData<CJ_tc_2early_SLOT23, [InstrStage<2, [SLOT2, SLOT3]>]>,
74*9880d681SAndroid Build Coastguard Worker        InstrItinData<J_tc_2early_SLOT23 , [InstrStage<2, [SLOT2, SLOT3]>]>,
75*9880d681SAndroid Build Coastguard Worker        InstrItinData<J_tc_2early_CJUMP_UCJUMP_ARCHDEPSLOT     , [InstrStage<1, [SLOT2, SLOT3]>]>,
76*9880d681SAndroid Build Coastguard Worker
77*9880d681SAndroid Build Coastguard Worker        // JR
78*9880d681SAndroid Build Coastguard Worker        InstrItinData<J_tc_2early_SLOT2  , [InstrStage<2, [SLOT2]>]>,
79*9880d681SAndroid Build Coastguard Worker        InstrItinData<J_tc_3stall_SLOT2  , [InstrStage<3, [SLOT2]>]>,
80*9880d681SAndroid Build Coastguard Worker
81*9880d681SAndroid Build Coastguard Worker        // Extender
82*9880d681SAndroid Build Coastguard Worker        InstrItinData<EXTENDER_tc_1_SLOT0123,
83*9880d681SAndroid Build Coastguard Worker                      [InstrStage<1, [SLOT0, SLOT1, SLOT2, SLOT3]>]>,
84*9880d681SAndroid Build Coastguard Worker
85*9880d681SAndroid Build Coastguard Worker        // Load
86*9880d681SAndroid Build Coastguard Worker        InstrItinData<LD_tc_ld_SLOT01      , [InstrStage<3, [SLOT0, SLOT1]>]>,
87*9880d681SAndroid Build Coastguard Worker        InstrItinData<LD_tc_3or4stall_SLOT0, [InstrStage<3, [SLOT0]>]>,
88*9880d681SAndroid Build Coastguard Worker        InstrItinData<LD_tc_ld_SLOT0       , [InstrStage<3, [SLOT0]>]>,
89*9880d681SAndroid Build Coastguard Worker
90*9880d681SAndroid Build Coastguard Worker        // M
91*9880d681SAndroid Build Coastguard Worker        InstrItinData<M_tc_1_SLOT23     , [InstrStage<1, [SLOT2, SLOT3]>]>,
92*9880d681SAndroid Build Coastguard Worker        InstrItinData<M_tc_2_SLOT23     , [InstrStage<2, [SLOT2, SLOT3]>]>,
93*9880d681SAndroid Build Coastguard Worker        InstrItinData<M_tc_3_SLOT23     , [InstrStage<3, [SLOT2, SLOT3]>]>,
94*9880d681SAndroid Build Coastguard Worker        InstrItinData<M_tc_3x_SLOT23    , [InstrStage<3, [SLOT2, SLOT3]>]>,
95*9880d681SAndroid Build Coastguard Worker        InstrItinData<M_tc_3or4x_SLOT23 , [InstrStage<3, [SLOT2, SLOT3]>]>,
96*9880d681SAndroid Build Coastguard Worker        InstrItinData<M_tc_3stall_SLOT23, [InstrStage<3, [SLOT2, SLOT3]>]>,
97*9880d681SAndroid Build Coastguard Worker
98*9880d681SAndroid Build Coastguard Worker        // Store
99*9880d681SAndroid Build Coastguard Worker        InstrItinData<ST_tc_st_SLOT01   , [InstrStage<1, [SLOT0, SLOT1]>]>,
100*9880d681SAndroid Build Coastguard Worker        InstrItinData<ST_tc_3stall_SLOT0, [InstrStage<3, [SLOT0]>]>,
101*9880d681SAndroid Build Coastguard Worker        InstrItinData<ST_tc_ld_SLOT0    , [InstrStage<3, [SLOT0]>]>,
102*9880d681SAndroid Build Coastguard Worker        InstrItinData<ST_tc_st_SLOT0    , [InstrStage<1, [SLOT0]>]>,
103*9880d681SAndroid Build Coastguard Worker
104*9880d681SAndroid Build Coastguard Worker        // Subinsn
105*9880d681SAndroid Build Coastguard Worker        InstrItinData<SUBINSN_tc_2early_SLOT0, [InstrStage<2, [SLOT0]>]>,
106*9880d681SAndroid Build Coastguard Worker        InstrItinData<SUBINSN_tc_3stall_SLOT0, [InstrStage<3, [SLOT0]>]>,
107*9880d681SAndroid Build Coastguard Worker        InstrItinData<SUBINSN_tc_ld_SLOT0    , [InstrStage<3, [SLOT0]>]>,
108*9880d681SAndroid Build Coastguard Worker        InstrItinData<SUBINSN_tc_1_SLOT01    , [InstrStage<1, [SLOT0, SLOT1]>]>,
109*9880d681SAndroid Build Coastguard Worker        InstrItinData<SUBINSN_tc_2early_SLOT01,
110*9880d681SAndroid Build Coastguard Worker                              [InstrStage<2, [SLOT0, SLOT1]>]>,
111*9880d681SAndroid Build Coastguard Worker        InstrItinData<SUBINSN_tc_ld_SLOT01   , [InstrStage<3, [SLOT0, SLOT1]>]>,
112*9880d681SAndroid Build Coastguard Worker        InstrItinData<SUBINSN_tc_st_SLOT01   , [InstrStage<1, [SLOT0, SLOT1]>]>,
113*9880d681SAndroid Build Coastguard Worker
114*9880d681SAndroid Build Coastguard Worker        // S
115*9880d681SAndroid Build Coastguard Worker        InstrItinData<S_2op_tc_1_SLOT23     , [InstrStage<1, [SLOT2, SLOT3]>]>,
116*9880d681SAndroid Build Coastguard Worker        InstrItinData<S_2op_tc_2_SLOT23     , [InstrStage<2, [SLOT2, SLOT3]>]>,
117*9880d681SAndroid Build Coastguard Worker        InstrItinData<S_2op_tc_2early_SLOT23, [InstrStage<2, [SLOT2, SLOT3]>]>,
118*9880d681SAndroid Build Coastguard Worker        InstrItinData<S_2op_tc_3or4x_SLOT23 , [InstrStage<3, [SLOT2, SLOT3]>]>,
119*9880d681SAndroid Build Coastguard Worker        InstrItinData<S_3op_tc_1_SLOT23     , [InstrStage<1, [SLOT2, SLOT3]>]>,
120*9880d681SAndroid Build Coastguard Worker        InstrItinData<S_3op_tc_2_SLOT23     , [InstrStage<2, [SLOT2, SLOT3]>]>,
121*9880d681SAndroid Build Coastguard Worker        InstrItinData<S_3op_tc_2early_SLOT23, [InstrStage<2, [SLOT2, SLOT3]>]>,
122*9880d681SAndroid Build Coastguard Worker        InstrItinData<S_3op_tc_3_SLOT23     , [InstrStage<3, [SLOT2, SLOT3]>]>,
123*9880d681SAndroid Build Coastguard Worker        InstrItinData<S_3op_tc_3stall_SLOT23, [InstrStage<3, [SLOT2, SLOT3]>]>,
124*9880d681SAndroid Build Coastguard Worker        InstrItinData<S_3op_tc_3x_SLOT23    , [InstrStage<3, [SLOT2, SLOT3]>]>,
125*9880d681SAndroid Build Coastguard Worker
126*9880d681SAndroid Build Coastguard Worker        // New Value Compare Jump
127*9880d681SAndroid Build Coastguard Worker        InstrItinData<NCJ_tc_3or4stall_SLOT0, [InstrStage<3, [SLOT0]>]>,
128*9880d681SAndroid Build Coastguard Worker
129*9880d681SAndroid Build Coastguard Worker        // Mem ops
130*9880d681SAndroid Build Coastguard Worker        InstrItinData<V2LDST_tc_st_SLOT0  , [InstrStage<1, [SLOT0]>]>,
131*9880d681SAndroid Build Coastguard Worker        InstrItinData<V2LDST_tc_ld_SLOT01 , [InstrStage<2, [SLOT0, SLOT1]>]>,
132*9880d681SAndroid Build Coastguard Worker        InstrItinData<V2LDST_tc_st_SLOT01 , [InstrStage<1, [SLOT0, SLOT1]>]>,
133*9880d681SAndroid Build Coastguard Worker        InstrItinData<V4LDST_tc_st_SLOT0  , [InstrStage<1, [SLOT0]>]>,
134*9880d681SAndroid Build Coastguard Worker        InstrItinData<V4LDST_tc_ld_SLOT01 , [InstrStage<3, [SLOT0, SLOT1]>]>,
135*9880d681SAndroid Build Coastguard Worker        InstrItinData<V4LDST_tc_st_SLOT01 , [InstrStage<1, [SLOT0, SLOT1]>]>,
136*9880d681SAndroid Build Coastguard Worker
137*9880d681SAndroid Build Coastguard Worker        // Endloop
138*9880d681SAndroid Build Coastguard Worker        InstrItinData<J_tc_2early_SLOT0123, [InstrStage<2, [SLOT_ENDLOOP]>]>,
139*9880d681SAndroid Build Coastguard Worker
140*9880d681SAndroid Build Coastguard Worker        // Vector
141*9880d681SAndroid Build Coastguard Worker        InstrItinData<COPROC_VMEM_vtc_long_SLOT01,
142*9880d681SAndroid Build Coastguard Worker                      [InstrStage<3, [SLOT0, SLOT1]>]>,
143*9880d681SAndroid Build Coastguard Worker        InstrItinData<COPROC_VX_vtc_long_SLOT23  ,
144*9880d681SAndroid Build Coastguard Worker                      [InstrStage<3, [SLOT2, SLOT3]>]>,
145*9880d681SAndroid Build Coastguard Worker        InstrItinData<COPROC_VX_vtc_SLOT23 ,
146*9880d681SAndroid Build Coastguard Worker                      [InstrStage<3, [SLOT2, SLOT3]>]>,
147*9880d681SAndroid Build Coastguard Worker        InstrItinData<MAPPING_tc_1_SLOT0123      ,
148*9880d681SAndroid Build Coastguard Worker                      [InstrStage<1, [SLOT0, SLOT1, SLOT2, SLOT3]>]>,
149*9880d681SAndroid Build Coastguard Worker
150*9880d681SAndroid Build Coastguard Worker        // Misc
151*9880d681SAndroid Build Coastguard Worker        InstrItinData<COMPOUND_CJ_ARCHDEPSLOT , [InstrStage<1, [SLOT2, SLOT3]>]>,
152*9880d681SAndroid Build Coastguard Worker        InstrItinData<COMPOUND , [InstrStage<1, [SLOT2, SLOT3]>]>,
153*9880d681SAndroid Build Coastguard Worker        InstrItinData<DUPLEX , [InstrStage<1, [SLOT0]>]>,
154*9880d681SAndroid Build Coastguard Worker        InstrItinData<PREFIX , [InstrStage<1, [SLOT0, SLOT1, SLOT2, SLOT3]>]>,
155*9880d681SAndroid Build Coastguard Worker        InstrItinData<PSEUDO , [InstrStage<1, [SLOT0, SLOT1, SLOT2, SLOT3]>]>,
156*9880d681SAndroid Build Coastguard Worker        InstrItinData<PSEUDOM, [InstrStage<1, [SLOT2, SLOT3], 0>,
157*9880d681SAndroid Build Coastguard Worker                                InstrStage<1, [SLOT2, SLOT3]>]>
158*9880d681SAndroid Build Coastguard Worker
159*9880d681SAndroid Build Coastguard Worker      ]>;
160*9880d681SAndroid Build Coastguard Worker
161*9880d681SAndroid Build Coastguard Workerdef HexagonModelV55 : SchedMachineModel {
162*9880d681SAndroid Build Coastguard Worker  // Max issue per cycle == bundle width.
163*9880d681SAndroid Build Coastguard Worker  let IssueWidth = 4;
164*9880d681SAndroid Build Coastguard Worker  let Itineraries = HexagonItinerariesV55;
165*9880d681SAndroid Build Coastguard Worker  let LoadLatency = 1;
166*9880d681SAndroid Build Coastguard Worker  let CompleteModel = 0;
167*9880d681SAndroid Build Coastguard Worker}
168*9880d681SAndroid Build Coastguard Worker
169*9880d681SAndroid Build Coastguard Worker//===----------------------------------------------------------------------===//
170*9880d681SAndroid Build Coastguard Worker// Hexagon V4 Resource Definitions -
171*9880d681SAndroid Build Coastguard Worker//===----------------------------------------------------------------------===//
172