1 //===-- RISCVProcessors.td - RISC-V Processors -------------*- 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 //===----------------------------------------------------------------------===//
10 // RISC-V processors supported.
11 //===----------------------------------------------------------------------===//
14 bits<8> PrefFunctionAlignment = 1;
15 bits<8> PrefLoopAlignment = 1;
18 def RISCVTuneInfoTable : GenericTable {
19 let FilterClass = "RISCVTuneInfo";
20 let CppTypeName = "RISCVTuneInfo";
21 let Fields = ["Name", "PrefFunctionAlignment", "PrefLoopAlignment"];
24 def getRISCVTuneInfo : SearchIndex {
25 let Table = RISCVTuneInfoTable;
29 class GenericTuneInfo: RISCVTuneInfo;
31 class RISCVProcessorModel<string n,
33 list<SubtargetFeature> f,
34 list<SubtargetFeature> tunef = [],
35 string default_march = "">
36 : ProcessorModel<n, m, f, tunef> {
37 string DefaultMarch = default_march;
40 class RISCVTuneProcessorModel<string n,
42 list<SubtargetFeature> tunef = [],
43 list<SubtargetFeature> f = []>
44 : ProcessorModel<n, m, f,tunef>;
46 def GENERIC_RV32 : RISCVProcessorModel<"generic-rv32",
50 def GENERIC_RV64 : RISCVProcessorModel<"generic-rv64",
54 // Support generic for compatibility with other targets. The triple will be used
55 // to change to the appropriate rv32/rv64 version.
56 def : ProcessorModel<"generic", NoSchedModel, []>, GenericTuneInfo;
58 def ROCKET_RV32 : RISCVProcessorModel<"rocket-rv32",
61 FeatureStdExtZifencei,
63 def ROCKET_RV64 : RISCVProcessorModel<"rocket-rv64",
66 FeatureStdExtZifencei,
68 def ROCKET : RISCVTuneProcessorModel<"rocket",
71 def SIFIVE_7 : RISCVTuneProcessorModel<"sifive-7-series",
75 def SIFIVE_E20 : RISCVProcessorModel<"sifive-e20",
79 FeatureStdExtZifencei,
83 def SIFIVE_E21 : RISCVProcessorModel<"sifive-e21",
87 FeatureStdExtZifencei,
92 def SIFIVE_E24 : RISCVProcessorModel<"sifive-e24",
95 FeatureStdExtZifencei,
101 def SIFIVE_E31 : RISCVProcessorModel<"sifive-e31",
104 FeatureStdExtZifencei,
110 def SIFIVE_E34 : RISCVProcessorModel<"sifive-e34",
113 FeatureStdExtZifencei,
119 def SIFIVE_E76 : RISCVProcessorModel<"sifive-e76",
122 FeatureStdExtZifencei,
129 def SIFIVE_S21 : RISCVProcessorModel<"sifive-s21",
133 FeatureStdExtZifencei,
138 def SIFIVE_S51 : RISCVProcessorModel<"sifive-s51",
142 FeatureStdExtZifencei,
147 def SIFIVE_S54 : RISCVProcessorModel<"sifive-s54",
150 FeatureStdExtZifencei,
157 def SIFIVE_S76 : RISCVProcessorModel<"sifive-s76",
160 FeatureStdExtZifencei,
166 FeatureStdExtZihintpause,
167 FeatureVendorXSfcie],
170 def SIFIVE_U54 : RISCVProcessorModel<"sifive-u54",
173 FeatureStdExtZifencei,
180 def SIFIVE_U74 : RISCVProcessorModel<"sifive-u74",
183 FeatureStdExtZifencei,
191 def SIFIVE_X280 : RISCVProcessorModel<"sifive-x280", SiFive7Model,
193 FeatureStdExtZifencei,
200 FeatureStdExtZvl512b,
208 def SYNTACORE_SCR1_BASE : RISCVProcessorModel<"syntacore-scr1-base",
212 FeatureStdExtZifencei,
214 [TuneNoDefaultUnroll]>;
216 def SYNTACORE_SCR1_MAX : RISCVProcessorModel<"syntacore-scr1-max",
220 FeatureStdExtZifencei,
223 [TuneNoDefaultUnroll]>;
225 def VENTANA_VEYRON_V1 : RISCVProcessorModel<"veyron-v1",
228 FeatureStdExtZifencei,
232 FeatureStdExtZihintpause,
245 FeatureVendorXVentanaCondOps],
246 [TuneVentanaVeyron]>;