[compiler-rt] [compiler-rt] Add cpu model init for Windows. (PR #111961)

via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 11 00:41:12 PDT 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff c2063de1593610eda0f4de33c3b89324642ed54c 889175da54a7769c23f8390b213cfcc22369c365 --extensions h,inc,c -- compiler-rt/lib/builtins/cpu_model/aarch64/fmv/windows.inc compiler-rt/lib/builtins/cpu_model/aarch64.c compiler-rt/lib/builtins/cpu_model/cpu_model.h
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/compiler-rt/lib/builtins/cpu_model/aarch64/fmv/windows.inc b/compiler-rt/lib/builtins/cpu_model/aarch64/fmv/windows.inc
index fba4d8aed8..b42a7257cf 100644
--- a/compiler-rt/lib/builtins/cpu_model/aarch64/fmv/windows.inc
+++ b/compiler-rt/lib/builtins/cpu_model/aarch64/fmv/windows.inc
@@ -7,11 +7,11 @@
 void __init_cpu_features_resolver(unsigned long hwcap,
                                   const __ifunc_arg_t *arg) {}
 
-void  CONSTRUCTOR_ATTRIBUTE __init_cpu_features(void) {
+void CONSTRUCTOR_ATTRIBUTE __init_cpu_features(void) {
   if (__atomic_load_n(&__aarch64_cpu_features.features, __ATOMIC_RELAXED))
     return;
 
-  #define setCPUFeature(F) features |= 1ULL << F
+#define setCPUFeature(F) features |= 1ULL << F
 
   uint64_t features = 0;
 
@@ -37,6 +37,5 @@ void  CONSTRUCTOR_ATTRIBUTE __init_cpu_features(void) {
   if (IsProcessorFeaturePresent(PF_ARM_V83_LRCPC_INSTRUCTIONS_AVAILABLE))
     setCPUFeature(FEAT_RCPC);
 
-  __atomic_store(&__aarch64_cpu_features.features, &features,
-                  __ATOMIC_RELAXED);
+  __atomic_store(&__aarch64_cpu_features.features, &features, __ATOMIC_RELAXED);
 }

``````````

</details>


https://github.com/llvm/llvm-project/pull/111961


More information about the llvm-commits mailing list