From ced5a382a8ebeffa828cdd66d5dfcc2d97716f85 Mon Sep 17 00:00:00 2001 From: Guillaume Chatelet Date: Tue, 7 Feb 2023 10:32:03 +0000 Subject: [PATCH] [libc][NFC] Move cpu_features to macros folder --- libc/cmake/modules/cpu_features/check_AVX2.cpp | 2 +- libc/cmake/modules/cpu_features/check_AVX512BW.cpp | 2 +- libc/cmake/modules/cpu_features/check_AVX512F.cpp | 2 +- libc/cmake/modules/cpu_features/check_FMA.cpp | 2 +- libc/cmake/modules/cpu_features/check_SSE2.cpp | 2 +- libc/cmake/modules/cpu_features/check_SSE4_2.cpp | 2 +- libc/src/__support/CMakeLists.txt | 2 +- libc/src/__support/FPUtil/FMA.h | 2 +- libc/src/__support/FPUtil/aarch64/FMA.h | 2 +- libc/src/__support/FPUtil/multiply_add.h | 2 +- libc/src/__support/FPUtil/x86_64/FMA.h | 2 +- libc/src/__support/{ => macros}/cpu_features.h | 6 +++--- libc/src/math/generic/asinf.cpp | 2 +- libc/src/math/generic/cosf.cpp | 2 +- libc/src/math/generic/expm1f.cpp | 2 +- libc/src/math/generic/sincosf.cpp | 2 +- libc/src/math/generic/sincosf_utils.h | 2 +- libc/src/math/generic/sinf.cpp | 2 +- libc/src/math/generic/tanf.cpp | 2 +- libc/src/math/generic/tanhf.cpp | 2 +- utils/bazel/llvm-project-overlay/libc/BUILD.bazel | 2 +- 21 files changed, 23 insertions(+), 23 deletions(-) rename libc/src/__support/{ => macros}/cpu_features.h (86%) diff --git a/libc/cmake/modules/cpu_features/check_AVX2.cpp b/libc/cmake/modules/cpu_features/check_AVX2.cpp index 4330308..024dd40 100644 --- a/libc/cmake/modules/cpu_features/check_AVX2.cpp +++ b/libc/cmake/modules/cpu_features/check_AVX2.cpp @@ -1,4 +1,4 @@ -#include "src/__support/cpu_features.h" +#include "src/__support/macros/cpu_features.h" #ifndef LIBC_TARGET_HAS_AVX2 #error unsupported diff --git a/libc/cmake/modules/cpu_features/check_AVX512BW.cpp b/libc/cmake/modules/cpu_features/check_AVX512BW.cpp index 4e8cfc2..5010612 100644 --- a/libc/cmake/modules/cpu_features/check_AVX512BW.cpp +++ b/libc/cmake/modules/cpu_features/check_AVX512BW.cpp @@ -1,4 +1,4 @@ -#include "src/__support/cpu_features.h" +#include "src/__support/macros/cpu_features.h" #ifndef LIBC_TARGET_HAS_AVX512BW #error unsupported diff --git a/libc/cmake/modules/cpu_features/check_AVX512F.cpp b/libc/cmake/modules/cpu_features/check_AVX512F.cpp index 8491654..2bab186 100644 --- a/libc/cmake/modules/cpu_features/check_AVX512F.cpp +++ b/libc/cmake/modules/cpu_features/check_AVX512F.cpp @@ -1,4 +1,4 @@ -#include "src/__support/cpu_features.h" +#include "src/__support/macros/cpu_features.h" #ifndef LIBC_TARGET_HAS_AVX512F #error unsupported diff --git a/libc/cmake/modules/cpu_features/check_FMA.cpp b/libc/cmake/modules/cpu_features/check_FMA.cpp index 9098756..b524476 100644 --- a/libc/cmake/modules/cpu_features/check_FMA.cpp +++ b/libc/cmake/modules/cpu_features/check_FMA.cpp @@ -1,4 +1,4 @@ -#include "src/__support/cpu_features.h" +#include "src/__support/macros/cpu_features.h" #ifndef LIBC_TARGET_HAS_FMA #error unsupported diff --git a/libc/cmake/modules/cpu_features/check_SSE2.cpp b/libc/cmake/modules/cpu_features/check_SSE2.cpp index eee2dea..d1c01ee 100644 --- a/libc/cmake/modules/cpu_features/check_SSE2.cpp +++ b/libc/cmake/modules/cpu_features/check_SSE2.cpp @@ -1,4 +1,4 @@ -#include "src/__support/cpu_features.h" +#include "src/__support/macros/cpu_features.h" #ifndef LIBC_TARGET_HAS_SSE2 #error unsupported diff --git a/libc/cmake/modules/cpu_features/check_SSE4_2.cpp b/libc/cmake/modules/cpu_features/check_SSE4_2.cpp index 43586b2..5280430 100644 --- a/libc/cmake/modules/cpu_features/check_SSE4_2.cpp +++ b/libc/cmake/modules/cpu_features/check_SSE4_2.cpp @@ -1,4 +1,4 @@ -#include "src/__support/cpu_features.h" +#include "src/__support/macros/cpu_features.h" #ifndef LIBC_TARGET_HAS_SSE4_2 #error unsupported diff --git a/libc/src/__support/CMakeLists.txt b/libc/src/__support/CMakeLists.txt index 7d68137..a937e5b 100644 --- a/libc/src/__support/CMakeLists.txt +++ b/libc/src/__support/CMakeLists.txt @@ -33,7 +33,7 @@ add_header_library( HDRS macros/architectures.h common.h - cpu_features.h + macros/cpu_features.h endian.h ) diff --git a/libc/src/__support/FPUtil/FMA.h b/libc/src/__support/FPUtil/FMA.h index 68bb952..b78577a 100644 --- a/libc/src/__support/FPUtil/FMA.h +++ b/libc/src/__support/FPUtil/FMA.h @@ -10,8 +10,8 @@ #define LLVM_LIBC_SRC_SUPPORT_FPUTIL_FMA_H #include "src/__support/common.h" -#include "src/__support/cpu_features.h" #include "src/__support/macros/architectures.h" +#include "src/__support/macros/cpu_features.h" #if defined(LIBC_TARGET_HAS_FMA) diff --git a/libc/src/__support/FPUtil/aarch64/FMA.h b/libc/src/__support/FPUtil/aarch64/FMA.h index 0f319a7..8318193 100644 --- a/libc/src/__support/FPUtil/aarch64/FMA.h +++ b/libc/src/__support/FPUtil/aarch64/FMA.h @@ -9,8 +9,8 @@ #ifndef LLVM_LIBC_SRC_SUPPORT_FPUTIL_AARCH64_FMA_H #define LLVM_LIBC_SRC_SUPPORT_FPUTIL_AARCH64_FMA_H -#include "src/__support/cpu_features.h" #include "src/__support/macros/architectures.h" +#include "src/__support/macros/cpu_features.h" #if !defined(LIBC_TARGET_IS_AARCH64) #error "Invalid include" diff --git a/libc/src/__support/FPUtil/multiply_add.h b/libc/src/__support/FPUtil/multiply_add.h index f2db759..e5df0f5 100644 --- a/libc/src/__support/FPUtil/multiply_add.h +++ b/libc/src/__support/FPUtil/multiply_add.h @@ -10,8 +10,8 @@ #define LLVM_LIBC_SRC_SUPPORT_FPUTIL_MULTIPLY_ADD_H #include "src/__support/common.h" -#include "src/__support/cpu_features.h" #include "src/__support/macros/architectures.h" +#include "src/__support/macros/cpu_features.h" namespace __llvm_libc { namespace fputil { diff --git a/libc/src/__support/FPUtil/x86_64/FMA.h b/libc/src/__support/FPUtil/x86_64/FMA.h index 466f413..48e7d08 100644 --- a/libc/src/__support/FPUtil/x86_64/FMA.h +++ b/libc/src/__support/FPUtil/x86_64/FMA.h @@ -10,8 +10,8 @@ #define LLVM_LIBC_SRC_SUPPORT_FPUTIL_X86_64_FMA_H #include "src/__support/common.h" -#include "src/__support/cpu_features.h" #include "src/__support/macros/architectures.h" +#include "src/__support/macros/cpu_features.h" #if !defined(LIBC_TARGET_IS_X86_64) #error "Invalid include" diff --git a/libc/src/__support/cpu_features.h b/libc/src/__support/macros/cpu_features.h similarity index 86% rename from libc/src/__support/cpu_features.h rename to libc/src/__support/macros/cpu_features.h index 68bf6fa..34c46f5 100644 --- a/libc/src/__support/cpu_features.h +++ b/libc/src/__support/macros/cpu_features.h @@ -9,8 +9,8 @@ // preprocessor definitions. //===----------------------------------------------------------------------===// -#ifndef LLVM_LIBC_SRC_SUPPORT_CPU_FEATURES_H -#define LLVM_LIBC_SRC_SUPPORT_CPU_FEATURES_H +#ifndef LLVM_LIBC_SRC_SUPPORT_MACROS_CPU_FEATURES_H +#define LLVM_LIBC_SRC_SUPPORT_MACROS_CPU_FEATURES_H #if defined(__SSE2__) #define LIBC_TARGET_HAS_SSE2 @@ -40,4 +40,4 @@ #define LIBC_TARGET_HAS_FMA #endif -#endif // LLVM_LIBC_SRC_SUPPORT_CPU_FEATURES_H +#endif // LLVM_LIBC_SRC_SUPPORT_MACROS_CPU_FEATURES_H diff --git a/libc/src/math/generic/asinf.cpp b/libc/src/math/generic/asinf.cpp index 1b38e8d..ab3ea69 100644 --- a/libc/src/math/generic/asinf.cpp +++ b/libc/src/math/generic/asinf.cpp @@ -13,7 +13,7 @@ #include "src/__support/FPUtil/except_value_utils.h" #include "src/__support/FPUtil/multiply_add.h" #include "src/__support/FPUtil/sqrt.h" -#include "src/__support/cpu_features.h" +#include "src/__support/macros/cpu_features.h" #include diff --git a/libc/src/math/generic/cosf.cpp b/libc/src/math/generic/cosf.cpp index fce60cd..297f667 100644 --- a/libc/src/math/generic/cosf.cpp +++ b/libc/src/math/generic/cosf.cpp @@ -14,7 +14,7 @@ #include "src/__support/FPUtil/except_value_utils.h" #include "src/__support/FPUtil/multiply_add.h" #include "src/__support/common.h" -#include "src/__support/cpu_features.h" +#include "src/__support/macros/cpu_features.h" #include diff --git a/libc/src/math/generic/expm1f.cpp b/libc/src/math/generic/expm1f.cpp index 8b57522..e029dd2 100644 --- a/libc/src/math/generic/expm1f.cpp +++ b/libc/src/math/generic/expm1f.cpp @@ -16,7 +16,7 @@ #include "src/__support/FPUtil/multiply_add.h" #include "src/__support/FPUtil/nearest_integer.h" #include "src/__support/common.h" -#include "src/__support/cpu_features.h" +#include "src/__support/macros/cpu_features.h" #include diff --git a/libc/src/math/generic/sincosf.cpp b/libc/src/math/generic/sincosf.cpp index 991eb32..75d985d 100644 --- a/libc/src/math/generic/sincosf.cpp +++ b/libc/src/math/generic/sincosf.cpp @@ -12,7 +12,7 @@ #include "src/__support/FPUtil/FPBits.h" #include "src/__support/FPUtil/multiply_add.h" #include "src/__support/common.h" -#include "src/__support/cpu_features.h" +#include "src/__support/macros/cpu_features.h" #include diff --git a/libc/src/math/generic/sincosf_utils.h b/libc/src/math/generic/sincosf_utils.h index 358c1cf..013c1ad 100644 --- a/libc/src/math/generic/sincosf_utils.h +++ b/libc/src/math/generic/sincosf_utils.h @@ -12,7 +12,7 @@ #include "src/__support/FPUtil/FPBits.h" #include "src/__support/FPUtil/PolyEval.h" #include "src/__support/common.h" -#include "src/__support/cpu_features.h" +#include "src/__support/macros/cpu_features.h" #if defined(LIBC_TARGET_HAS_FMA) #include "range_reduction_fma.h" diff --git a/libc/src/math/generic/sinf.cpp b/libc/src/math/generic/sinf.cpp index 836df28..f931e0d 100644 --- a/libc/src/math/generic/sinf.cpp +++ b/libc/src/math/generic/sinf.cpp @@ -14,7 +14,7 @@ #include "src/__support/FPUtil/PolyEval.h" #include "src/__support/FPUtil/multiply_add.h" #include "src/__support/common.h" -#include "src/__support/cpu_features.h" +#include "src/__support/macros/cpu_features.h" #include diff --git a/libc/src/math/generic/tanf.cpp b/libc/src/math/generic/tanf.cpp index 0f3961ee..963ce0f 100644 --- a/libc/src/math/generic/tanf.cpp +++ b/libc/src/math/generic/tanf.cpp @@ -15,7 +15,7 @@ #include "src/__support/FPUtil/multiply_add.h" #include "src/__support/FPUtil/nearest_integer.h" #include "src/__support/common.h" -#include "src/__support/cpu_features.h" +#include "src/__support/macros/cpu_features.h" #include diff --git a/libc/src/math/generic/tanhf.cpp b/libc/src/math/generic/tanhf.cpp index 8b6771b..4000730 100644 --- a/libc/src/math/generic/tanhf.cpp +++ b/libc/src/math/generic/tanhf.cpp @@ -8,7 +8,7 @@ #include "src/math/tanhf.h" #include "src/__support/FPUtil/FPBits.h" -#include "src/__support/cpu_features.h" +#include "src/__support/macros/cpu_features.h" #include "src/math/generic/explogxf.h" namespace __llvm_libc { diff --git a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel index 4e24360..c87482c 100644 --- a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel +++ b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel @@ -79,7 +79,7 @@ libc_support_library( hdrs = [ "src/__support/macros/architectures.h", "src/__support/common.h", - "src/__support/cpu_features.h", + "src/__support/macros/cpu_features.h", "src/__support/endian.h", ], ) -- 2.7.4