[llvm] [RISCV] Add `TuneVentanaVeyron` subtarget feature. (PR #70414)
Mikhail Gudim via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 26 22:43:55 PDT 2023
https://github.com/mgudim updated https://github.com/llvm/llvm-project/pull/70414
>From 48d0588907f3988d6bad4c809649d2b646648dbc Mon Sep 17 00:00:00 2001
From: Mikhail Gudim <mgudim at gmail.com>
Date: Thu, 26 Oct 2023 22:30:01 -0400
Subject: [PATCH] [RISCV] Add `TuneVentanaVeyron` subtarget feature.
This will be used to add veyron fusions in a later commit.
---
llvm/lib/Target/RISCV/RISCVFeatures.td | 4 ++++
llvm/lib/Target/RISCV/RISCVProcessors.td | 3 ++-
llvm/lib/Target/RISCV/RISCVSubtarget.h | 5 +----
3 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/llvm/lib/Target/RISCV/RISCVFeatures.td b/llvm/lib/Target/RISCV/RISCVFeatures.td
index 979bc0ea8c7d065..ba6c63d8958e647 100644
--- a/llvm/lib/Target/RISCV/RISCVFeatures.td
+++ b/llvm/lib/Target/RISCV/RISCVFeatures.td
@@ -954,6 +954,10 @@ def TuneSiFive7 : SubtargetFeature<"sifive7", "RISCVProcFamily", "SiFive7",
[TuneNoDefaultUnroll,
TuneShortForwardBranchOpt]>;
+def TuneVentanaVeyron : SubtargetFeature<"ventana-veyron", "RISCVProcFamily", "VentanaVeyron",
+ "Ventana-Veyron Series processors",
+ [TuneLUIADDIFusion]>;
+
// Assume that lock-free native-width atomics are available, even if the target
// and operating system combination would not usually provide them. The user
// is responsible for providing any necessary __sync implementations. Code
diff --git a/llvm/lib/Target/RISCV/RISCVProcessors.td b/llvm/lib/Target/RISCV/RISCVProcessors.td
index e4008d145ffa572..5465e0c998ca6f8 100644
--- a/llvm/lib/Target/RISCV/RISCVProcessors.td
+++ b/llvm/lib/Target/RISCV/RISCVProcessors.td
@@ -242,4 +242,5 @@ def VENTANA_VEYRON_V1 : RISCVProcessorModel<"veyron-v1",
FeatureStdExtZicbom,
FeatureStdExtZicbop,
FeatureStdExtZicboz,
- FeatureVendorXVentanaCondOps]>;
+ FeatureVendorXVentanaCondOps],
+ [TuneVentanaVeyron]>;
diff --git a/llvm/lib/Target/RISCV/RISCVSubtarget.h b/llvm/lib/Target/RISCV/RISCVSubtarget.h
index 6b915e61c136086..4e84d7932c61c41 100644
--- a/llvm/lib/Target/RISCV/RISCVSubtarget.h
+++ b/llvm/lib/Target/RISCV/RISCVSubtarget.h
@@ -46,10 +46,7 @@ struct RISCVTuneInfo {
class RISCVSubtarget : public RISCVGenSubtargetInfo {
public:
- enum RISCVProcFamilyEnum : uint8_t {
- Others,
- SiFive7,
- };
+ enum RISCVProcFamilyEnum : uint8_t { Others, SiFive7, VentanaVeyron };
private:
virtual void anchor();
More information about the llvm-commits
mailing list