[libc] Move likely/unlikely to the optimization header
authorGuillaume Chatelet <gchatelet@google.com>
Fri, 10 Feb 2023 15:15:10 +0000 (15:15 +0000)
committerGuillaume Chatelet <gchatelet@google.com>
Fri, 10 Feb 2023 15:31:28 +0000 (15:31 +0000)
41 files changed:
libc/src/__support/FPUtil/FMA.h
libc/src/__support/FPUtil/ManipulationFunctions.h
libc/src/__support/FPUtil/aarch64/FMA.h
libc/src/__support/FPUtil/dyadic_float.h
libc/src/__support/FPUtil/except_value_utils.h
libc/src/__support/FPUtil/generic/FMA.h
libc/src/__support/FPUtil/generic/FMod.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/__support/UInt.h
libc/src/__support/macros/attributes.h
libc/src/__support/macros/config.h
libc/src/__support/macros/optimization.h
libc/src/math/generic/acosf.cpp
libc/src/math/generic/acoshf.cpp
libc/src/math/generic/asinf.cpp
libc/src/math/generic/asinhf.cpp
libc/src/math/generic/atanf.cpp
libc/src/math/generic/atanhf.cpp
libc/src/math/generic/cosf.cpp
libc/src/math/generic/coshf.cpp
libc/src/math/generic/exp10f.cpp
libc/src/math/generic/exp2f.cpp
libc/src/math/generic/expf.cpp
libc/src/math/generic/expm1f.cpp
libc/src/math/generic/log10.cpp
libc/src/math/generic/sincosf.cpp
libc/src/math/generic/sincosf_utils.h
libc/src/math/generic/sinf.cpp
libc/src/math/generic/sinhf.cpp
libc/src/math/generic/tanf.cpp
libc/src/math/generic/tanhf.cpp
libc/src/string/memory_utils/bcmp_implementations.h
libc/src/string/memory_utils/memcmp_implementations.h
libc/src/string/memory_utils/memcpy_implementations.h
libc/src/string/memory_utils/op_generic.h
libc/src/string/string_utils.h
libc/test/src/math/exp2f_test.cpp
utils/bazel/llvm-project-overlay/libc/BUILD.bazel
utils/bazel/llvm-project-overlay/libc/test/src/math/BUILD.bazel

index 0416dd4..05df9cb 100644 (file)
@@ -9,9 +9,8 @@
 #ifndef LLVM_LIBC_SRC_SUPPORT_FPUTIL_FMA_H
 #define LLVM_LIBC_SRC_SUPPORT_FPUTIL_FMA_H
 
-#include "src/__support/common.h"
 #include "src/__support/macros/properties/architectures.h"
-#include "src/__support/macros/properties/cpu_features.h"
+#include "src/__support/macros/properties/cpu_features.h" // LIBC_TARGET_CPU_HAS_FMA
 
 #if defined(LIBC_TARGET_CPU_HAS_FMA)
 
index 61909cf..27d91c4 100644 (file)
@@ -16,8 +16,8 @@
 
 #include "src/__support/CPP/bit.h"
 #include "src/__support/CPP/type_traits.h"
-#include "src/__support/common.h"
 #include "src/__support/macros/attributes.h"
+#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY
 
 #include <limits.h>
 #include <math.h>
index 1ee3765..5f80ed7 100644 (file)
@@ -10,7 +10,7 @@
 #define LLVM_LIBC_SRC_SUPPORT_FPUTIL_AARCH64_FMA_H
 
 #include "src/__support/macros/properties/architectures.h"
-#include "src/__support/macros/properties/cpu_features.h"
+#include "src/__support/macros/properties/cpu_features.h" // LIBC_TARGET_CPU_HAS_FMA
 
 #if !defined(LIBC_TARGET_ARCH_IS_AARCH64)
 #error "Invalid include"
index 448fc93..86c41df 100644 (file)
@@ -14,6 +14,7 @@
 #include "multiply_add.h"
 #include "src/__support/CPP/type_traits.h"
 #include "src/__support/UInt.h"
+#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY
 
 #include <stddef.h>
 
