1 //=-LanaiSchedule.td - Lanai Scheduling Definitions --*- 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 //===----------------------------------------------------------------------===//
10 def LDST_FU : FuncUnit;
12 def IIC_ALU : InstrItinClass;
13 def IIC_LD : InstrItinClass;
14 def IIC_ST : InstrItinClass;
15 def IIC_LDSW : InstrItinClass;
16 def IIC_STSW : InstrItinClass;
18 def LanaiItinerary : ProcessorItineraries<[ALU_FU, LDST_FU],[],[
19 InstrItinData<IIC_LD, [InstrStage<1, [LDST_FU]>]>,
20 InstrItinData<IIC_ST, [InstrStage<1, [LDST_FU]>]>,
21 InstrItinData<IIC_LDSW, [InstrStage<2, [LDST_FU]>]>,
22 InstrItinData<IIC_STSW, [InstrStage<2, [LDST_FU]>]>,
23 InstrItinData<IIC_ALU, [InstrStage<1, [ALU_FU]>]>
26 def LanaiSchedModel : SchedMachineModel {
27 // Cycles for loads to access the cache [default = -1]
30 // Max micro-ops that can be buffered for optimized loop dispatch/execution.
32 let LoopMicroOpBufferSize = 0;
34 // Allow scheduler to assign default model to any unrecognized opcodes.
36 let CompleteModel = 0;
38 // Max micro-ops that may be scheduled per cycle. [default = 1]
41 // Extra cycles for a mispredicted branch. [default = -1]
42 let MispredictPenalty = 10;
44 // Enable Post RegAlloc Scheduler pass. [default = 0]
45 let PostRAScheduler = 0;
47 // Max micro-ops that can be buffered. [default = -1]
48 let MicroOpBufferSize = 0;
50 // Per-cycle resources tables. [default = NoItineraries]
51 let Itineraries = LanaiItinerary;
54 def ALU : ProcResource<1> { let BufferSize = 0; }
55 def LdSt : ProcResource<1> { let BufferSize = 0; }
57 def WriteLD : SchedWrite;
58 def WriteST : SchedWrite;
59 def WriteLDSW : SchedWrite;
60 def WriteSTSW : SchedWrite;
61 def WriteALU : SchedWrite;
63 let SchedModel = LanaiSchedModel in {
64 def : WriteRes<WriteLD, [LdSt]> { let Latency = 2; }
65 def : WriteRes<WriteST, [LdSt]> { let Latency = 2; }
66 def : WriteRes<WriteLDSW, [LdSt]> { let Latency = 2; }
67 def : WriteRes<WriteSTSW, [LdSt]> { let Latency = 4; }
68 def : WriteRes<WriteALU, [ALU]> { let Latency = 1; }