[compiler-rt] 2cd8207 - [RISCV][compiler-rt] drop __riscv_vendor_feature_bits (#126460)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 10 23:19:23 PST 2025
Author: Piyou Chen
Date: 2025-02-11T15:19:19+08:00
New Revision: 2cd8207b26ea4269630feba661f68554d7ae3c15
URL: https://github.com/llvm/llvm-project/commit/2cd8207b26ea4269630feba661f68554d7ae3c15
DIFF: https://github.com/llvm/llvm-project/commit/2cd8207b26ea4269630feba661f68554d7ae3c15.diff
LOG: [RISCV][compiler-rt] drop __riscv_vendor_feature_bits (#126460)
Address https://github.com/riscv-non-isa/riscv-c-api-doc/pull/101
Added:
Modified:
compiler-rt/lib/builtins/cpu_model/riscv.c
Removed:
################################################################################
diff --git a/compiler-rt/lib/builtins/cpu_model/riscv.c b/compiler-rt/lib/builtins/cpu_model/riscv.c
index 74534896057ef53..6879c2ad482641a 100644
--- a/compiler-rt/lib/builtins/cpu_model/riscv.c
+++ b/compiler-rt/lib/builtins/cpu_model/riscv.c
@@ -14,12 +14,6 @@ struct {
unsigned long long features[RISCV_FEATURE_BITS_LENGTH];
} __riscv_feature_bits __attribute__((visibility("hidden"), nocommon));
-#define RISCV_VENDOR_FEATURE_BITS_LENGTH 1
-struct {
- unsigned length;
- unsigned long long features[RISCV_VENDOR_FEATURE_BITS_LENGTH];
-} __riscv_vendor_feature_bits __attribute__((visibility("hidden"), nocommon));
-
struct {
unsigned mvendorid;
unsigned long long marchid;
@@ -338,11 +332,11 @@ static int FeaturesBitCached = 0;
void __init_riscv_feature_bits(void *);
static void __init_riscv_feature_bits_ctor(void) CONSTRUCTOR_ATTRIBUTE;
-// A constructor function that sets __riscv_feature_bits, and
-// __riscv_vendor_feature_bits to the right values. This needs to run
-// only once. This constructor is given the highest priority and it should
-// run before constructors without the priority set. However, it still runs
-// after ifunc initializers and needs to be called explicitly there.
+// A constructor function that sets __riscv_feature_bits
+// to the right values. This needs to run only once. This constructor is given
+// the highest priority and it should run before constructors without the
+// priority set. However, it still runs after ifunc initializers and needs to
+// be called explicitly there.
static void CONSTRUCTOR_ATTRIBUTE __init_riscv_feature_bits_ctor(void) {
__init_riscv_feature_bits(0);
@@ -357,7 +351,6 @@ void __init_riscv_feature_bits(void *PlatformArgs) {
return;
__riscv_feature_bits.length = RISCV_FEATURE_BITS_LENGTH;
- __riscv_vendor_feature_bits.length = RISCV_VENDOR_FEATURE_BITS_LENGTH;
#if defined(__linux__)
struct riscv_hwprobe Hwprobes[] = {
More information about the llvm-commits
mailing list