index 3d681a7..9f9f029 100644 (file)
@@ -12,6 +12,7 @@
 #include "FEnvImpl.h"
 #include "FPBits.h"
 #include "src/__support/CPP/optional.h"
+#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY
 
 namespace __llvm_libc {
 
index 591d45d..2af91c1 100644 (file)
@@ -15,7 +15,8 @@
 #include "src/__support/FPUtil/FloatProperties.h"
 #include "src/__support/UInt128.h"
 #include "src/__support/builtin_wrappers.h"
-#include "src/__support/common.h"
+#include "src/__support/macros/attributes.h"   // LIBC_INLINE
+#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY
 
 namespace __llvm_libc {
 namespace fputil {
index 0ed85a4..1879c0a 100644 (file)
@@ -14,7 +14,7 @@
 #include "src/__support/FPUtil/FEnvImpl.h"
 #include "src/__support/FPUtil/FPBits.h"
 #include "src/__support/builtin_wrappers.h"
-#include "src/__support/common.h"
+#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY
 #include "src/math/generic/math_utils.h"
 
 namespace __llvm_libc {
index 2aaa2c6..2829ebb 100644 (file)
@@ -11,7 +11,7 @@
 
 #include "src/__support/common.h"
 #include "src/__support/macros/properties/architectures.h"
-#include "src/__support/macros/properties/cpu_features.h"
+#include "src/__support/macros/properties/cpu_features.h" // LIBC_TARGET_CPU_HAS_FMA
 
 namespace __llvm_libc {
 namespace fputil {
index 3d42632..6d5b8bf 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef LLVM_LIBC_SRC_SUPPORT_FPUTIL_NEAREST_INTEGER_H
 #define LLVM_LIBC_SRC_SUPPORT_FPUTIL_NEAREST_INTEGER_H
 
-#include "src/__support/common.h"
+#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY
 #include "src/__support/macros/properties/architectures.h"
 #include "src/__support/macros/properties/cpu_features.h"
 
index 3eafb3d..31494bd 100644 (file)
@@ -9,9 +9,8 @@
 #ifndef LLVM_LIBC_SRC_SUPPORT_FPUTIL_X86_64_FMA_H
 #define LLVM_LIBC_SRC_SUPPORT_FPUTIL_X86_64_FMA_H
 
-#include "src/__support/common.h"
 #include "src/__support/macros/properties/architectures.h"
-#include "src/__support/macros/properties/cpu_features.h"
+#include "src/__support/macros/properties/cpu_features.h" // LIBC_TARGET_CPU_HAS_FMA
 
 #if !defined(LIBC_TARGET_ARCH_IS_X86_64)
 #error "Invalid include"
index ee1e540..85de5b7 100644 (file)
@@ -15,7 +15,7 @@
 #include "src/__support/CPP/type_traits.h"
 #include "src/__support/builtin_wrappers.h"
 #include "src/__support/integer_utils.h"
-#include "src/__support/macros/attributes.h" // LIBC_UNLIKELY
+#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY
 #include "src/__support/number_pair.h"
 
 #include <stddef.h> // For size_t
index e949627..9a2fcd2 100644 (file)
 
 #define LIBC_INLINE inline
 #define LIBC_INLINE_ASM __asm__ __volatile__
-
-// We use a template to implement likely/unlikely to make sure that we don't
-// accidentally pass an integer.
-namespace __llvm_libc::details {
-template <typename T>
-constexpr LIBC_INLINE bool expects_bool_condition(T value, T expected) {
-  return __builtin_expect(value, expected);
-}
-} // namespace __llvm_libc::details
-#define LIBC_LIKELY(x) __llvm_libc::details::expects_bool_condition(x, true)
-#define LIBC_UNLIKELY(x) __llvm_libc::details::expects_bool_condition(x, false)
-
 #define LIBC_UNUSED __attribute__((unused))
 
 #endif // LLVM_LIBC_SUPPORT_MACROS_ATTRIBUTES_H
index e39f559..3aeac32 100644 (file)
@@ -13,6 +13,8 @@
 #ifndef LLVM_LIBC_SUPPORT_MACROS_CONFIG_H
 #define LLVM_LIBC_SUPPORT_MACROS_CONFIG_H
 
+#define LIBC_INLINE inline
+
 // LIBC_HAS_BUILTIN()
 //
 // Checks whether the compiler supports a Clang Feature Checking Macro, and if
@@ -23,7 +25,6 @@
 // Note: Use this macro to avoid an extra level of #ifdef __has_builtin check.
 // http://releases.llvm.org/3.3/tools/clang/docs/LanguageExtensions.html
 
-
 // Compiler builtin-detection.
 // clang.llvm.org/docs/LanguageExtensions.html#has-builtin
 #ifdef __has_builtin
index 2b5ee78..ebd11e6 100644 (file)
 #ifndef LLVM_LIBC_SRC_SUPPORT_MACROS_OPTIMIZATION_H
 #define LLVM_LIBC_SRC_SUPPORT_MACROS_OPTIMIZATION_H
 
-#include "src/__support/macros/properties/compiler.h"
+#include "src/__support/macros/config.h" // LIBC_HAS_BUILTIN
+
+// We use a template to implement likely/unlikely to make sure that we don't
+// accidentally pass an integer.
+namespace __llvm_libc::details {
+template <typename T>
+constexpr LIBC_INLINE bool expects_bool_condition(T value, T expected) {
+  return __builtin_expect(value, expected);
+}
+} // namespace __llvm_libc::details
+#define LIBC_LIKELY(x) __llvm_libc::details::expects_bool_condition(x, true)
+#define LIBC_UNLIKELY(x) __llvm_libc::details::expects_bool_condition(x, false)
 
 #if defined(LIBC_COMPILER_IS_CLANG)
 #define LIBC_LOOP_NOUNROLL _Pragma("nounroll")
index a77b7df..5723dc5 100644 (file)
@@ -13,6 +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/optimization.h" // LIBC_UNLIKELY
 
 #include <errno.h>
 
index 906a9ab..12e0796 100644 (file)
@@ -12,6 +12,7 @@
 #include "src/__support/FPUtil/PolyEval.h"
 #include "src/__support/FPUtil/multiply_add.h"
 #include "src/__support/FPUtil/sqrt.h"
+#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY
 #include "src/math/generic/common_constants.h"
 #include "src/math/generic/explogxf.h"
 
index f94eac8..2bfa208 100644 (file)
@@ -13,7 +13,8 @@
 #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/properties/cpu_features.h"
+#include "src/__support/macros/optimization.h"            // LIBC_UNLIKELY
+#include "src/__support/macros/properties/cpu_features.h" // LIBC_TARGET_CPU_HAS_FMA
 
 #include <errno.h>
 
index 2afbd1a..7063387 100644 (file)
@@ -11,6 +11,7 @@
 #include "src/__support/FPUtil/PolyEval.h"
 #include "src/__support/FPUtil/multiply_add.h"
 #include "src/__support/FPUtil/sqrt.h"
+#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY
 #include "src/math/generic/common_constants.h"
 #include "src/math/generic/explogxf.h"
 
index b72acea..ff5d450 100644 (file)
@@ -9,6 +9,7 @@
 #include "src/math/atanf.h"
 #include "math_utils.h"
 #include "src/__support/FPUtil/FPBits.h"
+#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY
 #include "src/math/generic/inv_trigf_utils.h"
 
 namespace __llvm_libc {
index ef64e0d..0a07700 100644 (file)
@@ -8,6 +8,7 @@
 
 #include "src/math/atanhf.h"
 #include "src/__support/FPUtil/FPBits.h"
+#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY
 #include "src/math/generic/explogxf.h"
 
 namespace __llvm_libc {
index 05f1cd2..b9a6786 100644 (file)
@@ -14,7 +14,8 @@
 #include "src/__support/FPUtil/except_value_utils.h"
 #include "src/__support/FPUtil/multiply_add.h"
 #include "src/__support/common.h"
-#include "src/__support/macros/properties/cpu_features.h"
+#include "src/__support/macros/optimization.h"            // LIBC_UNLIKELY
+#include "src/__support/macros/properties/cpu_features.h" // LIBC_TARGET_CPU_HAS_FMA
 
 #include <errno.h>
 
index 463c564..c1387bc 100644 (file)
@@ -9,6 +9,7 @@
 #include "src/math/coshf.h"
 #include "src/__support/FPUtil/FPBits.h"
 #include "src/__support/FPUtil/multiply_add.h"
+#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY
 #include "src/math/generic/explogxf.h"
 
 namespace __llvm_libc {
index 73423af..4059da5 100644 (file)
@@ -15,6 +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/optimization.h" // LIBC_UNLIKELY
 
 #include <errno.h>
 
index 52ae89a..b5d720f 100644 (file)
@@ -13,6 +13,7 @@
 #include "src/__support/FPUtil/multiply_add.h"
 #include "src/__support/FPUtil/nearest_integer.h"
 #include "src/__support/common.h"
+#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY
 
 #include <errno.h>
 
index 4b5e180..a224490 100644 (file)
@@ -15,6 +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/optimization.h" // LIBC_UNLIKELY
 
 #include <errno.h>
 
index 0ee0721..67bbb8e 100644 (file)
@@ -16,7 +16,8 @@
 #include "src/__support/FPUtil/multiply_add.h"
 #include "src/__support/FPUtil/nearest_integer.h"
 #include "src/__support/common.h"
-#include "src/__support/macros/properties/cpu_features.h"
+#include "src/__support/macros/optimization.h"            // LIBC_UNLIKELY
+#include "src/__support/macros/properties/cpu_features.h" // LIBC_TARGET_CPU_HAS_FMA
 
 #include <errno.h>
 
index 4988064..10d57a8 100644 (file)
@@ -12,6 +12,7 @@
 #include "src/__support/FPUtil/dyadic_float.h"
 #include "src/__support/FPUtil/multiply_add.h"
 #include "src/__support/common.h"
+#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY
 
 namespace __llvm_libc {
 
index ea67229..291d462 100644 (file)
@@ -12,7 +12,8 @@
 #include "src/__support/FPUtil/FPBits.h"
 #include "src/__support/FPUtil/multiply_add.h"
 #include "src/__support/common.h"
-#include "src/__support/macros/properties/cpu_features.h"
+#include "src/__support/macros/optimization.h"            // LIBC_UNLIKELY
+#include "src/__support/macros/properties/cpu_features.h" // LIBC_TARGET_CPU_HAS_FMA
 
 #include <errno.h>
 
index bda1117..f23617e 100644 (file)
@@ -11,8 +11,7 @@
 
 #include "src/__support/FPUtil/FPBits.h"
 #include "src/__support/FPUtil/PolyEval.h"
-#include "src/__support/common.h"
-#include "src/__support/macros/properties/cpu_features.h"
+#include "src/__support/macros/properties/cpu_features.h" // LIBC_TARGET_CPU_HAS_FMA
 
 #if defined(LIBC_TARGET_CPU_HAS_FMA)
 #include "range_reduction_fma.h"
index 488a3e4..1cbe4f6 100644 (file)
@@ -14,7 +14,8 @@
 #include "src/__support/FPUtil/PolyEval.h"
 #include "src/__support/FPUtil/multiply_add.h"
 #include "src/__support/common.h"
-#include "src/__support/macros/properties/cpu_features.h"
+#include "src/__support/macros/optimization.h"            // LIBC_UNLIKELY
+#include "src/__support/macros/properties/cpu_features.h" // LIBC_TARGET_CPU_HAS_FMA
 
 #include <errno.h>
 
index 3a38e2b..9ba5ac2 100644 (file)
@@ -8,6 +8,7 @@
 
 #include "src/math/sinhf.h"
 #include "src/__support/FPUtil/FPBits.h"
+#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY
 #include "src/math/generic/explogxf.h"
 
 namespace __llvm_libc {
index d221428..0c055d2 100644 (file)
@@ -15,7 +15,8 @@
 #include "src/__support/FPUtil/multiply_add.h"
 #include "src/__support/FPUtil/nearest_integer.h"
 #include "src/__support/common.h"
-#include "src/__support/macros/properties/cpu_features.h"
+#include "src/__support/macros/optimization.h"            // LIBC_UNLIKELY
+#include "src/__support/macros/properties/cpu_features.h" // LIBC_TARGET_CPU_HAS_FMA
 
 #include <errno.h>
 
index 87a8874..e67eadf 100644 (file)
@@ -8,7 +8,8 @@
 
 #include "src/math/tanhf.h"
 #include "src/__support/FPUtil/FPBits.h"
-#include "src/__support/macros/properties/cpu_features.h"
+#include "src/__support/macros/optimization.h"            // LIBC_UNLIKELY
+#include "src/__support/macros/properties/cpu_features.h" // LIBC_TARGET_CPU_HAS_FMA
 #include "src/math/generic/explogxf.h"
 
 namespace __llvm_libc {
index 8e3aa4d..483d3c2 100644 (file)
@@ -10,7 +10,7 @@
 #define LLVM_LIBC_SRC_STRING_MEMORY_UTILS_BCMP_IMPLEMENTATIONS_H
 
 #include "src/__support/common.h"
-#include "src/__support/macros/optimization.h"
+#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY LIBC_LOOP_NOUNROLL
 #include "src/__support/macros/properties/architectures.h"
 #include "src/string/memory_utils/op_aarch64.h"
 #include "src/string/memory_utils/op_builtin.h"
index 71b1653..f99e2e4 100644 (file)
@@ -10,7 +10,7 @@
 #define LLVM_LIBC_SRC_STRING_MEMORY_UTILS_MEMCMP_IMPLEMENTATIONS_H
 
 #include "src/__support/common.h"
-#include "src/__support/macros/optimization.h"
+#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY LIBC_LOOP_NOUNROLL
 #include "src/__support/macros/properties/architectures.h"
 #include "src/string/memory_utils/op_aarch64.h"
 #include "src/string/memory_utils/op_builtin.h"
index 211a6fb..c9c5252 100644 (file)
@@ -10,7 +10,7 @@
 #define LLVM_LIBC_SRC_STRING_MEMORY_UTILS_MEMCPY_IMPLEMENTATIONS_H
 
 #include "src/__support/common.h"
-#include "src/__support/macros/optimization.h"
+#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY LIBC_LOOP_NOUNROLL
 #include "src/__support/macros/properties/architectures.h"
 #include "src/string/memory_utils/op_aarch64.h"
 #include "src/string/memory_utils/op_builtin.h"
index ae514f4..03c6cab 100644 (file)
@@ -28,7 +28,6 @@
 #include "src/__support/common.h"
 #include "src/__support/endian.h"
 #include "src/__support/macros/optimization.h"
-#include "src/__support/macros/properties/compiler.h"
 #include "src/string/memory_utils/op_builtin.h"
 #include "src/string/memory_utils/utils.h"
 
index 2ae5970..d3c637d 100644 (file)
@@ -15,7 +15,7 @@
 #define LIBC_SRC_STRING_STRING_UTILS_H
 
 #include "src/__support/CPP/bitset.h"
-#include "src/__support/common.h"
+#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY
 #include "src/string/memory_utils/bzero_implementations.h"
 #include "src/string/memory_utils/memcpy_implementations.h"
 #include <stddef.h> // For size_t
index 87da023..c66a39a 100644 (file)
@@ -7,6 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "src/__support/FPUtil/FPBits.h"
+#include "src/__support/macros/properties/cpu_features.h" // LIBC_TARGET_CPU_HAS_FMA
 #include "src/math/exp2f.h"
 #include "test/UnitTest/FPMatcher.h"
 #include "test/UnitTest/Test.h"
index 3efde7f..aff72f0 100644 (file)
@@ -94,7 +94,7 @@ libc_support_library(
     name = "__support_macros_optimization",
     hdrs = ["src/__support/macros/optimization.h"],
     deps = [
-        ":__support_macros_properties_compiler",
+        ":__support_macros_config",
         ":libc_root",
     ],
 )
@@ -242,6 +242,7 @@ libc_support_library(
         "__support_cpp_type_traits",
         "__support_integer_utils",
         "__support_macros_attributes",
+        "__support_macros_optimization",
         "__support_number_pair",
         ":libc_root",
     ],
@@ -410,6 +411,7 @@ libc_support_library(
         ":__support_fputil_nearest_integer_operations",
         ":__support_fputil_normal_float",
         ":__support_fputil_platform_defs",
+        ":__support_macros_optimization",
         ":__support_uint128",
         ":libc_root",
     ],
@@ -497,12 +499,12 @@ libc_support_library(
     textual_hdrs = fma_platform_hdrs,
     deps = [
         ":__support_builtin_wrappers",
-        ":__support_common",
         ":__support_cpp_bit",
         ":__support_cpp_type_traits",
         ":__support_fputil_fenv_impl",
         ":__support_fputil_float_properties",
         ":__support_fputil_fp_bits",
+        ":__support_macros_optimization",
         ":__support_macros_properties_cpu_features",
         ":__support_uint128",
         ":libc_root",
@@ -548,7 +550,6 @@ libc_support_library(
     # own.
     textual_hdrs = nearest_integer_platform_hdrs,
     deps = [
-        ":__support_common",
         ":libc_root",
     ],
 )
@@ -752,7 +753,6 @@ libc_support_library(
     name = "sincosf_utils",
     hdrs = ["src/math/generic/sincosf_utils.h"],
     deps = [
-        ":__support_common",
         ":__support_fputil_fp_bits",
         ":__support_fputil_polyeval",
         ":libc_root",
@@ -802,6 +802,7 @@ libc_math_function(
         ":__support_fputil_multiply_add",
         ":__support_fputil_nearest_integer",
         ":__support_fputil_polyeval",
+        ":__support_macros_optimization",
         ":__support_macros_properties_cpu_features",
         ":common_constants",
     ],
@@ -811,9 +812,10 @@ libc_math_function(
     name = "expf",
     additional_deps = [
         ":__support_fputil_fma",
-        ":__support_fputil_nearest_integer",
         ":__support_fputil_multiply_add",
+        ":__support_fputil_nearest_integer",
         ":__support_fputil_polyeval",
+        ":__support_macros_optimization",
         ":common_constants",
     ],
 )
@@ -822,9 +824,10 @@ libc_math_function(
     name = "exp10f",
     additional_deps = [
         ":__support_fputil_fma",
-        ":__support_fputil_nearest_integer",
         ":__support_fputil_multiply_add",
+        ":__support_fputil_nearest_integer",
         ":__support_fputil_polyeval",
+        ":__support_macros_optimization",
         ":common_constants",
         ":explogxf",
     ],
@@ -834,9 +837,10 @@ libc_math_function(
     name = "exp2f",
     additional_deps = [
         ":__support_fputil_fma",
-        ":__support_fputil_nearest_integer",
         ":__support_fputil_multiply_add",
+        ":__support_fputil_nearest_integer",
         ":__support_fputil_polyeval",
+        ":__support_macros_optimization",
         ":explogxf",
     ],
 )
@@ -889,9 +893,10 @@ libc_math_function(
     name = "sinhf",
     additional_deps = [
         ":__support_fputil_fma",
-        ":__support_fputil_nearest_integer",
         ":__support_fputil_multiply_add",
+        ":__support_fputil_nearest_integer",
         ":__support_fputil_polyeval",
+        ":__support_macros_optimization",
         ":common_constants",
         ":explogxf",
     ],
@@ -901,9 +906,10 @@ libc_math_function(
     name = "coshf",
     additional_deps = [
         ":__support_fputil_fma",
-        ":__support_fputil_nearest_integer",
         ":__support_fputil_multiply_add",
+        ":__support_fputil_nearest_integer",
         ":__support_fputil_polyeval",
+        ":__support_macros_optimization",
         ":common_constants",
         ":explogxf",
     ],
@@ -916,6 +922,7 @@ libc_math_function(
         ":__support_fputil_multiply_add",
         ":__support_fputil_nearest_integer",
         ":__support_fputil_polyeval",
+        ":__support_macros_optimization",
         ":__support_macros_properties_cpu_features",
         ":common_constants",
         ":explogxf",
@@ -926,10 +933,11 @@ libc_math_function(
     name = "asinhf",
     additional_deps = [
         ":__support_fputil_fma",
-        ":__support_fputil_nearest_integer",
         ":__support_fputil_multiply_add",
+        ":__support_fputil_nearest_integer",
         ":__support_fputil_polyeval",
         ":__support_fputil_sqrt",
+        ":__support_macros_optimization",
         ":common_constants",
         ":explogxf",
     ],
@@ -939,10 +947,11 @@ libc_math_function(
     name = "acoshf",
     additional_deps = [
         ":__support_fputil_fma",
-        ":__support_fputil_nearest_integer",
         ":__support_fputil_multiply_add",
+        ":__support_fputil_nearest_integer",
         ":__support_fputil_polyeval",
         ":__support_fputil_sqrt",
+        ":__support_macros_optimization",
         ":common_constants",
         ":explogxf",
     ],
@@ -952,9 +961,10 @@ libc_math_function(
     name = "atanhf",
     additional_deps = [
         ":__support_fputil_fma",
-        ":__support_fputil_nearest_integer",
         ":__support_fputil_multiply_add",
+        ":__support_fputil_nearest_integer",
         ":__support_fputil_polyeval",
+        ":__support_macros_optimization",
         ":common_constants",
         ":explogxf",
     ],
@@ -968,6 +978,7 @@ libc_math_function(
         ":__support_fputil_nearest_integer",
         ":__support_fputil_polyeval",
         ":__support_fputil_sqrt",
+        ":__support_macros_optimization",
         ":__support_macros_properties_cpu_features",
         ":inv_trigf_utils",
     ],
@@ -977,10 +988,11 @@ libc_math_function(
     name = "acosf",
     additional_deps = [
         ":__support_fputil_fma",
-        ":__support_fputil_nearest_integer",
         ":__support_fputil_multiply_add",
+        ":__support_fputil_nearest_integer",
         ":__support_fputil_polyeval",
         ":__support_fputil_sqrt",
+        ":__support_macros_optimization",
         ":inv_trigf_utils",
     ],
 )
@@ -989,9 +1001,10 @@ libc_math_function(
     name = "atanf",
     additional_deps = [
         ":__support_fputil_fma",
-        ":__support_fputil_nearest_integer",
         ":__support_fputil_multiply_add",
+        ":__support_fputil_nearest_integer",
         ":__support_fputil_polyeval",
+        ":__support_macros_optimization",
         ":inv_trigf_utils",
         ":math_utils",
     ],
@@ -1148,6 +1161,7 @@ libc_math_function(
     additional_deps = [
         ":__support_fputil_fma",
         ":__support_fputil_multiply_add",
+        ":__support_macros_optimization",
         ":__support_macros_properties_cpu_features",
         ":sincosf_utils",
     ],
@@ -1158,6 +1172,7 @@ libc_math_function(
     additional_deps = [
         ":__support_fputil_fma",
         ":__support_fputil_multiply_add",
+        ":__support_macros_optimization",
         ":__support_macros_properties_cpu_features",
         ":sincosf_utils",
     ],
@@ -1169,6 +1184,7 @@ libc_math_function(
         ":__support_fputil_fma",
         ":__support_fputil_multiply_add",
         ":__support_fputil_polyeval",
+        ":__support_macros_optimization",
         ":__support_macros_properties_cpu_features",
         ":range_reduction",
         ":sincosf_utils",
@@ -1182,6 +1198,7 @@ libc_math_function(
         ":__support_fputil_multiply_add",
         ":__support_fputil_nearest_integer",
         ":__support_fputil_polyeval",
+        ":__support_macros_optimization",
         ":__support_macros_properties_cpu_features",
         ":range_reduction",
         ":sincosf_utils",
@@ -1390,6 +1407,7 @@ libc_support_library(
         ":__support_macros_attributes",
         ":__support_macros_config",
         ":__support_macros_optimization",
+        ":__support_macros_properties_cpu_features",
         ":libc_root",
     ],
 )
@@ -1400,6 +1418,7 @@ libc_support_library(
     deps = [
         ":__support_common",
         ":__support_cpp_bitset",
+        ":__support_macros_optimization",
         ":libc_root",
         ":string_memory_utils",
     ],
index d238088..e0adffb 100644 (file)
@@ -592,6 +592,7 @@ math_test(
 math_test(
     name = "exp2f",
     deps = [
+        "//libc:__support_macros_properties_cpu_features",
         "//libc/utils/MPFRWrapper:mpfr_wrapper",
     ],
 )