[libc-commits] [libc] a6db871 - [libc][NFC] Move cpu_features.h to properties subfolder
Guillaume Chatelet via libc-commits
libc-commits at lists.llvm.org
Thu Feb 9 01:30:53 PST 2023
Author: Guillaume Chatelet
Date: 2023-02-09T09:30:24Z
New Revision: a6db871e85f0edcd61a78312078d7ece37097da0
URL: https://github.com/llvm/llvm-project/commit/a6db871e85f0edcd61a78312078d7ece37097da0
DIFF: https://github.com/llvm/llvm-project/commit/a6db871e85f0edcd61a78312078d7ece37097da0.diff
LOG: [libc][NFC] Move cpu_features.h to properties subfolder
Added:
libc/src/__support/macros/properties/cpu_features.h
Modified:
libc/cmake/modules/cpu_features/check_AVX2.cpp
libc/cmake/modules/cpu_features/check_AVX512BW.cpp
libc/cmake/modules/cpu_features/check_AVX512F.cpp
libc/cmake/modules/cpu_features/check_FMA.cpp
libc/cmake/modules/cpu_features/check_SSE2.cpp
libc/cmake/modules/cpu_features/check_SSE4_2.cpp
libc/src/__support/CMakeLists.txt
libc/src/__support/FPUtil/FMA.h
libc/src/__support/FPUtil/aarch64/FMA.h
libc/src/__support/FPUtil/multiply_add.h
libc/src/__support/FPUtil/nearest_integer.h
libc/src/__support/FPUtil/x86_64/FMA.h
libc/src/math/generic/asinf.cpp
libc/src/math/generic/cosf.cpp
libc/src/math/generic/expm1f.cpp
libc/src/math/generic/sincosf.cpp
libc/src/math/generic/sincosf_utils.h
libc/src/math/generic/sinf.cpp
libc/src/math/generic/tanf.cpp
libc/src/math/generic/tanhf.cpp
utils/bazel/llvm-project-overlay/libc/BUILD.bazel
Removed:
libc/src/__support/macros/cpu_features.h
################################################################################
diff --git a/libc/cmake/modules/cpu_features/check_AVX2.cpp b/libc/cmake/modules/cpu_features/check_AVX2.cpp
index 5fde894cf8589..0761244137b14 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/macros/cpu_features.h"
+#include "src/__support/macros/properties/cpu_features.h"
#ifndef LIBC_TARGET_CPU_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 084a21549beda..4816db59e1bee 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/macros/cpu_features.h"
+#include "src/__support/macros/properties/cpu_features.h"
#ifndef LIBC_TARGET_CPU_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 2d3f171d7c887..da177ab0ab35a 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/macros/cpu_features.h"
+#include "src/__support/macros/properties/cpu_features.h"
#ifndef LIBC_TARGET_CPU_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 69e979c7d81c3..e587404c13c97 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/macros/cpu_features.h"
+#include "src/__support/macros/properties/cpu_features.h"
#ifndef LIBC_TARGET_CPU_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 cbc98139a3443..af8f797fa9b06 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/macros/cpu_features.h"
+#include "src/__support/macros/properties/cpu_features.h"
#ifndef LIBC_TARGET_CPU_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 3c0bae8e9b7de..7de2d64f14485 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/macros/cpu_features.h"
+#include "src/__support/macros/properties/cpu_features.h"
#ifndef LIBC_TARGET_CPU_HAS_SSE4_2
#error unsupported
diff --git a/libc/src/__support/CMakeLists.txt b/libc/src/__support/CMakeLists.txt
index f5d2a39b1b641..67663bf201152 100644
--- a/libc/src/__support/CMakeLists.txt
+++ b/libc/src/__support/CMakeLists.txt
@@ -35,7 +35,7 @@ add_header_library(
endian.h
macros/properties/architectures.h
macros/attributes.h
- macros/cpu_features.h
+ macros/properties/cpu_features.h
)
add_header_library(
diff --git a/libc/src/__support/FPUtil/FMA.h b/libc/src/__support/FPUtil/FMA.h
index f428e1a29e0ea..0416dd4be64bc 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/macros/cpu_features.h"
#include "src/__support/macros/properties/architectures.h"
+#include "src/__support/macros/properties/cpu_features.h"
#if defined(LIBC_TARGET_CPU_HAS_FMA)
diff --git a/libc/src/__support/FPUtil/aarch64/FMA.h b/libc/src/__support/FPUtil/aarch64/FMA.h
index 43829b7a57c82..1ee37650d5317 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/macros/cpu_features.h"
#include "src/__support/macros/properties/architectures.h"
+#include "src/__support/macros/properties/cpu_features.h"
#if !defined(LIBC_TARGET_ARCH_IS_AARCH64)
#error "Invalid include"
diff --git a/libc/src/__support/FPUtil/multiply_add.h b/libc/src/__support/FPUtil/multiply_add.h
index 075813ddd2c09..2aaa2c60465b5 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/macros/cpu_features.h"
#include "src/__support/macros/properties/architectures.h"
+#include "src/__support/macros/properties/cpu_features.h"
namespace __llvm_libc {
namespace fputil {
diff --git a/libc/src/__support/FPUtil/nearest_integer.h b/libc/src/__support/FPUtil/nearest_integer.h
index da1d8528b6520..3d42632bd7ca7 100644
--- a/libc/src/__support/FPUtil/nearest_integer.h
+++ b/libc/src/__support/FPUtil/nearest_integer.h
@@ -10,8 +10,8 @@
#define LLVM_LIBC_SRC_SUPPORT_FPUTIL_NEAREST_INTEGER_H
#include "src/__support/common.h"
-#include "src/__support/macros/cpu_features.h"
#include "src/__support/macros/properties/architectures.h"
+#include "src/__support/macros/properties/cpu_features.h"
#if (defined(LIBC_TARGET_ARCH_IS_X86_64) && defined(LIBC_TARGET_CPU_HAS_SSE4_2))
#include "x86_64/nearest_integer.h"
diff --git a/libc/src/__support/FPUtil/x86_64/FMA.h b/libc/src/__support/FPUtil/x86_64/FMA.h
index e2bca9e963ee6..3eafb3dc00c6e 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/macros/cpu_features.h"
#include "src/__support/macros/properties/architectures.h"
+#include "src/__support/macros/properties/cpu_features.h"
#if !defined(LIBC_TARGET_ARCH_IS_X86_64)
#error "Invalid include"
diff --git a/libc/src/__support/macros/cpu_features.h b/libc/src/__support/macros/properties/cpu_features.h
similarity index 84%
rename from libc/src/__support/macros/cpu_features.h
rename to libc/src/__support/macros/properties/cpu_features.h
index bc7ba1058dc36..b986351ecbec7 100644
--- a/libc/src/__support/macros/cpu_features.h
+++ b/libc/src/__support/macros/properties/cpu_features.h
@@ -9,8 +9,8 @@
// preprocessor definitions.
//===----------------------------------------------------------------------===//
-#ifndef LLVM_LIBC_SRC_SUPPORT_MACROS_CPU_FEATURES_H
-#define LLVM_LIBC_SRC_SUPPORT_MACROS_CPU_FEATURES_H
+#ifndef LLVM_LIBC_SRC_SUPPORT_MACROS_PROPERTIES_CPU_FEATURES_H
+#define LLVM_LIBC_SRC_SUPPORT_MACROS_PROPERTIES_CPU_FEATURES_H
#if defined(__SSE2__)
#define LIBC_TARGET_CPU_HAS_SSE2
@@ -40,4 +40,4 @@
#define LIBC_TARGET_CPU_HAS_FMA
#endif
-#endif // LLVM_LIBC_SRC_SUPPORT_MACROS_CPU_FEATURES_H
+#endif // LLVM_LIBC_SRC_SUPPORT_MACROS_PROPERTIES_CPU_FEATURES_H
diff --git a/libc/src/math/generic/asinf.cpp b/libc/src/math/generic/asinf.cpp
index b50c2cb80ca14..f94eac8d904b6 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/macros/cpu_features.h"
+#include "src/__support/macros/properties/cpu_features.h"
#include <errno.h>
diff --git a/libc/src/math/generic/cosf.cpp b/libc/src/math/generic/cosf.cpp
index c84d4fbbf4fbb..05f1cd2d99b19 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/macros/cpu_features.h"
+#include "src/__support/macros/properties/cpu_features.h"
#include <errno.h>
diff --git a/libc/src/math/generic/expm1f.cpp b/libc/src/math/generic/expm1f.cpp
index 43e7d2dffb825..0ee0721463225 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/macros/cpu_features.h"
+#include "src/__support/macros/properties/cpu_features.h"
#include <errno.h>
diff --git a/libc/src/math/generic/sincosf.cpp b/libc/src/math/generic/sincosf.cpp
index 82ddaa83c09d5..ea6722927300b 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/macros/cpu_features.h"
+#include "src/__support/macros/properties/cpu_features.h"
#include <errno.h>
diff --git a/libc/src/math/generic/sincosf_utils.h b/libc/src/math/generic/sincosf_utils.h
index 3fd713edc4c03..bda1117a8cfac 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/macros/cpu_features.h"
+#include "src/__support/macros/properties/cpu_features.h"
#if defined(LIBC_TARGET_CPU_HAS_FMA)
#include "range_reduction_fma.h"
diff --git a/libc/src/math/generic/sinf.cpp b/libc/src/math/generic/sinf.cpp
index 511f548060a5d..488a3e419208c 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/macros/cpu_features.h"
+#include "src/__support/macros/properties/cpu_features.h"
#include <errno.h>
diff --git a/libc/src/math/generic/tanf.cpp b/libc/src/math/generic/tanf.cpp
index 9c2f685a00a28..d2214282957ec 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/macros/cpu_features.h"
+#include "src/__support/macros/properties/cpu_features.h"
#include <errno.h>
diff --git a/libc/src/math/generic/tanhf.cpp b/libc/src/math/generic/tanhf.cpp
index b0de6f94df7eb..87a8874771706 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/macros/cpu_features.h"
+#include "src/__support/macros/properties/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 d114467645c12..42045a02ef947 100644
--- a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
@@ -82,7 +82,7 @@ libc_support_library(
"src/__support/endian.h",
"src/__support/macros/properties/architectures.h",
"src/__support/macros/attributes.h",
- "src/__support/macros/cpu_features.h",
+ "src/__support/macros/properties/cpu_features.h",
],
deps = [":libc_root"],
)
More information about the libc-commits
mailing list