https://github.com/llvmbot updated https://github.com/llvm/llvm-project/pull/126845
>From 4806a5572e71e469015e04472a38afe35a7106d3 Mon Sep 17 00:00:00 2001 From: Piyou Chen <piyou.c...@sifive.com> Date: Tue, 11 Feb 2025 15:19:19 +0800 Subject: [PATCH] [RISCV][compiler-rt] drop __riscv_vendor_feature_bits (#126460) Address https://github.com/riscv-non-isa/riscv-c-api-doc/pull/101 (cherry picked from commit 2cd8207b26ea4269630feba661f68554d7ae3c15) --- compiler-rt/lib/builtins/cpu_model/riscv.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/compiler-rt/lib/builtins/cpu_model/riscv.c b/compiler-rt/lib/builtins/cpu_model/riscv.c index 74534896057ef..6879c2ad48264 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[] = { _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits