[libc-commits] [compiler-rt] [libc] [libc] Remove unused AOR_v20.02 directory (PR #185951)

via libc-commits libc-commits at lists.llvm.org
Wed Mar 11 11:53:44 PDT 2026


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libc

Author: None (DylanFleming-arm)

<details>
<summary>Changes</summary>

As far as I am aware, AOR is no longer used anywhere within LLVM, as most of the required code has since been ported to elsewhere within the project.

Removes the entire directory, and updates some now outdated comments.

---

Patch is 1.66 MiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/185951.diff


178 Files Affected:

- (modified) compiler-rt/lib/builtins/aarch64/sme-libc-opt-memcpy-memmove-sve.S (+1-1) 
- (modified) compiler-rt/lib/builtins/aarch64/sme-libc-opt-memcpy-memmove.S (+1-1) 
- (modified) compiler-rt/lib/builtins/aarch64/sme-libc-opt-memset-memchr.S (+1-1) 
- (removed) libc/AOR_v20.02/Makefile (-90) 
- (removed) libc/AOR_v20.02/README.md (-6) 
- (removed) libc/AOR_v20.02/config.mk (-70) 
- (removed) libc/AOR_v20.02/config.mk.dist (-68) 
- (removed) libc/AOR_v20.02/math/Dir.mk (-111) 
- (removed) libc/AOR_v20.02/math/exp.c (-177) 
- (removed) libc/AOR_v20.02/math/exp2.c (-144) 
- (removed) libc/AOR_v20.02/math/exp2f.c (-81) 
- (removed) libc/AOR_v20.02/math/exp2f_data.c (-79) 
- (removed) libc/AOR_v20.02/math/exp_data.c (-1121) 
- (removed) libc/AOR_v20.02/math/expf.c (-92) 
- (removed) libc/AOR_v20.02/math/include/mathlib.h (-101) 
- (removed) libc/AOR_v20.02/math/log.c (-163) 
- (removed) libc/AOR_v20.02/math/log2.c (-142) 
- (removed) libc/AOR_v20.02/math/log2_data.c (-210) 
- (removed) libc/AOR_v20.02/math/log2f.c (-81) 
- (removed) libc/AOR_v20.02/math/log2f_data.c (-34) 
- (removed) libc/AOR_v20.02/math/log_data.c (-512) 
- (removed) libc/AOR_v20.02/math/logf.c (-80) 
- (removed) libc/AOR_v20.02/math/logf_data.c (-34) 
- (removed) libc/AOR_v20.02/math/math_config.h (-420) 
- (removed) libc/AOR_v20.02/math/math_err.c (-81) 
- (removed) libc/AOR_v20.02/math/math_errf.c (-67) 
- (removed) libc/AOR_v20.02/math/pow.c (-381) 
- (removed) libc/AOR_v20.02/math/pow_log_data.c (-185) 
- (removed) libc/AOR_v20.02/math/powf.c (-222) 
- (removed) libc/AOR_v20.02/math/powf_log2_data.c (-35) 
- (removed) libc/AOR_v20.02/math/s_cos.c (-7) 
- (removed) libc/AOR_v20.02/math/s_cosf.c (-7) 
- (removed) libc/AOR_v20.02/math/s_exp.c (-7) 
- (removed) libc/AOR_v20.02/math/s_exp2f.c (-7) 
- (removed) libc/AOR_v20.02/math/s_exp2f_1u.c (-7) 
- (removed) libc/AOR_v20.02/math/s_expf.c (-7) 
- (removed) libc/AOR_v20.02/math/s_expf_1u.c (-7) 
- (removed) libc/AOR_v20.02/math/s_log.c (-7) 
- (removed) libc/AOR_v20.02/math/s_logf.c (-7) 
- (removed) libc/AOR_v20.02/math/s_pow.c (-7) 
- (removed) libc/AOR_v20.02/math/s_powf.c (-7) 
- (removed) libc/AOR_v20.02/math/s_sin.c (-7) 
- (removed) libc/AOR_v20.02/math/s_sinf.c (-7) 
- (removed) libc/AOR_v20.02/math/test/mathbench.c (-772) 
- (removed) libc/AOR_v20.02/math/test/mathtest.c (-1702) 
- (removed) libc/AOR_v20.02/math/test/rtest/dotest.c (-2168) 
- (removed) libc/AOR_v20.02/math/test/rtest/intern.h (-92) 
- (removed) libc/AOR_v20.02/math/test/rtest/main.c (-335) 
- (removed) libc/AOR_v20.02/math/test/rtest/random.c (-100) 
- (removed) libc/AOR_v20.02/math/test/rtest/random.h (-13) 
- (removed) libc/AOR_v20.02/math/test/rtest/semi.c (-906) 
- (removed) libc/AOR_v20.02/math/test/rtest/semi.h (-54) 
- (removed) libc/AOR_v20.02/math/test/rtest/types.h (-26) 
- (removed) libc/AOR_v20.02/math/test/rtest/wrappers.c (-262) 
- (removed) libc/AOR_v20.02/math/test/rtest/wrappers.h (-115) 
- (removed) libc/AOR_v20.02/math/test/runulp.sh (-295) 
- (removed) libc/AOR_v20.02/math/test/testcases/directed/exp.tst (-32) 
- (removed) libc/AOR_v20.02/math/test/testcases/directed/exp2.tst (-31) 
- (removed) libc/AOR_v20.02/math/test/testcases/directed/exp2f.tst (-26) 
- (removed) libc/AOR_v20.02/math/test/testcases/directed/expf.tst (-24) 
- (removed) libc/AOR_v20.02/math/test/testcases/directed/log.tst (-22) 
- (removed) libc/AOR_v20.02/math/test/testcases/directed/log2.tst (-22) 
- (removed) libc/AOR_v20.02/math/test/testcases/directed/log2f.tst (-28) 
- (removed) libc/AOR_v20.02/math/test/testcases/directed/logf.tst (-70) 
- (removed) libc/AOR_v20.02/math/test/testcases/directed/pow.tst (-1419) 
- (removed) libc/AOR_v20.02/math/test/testcases/directed/powf.tst (-247) 
- (removed) libc/AOR_v20.02/math/test/testcases/random/double.tst (-11) 
- (removed) libc/AOR_v20.02/math/test/testcases/random/float.tst (-12) 
- (removed) libc/AOR_v20.02/math/test/traces/exp.txt (-16000) 
- (removed) libc/AOR_v20.02/math/test/traces/sincosf.txt (-31999) 
- (removed) libc/AOR_v20.02/math/test/ulp.c (-852) 
- (removed) libc/AOR_v20.02/math/test/ulp.h (-363) 
- (removed) libc/AOR_v20.02/math/tools/cos.sollya (-32) 
- (removed) libc/AOR_v20.02/math/tools/exp.sollya (-36) 
- (removed) libc/AOR_v20.02/math/tools/exp2.sollya (-49) 
- (removed) libc/AOR_v20.02/math/tools/log.sollya (-36) 
- (removed) libc/AOR_v20.02/math/tools/log2.sollya (-43) 
- (removed) libc/AOR_v20.02/math/tools/log2_abs.sollya (-42) 
- (removed) libc/AOR_v20.02/math/tools/log_abs.sollya (-36) 
- (removed) libc/AOR_v20.02/math/tools/plot.py (-66) 
- (removed) libc/AOR_v20.02/math/tools/remez.jl (-1335) 
- (removed) libc/AOR_v20.02/math/tools/sin.sollya (-38) 
- (removed) libc/AOR_v20.02/math/tools/v_exp.sollya (-31) 
- (removed) libc/AOR_v20.02/math/tools/v_log.sollya (-35) 
- (removed) libc/AOR_v20.02/math/tools/v_sin.sollya (-37) 
- (removed) libc/AOR_v20.02/math/v_cos.c (-88) 
- (removed) libc/AOR_v20.02/math/v_cosf.c (-77) 
- (removed) libc/AOR_v20.02/math/v_exp.c (-95) 
- (removed) libc/AOR_v20.02/math/v_exp.h (-15) 
- (removed) libc/AOR_v20.02/math/v_exp2f.c (-79) 
- (removed) libc/AOR_v20.02/math/v_exp2f_1u.c (-76) 
- (removed) libc/AOR_v20.02/math/v_exp_data.c (-404) 
- (removed) libc/AOR_v20.02/math/v_expf.c (-84) 
- (removed) libc/AOR_v20.02/math/v_expf_1u.c (-81) 
- (removed) libc/AOR_v20.02/math/v_log.c (-105) 
- (removed) libc/AOR_v20.02/math/v_log.h (-19) 
- (removed) libc/AOR_v20.02/math/v_log_data.c (-159) 
- (removed) libc/AOR_v20.02/math/v_logf.c (-74) 
- (removed) libc/AOR_v20.02/math/v_math.h (-642) 
- (removed) libc/AOR_v20.02/math/v_pow.c (-28) 
- (removed) libc/AOR_v20.02/math/v_powf.c (-236) 
- (removed) libc/AOR_v20.02/math/v_sin.c (-87) 
- (removed) libc/AOR_v20.02/math/v_sinf.c (-76) 
- (removed) libc/AOR_v20.02/math/vn_cos.c (-13) 
- (removed) libc/AOR_v20.02/math/vn_cosf.c (-13) 
- (removed) libc/AOR_v20.02/math/vn_exp.c (-13) 
- (removed) libc/AOR_v20.02/math/vn_exp2f.c (-13) 
- (removed) libc/AOR_v20.02/math/vn_exp2f_1u.c (-12) 
- (removed) libc/AOR_v20.02/math/vn_expf.c (-13) 
- (removed) libc/AOR_v20.02/math/vn_expf_1u.c (-12) 
- (removed) libc/AOR_v20.02/math/vn_log.c (-13) 
- (removed) libc/AOR_v20.02/math/vn_logf.c (-13) 
- (removed) libc/AOR_v20.02/math/vn_pow.c (-13) 
- (removed) libc/AOR_v20.02/math/vn_powf.c (-13) 
- (removed) libc/AOR_v20.02/math/vn_sin.c (-13) 
- (removed) libc/AOR_v20.02/math/vn_sinf.c (-13) 
- (removed) libc/AOR_v20.02/networking/Dir.mk (-77) 
- (removed) libc/AOR_v20.02/networking/aarch64/chksum_simd.c (-147) 
- (removed) libc/AOR_v20.02/networking/arm/chksum_simd.c (-150) 
- (removed) libc/AOR_v20.02/networking/chksum.c (-82) 
- (removed) libc/AOR_v20.02/networking/chksum_common.h (-133) 
- (removed) libc/AOR_v20.02/networking/include/networking.h (-15) 
- (removed) libc/AOR_v20.02/networking/test/chksum.c (-382) 
- (removed) libc/AOR_v20.02/string/Dir.mk (-101) 
- (removed) libc/AOR_v20.02/string/aarch64/check-arch.S (-11) 
- (removed) libc/AOR_v20.02/string/aarch64/memchr-sve.S (-65) 
- (removed) libc/AOR_v20.02/string/aarch64/memchr.S (-144) 
- (removed) libc/AOR_v20.02/string/aarch64/memcmp-sve.S (-51) 
- (removed) libc/AOR_v20.02/string/aarch64/memcmp.S (-134) 
- (removed) libc/AOR_v20.02/string/aarch64/memcpy-advsimd.S (-202) 
- (removed) libc/AOR_v20.02/string/aarch64/memcpy.S (-240) 
- (removed) libc/AOR_v20.02/string/aarch64/memset.S (-115) 
- (removed) libc/AOR_v20.02/string/aarch64/stpcpy-sve.S (-11) 
- (removed) libc/AOR_v20.02/string/aarch64/stpcpy.S (-11) 
- (removed) libc/AOR_v20.02/string/aarch64/strchr-mte.S (-131) 
- (removed) libc/AOR_v20.02/string/aarch64/strchr-sve.S (-72) 
- (removed) libc/AOR_v20.02/string/aarch64/strchr.S (-132) 
- (removed) libc/AOR_v20.02/string/aarch64/strchrnul-sve.S (-10) 
- (removed) libc/AOR_v20.02/string/aarch64/strchrnul.S (-117) 
- (removed) libc/AOR_v20.02/string/aarch64/strcmp-sve.S (-60) 
- (removed) libc/AOR_v20.02/string/aarch64/strcmp.S (-171) 
- (removed) libc/AOR_v20.02/string/aarch64/strcpy-sve.S (-72) 
- (removed) libc/AOR_v20.02/string/aarch64/strcpy.S (-309) 
- (removed) libc/AOR_v20.02/string/aarch64/strlen-mte.S (-186) 
- (removed) libc/AOR_v20.02/string/aarch64/strlen-sve.S (-58) 
- (removed) libc/AOR_v20.02/string/aarch64/strlen.S (-207) 
- (removed) libc/AOR_v20.02/string/aarch64/strncmp-sve.S (-69) 
- (removed) libc/AOR_v20.02/string/aarch64/strncmp.S (-262) 
- (removed) libc/AOR_v20.02/string/aarch64/strnlen-sve.S (-75) 
- (removed) libc/AOR_v20.02/string/aarch64/strnlen.S (-156) 
- (removed) libc/AOR_v20.02/string/aarch64/strrchr-sve.S (-86) 
- (removed) libc/AOR_v20.02/string/aarch64/strrchr.S (-148) 
- (removed) libc/AOR_v20.02/string/arm/check-arch.S (-11) 
- (removed) libc/AOR_v20.02/string/arm/memchr.S (-134) 
- (removed) libc/AOR_v20.02/string/arm/memcpy.S (-588) 
- (removed) libc/AOR_v20.02/string/arm/memset.S (-100) 
- (removed) libc/AOR_v20.02/string/arm/strcmp-armv6m.S (-118) 
- (removed) libc/AOR_v20.02/string/arm/strcmp.S (-477) 
- (removed) libc/AOR_v20.02/string/arm/strcpy.c (-134) 
- (removed) libc/AOR_v20.02/string/arm/strlen-armv6t2.S (-125) 
- (removed) libc/AOR_v20.02/string/asmdefs.h (-32) 
- (removed) libc/AOR_v20.02/string/include/stringlib.h (-58) 
- (removed) libc/AOR_v20.02/string/test/memchr.c (-94) 
- (removed) libc/AOR_v20.02/string/test/memcmp.c (-97) 
- (removed) libc/AOR_v20.02/string/test/memcpy.c (-99) 
- (removed) libc/AOR_v20.02/string/test/memmove.c (-145) 
- (removed) libc/AOR_v20.02/string/test/memset.c (-112) 
- (removed) libc/AOR_v20.02/string/test/stpcpy.c (-99) 
- (removed) libc/AOR_v20.02/string/test/strchr.c (-99) 
- (removed) libc/AOR_v20.02/string/test/strchrnul.c (-100) 
- (removed) libc/AOR_v20.02/string/test/strcmp.c (-104) 
- (removed) libc/AOR_v20.02/string/test/strcpy.c (-100) 
- (removed) libc/AOR_v20.02/string/test/strlen.c (-92) 
- (removed) libc/AOR_v20.02/string/test/strncmp.c (-104) 
- (removed) libc/AOR_v20.02/string/test/strnlen.c (-94) 
- (removed) libc/AOR_v20.02/string/test/strrchr.c (-98) 
- (removed) libc/AOR_v20.02/string/x86_64/check-arch.S (-11) 
- (modified) libc/utils/buildbot/Dockerfile (+1-1) 


``````````diff
diff --git a/compiler-rt/lib/builtins/aarch64/sme-libc-opt-memcpy-memmove-sve.S b/compiler-rt/lib/builtins/aarch64/sme-libc-opt-memcpy-memmove-sve.S
index be9dcf0ce30dd..17d726866569a 100644
--- a/compiler-rt/lib/builtins/aarch64/sme-libc-opt-memcpy-memmove-sve.S
+++ b/compiler-rt/lib/builtins/aarch64/sme-libc-opt-memcpy-memmove-sve.S
@@ -12,7 +12,7 @@
 ///
 /// These implementations depend on unaligned access support.
 ///
-/// Routines taken from libc/AOR_v20.02/string/aarch64.
+/// Routines based on Arm Optimized Routines, in string/aarch64.
 ///
 //===----------------------------------------------------------------------===//
 
diff --git a/compiler-rt/lib/builtins/aarch64/sme-libc-opt-memcpy-memmove.S b/compiler-rt/lib/builtins/aarch64/sme-libc-opt-memcpy-memmove.S
index 3d79ca31b7866..50566e0a4b887 100644
--- a/compiler-rt/lib/builtins/aarch64/sme-libc-opt-memcpy-memmove.S
+++ b/compiler-rt/lib/builtins/aarch64/sme-libc-opt-memcpy-memmove.S
@@ -12,7 +12,7 @@
 ///
 /// These implementations depend on unaligned access support.
 ///
-/// Routines taken from libc/AOR_v20.02/string/aarch64.
+/// Routines based on Arm Optimized Routines, in string/aarch64.
 ///
 //===----------------------------------------------------------------------===//
 
diff --git a/compiler-rt/lib/builtins/aarch64/sme-libc-opt-memset-memchr.S b/compiler-rt/lib/builtins/aarch64/sme-libc-opt-memset-memchr.S
index b6939f114cbae..adde2f20d84d2 100644
--- a/compiler-rt/lib/builtins/aarch64/sme-libc-opt-memset-memchr.S
+++ b/compiler-rt/lib/builtins/aarch64/sme-libc-opt-memset-memchr.S
@@ -12,7 +12,7 @@
 ///
 /// These implementations depend on unaligned access and floating-point support.
 ///
-/// Routines taken from libc/AOR_v20.02/string/aarch64.
+/// Routines based on Arm Optimized Routines, in string/aarch64.
 ///
 //===----------------------------------------------------------------------===//
 
diff --git a/libc/AOR_v20.02/Makefile b/libc/AOR_v20.02/Makefile
deleted file mode 100644
index 53e0245f82c40..0000000000000
--- a/libc/AOR_v20.02/Makefile
+++ /dev/null
@@ -1,90 +0,0 @@
-# Makefile - requires GNU make
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-srcdir = .
-prefix = /usr
-bindir = $(prefix)/bin
-libdir = $(prefix)/lib
-includedir = $(prefix)/include
-
-# Configure these in config.mk, do not make changes in this file.
-SUBS = math string networking
-HOST_CC = cc
-HOST_CFLAGS = -std=c99 -O2
-HOST_LDFLAGS =
-HOST_LDLIBS =
-EMULATOR =
-CPPFLAGS =
-CFLAGS = -std=c99 -O2
-CFLAGS_SHARED = -fPIC
-CFLAGS_ALL = -Ibuild/include $(CPPFLAGS) $(CFLAGS)
-LDFLAGS =
-LDLIBS =
-AR = $(CROSS_COMPILE)ar
-RANLIB = $(CROSS_COMPILE)ranlib
-INSTALL = install
-
-all:
-
--include config.mk
-
-$(foreach sub,$(SUBS),$(eval include $(srcdir)/$(sub)/Dir.mk))
-
-# Required targets of subproject foo:
-#   all-foo
-#   check-foo
-#   clean-foo
-#   install-foo
-# Required make variables of subproject foo:
-#   foo-files: Built files (all in build/).
-# Make variables used by subproject foo:
-#   foo-...: Variables defined in foo/Dir.mk or by config.mk.
-
-all: $(SUBS:%=all-%)
-
-ALL_FILES = $(foreach sub,$(SUBS),$($(sub)-files))
-DIRS = $(sort $(patsubst %/,%,$(dir $(ALL_FILES))))
-$(ALL_FILES): | $(DIRS)
-$(DIRS):
-	mkdir -p $@
-
-$(filter %.os,$(ALL_FILES)): CFLAGS_ALL += $(CFLAGS_SHARED)
-
-build/%.o: $(srcdir)/%.S
-	$(CC) $(CFLAGS_ALL) -c -o $@ $<
-
-build/%.o: $(srcdir)/%.c
-	$(CC) $(CFLAGS_ALL) -c -o $@ $<
-
-build/%.os: $(srcdir)/%.S
-	$(CC) $(CFLAGS_ALL) -c -o $@ $<
-
-build/%.os: $(srcdir)/%.c
-	$(CC) $(CFLAGS_ALL) -c -o $@ $<
-
-clean: $(SUBS:%=clean-%)
-	rm -rf build
-
-distclean: clean
-	rm -f config.mk
-
-$(DESTDIR)$(bindir)/%: build/bin/%
-	$(INSTALL) -D $< $@
-
-$(DESTDIR)$(libdir)/%.so: build/lib/%.so
-	$(INSTALL) -D $< $@
-
-$(DESTDIR)$(libdir)/%: build/lib/%
-	$(INSTALL) -m 644 -D $< $@
-
-$(DESTDIR)$(includedir)/%: build/include/%
-	$(INSTALL) -m 644 -D $< $@
-
-install: $(SUBS:%=install-%)
-
-check: $(SUBS:%=check-%)
-
-.PHONY: all clean distclean install check
diff --git a/libc/AOR_v20.02/README.md b/libc/AOR_v20.02/README.md
deleted file mode 100644
index 860f90ebe26dd..0000000000000
--- a/libc/AOR_v20.02/README.md
+++ /dev/null
@@ -1,6 +0,0 @@
-This directory contains Arm's contribution of their optimized routines as
-initially uploaded to https://reviews.llvm.org/D75355. Going forward, parts
-of the implementations from this directory will be moved over to the
-appropriate place in the LLVM-libc tree. This will be done over many patches,
-all of which will go through the normal LLVM code review practice, and follow
-the LLVM-libc implementation standards.
diff --git a/libc/AOR_v20.02/config.mk b/libc/AOR_v20.02/config.mk
deleted file mode 100644
index 6808df93519e0..0000000000000
--- a/libc/AOR_v20.02/config.mk
+++ /dev/null
@@ -1,70 +0,0 @@
-# Example config.mk
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-# Subprojects to build
-# For now, LLVM-libc project will focus only "math" functions.
-SUBS = math # string networking
-
-# Target architecture: aarch64, arm or x86_64
-# For now, LLVM-libc project will focus on x86_64 only.
-ARCH = x86_64
-
-# Compiler for the target
-CC = $(CROSS_COMPILE)gcc
-CFLAGS = -std=c99 -pipe -O3
-CFLAGS += -Wall -Wno-missing-braces
-CFLAGS += -Werror=implicit-function-declaration
-
-# Used for test case generator that is executed on the host
-HOST_CC = gcc
-HOST_CFLAGS = -std=c99 -O2
-HOST_CFLAGS += -Wall -Wno-unused-function
-
-# Enable debug info.
-HOST_CFLAGS += -g
-CFLAGS += -g
-
-# Optimize the shared libraries on aarch64 assuming they fit in 1M.
-#CFLAGS_SHARED = -fPIC -mcmodel=tiny
-
-# Use for cross compilation with gcc.
-#CROSS_COMPILE = aarch64-none-linux-gnu-
-
-# Use with cross testing.
-#EMULATOR = qemu-aarch64-static
-#EMULATOR = sh -c 'scp $$1 user at host:/dir && ssh user at host /dir/"$$@"' --
-
-# Additional flags for subprojects.
-math-cflags =
-math-ldlibs =
-math-ulpflags =
-math-testflags =
-string-cflags =
-networking-cflags =
-
-# Use if mpfr is available on the target for ulp error checking.
-#math-ldlibs += -lmpfr -lgmp
-#math-cflags += -DUSE_MPFR
-
-# Use with gcc.
-math-cflags += -frounding-math -fexcess-precision=standard -fno-stack-protector
-math-cflags += -ffp-contract=fast -fno-math-errno
-
-# Use with clang.
-#math-cflags += -ffp-contract=fast
-
-# Disable vector math code
-#math-cflags += -DWANT_VMATH=0
-
-# Disable fenv checks
-#math-ulpflags = -q -f
-#math-testflags = -nostatus
-
-# Enable assertion checks.
-#networking-cflags += -DWANT_ASSERT
-
-# Avoid auto-vectorization of scalar code and unroll loops
-networking-cflags += -O2 -fno-tree-vectorize -funroll-loops
diff --git a/libc/AOR_v20.02/config.mk.dist b/libc/AOR_v20.02/config.mk.dist
deleted file mode 100644
index 240d4b6f4b4c2..0000000000000
--- a/libc/AOR_v20.02/config.mk.dist
+++ /dev/null
@@ -1,68 +0,0 @@
-# Example config.mk
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-# Subprojects to build
-SUBS = math string networking
-
-# Target architecture: aarch64, arm or x86_64
-ARCH = aarch64
-
-# Compiler for the target
-CC = $(CROSS_COMPILE)gcc
-CFLAGS = -std=c99 -pipe -O3
-CFLAGS += -Wall -Wno-missing-braces
-CFLAGS += -Werror=implicit-function-declaration
-
-# Used for test case generator that is executed on the host
-HOST_CC = gcc
-HOST_CFLAGS = -std=c99 -O2
-HOST_CFLAGS += -Wall -Wno-unused-function
-
-# Enable debug info.
-HOST_CFLAGS += -g
-CFLAGS += -g
-
-# Optimize the shared libraries on aarch64 assuming they fit in 1M.
-#CFLAGS_SHARED = -fPIC -mcmodel=tiny
-
-# Use for cross compilation with gcc.
-#CROSS_COMPILE = aarch64-none-linux-gnu-
-
-# Use with cross testing.
-#EMULATOR = qemu-aarch64-static
-#EMULATOR = sh -c 'scp $$1 user at host:/dir && ssh user at host /dir/"$$@"' --
-
-# Additional flags for subprojects.
-math-cflags =
-math-ldlibs =
-math-ulpflags =
-math-testflags =
-string-cflags =
-networking-cflags =
-
-# Use if mpfr is available on the target for ulp error checking.
-#math-ldlibs += -lmpfr -lgmp
-#math-cflags += -DUSE_MPFR
-
-# Use with gcc.
-math-cflags += -frounding-math -fexcess-precision=standard -fno-stack-protector
-math-cflags += -ffp-contract=fast -fno-math-errno
-
-# Use with clang.
-#math-cflags += -ffp-contract=fast
-
-# Disable vector math code
-#math-cflags += -DWANT_VMATH=0
-
-# Disable fenv checks
-#math-ulpflags = -q -f
-#math-testflags = -nostatus
-
-# Enable assertion checks.
-#networking-cflags += -DWANT_ASSERT
-
-# Avoid auto-vectorization of scalar code and unroll loops
-networking-cflags += -O2 -fno-tree-vectorize -funroll-loops
diff --git a/libc/AOR_v20.02/math/Dir.mk b/libc/AOR_v20.02/math/Dir.mk
deleted file mode 100644
index 6be9115e86b08..0000000000000
--- a/libc/AOR_v20.02/math/Dir.mk
+++ /dev/null
@@ -1,111 +0,0 @@
-# Makefile fragment - requires GNU make
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-S := $(srcdir)/math
-B := build/math
-
-math-lib-srcs := $(wildcard $(S)/*.[cS])
-math-test-srcs := \
-	$(S)/test/mathtest.c \
-	$(S)/test/mathbench.c \
-	$(S)/test/ulp.c \
-
-math-test-host-srcs := $(wildcard $(S)/test/rtest/*.[cS])
-
-math-includes := $(patsubst $(S)/%,build/%,$(wildcard $(S)/include/*.h))
-
-math-libs := \
-	build/lib/libmathlib.so \
-	build/lib/libmathlib.a \
-
-math-tools := \
-	build/bin/mathtest \
-	build/bin/mathbench \
-	build/bin/mathbench_libc \
-	build/bin/runulp.sh \
-	build/bin/ulp \
-
-math-host-tools := \
-	build/bin/rtest \
-
-math-lib-objs := $(patsubst $(S)/%,$(B)/%.o,$(basename $(math-lib-srcs)))
-math-test-objs := $(patsubst $(S)/%,$(B)/%.o,$(basename $(math-test-srcs)))
-math-host-objs := $(patsubst $(S)/%,$(B)/%.o,$(basename $(math-test-host-srcs)))
-math-target-objs := $(math-lib-objs) $(math-test-objs)
-math-objs := $(math-target-objs) $(math-target-objs:%.o=%.os) $(math-host-objs)
-
-math-files := \
-	$(math-objs) \
-	$(math-libs) \
-	$(math-tools) \
-	$(math-host-tools) \
-	$(math-includes) \
-
-all-math: $(math-libs) $(math-tools) $(math-includes)
-
-$(math-objs): $(math-includes)
-$(math-objs): CFLAGS_ALL += $(math-cflags)
-$(B)/test/mathtest.o: CFLAGS_ALL += -fmath-errno
-$(math-host-objs): CC = $(HOST_CC)
-$(math-host-objs): CFLAGS_ALL = $(HOST_CFLAGS)
-
-$(B)/test/ulp.o: $(S)/test/ulp.h
-
-build/lib/libmathlib.so: $(math-lib-objs:%.o=%.os)
-	$(CC) $(CFLAGS_ALL) $(LDFLAGS) -shared -o $@ $^
-
-build/lib/libmathlib.a: $(math-lib-objs)
-	rm -f $@
-	$(AR) rc $@ $^
-	$(RANLIB) $@
-
-$(math-host-tools): HOST_LDLIBS += -lm -lmpfr -lmpc
-$(math-tools): LDLIBS += $(math-ldlibs) -lm
-
-build/bin/rtest: $(math-host-objs)
-	$(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ $^ $(HOST_LDLIBS)
-
-build/bin/mathtest: $(B)/test/mathtest.o build/lib/libmathlib.a
-	$(CC) $(CFLAGS_ALL) $(LDFLAGS) -static -o $@ $^ $(LDLIBS)
-
-build/bin/mathbench: $(B)/test/mathbench.o build/lib/libmathlib.a
-	$(CC) $(CFLAGS_ALL) $(LDFLAGS) -static -o $@ $^ $(LDLIBS)
-
-# This is not ideal, but allows custom symbols in mathbench to get resolved.
-build/bin/mathbench_libc: $(B)/test/mathbench.o build/lib/libmathlib.a
-	$(CC) $(CFLAGS_ALL) $(LDFLAGS) -static -o $@ $< $(LDLIBS) -lc build/lib/libmathlib.a -lm
-
-build/bin/ulp: $(B)/test/ulp.o build/lib/libmathlib.a
-	$(CC) $(CFLAGS_ALL) $(LDFLAGS) -static -o $@ $^ $(LDLIBS)
-
-build/include/%.h: $(S)/include/%.h
-	cp $< $@
-
-build/bin/%.sh: $(S)/test/%.sh
-	cp $< $@
-
-math-tests := $(wildcard $(S)/test/testcases/directed/*.tst)
-math-rtests := $(wildcard $(S)/test/testcases/random/*.tst)
-
-check-math-test: $(math-tools)
-	cat $(math-tests) | $(EMULATOR) build/bin/mathtest $(math-testflags)
-
-check-math-rtest: $(math-host-tools) $(math-tools)
-	cat $(math-rtests) | build/bin/rtest | $(EMULATOR) build/bin/mathtest $(math-testflags)
-
-check-math-ulp: $(math-tools)
-	ULPFLAGS="$(math-ulpflags)" build/bin/runulp.sh $(EMULATOR)
-
-check-math: check-math-test check-math-rtest check-math-ulp
-
-install-math: \
- $(math-libs:build/lib/%=$(DESTDIR)$(libdir)/%) \
- $(math-includes:build/include/%=$(DESTDIR)$(includedir)/%)
-
-clean-math:
-	rm -f $(math-files)
-
-.PHONY: all-math check-math-test check-math-rtest check-math-ulp check-math install-math clean-math
diff --git a/libc/AOR_v20.02/math/exp.c b/libc/AOR_v20.02/math/exp.c
deleted file mode 100644
index d0996023188ca..0000000000000
--- a/libc/AOR_v20.02/math/exp.c
+++ /dev/null
@@ -1,177 +0,0 @@
-/*
- * Double-precision e^x function.
- *
- * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
- * See https://llvm.org/LICENSE.txt for license information.
- * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
- */
-
-#include <float.h>
-#include <math.h>
-#include <stdint.h>
-#include "math_config.h"
-
-#define N (1 << EXP_TABLE_BITS)
-#define InvLn2N __exp_data.invln2N
-#define NegLn2hiN __exp_data.negln2hiN
-#define NegLn2loN __exp_data.negln2loN
-#define Shift __exp_data.shift
-#define T __exp_data.tab
-#define C2 __exp_data.poly[5 - EXP_POLY_ORDER]
-#define C3 __exp_data.poly[6 - EXP_POLY_ORDER]
-#define C4 __exp_data.poly[7 - EXP_POLY_ORDER]
-#define C5 __exp_data.poly[8 - EXP_POLY_ORDER]
-#define C6 __exp_data.poly[9 - EXP_POLY_ORDER]
-
-/* Handle cases that may overflow or underflow when computing the result that
-   is scale*(1+TMP) without intermediate rounding.  The bit representation of
-   scale is in SBITS, however it has a computed exponent that may have
-   overflown into the sign bit so that needs to be adjusted before using it as
-   a double.  (int32_t)KI is the k used in the argument reduction and exponent
-   adjustment of scale, positive k here means the result may overflow and
-   negative k means the result may underflow.  */
-static inline double
-specialcase (double_t tmp, uint64_t sbits, uint64_t ki)
-{
-  double_t scale, y;
-
-  if ((ki & 0x80000000) == 0)
-    {
-      /* k > 0, the exponent of scale might have overflowed by <= 460.  */
-      sbits -= 1009ull << 52;
-      scale = asdouble (sbits);
-      y = 0x1p1009 * (scale + scale * tmp);
-      return check_oflow (eval_as_double (y));
-    }
-  /* k < 0, need special care in the subnormal range.  */
-  sbits += 1022ull << 52;
-  scale = asdouble (sbits);
-  y = scale + scale * tmp;
-  if (y < 1.0)
-    {
-      /* Round y to the right precision before scaling it into the subnormal
-	 range to avoid double rounding that can cause 0.5+E/2 ulp error where
-	 E is the worst-case ulp error outside the subnormal range.  So this
-	 is only useful if the goal is better than 1 ulp worst-case error.  */
-      double_t hi, lo;
-      lo = scale - y + scale * tmp;
-      hi = 1.0 + y;
-      lo = 1.0 - hi + y + lo;
-      y = eval_as_double (hi + lo) - 1.0;
-      /* Avoid -0.0 with downward rounding.  */
-      if (WANT_ROUNDING && y == 0.0)
-	y = 0.0;
-      /* The underflow exception needs to be signaled explicitly.  */
-      force_eval_double (opt_barrier_double (0x1p-1022) * 0x1p-1022);
-    }
-  y = 0x1p-1022 * y;
-  return check_uflow (eval_as_double (y));
-}
-
-/* Top 12 bits of a double (sign and exponent bits).  */
-static inline uint32_t
-top12 (double x)
-{
-  return asuint64 (x) >> 52;
-}
-
-/* Computes exp(x+xtail) where |xtail| < 2^-8/N and |xtail| <= |x|.
-   If hastail is 0 then xtail is assumed to be 0 too.  */
-static inline double
-exp_inline (double x, double xtail, int hastail)
-{
-  uint32_t abstop;
-  uint64_t ki, idx, top, sbits;
-  /* double_t for better performance on targets with FLT_EVAL_METHOD==2.  */
-  double_t kd, z, r, r2, scale, tail, tmp;
-
-  abstop = top12 (x) & 0x7ff;
-  if (unlikely (abstop - top12 (0x1p-54) >= top12 (512.0) - top12 (0x1p-54)))
-    {
-      if (abstop - top12 (0x1p-54) >= 0x80000000)
-	/* Avoid spurious underflow for tiny x.  */
-	/* Note: 0 is common input.  */
-	return WANT_ROUNDING ? 1.0 + x : 1.0;
-      if (abstop >= top12 (1024.0))
-	{
-	  if (asuint64 (x) == asuint64 (-INFINITY))
-	    return 0.0;
-	  if (abstop >= top12 (INFINITY))
-	    return 1.0 + x;
-	  if (asuint64 (x) >> 63)
-	    return __math_uflow (0);
-	  else
-	    return __math_oflow (0);
-	}
-      /* Large x is special cased below.  */
-      abstop = 0;
-    }
-
-  /* exp(x) = 2^(k/N) * exp(r), with exp(r) in [2^(-1/2N),2^(1/2N)].  */
-  /* x = ln2/N*k + r, with int k and r in [-ln2/2N, ln2/2N].  */
-  z = InvLn2N * x;
-#if TOINT_INTRINSICS
-  kd = roundtoint (z);
-  ki = converttoint (z);
-#elif EXP_USE_TOINT_NARROW
-  /* z - kd is in [-0.5-2^-16, 0.5] in all rounding modes.  */
-  kd = eval_as_double (z + Shift);
-  ki = asuint64 (kd) >> 16;
-  kd = (double_t) (int32_t) ki;
-#else
-  /* z - kd is in [-1, 1] in non-nearest rounding modes.  */
-  kd = eval_as_double (z + Shift);
-  ki = asuint64 (kd);
-  kd -= Shift;
-#endif
-  r = x + kd * NegLn2hiN + kd * NegLn2loN;
-  /* The code assumes 2^-200 < |xtail| < 2^-8/N.  */
-  if (hastail)
-    r += xtail;
-  /* 2^(k/N) ~= scale * (1 + tail).  */
-  idx = 2 * (ki % N);
-  top = ki << (52 - EXP_TABLE_BITS);
-  tail = asdouble (T[idx]);
-  /* This is only a valid scale when -1023*N < k < 1024*N.  */
-  sbits = T[idx + 1] + top;
-  /* exp(x) = 2^(k/N) * exp(r) ~= scale + scale * (tail + exp(r) - 1).  */
-  /* Evaluation is optimized assuming superscalar pipelined execution.  */
-  r2 = r * r;
-  /* Without fma the worst case error is 0.25/N ulp larger.  */
-  /* Worst case error is less than 0.5+1.11/N+(abs poly error * 2^53) ulp.  */
-#if EXP_POLY_ORDER == 4
-  tmp = tail + r + r2 * C2 + r * r2 * (C3 + r * C4);
-#elif EXP_POLY_ORDER == 5
-  tmp = tail + r + r2 * (C2 + r * C3) + r2 * r2 * (C4 + r * C5);
-#elif EXP_POLY_ORDER == 6
-  tmp = tail + r + r2 * (0.5 + r * C3) + r2 * r2 * (C4 + r * C5 + r2 * C6);
-#endif
-  if (unlikely (abstop == 0))
-    return specialcase (tmp, sbits, ki);
-  scale = asdouble (sbits);
-  /* Note: tmp == 0 or |tmp| > 2^-200 and scale > 2^-739, so there
-     is no spurious underflow here even without fma.  */
-  return eval_as_double (scale + scale * tmp);
-}
-
-double
-exp (double x)
-{
-  return exp_inline (x, 0, 0);
-}
-
-/* May be useful for implementing pow where more than double
-   precision input is needed.  */
-double
-__exp_dd (double x, double xtail)
-{
-  return exp_inline (x, xtail, 1);
-}
-#if USE_GLIBC_ABI
-strong_alias (exp, __exp_finite)
-hidden_alias (exp, __ieee754_exp)
-hidden_alias (__exp_dd, __exp1)
-# if LDBL_MANT_DIG == 53
-long double expl (long double x) { return exp (x); }
-# endif
-#endif
diff --git a/libc/AOR_v20.02/math/exp2.c b/libc/AOR_v20.02/math/exp2.c
deleted file mode 100644
index 53296ab7c5815..0000000000000
--- a/libc/AOR_v20.02/math/exp2.c
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * Double-precision 2^x function.
- *
- * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
- * See https://llvm.org/LICENSE.txt for license information.
- * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
- */
-
-#include <float.h>
-#include <math.h>
-#include <stdint.h>
-#include "math_config.h"
-
-#define N (1 << EXP_TABLE_BITS)
-#define Shift __exp_data.exp2_shift
-#define T __exp_data.tab
-#define C1 __exp_data.exp2_poly[0]
-#define C2 __exp_data.exp2_poly[1]
-#define C3 __exp_data.exp2_poly[2]
-#define C4 __exp_data.exp2_poly[3]
-#define C5 __exp_data.exp2_poly[4]
-#define C6 __exp_data.exp2_poly[5]
-
-/* Handle cases that may overflow or underflow when computing the result that
-   is scale*(1+TMP) without intermediate rounding.  The bit representation of
-   scale is in SBITS, however it has a computed exponent that may have
-   overflown into the sign bit so that needs to be adjusted before using it as
-   a double.  (int32_t)KI is the k used in the argument reduction and exponent
-   adjustment of scale, positive k here means the result may overflow and
-   negative k means the result may underflow.  */
-static inline double
-specialcase (double_t tmp, uint64_t sbits, uint64_t ki)
-{
-  double_t scale, y;
-
-  if ((ki & 0x80000000) == 0)
-    {
-      ...
[truncated]

``````````

</details>


https://github.com/llvm/llvm-project/pull/185951


More information about the libc-commits mailing list