1 //==- AArch64SchedFalkor.td - Falkor 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 //===----------------------------------------------------------------------===//
9 // This file defines the machine model for Qualcomm Falkor to support
10 // instruction scheduling and other instruction cost heuristics.
12 //===----------------------------------------------------------------------===//
14 //===----------------------------------------------------------------------===//
15 // Define the SchedMachineModel and provide basic properties for coarse grained
16 // instruction cost model.
18 def FalkorModel : SchedMachineModel {
19 let IssueWidth = 8; // 8 uops are dispatched per cycle.
20 let MicroOpBufferSize = 128; // Out-of-order with temporary unified issue buffer.
21 let LoopMicroOpBufferSize = 16;
22 let LoadLatency = 3; // Optimistic load latency.
23 let MispredictPenalty = 11; // Minimum branch misprediction penalty.
24 let CompleteModel = 1;
26 list<Predicate> UnsupportedFeatures = SVEUnsupported.F;
28 // FIXME: Remove when all errors have been fixed.
29 let FullInstRWOverlapCheck = 0;
32 //===----------------------------------------------------------------------===//
33 // Define each kind of processor resource and number available on Falkor.
35 let SchedModel = FalkorModel in {
37 def FalkorUnitB : ProcResource<1>; // Branch
38 def FalkorUnitLD : ProcResource<1>; // Load pipe
39 def FalkorUnitSD : ProcResource<1>; // Store data
40 def FalkorUnitST : ProcResource<1>; // Store pipe
41 def FalkorUnitX : ProcResource<1>; // Complex arithmetic
42 def FalkorUnitY : ProcResource<1>; // Simple arithmetic
43 def FalkorUnitZ : ProcResource<1>; // Simple arithmetic
45 def FalkorUnitVSD : ProcResource<1>; // Vector store data
46 def FalkorUnitVX : ProcResource<1>; // Vector X-pipe
47 def FalkorUnitVY : ProcResource<1>; // Vector Y-pipe
49 def FalkorUnitGTOV : ProcResource<1>; // Scalar to Vector
50 def FalkorUnitVTOG : ProcResource<1>; // Vector to Scalar
52 // Define the resource groups.
53 def FalkorUnitXY : ProcResGroup<[FalkorUnitX, FalkorUnitY]>;
54 def FalkorUnitXYZ : ProcResGroup<[FalkorUnitX, FalkorUnitY, FalkorUnitZ]>;
55 def FalkorUnitXYZB : ProcResGroup<[FalkorUnitX, FalkorUnitY, FalkorUnitZ,
57 def FalkorUnitZB : ProcResGroup<[FalkorUnitZ, FalkorUnitB]>;
58 def FalkorUnitVXVY : ProcResGroup<[FalkorUnitVX, FalkorUnitVY]>;
62 //===----------------------------------------------------------------------===//
63 // Map the target-defined scheduler read/write resources and latency for
66 let SchedModel = FalkorModel in {
68 // These WriteRes entries are not used in the Falkor sched model.
69 def : WriteRes<WriteImm, []> { let Unsupported = 1; }
70 def : WriteRes<WriteI, []> { let Unsupported = 1; }
71 def : WriteRes<WriteISReg, []> { let Unsupported = 1; }
72 def : WriteRes<WriteIEReg, []> { let Unsupported = 1; }
73 def : WriteRes<WriteExtr, []> { let Unsupported = 1; }
74 def : WriteRes<WriteIS, []> { let Unsupported = 1; }
75 def : WriteRes<WriteID32, []> { let Unsupported = 1; }
76 def : WriteRes<WriteID64, []> { let Unsupported = 1; }
77 def : WriteRes<WriteIM32, []> { let Unsupported = 1; }
78 def : WriteRes<WriteIM64, []> { let Unsupported = 1; }
79 def : WriteRes<WriteBr, []> { let Unsupported = 1; }
80 def : WriteRes<WriteBrReg, []> { let Unsupported = 1; }
81 def : WriteRes<WriteLD, []> { let Unsupported = 1; }
82 def : WriteRes<WriteST, []> { let Unsupported = 1; }
83 def : WriteRes<WriteSTP, []> { let Unsupported = 1; }
84 def : WriteRes<WriteAdr, []> { let Unsupported = 1; }
85 def : WriteRes<WriteLDIdx, []> { let Unsupported = 1; }
86 def : WriteRes<WriteSTIdx, []> { let Unsupported = 1; }
87 def : WriteRes<WriteF, []> { let Unsupported = 1; }
88 def : WriteRes<WriteFCmp, []> { let Unsupported = 1; }
89 def : WriteRes<WriteFCvt, []> { let Unsupported = 1; }
90 def : WriteRes<WriteFCopy, []> { let Unsupported = 1; }
91 def : WriteRes<WriteFImm, []> { let Unsupported = 1; }
92 def : WriteRes<WriteFMul, []> { let Unsupported = 1; }
93 def : WriteRes<WriteFDiv, []> { let Unsupported = 1; }
94 def : WriteRes<WriteV, []> { let Unsupported = 1; }
95 def : WriteRes<WriteVLD, []> { let Unsupported = 1; }
96 def : WriteRes<WriteVST, []> { let Unsupported = 1; }
97 def : WriteRes<WriteSys, []> { let Unsupported = 1; }
98 def : WriteRes<WriteBarrier, []> { let Unsupported = 1; }
99 def : WriteRes<WriteHint, []> { let Unsupported = 1; }
100 def : WriteRes<WriteLDHi, []> { let Unsupported = 1; }
101 def : WriteRes<WriteAtomic, []> { let Unsupported = 1; }
103 // These ReadAdvance entries are not used in the Falkor sched model.
104 def : ReadAdvance<ReadI, 0>;
105 def : ReadAdvance<ReadISReg, 0>;
106 def : ReadAdvance<ReadIEReg, 0>;
107 def : ReadAdvance<ReadIM, 0>;
108 def : ReadAdvance<ReadIMA, 0>;
109 def : ReadAdvance<ReadID, 0>;
110 def : ReadAdvance<ReadExtrHi, 0>;
111 def : ReadAdvance<ReadAdrBase, 0>;
112 def : ReadAdvance<ReadVLD, 0>;
114 // Detailed Refinements
115 // -----------------------------------------------------------------------------
116 include "AArch64SchedFalkorDetails.td"