-
Notifications
You must be signed in to change notification settings - Fork 15.3k
[libc] Remove some unused includes from headers under src/math/generic. #121632
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
These were indicated by Clang include-cleaner.
|
@llvm/pr-subscribers-libc Author: Alexey Samsonov (vonosmas) ChangesThese were indicated by Clang include-cleaner. Full diff: https://github.com/llvm/llvm-project/pull/121632.diff 6 Files Affected:
diff --git a/libc/src/math/generic/CMakeLists.txt b/libc/src/math/generic/CMakeLists.txt
index b3d46129151974..d4795e3c56e303 100644
--- a/libc/src/math/generic/CMakeLists.txt
+++ b/libc/src/math/generic/CMakeLists.txt
@@ -358,7 +358,6 @@ add_header_library(
HDRS
sincosf16_utils.h
DEPENDS
- libc.src.__support.FPUtil.fp_bits
libc.src.__support.FPUtil.polyeval
libc.src.__support.FPUtil.nearest_integer
libc.src.__support.common
@@ -1702,8 +1701,6 @@ add_header_library(
libc.src.__support.FPUtil.fenv_impl
libc.src.__support.FPUtil.fp_bits
libc.src.__support.FPUtil.multiply_add
- libc.src.__support.FPUtil.nearest_integer
- libc.src.__support.FPUtil.polyeval
libc.src.__support.FPUtil.rounding_mode
libc.src.__support.macros.optimization
libc.src.__support.common
@@ -4383,7 +4380,6 @@ add_object_library(
libc.src.__support.CPP.optional
libc.src.__support.FPUtil.basic_operations
libc.src.__support.FPUtil.basic_operations
- libc.src.__support.FPUtil.fenv_impl
libc.src.__support.FPUtil.fp_bits
libc.src.__support.FPUtil.multiply_add
libc.src.__support.FPUtil.nearest_integer
diff --git a/libc/src/math/generic/exp10f_impl.h b/libc/src/math/generic/exp10f_impl.h
index d741318382e1f2..975fd01a0a25c7 100644
--- a/libc/src/math/generic/exp10f_impl.h
+++ b/libc/src/math/generic/exp10f_impl.h
@@ -10,12 +10,9 @@
#define LLVM_LIBC_SRC_MATH_GENERIC_EXP10F_IMPL_H
#include "explogxf.h"
-#include "src/__support/FPUtil/BasicOperations.h"
#include "src/__support/FPUtil/FEnvImpl.h"
#include "src/__support/FPUtil/FPBits.h"
-#include "src/__support/FPUtil/PolyEval.h"
#include "src/__support/FPUtil/multiply_add.h"
-#include "src/__support/FPUtil/nearest_integer.h"
#include "src/__support/FPUtil/rounding_mode.h"
#include "src/__support/common.h"
#include "src/__support/macros/config.h"
diff --git a/libc/src/math/generic/explogxf.h b/libc/src/math/generic/explogxf.h
index 651524a165f032..f94b96d32fafae 100644
--- a/libc/src/math/generic/explogxf.h
+++ b/libc/src/math/generic/explogxf.h
@@ -12,7 +12,6 @@
#include "common_constants.h"
#include "src/__support/CPP/bit.h"
#include "src/__support/CPP/optional.h"
-#include "src/__support/FPUtil/FEnvImpl.h"
#include "src/__support/FPUtil/FPBits.h"
#include "src/__support/FPUtil/PolyEval.h"
#include "src/__support/FPUtil/nearest_integer.h"
diff --git a/libc/src/math/generic/range_reduction_double_common.h b/libc/src/math/generic/range_reduction_double_common.h
index bcab82f6c9c3a8..06aeb49495ad20 100644
--- a/libc/src/math/generic/range_reduction_double_common.h
+++ b/libc/src/math/generic/range_reduction_double_common.h
@@ -9,7 +9,6 @@
#ifndef LLVM_LIBC_SRC_MATH_GENERIC_RANGE_REDUCTION_DOUBLE_COMMON_H
#define LLVM_LIBC_SRC_MATH_GENERIC_RANGE_REDUCTION_DOUBLE_COMMON_H
-#include "src/__support/FPUtil/FPBits.h"
#include "src/__support/FPUtil/double_double.h"
#include "src/__support/FPUtil/dyadic_float.h"
#include "src/__support/FPUtil/multiply_add.h"
diff --git a/libc/src/math/generic/sincosf16_utils.h b/libc/src/math/generic/sincosf16_utils.h
index 5e5edd4a8c85bd..87b1dde560c5e6 100644
--- a/libc/src/math/generic/sincosf16_utils.h
+++ b/libc/src/math/generic/sincosf16_utils.h
@@ -9,9 +9,7 @@
#ifndef LLVM_LIBC_SRC_MATH_GENERIC_SINCOSF16_UTILS_H
#define LLVM_LIBC_SRC_MATH_GENERIC_SINCOSF16_UTILS_H
-#include "src/__support/FPUtil/FPBits.h"
#include "src/__support/FPUtil/PolyEval.h"
-#include "src/__support/FPUtil/cast.h"
#include "src/__support/FPUtil/nearest_integer.h"
#include "src/__support/common.h"
#include "src/__support/macros/config.h"
diff --git a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
index 91c7db9029a660..7aaa65729417ef 100644
--- a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
@@ -1797,7 +1797,6 @@ libc_support_library(
hdrs = ["src/math/generic/sincosf16_utils.h"],
deps = [
":__support_common",
- ":__support_fputil_fp_bits",
":__support_fputil_nearest_integer",
":__support_fputil_polyeval",
],
@@ -1809,7 +1808,6 @@ libc_support_library(
hdrs = ["src/math/generic/explogxf.h"],
deps = [
":__support_common",
- ":__support_fputil_fenv_impl",
":__support_fputil_fma",
":__support_fputil_fp_bits",
":__support_fputil_multiply_add",
@@ -1846,11 +1844,8 @@ libc_support_library(
name = "exp10f_impl",
hdrs = ["src/math/generic/exp10f_impl.h"],
deps = [
- ":__support_fputil_basic_operations",
":__support_fputil_fma",
":__support_fputil_multiply_add",
- ":__support_fputil_nearest_integer",
- ":__support_fputil_polyeval",
":__support_fputil_rounding_mode",
":__support_macros_optimization",
":common_constants",
|
|
Cool! How do we run clang include cleaner on llvm-libc? |
|
This was a one-off run on some headers when a Bazel build (internal) broke after some unrelated changes and I noticed the extra include. Even then, the results of include-cleaner can't be applied as-is, because it wasn't able to understand some of the header uses in code that was ifdef-ed out. Leaving to you how much we want to invest in a continuous process / checks. |
These were indicated by Clang include-cleaner.