[libc][nfc] move ctype_utils and FPUtils to __support
authorMichael Jones <michaelrj@google.com>
Thu, 5 Aug 2021 21:27:29 +0000 (21:27 +0000)
committerMichael Jones <michaelrj@google.com>
Fri, 6 Aug 2021 17:29:41 +0000 (17:29 +0000)
commitc120edc7b3e1907127c3107b30e2667f1fde1ee2
treeeb00a74f02cea1d646b41a7bef3c4e6ef0223f78
parent772d2093fc30b545df61c25d3b05a90ed2909e92
[libc][nfc] move ctype_utils and FPUtils to __support

Some ctype functions are called from other libc functions (e.g. isspace
is used in atoi). By moving ctype_utils.h to __support it becomes easier
to include just the implementations of these functions. For these
reasons the implementation for isspace was moved into
ctype_utils as well.

FPUtils was moved to simplify the build order, and to clarify which
files are a part of the actual libc.

Many files were modified to accomodate these changes, mostly changing
the #include paths.

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D107600
196 files changed:
libc/fuzzing/math/CMakeLists.txt
libc/fuzzing/math/Compare.h
libc/fuzzing/math/RemQuoDiff.h
libc/fuzzing/math/SingleInputSingleOutputDiff.h
libc/fuzzing/math/TwoInputSingleOutputDiff.h
libc/src/__support/CMakeLists.txt
libc/src/__support/FPUtil/BasicOperations.h [moved from libc/utils/FPUtil/BasicOperations.h with 92% similarity]
libc/src/__support/FPUtil/CMakeLists.txt [moved from libc/utils/FPUtil/CMakeLists.txt with 96% similarity]
libc/src/__support/FPUtil/DivisionAndRemainderOperations.h [moved from libc/utils/FPUtil/DivisionAndRemainderOperations.h with 93% similarity]
libc/src/__support/FPUtil/DummyFEnvImpl.h [moved from libc/utils/FPUtil/DummyFEnvImpl.h with 85% similarity]
libc/src/__support/FPUtil/FEnvUtils.h [moved from libc/utils/FPUtil/FEnvUtils.h with 77% similarity]
libc/src/__support/FPUtil/FMA.h [moved from libc/utils/FPUtil/FMA.h with 88% similarity]
libc/src/__support/FPUtil/FPBits.h [moved from libc/utils/FPUtil/FPBits.h with 96% similarity]
libc/src/__support/FPUtil/FPExceptMatcher.cpp [moved from libc/utils/FPUtil/FPExceptMatcher.cpp with 100% similarity]
libc/src/__support/FPUtil/FPExceptMatcher.h [moved from libc/utils/FPUtil/FPExceptMatcher.h with 92% similarity]
libc/src/__support/FPUtil/FloatProperties.h [moved from libc/utils/FPUtil/FloatProperties.h with 96% similarity]
libc/src/__support/FPUtil/Hypot.h [moved from libc/utils/FPUtil/Hypot.h with 98% similarity]
libc/src/__support/FPUtil/LongDoubleBitsX86.h [moved from libc/utils/FPUtil/LongDoubleBitsX86.h with 96% similarity]
libc/src/__support/FPUtil/ManipulationFunctions.h [moved from libc/utils/FPUtil/ManipulationFunctions.h with 96% similarity]
libc/src/__support/FPUtil/NearestIntegerOperations.h [moved from libc/utils/FPUtil/NearestIntegerOperations.h with 97% similarity]
libc/src/__support/FPUtil/NextAfterLongDoubleX86.h [moved from libc/utils/FPUtil/NextAfterLongDoubleX86.h with 94% similarity]
libc/src/__support/FPUtil/NormalFloat.h [moved from libc/utils/FPUtil/NormalFloat.h with 98% similarity]
libc/src/__support/FPUtil/PlatformDefs.h [moved from libc/utils/FPUtil/PlatformDefs.h with 78% similarity]
libc/src/__support/FPUtil/PolyEval.h [moved from libc/utils/FPUtil/PolyEval.h with 90% similarity]
libc/src/__support/FPUtil/Sqrt.h [moved from libc/utils/FPUtil/Sqrt.h with 97% similarity]
libc/src/__support/FPUtil/SqrtLongDoubleX86.h [moved from libc/utils/FPUtil/SqrtLongDoubleX86.h with 95% similarity]
libc/src/__support/FPUtil/TestHelpers.cpp [moved from libc/utils/FPUtil/TestHelpers.cpp with 100% similarity]
libc/src/__support/FPUtil/TestHelpers.h [moved from libc/utils/FPUtil/TestHelpers.h with 96% similarity]
libc/src/__support/FPUtil/aarch64/FEnvImpl.h [moved from libc/utils/FPUtil/aarch64/FEnvImpl.h with 97% similarity]
libc/src/__support/FPUtil/aarch64/FMA.h [moved from libc/utils/FPUtil/aarch64/FMA.h with 87% similarity]
libc/src/__support/FPUtil/generic/FMA.h [moved from libc/utils/FPUtil/generic/FMA.h with 95% similarity]
libc/src/__support/FPUtil/generic/README.md [moved from libc/utils/FPUtil/generic/README.md with 100% similarity]
libc/src/__support/FPUtil/x86_64/FEnvImpl.h [moved from libc/utils/FPUtil/x86_64/FEnvImpl.h with 98% similarity]
libc/src/__support/FPUtil/x86_64/FMA.h [moved from libc/utils/FPUtil/x86_64/FMA.h with 88% similarity]
libc/src/__support/ctype_utils.h [moved from libc/src/ctype/ctype_utils.h with 84% similarity]
libc/src/ctype/CMakeLists.txt
libc/src/ctype/isalnum.cpp
libc/src/ctype/isalpha.cpp
libc/src/ctype/isdigit.cpp
libc/src/ctype/isgraph.cpp
libc/src/ctype/islower.cpp
libc/src/ctype/ispunct.cpp
libc/src/ctype/isspace.cpp
libc/src/ctype/isupper.cpp
libc/src/ctype/isxdigit.cpp
libc/src/ctype/tolower.cpp
libc/src/ctype/toupper.cpp
libc/src/fenv/CMakeLists.txt
libc/src/fenv/feclearexcept.cpp
libc/src/fenv/fegetenv.cpp
libc/src/fenv/fegetexceptflag.cpp
libc/src/fenv/fegetround.cpp
libc/src/fenv/feholdexcept.cpp
libc/src/fenv/feraiseexcept.cpp
libc/src/fenv/fesetenv.cpp
libc/src/fenv/fesetexceptflag.cpp
libc/src/fenv/fesetround.cpp
libc/src/fenv/fetestexcept.cpp
libc/src/fenv/feupdateenv.cpp
libc/src/math/CMakeLists.txt
libc/src/math/fma.cpp
libc/src/math/fmaf.cpp
libc/src/math/generic/CMakeLists.txt
libc/src/math/generic/ceil.cpp
libc/src/math/generic/ceilf.cpp
libc/src/math/generic/ceill.cpp
libc/src/math/generic/copysign.cpp
libc/src/math/generic/copysignf.cpp
libc/src/math/generic/copysignl.cpp
libc/src/math/generic/expm1f.cpp
libc/src/math/generic/fabs.cpp
libc/src/math/generic/fabsf.cpp
libc/src/math/generic/fabsl.cpp
libc/src/math/generic/fdim.cpp
libc/src/math/generic/fdimf.cpp
libc/src/math/generic/fdiml.cpp
libc/src/math/generic/floor.cpp
libc/src/math/generic/floorf.cpp
libc/src/math/generic/floorl.cpp
libc/src/math/generic/fmax.cpp
libc/src/math/generic/fmaxf.cpp
libc/src/math/generic/fmaxl.cpp
libc/src/math/generic/fmin.cpp
libc/src/math/generic/fminf.cpp
libc/src/math/generic/fminl.cpp
libc/src/math/generic/frexp.cpp
libc/src/math/generic/frexpf.cpp
libc/src/math/generic/frexpl.cpp
libc/src/math/generic/hypot.cpp
libc/src/math/generic/hypotf.cpp
libc/src/math/generic/ilogb.cpp
libc/src/math/generic/ilogbf.cpp
libc/src/math/generic/ilogbl.cpp
libc/src/math/generic/ldexp.cpp
libc/src/math/generic/ldexpf.cpp
libc/src/math/generic/ldexpl.cpp
libc/src/math/generic/llrint.cpp
libc/src/math/generic/llrintf.cpp
libc/src/math/generic/llrintl.cpp
libc/src/math/generic/llround.cpp
libc/src/math/generic/llroundf.cpp
libc/src/math/generic/llroundl.cpp
libc/src/math/generic/logb.cpp
libc/src/math/generic/logbf.cpp
libc/src/math/generic/logbl.cpp
libc/src/math/generic/lrint.cpp
libc/src/math/generic/lrintf.cpp
libc/src/math/generic/lrintl.cpp
libc/src/math/generic/lround.cpp
libc/src/math/generic/lroundf.cpp
libc/src/math/generic/lroundl.cpp
libc/src/math/generic/modf.cpp
libc/src/math/generic/modff.cpp
libc/src/math/generic/modfl.cpp
libc/src/math/generic/nearbyint.cpp
libc/src/math/generic/nearbyintf.cpp
libc/src/math/generic/nearbyintl.cpp
libc/src/math/generic/nextafter.cpp
libc/src/math/generic/nextafterf.cpp
libc/src/math/generic/nextafterl.cpp
libc/src/math/generic/remainder.cpp
libc/src/math/generic/remainderf.cpp
libc/src/math/generic/remainderl.cpp
libc/src/math/generic/remquo.cpp
libc/src/math/generic/remquof.cpp
libc/src/math/generic/remquol.cpp
libc/src/math/generic/rint.cpp
libc/src/math/generic/rintf.cpp
libc/src/math/generic/rintl.cpp
libc/src/math/generic/round.cpp
libc/src/math/generic/roundf.cpp
libc/src/math/generic/roundl.cpp
libc/src/math/generic/sqrt.cpp
libc/src/math/generic/sqrtf.cpp
libc/src/math/generic/sqrtl.cpp
libc/src/math/generic/trunc.cpp
libc/src/math/generic/truncf.cpp
libc/src/math/generic/truncl.cpp
libc/test/src/fenv/CMakeLists.txt
libc/test/src/fenv/enabled_exceptions_test.cpp
libc/test/src/fenv/exception_flags_test.cpp
libc/test/src/fenv/exception_status_test.cpp
libc/test/src/fenv/feclearexcept_test.cpp
libc/test/src/fenv/feholdexcept_test.cpp
libc/test/src/fenv/feupdateenv_test.cpp
libc/test/src/fenv/getenv_and_setenv_test.cpp
libc/test/src/math/CMakeLists.txt
libc/test/src/math/CeilTest.h
libc/test/src/math/CopySignTest.h
libc/test/src/math/FAbsTest.h
libc/test/src/math/FDimTest.h
libc/test/src/math/FMaxTest.h
libc/test/src/math/FMinTest.h
libc/test/src/math/FloorTest.h
libc/test/src/math/FmaTest.h
libc/test/src/math/FrexpTest.h
libc/test/src/math/HypotTest.h
libc/test/src/math/ILogbTest.h
libc/test/src/math/LdExpTest.h
libc/test/src/math/LogbTest.h
libc/test/src/math/ModfTest.h
libc/test/src/math/NextAfterTest.h
libc/test/src/math/RIntTest.h
libc/test/src/math/RemQuoTest.h
libc/test/src/math/RoundTest.h
libc/test/src/math/RoundToIntegerTest.h
libc/test/src/math/SqrtTest.h
libc/test/src/math/TruncTest.h
libc/test/src/math/cos_test.cpp
libc/test/src/math/cosf_test.cpp
libc/test/src/math/differential_testing/CMakeLists.txt
libc/test/src/math/differential_testing/SingleInputSingleOutputDiff.h
libc/test/src/math/exhaustive/CMakeLists.txt
libc/test/src/math/exhaustive/cosf_test.cpp
libc/test/src/math/exhaustive/expm1f_test.cpp
libc/test/src/math/exhaustive/sinf_test.cpp
libc/test/src/math/exhaustive/sqrtf_test.cpp
libc/test/src/math/exp2f_test.cpp
libc/test/src/math/expf_test.cpp
libc/test/src/math/expm1f_test.cpp
libc/test/src/math/fdim_test.cpp
libc/test/src/math/fdimf_test.cpp
libc/test/src/math/fdiml_test.cpp
libc/test/src/math/generic/CMakeLists.txt
libc/test/src/math/ilogb_test.cpp
libc/test/src/math/ilogbf_test.cpp
libc/test/src/math/ilogbl_test.cpp
libc/test/src/math/sin_test.cpp
libc/test/src/math/sincosf_test.cpp
libc/test/src/math/sinf_test.cpp
libc/test/src/math/tan_test.cpp
libc/test/utils/FPUtil/CMakeLists.txt
libc/test/utils/FPUtil/x86_long_double_test.cpp
libc/utils/CMakeLists.txt
libc/utils/MPFRWrapper/CMakeLists.txt
libc/utils/MPFRWrapper/MPFRUtils.cpp