aboutsummaryrefslogtreecommitdiff
path: root/utils/bazel
diff options
context:
space:
mode:
Diffstat (limited to 'utils/bazel')
-rw-r--r--utils/bazel/.bazelrc9
-rw-r--r--utils/bazel/.bazelversion2
-rw-r--r--utils/bazel/README.md45
-rw-r--r--utils/bazel/WORKSPACE41
-rw-r--r--utils/bazel/examples/http_archive/WORKSPACE2
-rw-r--r--utils/bazel/examples/submodule/WORKSPACE4
-rw-r--r--utils/bazel/llvm-project-overlay/bolt/BUILD.bazel19
-rw-r--r--utils/bazel/llvm-project-overlay/clang-tools-extra/clang-tidy/BUILD.bazel5
-rw-r--r--utils/bazel/llvm-project-overlay/clang-tools-extra/clangd/BUILD.bazel1
-rw-r--r--utils/bazel/llvm-project-overlay/clang/BUILD.bazel86
-rw-r--r--utils/bazel/llvm-project-overlay/compiler-rt/BUILD.bazel1
-rw-r--r--utils/bazel/llvm-project-overlay/libc/BUILD.bazel1276
-rw-r--r--utils/bazel/llvm-project-overlay/libc/libc_configure_options.bzl2
-rw-r--r--utils/bazel/llvm-project-overlay/libc/test/UnitTest/BUILD.bazel10
-rw-r--r--utils/bazel/llvm-project-overlay/libc/test/libc_test_rules.bzl1
-rw-r--r--utils/bazel/llvm-project-overlay/libc/test/src/__support/BUILD.bazel1
-rw-r--r--utils/bazel/llvm-project-overlay/libc/test/src/__support/FPUtil/BUILD.bazel3
-rw-r--r--utils/bazel/llvm-project-overlay/libc/test/src/fenv/BUILD.bazel1
-rw-r--r--utils/bazel/llvm-project-overlay/libc/test/src/math/BUILD.bazel861
-rw-r--r--utils/bazel/llvm-project-overlay/libc/test/src/math/libc_math_test_rules.bzl23
-rw-r--r--utils/bazel/llvm-project-overlay/libc/test/src/math/smoke/BUILD.bazel1233
-rw-r--r--utils/bazel/llvm-project-overlay/libc/test/src/stdlib/BUILD.bazel29
-rw-r--r--utils/bazel/llvm-project-overlay/libc/test/src/string/BUILD.bazel1
-rw-r--r--utils/bazel/llvm-project-overlay/libc/test/src/sys/epoll/BUILD.bazel34
-rw-r--r--utils/bazel/llvm-project-overlay/libc/test/src/unistd/BUILD.bazel7
-rw-r--r--utils/bazel/llvm-project-overlay/libc/utils/MPFRWrapper/BUILD.bazel2
-rw-r--r--utils/bazel/llvm-project-overlay/lld/BUILD.bazel2
-rw-r--r--utils/bazel/llvm-project-overlay/lldb/BUILD.bazel79
-rw-r--r--utils/bazel/llvm-project-overlay/lldb/source/Plugins/BUILD.bazel5
-rw-r--r--utils/bazel/llvm-project-overlay/lldb/tools/lldb-dap/BUILD.bazel62
-rw-r--r--utils/bazel/llvm-project-overlay/llvm/BUILD.bazel116
-rw-r--r--utils/bazel/llvm-project-overlay/llvm/config.bzl5
-rw-r--r--utils/bazel/llvm-project-overlay/llvm/driver.bzl2
-rw-r--r--utils/bazel/llvm-project-overlay/llvm/include/llvm/Config/config.h3
-rw-r--r--utils/bazel/llvm-project-overlay/llvm/unittests/BUILD.bazel23
-rw-r--r--utils/bazel/llvm-project-overlay/llvm/utils/lit/tests/BUILD.bazel12
-rw-r--r--utils/bazel/llvm-project-overlay/mlir/BUILD.bazel361
-rw-r--r--utils/bazel/llvm-project-overlay/mlir/test/BUILD.bazel16
-rw-r--r--utils/bazel/llvm-project-overlay/mlir/test/mlir-tblgen/BUILD.bazel3
-rw-r--r--utils/bazel/llvm-project-overlay/mlir/unittests/BUILD.bazel13
-rw-r--r--utils/bazel/llvm_configs/config.h.cmake7
-rw-r--r--utils/bazel/third_party_build/pybind.BUILD15
42 files changed, 3176 insertions, 1247 deletions
diff --git a/utils/bazel/.bazelrc b/utils/bazel/.bazelrc
index 975667f..d5da8fc 100644
--- a/utils/bazel/.bazelrc
+++ b/utils/bazel/.bazelrc
@@ -6,6 +6,11 @@
# Common flags that apply to all configurations.
# Use sparingly for things common to all compilers and platforms.
###############################################################################
+
+# Flip off to disable MODULE.bazel until we're ready.
+# https://github.com/llvm/llvm-project/issues/55924
+common --enable_bzlmod=false
+
# Prevent invalid caching if input files are modified during a build.
build --experimental_guard_against_concurrent_changes
@@ -204,6 +209,10 @@ build:ci --test_output=errors
# Only show failing tests to reduce output
build:ci --test_summary=terse
+# Attempt to work around intermittent issue while trying to fetch remote blob.
+# See e.g. https://github.com/bazelbuild/bazel/issues/18694.
+build:ci --remote_default_exec_properties=cache-silo-key=CleverPeafowl
+
###############################################################################
# The user.bazelrc file is not checked in but available for local mods.
diff --git a/utils/bazel/.bazelversion b/utils/bazel/.bazelversion
index 5e32542..1502020 100644
--- a/utils/bazel/.bazelversion
+++ b/utils/bazel/.bazelversion
@@ -1 +1 @@
-6.1.2
+7.3.0
diff --git a/utils/bazel/README.md b/utils/bazel/README.md
index ba74947..d3e7f15 100644
--- a/utils/bazel/README.md
+++ b/utils/bazel/README.md
@@ -33,15 +33,31 @@ for adding this configuration.
[bazelisk](https://github.com/bazelbuild/bazelisk) which automates
downloading the proper bazel version
3. `cd utils/bazel`
-4. `bazel build --config=generic_clang @llvm-project//...`
- * If you're using clang, it's expected that lld is also available
- * If you're using MSVC or gcc, instead of `--config=generic_clang`, pass
- `--config=generic_gcc` or `--config=msvc`
- * To specify a specific local compiler to use, add the following bazel
- flag: `--repo_env=CC=/usr/bin/clang`
- * `--config=generic_clang`/`--config=generic_gcc` by default set
- `--repo_env=CC=clang`/`--repo_env=CC=gcc`, using `clang`/`gcc` on the
- `PATH`
+4. The `bazel build` command depends on the local compiler you want to use.
+ * For **clang**, go to step 5.
+ * For **gcc** or **MSVC**, go to step 6
+5. If you are using **clang**, it is expected that lld is also available.
+ The `--config=generic_clang` flag by default sets the compiler to be `clang`
+ binary on the `PATH`.
+ ```
+ bazel build --config=generic_clang @llvm-project//...
+ ```
+ To provide a specific path to your `clang`, use the `--repo_env` Bazel flag.
+ For example:
+ ```
+ bazel build --config=generic_clang --repo_env=CC=/usr/bin/clang --repo_env=CXX=/usr/bin/clang++ @llvm-project//...
+ ```
+6. If you are using **gcc** or **MSVC**, instead of `--config=generic_clang`
+ , pass `--config=generic_gcc` or `--config=generic_msvc`, which sets the
+ compiler to be `gcc` binary on the `PATH`.
+ ```
+ bazel build --config=generic_gcc @llvm-project//...
+ ```
+ To provide a specific path to your `gcc`, use the `--repo_env` Bazel flag.
+ For example:
+ ```
+ bazel build --config=generic_gcc --repo_env=CC=/usr/bin/gcc --repo_env=CXX=/usr/bin/g++ @llvm-project//...
+ ```
# Configuration
@@ -94,17 +110,6 @@ subscribe, it is highly recommended that you set up email filters or some other
mechanism to not flood your inbox. More sophisticated notifications, e.g. only
on status change or routed based on blamelist are TODO (contributions welcome).
-# Pre-merge Testing
-
-A Buildkite pipeline runs the full Bazel build as a pre-merge test using the
-[LLVM pre-merge testing](https://github.com/google/llvm-premerge-checks/). It
-is triggered on all changes to the utils/bazel directory and when the patch
-author is a member of the
-[Bazel Phabricator project](https://reviews.llvm.org/project/members/107/). If
-you use or benefit from the Bazel build, please join the project so that you
-can help keep it green. As a bonus, it runs in under 5 minutes, much faster
-than any of the other pre-merge builds.
-
# Usage in Downstream Projects
To use in dependent projects using Bazel, you can import LLVM and then use the
diff --git a/utils/bazel/WORKSPACE b/utils/bazel/WORKSPACE
index 298b64f..7baca11 100644
--- a/utils/bazel/WORKSPACE
+++ b/utils/bazel/WORKSPACE
@@ -2,7 +2,6 @@
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository", "new_git_repository")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
@@ -29,6 +28,14 @@ llvm_configure(name = "llvm-project")
maybe(
http_archive,
+ name = "rules_python",
+ sha256 = "778aaeab3e6cfd56d681c89f5c10d7ad6bf8d2f1a72de9de55b23081b2d31618",
+ strip_prefix = "rules_python-0.34.0",
+ url = "https://github.com/bazelbuild/rules_python/releases/download/0.34.0/rules_python-0.34.0.tar.gz",
+)
+
+maybe(
+ http_archive,
name = "llvm_zlib",
build_file = "@llvm-raw//utils/bazel/third_party_build:zlib-ng.BUILD",
sha256 = "e36bb346c00472a1f9ff2a0a4643e590a254be6379da7cddd9daeb9a7f296731",
@@ -76,10 +83,11 @@ apple_support_dependencies()
# Note: that building from source requires `m4` to be installed on the host machine.
# This is a known issue: https://github.com/bazelbuild/rules_foreign_cc/issues/755.
-git_repository(
+http_archive(
name = "rules_foreign_cc",
- remote = "https://github.com/bazelbuild/rules_foreign_cc.git",
- tag = "0.9.0",
+ sha256 = "4b33d62cf109bcccf286b30ed7121129cc34cf4f4ed9d8a11f38d9108f40ba74",
+ strip_prefix = "rules_foreign_cc-0.11.1",
+ url = "https://github.com/bazelbuild/rules_foreign_cc/releases/download/0.11.1/rules_foreign_cc-0.11.1.tar.gz",
)
load("@rules_foreign_cc//foreign_cc:repositories.bzl", "rules_foreign_cc_dependencies")
@@ -112,11 +120,12 @@ maybe(
)
maybe(
- new_git_repository,
+ http_archive,
name = "pfm",
build_file = "@llvm-raw//utils/bazel/third_party_build:pfm.BUILD",
- remote = "https://git.code.sf.net/p/perfmon2/libpfm4",
- tag = "v4.12.1",
+ sha256 = "d18b97764c755528c1051d376e33545d0eb60c6ebf85680436813fa5b04cc3d1",
+ strip_prefix = "libpfm-4.13.0",
+ urls = ["https://versaweb.dl.sourceforge.net/project/perfmon2/libpfm4/libpfm-4.13.0.tar.gz"],
)
maybe(
@@ -129,3 +138,21 @@ maybe(
"https://github.com/facebook/zstd/releases/download/v1.5.2/zstd-1.5.2.tar.gz",
],
)
+
+maybe(
+ http_archive,
+ name = "pybind11",
+ build_file = "@llvm-raw//utils/bazel/third_party_build:pybind.BUILD",
+ sha256 = "201966a61dc826f1b1879a24a3317a1ec9214a918c8eb035be2f30c3e9cfbdcb",
+ strip_prefix = "pybind11-2.10.3",
+ url = "https://github.com/pybind/pybind11/archive/v2.10.3.zip",
+)
+
+load("@rules_python//python:repositories.bzl", "py_repositories", "python_register_toolchains")
+
+py_repositories()
+
+python_register_toolchains(
+ name = "python_3_12",
+ python_version = "3.12",
+)
diff --git a/utils/bazel/examples/http_archive/WORKSPACE b/utils/bazel/examples/http_archive/WORKSPACE
index efc3a08..94dffa7 100644
--- a/utils/bazel/examples/http_archive/WORKSPACE
+++ b/utils/bazel/examples/http_archive/WORKSPACE
@@ -39,6 +39,8 @@ load("@llvm-raw//utils/bazel:configure.bzl", "llvm_configure")
llvm_configure(name = "llvm-project")
+load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
+
maybe(
http_archive,
name = "llvm_zlib",
diff --git a/utils/bazel/examples/submodule/WORKSPACE b/utils/bazel/examples/submodule/WORKSPACE
index e8eff85..d6f0a5d 100644
--- a/utils/bazel/examples/submodule/WORKSPACE
+++ b/utils/bazel/examples/submodule/WORKSPACE
@@ -8,6 +8,8 @@ workspace(name = "submodule_example")
SKYLIB_VERSION = "1.0.3"
+load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
+
http_archive(
name = "bazel_skylib",
sha256 = "97e70364e9249702246c0e9444bccdc4b847bed1eb03c5a3ece4f83dfe6abc44",
@@ -28,6 +30,8 @@ load("@llvm-raw//utils/bazel:configure.bzl", "llvm_configure")
llvm_configure(name = "llvm-project")
+load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
+
maybe(
http_archive,
name = "llvm_zlib",
diff --git a/utils/bazel/llvm-project-overlay/bolt/BUILD.bazel b/utils/bazel/llvm-project-overlay/bolt/BUILD.bazel
index 7413b01..907fe10 100644
--- a/utils/bazel/llvm-project-overlay/bolt/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/bolt/BUILD.bazel
@@ -10,6 +10,12 @@ package(
licenses(["notice"])
+genrule(
+ name = "generate_vcs_revision",
+ outs = ["include/VCSVersion.inc"],
+ cmd = "echo '#undef BOLT_REVISION' >> $@\n",
+)
+
cc_binary(
name = "llvm-bolt-heatmap",
srcs = glob([
@@ -114,6 +120,7 @@ cc_library(
textual_hdrs = glob([
"include/bolt/RuntimeLibs/*.h",
]) + ["include/bolt/RuntimeLibs/RuntimeLibraryVariables.inc"],
+ defines=["CMAKE_INSTALL_FULL_LIBDIR=\\\"\\\""],
deps = [
":Core",
":Passes",
@@ -133,6 +140,13 @@ cc_library(
)
cc_library(
+ name = "ProfileHeaders",
+ hdrs = glob(["include/bolt/Profile/*.h"]),
+ includes = ["include"],
+ visibility = ["//visibility:private"],
+)
+
+cc_library(
name = "Profile",
srcs = glob([
"lib/Profile/*.cpp",
@@ -258,6 +272,7 @@ cc_library(
]),
includes = ["include"],
deps = [
+ ":ProfileHeaders",
":Utils",
"//llvm:Analysis",
"//llvm:BinaryFormat",
@@ -281,7 +296,9 @@ cc_library(
srcs = glob([
"lib/Utils/*.cpp",
]),
- hdrs = glob([
+ hdrs = [
+ "include/VCSVersion.inc",
+ ] + glob([
"include/bolt/Utils/*.h",
]),
includes = ["include"],
diff --git a/utils/bazel/llvm-project-overlay/clang-tools-extra/clang-tidy/BUILD.bazel b/utils/bazel/llvm-project-overlay/clang-tools-extra/clang-tidy/BUILD.bazel
index 317863d..57c46c91 100644
--- a/utils/bazel/llvm-project-overlay/clang-tools-extra/clang-tidy/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/clang-tools-extra/clang-tidy/BUILD.bazel
@@ -196,7 +196,10 @@ clang_tidy_library(
clang_tidy_library(
name = "boost",
- deps = [":lib"],
+ deps = [
+ ":lib",
+ ":utils",
+ ],
)
clang_tidy_library(
diff --git a/utils/bazel/llvm-project-overlay/clang-tools-extra/clangd/BUILD.bazel b/utils/bazel/llvm-project-overlay/clang-tools-extra/clangd/BUILD.bazel
index f2aa64b..2ec99aa 100644
--- a/utils/bazel/llvm-project-overlay/clang-tools-extra/clangd/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/clang-tools-extra/clangd/BUILD.bazel
@@ -67,5 +67,6 @@ cc_library(
"//clang:index",
"//llvm:Support",
"//llvm:TargetParser",
+ "//llvm:config",
],
)
diff --git a/utils/bazel/llvm-project-overlay/clang/BUILD.bazel b/utils/bazel/llvm-project-overlay/clang/BUILD.bazel
index 725ac6b..1d0ba8b 100644
--- a/utils/bazel/llvm-project-overlay/clang/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/clang/BUILD.bazel
@@ -4,10 +4,10 @@
load(
"//:vars.bzl",
- "LLVM_VERSION",
"LLVM_VERSION_MAJOR",
"LLVM_VERSION_MINOR",
"LLVM_VERSION_PATCH",
+ "PACKAGE_VERSION",
)
load("//:workspace_root.bzl", "workspace_root")
load("//llvm:binary_alias.bzl", "binary_alias")
@@ -92,6 +92,7 @@ gentbl(
tblgen = ":clang-tblgen",
td_file = "include/clang/Basic/arm_neon.td",
td_srcs = [
+ "include/clang/Basic/arm_immcheck_incl.td",
"include/clang/Basic/arm_neon.td",
"include/clang/Basic/arm_neon_incl.td",
],
@@ -107,6 +108,7 @@ gentbl(
td_file = "include/clang/Basic/arm_fp16.td",
td_srcs = [
"include/clang/Basic/arm_fp16.td",
+ "include/clang/Basic/arm_immcheck_incl.td",
"include/clang/Basic/arm_neon_incl.td",
],
)
@@ -120,6 +122,7 @@ gentbl(
tblgen = ":clang-tblgen",
td_file = "include/clang/Basic/arm_mve.td",
td_srcs = [
+ "include/clang/Basic/arm_immcheck_incl.td",
"include/clang/Basic/arm_mve.td",
"include/clang/Basic/arm_mve_defs.td",
],
@@ -134,6 +137,7 @@ gentbl(
tblgen = ":clang-tblgen",
td_file = "include/clang/Basic/arm_sve.td",
td_srcs = [
+ "include/clang/Basic/arm_immcheck_incl.td",
"include/clang/Basic/arm_sve.td",
"include/clang/Basic/arm_sve_sme_incl.td",
],
@@ -148,12 +152,29 @@ gentbl(
tblgen = ":clang-tblgen",
td_file = "include/clang/Basic/arm_sve.td",
td_srcs = [
+ "include/clang/Basic/arm_immcheck_incl.td",
"include/clang/Basic/arm_sve.td",
"include/clang/Basic/arm_sve_sme_incl.td",
],
)
gentbl(
+ name = "basic_arm_sve_immcheck_types_gen",
+ tbl_outs = [(
+ "-gen-arm-immcheck-types",
+ "include/clang/Basic/arm_immcheck_types.inc",
+ )],
+ tblgen = ":clang-tblgen",
+ td_file = "include/clang/Basic/arm_sve.td",
+ td_srcs = [
+ "include/clang/Basic/arm_immcheck_incl.td",
+ "include/clang/Basic/arm_sve.td",
+ "include/clang/Basic/arm_sve_sme_incl.td",
+ ],
+)
+
+
+gentbl(
name = "basic_arm_sve_typeflags_gen",
tbl_outs = [(
"-gen-arm-sve-typeflags",
@@ -162,6 +183,7 @@ gentbl(
tblgen = ":clang-tblgen",
td_file = "include/clang/Basic/arm_sve.td",
td_srcs = [
+ "include/clang/Basic/arm_immcheck_incl.td",
"include/clang/Basic/arm_sve.td",
"include/clang/Basic/arm_sve_sme_incl.td",
],
@@ -176,6 +198,7 @@ gentbl(
tblgen = ":clang-tblgen",
td_file = "include/clang/Basic/arm_sve.td",
td_srcs = [
+ "include/clang/Basic/arm_immcheck_incl.td",
"include/clang/Basic/arm_sve.td",
"include/clang/Basic/arm_sve_sme_incl.td",
],
@@ -190,6 +213,7 @@ gentbl(
tblgen = ":clang-tblgen",
td_file = "include/clang/Basic/arm_sve.td",
td_srcs = [
+ "include/clang/Basic/arm_immcheck_incl.td",
"include/clang/Basic/arm_sve.td",
"include/clang/Basic/arm_sve_sme_incl.td",
],
@@ -204,6 +228,7 @@ gentbl(
tblgen = ":clang-tblgen",
td_file = "include/clang/Basic/arm_sme.td",
td_srcs = [
+ "include/clang/Basic/arm_immcheck_incl.td",
"include/clang/Basic/arm_sme.td",
"include/clang/Basic/arm_sve_sme_incl.td",
],
@@ -220,6 +245,7 @@ gentbl(
td_srcs = [
"include/clang/Basic/arm_sme.td",
"include/clang/Basic/arm_sve_sme_incl.td",
+ "include/clang/Basic/arm_immcheck_incl.td",
],
)
@@ -232,6 +258,7 @@ gentbl(
tblgen = ":clang-tblgen",
td_file = "include/clang/Basic/arm_sme.td",
td_srcs = [
+ "include/clang/Basic/arm_immcheck_incl.td",
"include/clang/Basic/arm_sme.td",
"include/clang/Basic/arm_sve_sme_incl.td",
],
@@ -246,6 +273,7 @@ gentbl(
tblgen = ":clang-tblgen",
td_file = "include/clang/Basic/arm_sme.td",
td_srcs = [
+ "include/clang/Basic/arm_immcheck_incl.td",
"include/clang/Basic/arm_sme.td",
"include/clang/Basic/arm_sve_sme_incl.td",
],
@@ -260,6 +288,7 @@ gentbl(
tblgen = ":clang-tblgen",
td_file = "include/clang/Basic/arm_sme.td",
td_srcs = [
+ "include/clang/Basic/arm_immcheck_incl.td",
"include/clang/Basic/arm_sme.td",
"include/clang/Basic/arm_sve_sme_incl.td",
],
@@ -553,12 +582,12 @@ genrule(
"echo '#define CLANG_VERSION_MAJOR_STRING \"{major}\"' >> $@\n" +
"echo '#define CLANG_VERSION_MINOR {minor}' >> $@\n" +
"echo '#define CLANG_VERSION_PATCHLEVEL {patch}' >> $@\n" +
- "echo '#define CLANG_VERSION_STRING \"{vers}git\"' >> $@\n"
+ "echo '#define CLANG_VERSION_STRING \"{vers}\"' >> $@\n"
).format(
major = LLVM_VERSION_MAJOR,
minor = LLVM_VERSION_MINOR,
patch = LLVM_VERSION_PATCH,
- vers = LLVM_VERSION,
+ vers = PACKAGE_VERSION,
),
)
@@ -629,6 +658,7 @@ cc_library(
textual_hdrs = [
"include/clang/Basic/arm_fp16.inc",
"include/clang/Basic/arm_mve_builtins.inc",
+ "include/clang/Basic/arm_immcheck_types.inc",
"include/clang/Basic/arm_mve_builtin_aliases.inc",
"include/clang/Basic/arm_mve_builtin_cg.inc",
"include/clang/Basic/arm_mve_builtin_sema.inc",
@@ -852,14 +882,14 @@ gentbl(
)
gentbl(
- name = "ast_interp_opcodes_gen",
+ name = "ast_bytecode_opcodes_gen",
tbl_outs = [(
"-gen-clang-opcodes",
- "lib/AST/Interp/Opcodes.inc",
+ "lib/AST/ByteCode/Opcodes.inc",
)],
tblgen = ":clang-tblgen",
- td_file = "lib/AST/Interp/Opcodes.td",
- td_srcs = ["lib/AST/Interp/Opcodes.td"],
+ td_file = "lib/AST/ByteCode/Opcodes.td",
+ td_srcs = ["lib/AST/ByteCode/Opcodes.td"],
)
gentbl(
@@ -922,11 +952,11 @@ cc_library(
srcs = glob([
"lib/AST/*.cpp",
"lib/AST/*.h",
- "lib/AST/Interp/*.cpp",
- "lib/AST/Interp/*.h",
+ "lib/AST/ByteCode/*.cpp",
+ "lib/AST/ByteCode/*.h",
]) + [
"lib/AST/AttrDocTable.inc",
- "lib/AST/Interp/Opcodes.inc",
+ "lib/AST/ByteCode/Opcodes.inc",
],
hdrs = glob([
"include/clang/AST/*.h",
@@ -942,7 +972,7 @@ cc_library(
# this library because it contains files that collide easily with system
# headers such as `CXXABI.h`.
"-I$(GENDIR)/$(WORKSPACE_ROOT)/clang/lib/AST",
- "-I$(GENDIR)/$(WORKSPACE_ROOT)/clang/lib/AST/Interp",
+ "-I$(GENDIR)/$(WORKSPACE_ROOT)/clang/lib/AST/ByteCode",
],
textual_hdrs = [
"include/clang/AST/AttrImpl.inc",
@@ -972,8 +1002,8 @@ cc_library(
":ast_comment_html_tags_gen",
":ast_comment_html_tags_properties_gen",
":ast_comment_nodes_gen",
+ ":ast_bytecode_opcodes_gen",
":ast_decl_nodes_gen",
- ":ast_interp_opcodes_gen",
":ast_properties_base_gen",
":ast_stmt_data_collectors_gen",
":ast_stmt_nodes_gen",
@@ -1634,6 +1664,7 @@ gentbl(
tblgen = ":clang-tblgen",
td_file = "include/clang/Basic/arm_neon.td",
td_srcs = [
+ "include/clang/Basic/arm_immcheck_incl.td",
"include/clang/Basic/arm_neon.td",
"include/clang/Basic/arm_neon_incl.td",
],
@@ -1649,6 +1680,7 @@ gentbl(
td_file = "include/clang/Basic/arm_fp16.td",
td_srcs = [
"include/clang/Basic/arm_fp16.td",
+ "include/clang/Basic/arm_immcheck_incl.td",
"include/clang/Basic/arm_neon_incl.td",
],
)
@@ -1690,6 +1722,7 @@ gentbl(
tblgen = ":clang-tblgen",
td_file = "include/clang/Basic/arm_sve.td",
td_srcs = [
+ "include/clang/Basic/arm_immcheck_incl.td",
"include/clang/Basic/arm_sve.td",
"include/clang/Basic/arm_sve_sme_incl.td",
],
@@ -1705,6 +1738,7 @@ gentbl(
td_file = "include/clang/Basic/arm_bf16.td",
td_srcs = [
"include/clang/Basic/arm_bf16.td",
+ "include/clang/Basic/arm_immcheck_incl.td",
"include/clang/Basic/arm_neon_incl.td",
],
)
@@ -1722,6 +1756,7 @@ gentbl(
tblgen = ":clang-tblgen",
td_file = "include/clang/Basic/arm_sme.td",
td_srcs = [
+ "include/clang/Basic/arm_immcheck_incl.td",
"include/clang/Basic/arm_sme.td",
"include/clang/Basic/arm_sve_sme_incl.td",
],
@@ -1736,6 +1771,7 @@ gentbl(
tblgen = ":clang-tblgen",
td_file = "include/clang/Basic/arm_neon.td",
td_srcs = [
+ "include/clang/Basic/arm_immcheck_incl.td",
"include/clang/Basic/arm_neon.td",
"include/clang/Basic/arm_neon_incl.td",
],
@@ -1869,11 +1905,19 @@ cc_library(
cc_library(
name = "interpreter",
- srcs = glob([
- "lib/Interpreter/*.cpp",
- "lib/Interpreter/*.h",
- ]),
- hdrs = glob(["include/clang/Interpreter/*.h"]),
+ srcs = glob(
+ [
+ "lib/Interpreter/*.cpp",
+ "lib/Interpreter/*.h",
+ ],
+ exclude = ["lib/Interpreter/Wasm.cpp"],
+ ),
+ hdrs = glob(
+ [
+ "include/clang/Interpreter/*.h",
+ ],
+ exclude = ["lib/Interpreter/Wasm.cpp"],
+ ),
includes = ["include"],
deps = [
":analysis",
@@ -1901,6 +1945,7 @@ cc_library(
"//llvm:Support",
"//llvm:Target",
"//llvm:TargetParser",
+ "//llvm:config",
],
)
@@ -2087,6 +2132,7 @@ cc_library(
"//llvm:BitstreamReader",
"//llvm:BitstreamWriter",
"//llvm:FrontendOpenMP",
+ "//llvm:Object",
"//llvm:Support",
"//llvm:TargetParser",
],
@@ -2206,7 +2252,6 @@ filegroup(
name = "python-sources",
srcs = [
"bindings/python/clang/cindex.py",
- "bindings/python/clang/enumerations.py",
],
)
@@ -2517,6 +2562,7 @@ cc_binary(
"//llvm:Object",
"//llvm:Option",
"//llvm:Passes",
+ "//llvm:Remarks",
"//llvm:Support",
"//llvm:Target",
"//llvm:TargetParser",
@@ -2629,9 +2675,9 @@ cc_library(
"lib/ExtractAPI/**/*.cpp",
]),
hdrs = glob([
- "include/clang/ExtractAPI/**/*.h",
+ "include/clang/ExtractAPI/**/*.h",
]) + [
- "include/clang/ExtractAPI/APIRecords.inc",
+ "include/clang/ExtractAPI/APIRecords.inc",
],
includes = ["include"],
deps = [
diff --git a/utils/bazel/llvm-project-overlay/compiler-rt/BUILD.bazel b/utils/bazel/llvm-project-overlay/compiler-rt/BUILD.bazel
index 9a4e103..9457e44 100644
--- a/utils/bazel/llvm-project-overlay/compiler-rt/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/compiler-rt/BUILD.bazel
@@ -70,6 +70,7 @@ cc_library(
"lib/orc/extensible_rtti.h",
"lib/orc/interval_map.h",
"lib/orc/interval_set.h",
+ "lib/orc/jit_dispatch.h",
"lib/orc/simple_packed_serialization.h",
"lib/orc/stl_extras.h",
"lib/orc/string_pool.h",
diff --git a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
index c3cddf9..b6ccf1a 100644
--- a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
@@ -51,6 +51,13 @@ config_setting(
flag_values = {":mpfr": "system"},
)
+################################## Base Config #################################
+
+cc_library(
+ name = "__support_macros_config",
+ hdrs = ["src/__support/macros/config.h"],
+)
+
################################# Include Files ################################
libc_support_library(
@@ -138,6 +145,16 @@ libc_support_library(
hdrs = ["hdr/float_macros.h"],
)
+libc_support_library(
+ name = "hdr_stdio_macros",
+ hdrs = ["hdr/stdio_macros.h"],
+)
+
+libc_support_library(
+ name = "hdr_limits_macros",
+ hdrs = ["hdr/limits_macros.h"],
+)
+
############################ Type Proxy Header Files ###########################
libc_support_library(
@@ -146,6 +163,11 @@ libc_support_library(
)
libc_support_library(
+ name = "types_clock_t",
+ hdrs = ["hdr/types/clock_t.h"],
+)
+
+libc_support_library(
name = "types_fenv_t",
hdrs = ["hdr/types/fenv_t.h"],
)
@@ -176,10 +198,25 @@ libc_support_library(
)
libc_support_library(
+ name = "types_struct_timeval",
+ hdrs = ["hdr/types/struct_timeval.h"],
+)
+
+libc_support_library(
name = "types_pid_t",
hdrs = ["hdr/types/pid_t.h"],
)
+libc_support_library(
+ name = "types_off_t",
+ hdrs = ["hdr/types/off_t.h"],
+)
+
+libc_support_library(
+ name = "types_FILE",
+ hdrs = ["hdr/types/FILE.h"],
+)
+
############################### Support libraries ##############################
libc_support_library(
@@ -220,11 +257,6 @@ libc_support_library(
)
libc_support_library(
- name = "__support_macros_config",
- hdrs = ["src/__support/macros/config.h"],
-)
-
-libc_support_library(
name = "__support_macros_attributes",
hdrs = ["src/__support/macros/attributes.h"],
deps = [
@@ -251,6 +283,16 @@ libc_support_library(
)
libc_support_library(
+ name = "__support_macros_null_check",
+ hdrs = ["src/__support/macros/null_check.h"],
+ deps = [
+ ":__support_macros_config",
+ ":__support_macros_optimization",
+ ":__support_macros_sanitizer",
+ ],
+)
+
+libc_support_library(
name = "__support_common",
hdrs = [
"src/__support/common.h",
@@ -258,6 +300,7 @@ libc_support_library(
],
deps = [
":__support_macros_attributes",
+ ":__support_macros_config",
":__support_macros_properties_architectures",
],
)
@@ -267,6 +310,7 @@ libc_support_library(
hdrs = ["src/__support/CPP/algorithm.h"],
deps = [
":__support_macros_attributes",
+ ":__support_macros_config",
],
)
@@ -304,6 +348,7 @@ libc_support_library(
hdrs = ["src/__support/CPP/bitset.h"],
deps = [
":__support_macros_attributes",
+ ":__support_macros_config",
],
)
@@ -321,6 +366,7 @@ libc_support_library(
hdrs = ["src/__support/CPP/expected.h"],
deps = [
":__support_macros_attributes",
+ ":__support_macros_config",
],
)
@@ -341,7 +387,7 @@ libc_support_library(
"__support_cpp_type_traits",
"__support_macros_attributes",
":__support_macros_properties_types",
- ":llvm_libc_macros_limits_macros",
+ ":hdr_limits_macros",
],
)
@@ -351,6 +397,7 @@ libc_support_library(
hdrs = ["src/__support/CPP/new.h"],
deps = [
":__support_common",
+ ":__support_macros_properties_os",
],
)
@@ -411,6 +458,7 @@ libc_support_library(
],
deps = [
":__support_macros_attributes",
+ ":__support_macros_config",
":__support_macros_properties_types",
":llvm_libc_macros_stdfix_macros",
],
@@ -560,7 +608,10 @@ libc_support_library(
libc_support_library(
name = "__support_str_to_num_result",
hdrs = ["src/__support/str_to_num_result.h"],
- deps = [":__support_macros_attributes"],
+ deps = [
+ ":__support_macros_attributes",
+ ":__support_macros_config",
+ ],
)
libc_support_library(
@@ -599,7 +650,10 @@ libc_support_library(
libc_support_library(
name = "__support_ctype_utils",
hdrs = ["src/__support/ctype_utils.h"],
- deps = [":__support_macros_attributes"],
+ deps = [
+ ":__support_macros_attributes",
+ ":__support_macros_config",
+ ],
)
libc_support_library(
@@ -630,10 +684,9 @@ libc_support_library(
":__support_cpp_optional",
":__support_cpp_string_view",
":__support_ctype_utils",
- ":__support_fputil_dyadic_float",
- ":__support_fputil_fenv_impl",
":__support_fputil_fp_bits",
":__support_fputil_rounding_mode",
+ ":__support_macros_null_check",
":__support_str_to_integer",
":__support_str_to_num_result",
":__support_uint128",
@@ -643,12 +696,19 @@ libc_support_library(
libc_support_library(
name = "__support_fputil_basic_operations",
- hdrs = ["src/__support/FPUtil/BasicOperations.h"],
+ hdrs = [
+ "src/__support/FPUtil/BasicOperations.h",
+ "src/__support/FPUtil/generic/add_sub.h",
+ "src/__support/FPUtil/generic/div.h",
+ "src/__support/FPUtil/generic/mul.h",
+ ],
deps = [
":__support_common",
":__support_cpp_type_traits",
+ ":__support_fputil_dyadic_float",
":__support_fputil_fenv_impl",
":__support_fputil_fp_bits",
+ ":__support_fputil_rounding_mode",
":__support_macros_optimization",
":__support_uint128",
],
@@ -656,7 +716,10 @@ libc_support_library(
libc_support_library(
name = "__support_file_file",
- srcs = ["src/__support/File/file.cpp"],
+ srcs = [
+ "include/llvm-libc-types/off_t.h",
+ "src/__support/File/file.cpp",
+ ],
hdrs = ["src/__support/File/file.h"],
deps = [
":__support_cpp_new",
@@ -664,6 +727,8 @@ libc_support_library(
":__support_error_or",
":__support_threads_mutex",
":errno",
+ ":hdr_stdio_macros",
+ ":types_off_t",
],
)
@@ -675,6 +740,7 @@ libc_support_library(
":__support_error_or",
":__support_osutil_syscall",
":errno",
+ ":types_off_t",
],
)
@@ -766,6 +832,7 @@ libc_support_library(
hdrs = ["src/__support/FPUtil/rounding_mode.h"],
deps = [
":__support_macros_attributes",
+ ":__support_macros_config",
":hdr_fenv_macros",
],
)
@@ -883,6 +950,7 @@ libc_support_library(
":__support_common",
":__support_cpp_bit",
":__support_cpp_type_traits",
+ ":__support_fputil_dyadic_float",
":__support_fputil_fenv_impl",
":__support_fputil_fp_bits",
":__support_fputil_rounding_mode",
@@ -1013,6 +1081,33 @@ libc_support_library(
)
libc_support_library(
+ name = "__support_osutil_vdso",
+ hdrs = [
+ "src/__support/OSUtil/linux/vdso.h",
+ "src/__support/OSUtil/linux/vdso_sym.h",
+ ],
+ target_compatible_with = select({
+ "@platforms//os:linux": [],
+ "//conditions:default": ["@platforms//:incompatible"],
+ }),
+ textual_hdrs = [
+ "src/__support/OSUtil/linux/riscv/vdso.h",
+ "src/__support/OSUtil/linux/arm/vdso.h",
+ "src/__support/OSUtil/linux/x86_64/vdso.h",
+ "src/__support/OSUtil/linux/aarch64/vdso.h",
+ ],
+ deps = [
+ ":__support_cpp_array",
+ ":__support_cpp_optional",
+ ":__support_cpp_string_view",
+ ":__support_threads_callonce",
+ ":types_clock_t",
+ ":types_clockid_t",
+ ":types_struct_timeval",
+ ],
+)
+
+libc_support_library(
name = "__support_osutil_io",
hdrs = ["src/__support/OSUtil/io.h"],
textual_hdrs = select({
@@ -1096,7 +1191,7 @@ libc_support_library(
":__support_cpp_optional",
":__support_osutil_syscall",
":__support_threads_linux_futex_word_type",
- ":__support_time_linux",
+ ":__support_time_linux_abs_timeout",
":types_struct_timespec",
],
)
@@ -1106,6 +1201,7 @@ libc_support_library(
hdrs = ["src/__support/threads/sleep.h"],
deps = [
":__support_macros_attributes",
+ ":__support_macros_config",
],
)
@@ -1123,10 +1219,12 @@ libc_support_library(
"//conditions:default": ["@platforms//:incompatible"],
}),
deps = [
+ ":__support_cpp_expected",
":__support_cpp_optional",
":__support_threads_linux_futex_utils",
":__support_threads_sleep",
- ":__support_time_linux",
+ ":__support_time_linux_abs_timeout",
+ ":__support_time_linux_monotonicity",
":types_pid_t",
],
)
@@ -1154,6 +1252,25 @@ libc_support_library(
)
libc_support_library(
+ name = "__support_threads_callonce",
+ hdrs = [
+ "src/__support/threads/callonce.h",
+ ],
+ target_compatible_with = select({
+ "@platforms//os:linux": [],
+ "//conditions:default": ["@platforms//:incompatible"],
+ }),
+ textual_hdrs = [
+ "src/__support/threads/linux/callonce.h",
+ ],
+ deps = [
+ ":__support_macros_config",
+ ":__support_macros_optimization",
+ ":__support_threads_linux_futex_utils",
+ ],
+)
+
+libc_support_library(
name = "__support_time",
hdrs = glob(["src/__support/time/*.h"]),
deps = [
@@ -1164,24 +1281,62 @@ libc_support_library(
)
libc_support_library(
- name = "__support_time_linux",
- hdrs = glob(["src/__support/time/linux/**/*.h"]),
+ name = "__support_time_linux_abs_timeout",
+ hdrs = ["src/__support/time/linux/abs_timeout.h"],
target_compatible_with = select({
"@platforms//os:linux": [],
"//conditions:default": ["@platforms//:incompatible"],
}),
deps = [
- ":__support_common",
":__support_cpp_expected",
- ":__support_error_or",
- ":__support_libc_assert",
":__support_time",
":hdr_time_macros",
- ":types_clockid_t",
":types_struct_timespec",
],
)
+libc_support_library(
+ name = "__support_time_linux_clock_conversion",
+ hdrs = ["src/__support/time/linux/clock_conversion.h"],
+ target_compatible_with = select({
+ "@platforms//os:linux": [],
+ "//conditions:default": ["@platforms//:incompatible"],
+ }),
+ deps = [
+ ":__support_time",
+ ":__support_time_linux_clock_gettime",
+ ],
+)
+
+libc_support_library(
+ name = "__support_time_linux_clock_gettime",
+ hdrs = ["src/__support/time/linux/clock_gettime.h"],
+ target_compatible_with = select({
+ "@platforms//os:linux": [],
+ "//conditions:default": ["@platforms//:incompatible"],
+ }),
+ deps = [
+ ":__support_common",
+ ":__support_error_or",
+ ":__support_osutil_vdso",
+ ],
+)
+
+libc_support_library(
+ name = "__support_time_linux_monotonicity",
+ hdrs = ["src/__support/time/linux/monotonicity.h"],
+ target_compatible_with = select({
+ "@platforms//os:linux": [],
+ "//conditions:default": ["@platforms//:incompatible"],
+ }),
+ deps = [
+ ":__support_libc_assert",
+ ":__support_time_linux_abs_timeout",
+ ":__support_time_linux_clock_conversion",
+ ":hdr_time_macros",
+ ],
+)
+
############################### errno targets ################################
libc_function(
@@ -1190,6 +1345,7 @@ libc_function(
hdrs = ["src/errno/libc_errno.h"],
deps = [
":__support_common",
+ ":__support_cpp_atomic",
":__support_macros_attributes",
":__support_macros_properties_architectures",
":hdr_errno_macros",
@@ -1361,7 +1517,7 @@ libc_function(
],
)
-################################ math targets ################################
+########################### math support library ###############################
libc_support_library(
name = "common_constants",
@@ -1389,6 +1545,41 @@ libc_support_library(
)
libc_support_library(
+ name = "range_reduction_double",
+ hdrs = [
+ "src/math/generic/range_reduction_double_common.h",
+ "src/math/generic/range_reduction_double_fma.h",
+ "src/math/generic/range_reduction_double_nofma.h",
+ ],
+ deps = [
+ ":__support_common",
+ ":__support_fputil_double_double",
+ ":__support_fputil_dyadic_float",
+ ":__support_fputil_fp_bits",
+ ":__support_fputil_multiply_add",
+ ":__support_fputil_nearest_integer",
+ ":__support_fputil_rounding_mode",
+ ":__support_integer_literals",
+ ],
+)
+
+libc_support_library(
+ name = "sincos_eval",
+ hdrs = [
+ "src/math/generic/sincos_eval.h",
+ ],
+ deps = [
+ ":__support_common",
+ ":__support_fputil_double_double",
+ ":__support_fputil_dyadic_float",
+ ":__support_fputil_fp_bits",
+ ":__support_fputil_multiply_add",
+ ":__support_fputil_polyeval",
+ ":__support_integer_literals",
+ ],
+)
+
+libc_support_library(
name = "sincosf_utils",
hdrs = ["src/math/generic/sincosf_utils.h"],
deps = [
@@ -1469,26 +1660,29 @@ libc_support_library(
],
)
+################################ math targets ##################################
+
libc_math_function(
- name = "erff",
+ name = "acosf",
additional_deps = [
+ ":__support_fputil_fma",
":__support_fputil_multiply_add",
+ ":__support_fputil_nearest_integer",
":__support_fputil_polyeval",
+ ":__support_fputil_sqrt",
":__support_macros_optimization",
+ ":inv_trigf_utils",
],
)
libc_math_function(
- name = "expm1",
+ name = "acoshf",
additional_deps = [
- ":__support_fputil_double_double",
- ":__support_fputil_dyadic_float",
+ ":__support_fputil_fma",
":__support_fputil_multiply_add",
":__support_fputil_nearest_integer",
":__support_fputil_polyeval",
- ":__support_fputil_rounding_mode",
- ":__support_fputil_triple_double",
- ":__support_integer_literals",
+ ":__support_fputil_sqrt",
":__support_macros_optimization",
":common_constants",
":explogxf",
@@ -1496,30 +1690,27 @@ libc_math_function(
)
libc_math_function(
- name = "expm1f",
+ name = "asinf",
additional_deps = [
":__support_fputil_fma",
":__support_fputil_multiply_add",
":__support_fputil_nearest_integer",
":__support_fputil_polyeval",
- ":__support_fputil_rounding_mode",
+ ":__support_fputil_sqrt",
":__support_macros_optimization",
":__support_macros_properties_cpu_features",
- ":common_constants",
+ ":inv_trigf_utils",
],
)
libc_math_function(
- name = "exp",
+ name = "asinhf",
additional_deps = [
- ":__support_fputil_double_double",
- ":__support_fputil_dyadic_float",
+ ":__support_fputil_fma",
":__support_fputil_multiply_add",
":__support_fputil_nearest_integer",
":__support_fputil_polyeval",
- ":__support_fputil_rounding_mode",
- ":__support_fputil_triple_double",
- ":__support_integer_literals",
+ ":__support_fputil_sqrt",
":__support_macros_optimization",
":common_constants",
":explogxf",
@@ -1527,7 +1718,7 @@ libc_math_function(
)
libc_math_function(
- name = "expf",
+ name = "atanf",
additional_deps = [
":__support_fputil_fma",
":__support_fputil_multiply_add",
@@ -1535,190 +1726,211 @@ libc_math_function(
":__support_fputil_polyeval",
":__support_fputil_rounding_mode",
":__support_macros_optimization",
- ":common_constants",
+ ":inv_trigf_utils",
],
)
libc_math_function(
- name = "exp10",
+ name = "atan2f",
additional_deps = [
":__support_fputil_double_double",
- ":__support_fputil_dyadic_float",
- ":__support_fputil_multiply_add",
":__support_fputil_nearest_integer",
- ":__support_fputil_polyeval",
- ":__support_fputil_rounding_mode",
- ":__support_fputil_triple_double",
- ":__support_integer_literals",
- ":__support_macros_optimization",
- ":common_constants",
- ":explogxf",
+ ":inv_trigf_utils",
],
)
libc_math_function(
- name = "exp10f",
+ name = "atan2",
additional_deps = [
- ":exp10f_impl",
+ ":__support_fputil_double_double",
+ ":__support_fputil_nearest_integer",
+ ":inv_trigf_utils",
],
)
libc_math_function(
- name = "exp2",
+ name = "atanhf",
additional_deps = [
- ":__support_fputil_double_double",
- ":__support_fputil_dyadic_float",
+ ":__support_fputil_fma",
":__support_fputil_multiply_add",
":__support_fputil_nearest_integer",
":__support_fputil_polyeval",
- ":__support_fputil_rounding_mode",
- ":__support_fputil_triple_double",
- ":__support_integer_literals",
":__support_macros_optimization",
":common_constants",
":explogxf",
],
)
+libc_math_function(name = "canonicalize")
+
+libc_math_function(name = "canonicalizef")
+
+libc_math_function(name = "canonicalizel")
+
+libc_math_function(name = "canonicalizef128")
+
libc_math_function(
- name = "exp2f",
+ name = "cbrt",
additional_deps = [
- ":exp2f_impl",
+ ":__support_fputil_double_double",
+ ":__support_fputil_polyeval",
+ ":__support_integer_literals",
],
)
libc_math_function(
- name = "logf",
+ name = "cbrtf",
additional_deps = [
- ":__support_fputil_fma",
- ":__support_fputil_multiply_add",
":__support_fputil_polyeval",
- ":__support_macros_optimization",
- ":__support_macros_properties_cpu_features",
- ":common_constants",
],
)
libc_math_function(
- name = "log2f",
- additional_deps = [
- ":__support_fputil_fma",
- ":__support_fputil_multiply_add",
- ":__support_fputil_polyeval",
- ":__support_macros_optimization",
- ":common_constants",
+ name = "ceil",
+ specializations = [
+ "generic",
],
)
libc_math_function(
- name = "log10f",
+ name = "ceilf",
+ specializations = [
+ "generic",
+ ],
+)
+
+libc_math_function(
+ name = "ceill",
+ specializations = [
+ "generic",
+ ],
+)
+
+libc_math_function(name = "ceilf128")
+
+libc_math_function(name = "copysign")
+
+libc_math_function(name = "copysignf")
+
+libc_math_function(name = "copysignl")
+
+libc_math_function(name = "copysignf128")
+
+libc_math_function(
+ name = "cos",
additional_deps = [
- ":__support_fputil_fma",
":__support_fputil_multiply_add",
- ":__support_fputil_polyeval",
":__support_macros_optimization",
":__support_macros_properties_cpu_features",
- ":common_constants",
+ ":range_reduction_double",
+ ":sincos_eval",
],
)
libc_math_function(
- name = "log1pf",
+ name = "cosf",
additional_deps = [
":__support_fputil_fma",
":__support_fputil_multiply_add",
- ":__support_fputil_polyeval",
":__support_macros_optimization",
":__support_macros_properties_cpu_features",
- ":common_constants",
+ ":sincosf_utils",
],
)
libc_math_function(
- name = "log",
+ name = "coshf",
additional_deps = [
- ":__support_fputil_double_double",
- ":__support_fputil_dyadic_float",
":__support_fputil_fma",
":__support_fputil_multiply_add",
+ ":__support_fputil_nearest_integer",
":__support_fputil_polyeval",
- ":__support_integer_literals",
+ ":__support_fputil_rounding_mode",
":__support_macros_optimization",
- ":__support_macros_properties_cpu_features",
":common_constants",
- ":log_range_reduction",
+ ":explogxf",
],
)
libc_math_function(
- name = "log2",
+ name = "cospif",
additional_deps = [
- ":__support_fputil_double_double",
- ":__support_fputil_dyadic_float",
":__support_fputil_fma",
":__support_fputil_multiply_add",
+ ":__support_fputil_nearest_integer",
":__support_fputil_polyeval",
- ":__support_integer_literals",
+ ":__support_fputil_rounding_mode",
":__support_macros_optimization",
- ":__support_macros_properties_cpu_features",
":common_constants",
- ":log_range_reduction",
+ ":explogxf",
+ ":sincosf_utils",
],
)
+libc_math_function(name = "daddl")
+
+libc_math_function(name = "daddf128")
+
+libc_math_function(name = "ddivl")
+
+libc_math_function(name = "ddivf128")
+
libc_math_function(
- name = "log10",
+ name = "dfmal",
additional_deps = [
- ":__support_fputil_double_double",
- ":__support_fputil_dyadic_float",
":__support_fputil_fma",
- ":__support_fputil_multiply_add",
- ":__support_fputil_polyeval",
- ":__support_integer_literals",
- ":__support_macros_optimization",
- ":__support_macros_properties_cpu_features",
- ":common_constants",
- ":log_range_reduction",
],
)
libc_math_function(
- name = "log1p",
+ name = "dfmaf128",
additional_deps = [
- ":__support_fputil_double_double",
- ":__support_fputil_dyadic_float",
":__support_fputil_fma",
- ":__support_fputil_multiply_add",
- ":__support_fputil_polyeval",
- ":__support_integer_literals",
- ":__support_macros_optimization",
- ":__support_macros_properties_cpu_features",
- ":common_constants",
],
)
+libc_math_function(name = "dmull")
+
+libc_math_function(name = "dmulf128")
+
libc_math_function(
- name = "sinhf",
+ name = "dsqrtl",
+ additional_deps = [
+ ":__support_fputil_sqrt",
+ ],
+)
+
+libc_math_function(
+ name = "dsqrtf128",
+ additional_deps = [
+ ":__support_fputil_sqrt",
+ ],
+)
+
+libc_math_function(name = "dsubl")
+
+libc_math_function(name = "dsubf128")
+
+libc_math_function(
+ name = "erff",
additional_deps = [
- ":__support_fputil_fma",
":__support_fputil_multiply_add",
- ":__support_fputil_nearest_integer",
":__support_fputil_polyeval",
- ":__support_fputil_rounding_mode",
":__support_macros_optimization",
- ":common_constants",
- ":explogxf",
],
)
libc_math_function(
- name = "coshf",
+ name = "exp",
additional_deps = [
- ":__support_fputil_fma",
+ ":__support_fputil_double_double",
+ ":__support_fputil_dyadic_float",
":__support_fputil_multiply_add",
":__support_fputil_nearest_integer",
":__support_fputil_polyeval",
":__support_fputil_rounding_mode",
+ ":__support_fputil_triple_double",
+ ":__support_integer_literals",
":__support_macros_optimization",
":common_constants",
":explogxf",
@@ -1726,7 +1938,7 @@ libc_math_function(
)
libc_math_function(
- name = "tanhf",
+ name = "expf",
additional_deps = [
":__support_fputil_fma",
":__support_fputil_multiply_add",
@@ -1734,20 +1946,21 @@ libc_math_function(
":__support_fputil_polyeval",
":__support_fputil_rounding_mode",
":__support_macros_optimization",
- ":__support_macros_properties_cpu_features",
":common_constants",
- ":explogxf",
],
)
libc_math_function(
- name = "asinhf",
+ name = "exp10",
additional_deps = [
- ":__support_fputil_fma",
+ ":__support_fputil_double_double",
+ ":__support_fputil_dyadic_float",
":__support_fputil_multiply_add",
":__support_fputil_nearest_integer",
":__support_fputil_polyeval",
- ":__support_fputil_sqrt",
+ ":__support_fputil_rounding_mode",
+ ":__support_fputil_triple_double",
+ ":__support_integer_literals",
":__support_macros_optimization",
":common_constants",
":explogxf",
@@ -1755,26 +1968,23 @@ libc_math_function(
)
libc_math_function(
- name = "acoshf",
+ name = "exp10f",
additional_deps = [
- ":__support_fputil_fma",
- ":__support_fputil_multiply_add",
- ":__support_fputil_nearest_integer",
- ":__support_fputil_polyeval",
- ":__support_fputil_sqrt",
- ":__support_macros_optimization",
- ":common_constants",
- ":explogxf",
+ ":exp10f_impl",
],
)
libc_math_function(
- name = "atanhf",
+ name = "exp2",
additional_deps = [
- ":__support_fputil_fma",
+ ":__support_fputil_double_double",
+ ":__support_fputil_dyadic_float",
":__support_fputil_multiply_add",
":__support_fputil_nearest_integer",
":__support_fputil_polyeval",
+ ":__support_fputil_rounding_mode",
+ ":__support_fputil_triple_double",
+ ":__support_integer_literals",
":__support_macros_optimization",
":common_constants",
":explogxf",
@@ -1782,60 +1992,48 @@ libc_math_function(
)
libc_math_function(
- name = "asinf",
+ name = "exp2f",
additional_deps = [
- ":__support_fputil_fma",
- ":__support_fputil_multiply_add",
- ":__support_fputil_nearest_integer",
- ":__support_fputil_polyeval",
- ":__support_fputil_sqrt",
- ":__support_macros_optimization",
- ":__support_macros_properties_cpu_features",
- ":inv_trigf_utils",
+ ":exp2f_impl",
],
)
libc_math_function(
- name = "acosf",
+ name = "exp2m1f",
additional_deps = [
- ":__support_fputil_fma",
- ":__support_fputil_multiply_add",
- ":__support_fputil_nearest_integer",
":__support_fputil_polyeval",
- ":__support_fputil_sqrt",
- ":__support_macros_optimization",
- ":inv_trigf_utils",
+ ":explogxf",
],
)
libc_math_function(
- name = "atanf",
+ name = "expm1",
additional_deps = [
- ":__support_fputil_fma",
+ ":__support_fputil_double_double",
+ ":__support_fputil_dyadic_float",
":__support_fputil_multiply_add",
":__support_fputil_nearest_integer",
":__support_fputil_polyeval",
":__support_fputil_rounding_mode",
+ ":__support_fputil_triple_double",
+ ":__support_integer_literals",
":__support_macros_optimization",
- ":inv_trigf_utils",
+ ":common_constants",
+ ":explogxf",
],
)
libc_math_function(
- name = "powf",
+ name = "expm1f",
additional_deps = [
- ":__support_fputil_double_double",
+ ":__support_fputil_fma",
":__support_fputil_multiply_add",
":__support_fputil_nearest_integer",
":__support_fputil_polyeval",
":__support_fputil_rounding_mode",
- ":__support_fputil_sqrt",
- ":__support_fputil_triple_double",
":__support_macros_optimization",
+ ":__support_macros_properties_cpu_features",
":common_constants",
- ":explogxf",
- ":exp2f_impl",
- ":exp10f_impl",
],
)
@@ -1847,6 +2045,12 @@ libc_math_function(name = "fabsl")
libc_math_function(name = "fabsf128")
+libc_math_function(name = "fadd")
+
+libc_math_function(name = "faddl")
+
+libc_math_function(name = "faddf128")
+
libc_math_function(name = "fdim")
libc_math_function(name = "fdimf")
@@ -1855,35 +2059,36 @@ libc_math_function(name = "fdiml")
libc_math_function(name = "fdimf128")
+libc_math_function(name = "fdiv")
+
+libc_math_function(name = "fdivl")
+
+libc_math_function(name = "fdivf128")
+
libc_math_function(
- name = "ceil",
- specializations = [
- "aarch64",
- "generic",
+ name = "ffma",
+ additional_deps = [
+ ":__support_fputil_fma",
],
)
libc_math_function(
- name = "ceilf",
- specializations = [
- "aarch64",
- "generic",
+ name = "ffmal",
+ additional_deps = [
+ ":__support_fputil_fma",
],
)
libc_math_function(
- name = "ceill",
- specializations = [
- "generic",
+ name = "ffmaf128",
+ additional_deps = [
+ ":__support_fputil_fma",
],
)
-libc_math_function(name = "ceilf128")
-
libc_math_function(
name = "floor",
specializations = [
- "aarch64",
"generic",
],
)
@@ -1891,7 +2096,6 @@ libc_math_function(
libc_math_function(
name = "floorf",
specializations = [
- "aarch64",
"generic",
],
)
@@ -1900,236 +2104,353 @@ libc_math_function(name = "floorl")
libc_math_function(name = "floorf128")
-libc_math_function(name = "ldexp")
+# TODO: Add fma, fmaf, fmal, fmaf128 functions.
-libc_math_function(name = "ldexpf")
+libc_math_function(name = "fmax")
-libc_math_function(name = "ldexpl")
+libc_math_function(name = "fmaxf")
-libc_math_function(name = "ldexpf128")
+libc_math_function(name = "fmaxl")
+
+libc_math_function(name = "fmaxf128")
+
+libc_math_function(name = "fmaximum")
+
+libc_math_function(name = "fmaximumf")
+
+libc_math_function(name = "fmaximuml")
+
+libc_math_function(name = "fmaximumf128")
+
+libc_math_function(name = "fmaximum_mag")
+
+libc_math_function(name = "fmaximum_magf")
+
+libc_math_function(name = "fmaximum_magl")
+
+libc_math_function(name = "fmaximum_magf128")
+
+libc_math_function(name = "fmaximum_mag_num")
+
+libc_math_function(name = "fmaximum_mag_numf")
+
+libc_math_function(name = "fmaximum_mag_numl")
+
+libc_math_function(name = "fmaximum_mag_numf128")
+
+libc_math_function(name = "fmaximum_num")
+
+libc_math_function(name = "fmaximum_numf")
+
+libc_math_function(name = "fmaximum_numl")
+
+libc_math_function(name = "fmaximum_numf128")
+
+libc_math_function(name = "fmin")
+
+libc_math_function(name = "fminf")
+
+libc_math_function(name = "fminl")
+
+libc_math_function(name = "fminf128")
+
+libc_math_function(name = "fminimum")
+
+libc_math_function(name = "fminimumf")
+
+libc_math_function(name = "fminimuml")
+
+libc_math_function(name = "fminimumf128")
+
+libc_math_function(name = "fminimum_mag")
+
+libc_math_function(name = "fminimum_magf")
+
+libc_math_function(name = "fminimum_magl")
+
+libc_math_function(name = "fminimum_magf128")
+
+libc_math_function(name = "fminimum_mag_num")
+
+libc_math_function(name = "fminimum_mag_numf")
+
+libc_math_function(name = "fminimum_mag_numl")
+
+libc_math_function(name = "fminimum_mag_numf128")
+
+libc_math_function(name = "fminimum_num")
+
+libc_math_function(name = "fminimum_numf")
+
+libc_math_function(name = "fminimum_numl")
+
+libc_math_function(name = "fminimum_numf128")
libc_math_function(
- name = "trunc",
- specializations = [
- "aarch64",
- "generic",
+ name = "fmod",
+ additional_deps = [
+ ":__support_fputil_generic_fmod",
],
)
libc_math_function(
- name = "truncf",
- specializations = [
- "aarch64",
- "generic",
+ name = "fmodf",
+ additional_deps = [
+ ":__support_fputil_generic_fmod",
],
)
-libc_math_function(name = "truncl")
-
-libc_math_function(name = "truncf128")
+libc_math_function(
+ name = "fmodl",
+ additional_deps = [
+ ":__support_fputil_generic_fmod",
+ ],
+)
libc_math_function(
- name = "round",
- specializations = [
- "aarch64",
- "generic",
+ name = "fmodf128",
+ additional_deps = [
+ ":__support_fputil_generic_fmod",
],
)
libc_math_function(
- name = "roundf",
- specializations = [
- "aarch64",
- "generic",
+ name = "fmul",
+ additional_deps = [
+ ":__support_fputil_double_double",
],
)
-libc_math_function(name = "roundl")
+libc_math_function(name = "fmull")
-libc_math_function(name = "roundf128")
+libc_math_function(name = "fmulf128")
+
+libc_math_function(name = "frexp")
+
+libc_math_function(name = "frexpf")
+
+libc_math_function(name = "frexpl")
+
+libc_math_function(name = "frexpf128")
+
+libc_math_function(name = "fromfp")
+
+libc_math_function(name = "fromfpf")
+
+libc_math_function(name = "fromfpl")
+
+libc_math_function(name = "fromfpf128")
+
+libc_math_function(name = "fromfpx")
+
+libc_math_function(name = "fromfpxf")
+
+libc_math_function(name = "fromfpxl")
+
+libc_math_function(name = "fromfpxf128")
libc_math_function(
- name = "fmod",
+ name = "fsqrt",
additional_deps = [
- ":__support_fputil_generic_fmod",
+ ":__support_fputil_sqrt",
],
)
libc_math_function(
- name = "fmodf",
+ name = "fsqrtl",
additional_deps = [
- ":__support_fputil_generic_fmod",
+ ":__support_fputil_sqrt",
],
)
-libc_math_function(name = "frexp")
+libc_math_function(
+ name = "fsqrtf128",
+ additional_deps = [
+ ":__support_fputil_sqrt",
+ ],
+)
-libc_math_function(name = "frexpf")
+libc_math_function(name = "fsub")
-libc_math_function(name = "frexpl")
+libc_math_function(name = "fsubl")
-libc_math_function(name = "frexpf128")
+libc_math_function(name = "fsubf128")
+
+libc_math_function(name = "getpayload")
+
+libc_math_function(name = "getpayloadf")
+
+libc_math_function(name = "getpayloadl")
+
+libc_math_function(name = "getpayloadf128")
libc_math_function(name = "hypot")
libc_math_function(
name = "hypotf",
additional_deps = [
+ ":__support_fputil_double_double",
":__support_fputil_sqrt",
],
)
-libc_math_function(name = "logb")
-
-libc_math_function(name = "logbf")
-
-libc_math_function(name = "logbl")
+libc_math_function(name = "ilogb")
-libc_math_function(name = "logbf128")
+libc_math_function(name = "ilogbf")
-libc_math_function(name = "modf")
+libc_math_function(name = "ilogbl")
-libc_math_function(name = "modff")
+libc_math_function(name = "ilogbf128")
-libc_math_function(name = "modfl")
+libc_math_function(name = "ldexp")
-libc_math_function(name = "modff128")
+libc_math_function(name = "ldexpf")
-libc_math_function(name = "remquo")
+libc_math_function(name = "ldexpl")
-libc_math_function(name = "remquof")
+libc_math_function(name = "ldexpf128")
-libc_math_function(name = "remquol")
+libc_math_function(name = "llogb")
-libc_math_function(name = "remainder")
+libc_math_function(name = "llogbf")
-libc_math_function(name = "remainderf")
+libc_math_function(name = "llogbl")
-libc_math_function(name = "remainderl")
+libc_math_function(name = "llogbf128")
-libc_math_function(name = "fmin")
+libc_math_function(name = "llrint")
-libc_math_function(name = "fminf")
+libc_math_function(name = "llrintf")
-libc_math_function(name = "fminl")
+libc_math_function(name = "llrintl")
-libc_math_function(name = "fminf128")
+libc_math_function(name = "llrintf128")
-libc_math_function(name = "fmax")
+libc_math_function(name = "llround")
-libc_math_function(name = "fmaxf")
+libc_math_function(name = "llroundf")
-libc_math_function(name = "fmaxl")
+libc_math_function(name = "llroundl")
-libc_math_function(name = "fmaxf128")
+libc_math_function(name = "llroundf128")
libc_math_function(
- name = "cosf",
+ name = "log",
additional_deps = [
+ ":__support_fputil_double_double",
+ ":__support_fputil_dyadic_float",
":__support_fputil_fma",
":__support_fputil_multiply_add",
+ ":__support_fputil_polyeval",
+ ":__support_integer_literals",
":__support_macros_optimization",
":__support_macros_properties_cpu_features",
- ":sincosf_utils",
+ ":common_constants",
+ ":log_range_reduction",
],
)
libc_math_function(
- name = "sincosf",
+ name = "logf",
additional_deps = [
":__support_fputil_fma",
":__support_fputil_multiply_add",
- ":__support_fputil_rounding_mode",
+ ":__support_fputil_polyeval",
":__support_macros_optimization",
":__support_macros_properties_cpu_features",
- ":sincosf_utils",
+ ":common_constants",
],
)
libc_math_function(
- name = "sinf",
+ name = "log10",
additional_deps = [
+ ":__support_fputil_double_double",
+ ":__support_fputil_dyadic_float",
":__support_fputil_fma",
":__support_fputil_multiply_add",
":__support_fputil_polyeval",
- ":__support_fputil_rounding_mode",
+ ":__support_integer_literals",
":__support_macros_optimization",
":__support_macros_properties_cpu_features",
- ":range_reduction",
- ":sincosf_utils",
+ ":common_constants",
+ ":log_range_reduction",
],
)
libc_math_function(
- name = "tanf",
+ name = "log10f",
additional_deps = [
":__support_fputil_fma",
":__support_fputil_multiply_add",
- ":__support_fputil_nearest_integer",
":__support_fputil_polyeval",
":__support_macros_optimization",
":__support_macros_properties_cpu_features",
- ":range_reduction",
- ":sincosf_utils",
- ],
-)
-
-libc_math_function(
- name = "sqrt",
- additional_deps = [
- ":__support_fputil_sqrt",
+ ":common_constants",
],
)
libc_math_function(
- name = "sqrtf",
+ name = "log1p",
additional_deps = [
- ":__support_fputil_sqrt",
+ ":__support_fputil_double_double",
+ ":__support_fputil_dyadic_float",
+ ":__support_fputil_fma",
+ ":__support_fputil_multiply_add",
+ ":__support_fputil_polyeval",
+ ":__support_integer_literals",
+ ":__support_macros_optimization",
+ ":__support_macros_properties_cpu_features",
+ ":common_constants",
],
)
libc_math_function(
- name = "sqrtl",
+ name = "log1pf",
additional_deps = [
- ":__support_fputil_sqrt",
+ ":__support_fputil_fma",
+ ":__support_fputil_multiply_add",
+ ":__support_fputil_polyeval",
+ ":__support_macros_optimization",
+ ":__support_macros_properties_cpu_features",
+ ":common_constants",
],
)
libc_math_function(
- name = "sqrtf128",
+ name = "log2",
additional_deps = [
- ":__support_fputil_sqrt",
+ ":__support_fputil_double_double",
+ ":__support_fputil_dyadic_float",
+ ":__support_fputil_fma",
+ ":__support_fputil_multiply_add",
+ ":__support_fputil_polyeval",
+ ":__support_integer_literals",
+ ":__support_macros_optimization",
+ ":__support_macros_properties_cpu_features",
+ ":common_constants",
+ ":log_range_reduction",
],
)
-libc_math_function(name = "copysign")
-
-libc_math_function(name = "copysignf")
-
-libc_math_function(name = "copysignl")
-
libc_math_function(
- name = "copysignf128",
+ name = "log2f",
additional_deps = [
- ":llvm_libc_types_float128",
+ ":__support_fputil_fma",
+ ":__support_fputil_multiply_add",
+ ":__support_fputil_polyeval",
+ ":__support_macros_optimization",
+ ":common_constants",
],
)
-libc_math_function(name = "ilogb")
-
-libc_math_function(name = "ilogbf")
-
-libc_math_function(name = "ilogbl")
-
-libc_math_function(name = "ilogbf128")
-
-libc_math_function(name = "rint")
+libc_math_function(name = "logb")
-libc_math_function(name = "rintf")
+libc_math_function(name = "logbf")
-libc_math_function(name = "rintl")
+libc_math_function(name = "logbl")
-libc_math_function(name = "rintf128")
+libc_math_function(name = "logbf128")
libc_math_function(name = "lrint")
@@ -2139,14 +2460,6 @@ libc_math_function(name = "lrintl")
libc_math_function(name = "lrintf128")
-libc_math_function(name = "llrint")
-
-libc_math_function(name = "llrintf")
-
-libc_math_function(name = "llrintl")
-
-libc_math_function(name = "llrintf128")
-
libc_math_function(name = "lround")
libc_math_function(name = "lroundf")
@@ -2155,13 +2468,13 @@ libc_math_function(name = "lroundl")
libc_math_function(name = "lroundf128")
-libc_math_function(name = "llround")
+libc_math_function(name = "modf")
-libc_math_function(name = "llroundf")
+libc_math_function(name = "modff")
-libc_math_function(name = "llroundl")
+libc_math_function(name = "modfl")
-libc_math_function(name = "llroundf128")
+libc_math_function(name = "modff128")
libc_math_function(
name = "nan",
@@ -2201,6 +2514,8 @@ libc_math_function(name = "nearbyintf")
libc_math_function(name = "nearbyintl")
+libc_math_function(name = "nearbyintf128")
+
libc_math_function(name = "nextafter")
libc_math_function(name = "nextafterf")
@@ -2209,18 +2524,326 @@ libc_math_function(name = "nextafterl")
libc_math_function(name = "nextafterf128")
+libc_math_function(name = "nextdown")
+
+libc_math_function(name = "nextdownf")
+
+libc_math_function(name = "nextdownl")
+
+libc_math_function(name = "nextdownf128")
+
libc_math_function(name = "nexttoward")
libc_math_function(name = "nexttowardf")
libc_math_function(name = "nexttowardl")
+libc_math_function(name = "nextup")
+
+libc_math_function(name = "nextupf")
+
+libc_math_function(name = "nextupl")
+
+libc_math_function(name = "nextupf128")
+
+libc_math_function(
+ name = "pow",
+ additional_deps = [
+ ":__support_fputil_double_double",
+ ":__support_fputil_nearest_integer",
+ ":__support_fputil_polyeval",
+ ":__support_fputil_sqrt",
+ ":common_constants",
+ ],
+)
+
+libc_math_function(
+ name = "powf",
+ additional_deps = [
+ ":__support_fputil_double_double",
+ ":__support_fputil_multiply_add",
+ ":__support_fputil_nearest_integer",
+ ":__support_fputil_polyeval",
+ ":__support_fputil_rounding_mode",
+ ":__support_fputil_sqrt",
+ ":__support_fputil_triple_double",
+ ":__support_macros_optimization",
+ ":common_constants",
+ ":explogxf",
+ ":exp2f_impl",
+ ":exp10f_impl",
+ ],
+)
+
+libc_math_function(name = "remainder")
+
+libc_math_function(name = "remainderf")
+
+libc_math_function(name = "remainderl")
+
+libc_math_function(name = "remainderf128")
+
+libc_math_function(name = "remquo")
+
+libc_math_function(name = "remquof")
+
+libc_math_function(name = "remquol")
+
+libc_math_function(name = "remquof128")
+
+libc_math_function(name = "rint")
+
+libc_math_function(name = "rintf")
+
+libc_math_function(name = "rintl")
+
+libc_math_function(name = "rintf128")
+
+libc_math_function(
+ name = "round",
+ specializations = [
+ "generic",
+ ],
+)
+
+libc_math_function(
+ name = "roundf",
+ specializations = [
+ "generic",
+ ],
+)
+
+libc_math_function(name = "roundl")
+
+libc_math_function(name = "roundf128")
+
+libc_math_function(name = "roundeven")
+
+libc_math_function(name = "roundevenf")
+
+libc_math_function(name = "roundevenl")
+
+libc_math_function(name = "roundevenf128")
+
+libc_math_function(name = "scalbln")
+
+libc_math_function(name = "scalblnf")
+
+libc_math_function(name = "scalblnl")
+
+libc_math_function(name = "scalblnf128")
+
libc_math_function(name = "scalbn")
libc_math_function(name = "scalbnf")
libc_math_function(name = "scalbnl")
+libc_math_function(name = "scalbnf128")
+
+libc_math_function(name = "setpayload")
+
+libc_math_function(name = "setpayloadf")
+
+libc_math_function(name = "setpayloadl")
+
+libc_math_function(name = "setpayloadf128")
+
+libc_math_function(name = "setpayloadsig")
+
+libc_math_function(name = "setpayloadsigf")
+
+libc_math_function(name = "setpayloadsigl")
+
+libc_math_function(name = "setpayloadsigf128")
+
+libc_math_function(
+ name = "sin",
+ additional_deps = [
+ ":__support_fputil_multiply_add",
+ ":__support_macros_optimization",
+ ":__support_macros_properties_cpu_features",
+ ":range_reduction_double",
+ ":sincos_eval",
+ ],
+)
+
+libc_math_function(
+ name = "sinf",
+ additional_deps = [
+ ":__support_fputil_fma",
+ ":__support_fputil_multiply_add",
+ ":__support_fputil_polyeval",
+ ":__support_fputil_rounding_mode",
+ ":__support_macros_optimization",
+ ":__support_macros_properties_cpu_features",
+ ":range_reduction",
+ ":sincosf_utils",
+ ],
+)
+
+libc_math_function(
+ name = "sincos",
+ additional_deps = [
+ ":__support_fputil_multiply_add",
+ ":__support_macros_optimization",
+ ":__support_macros_properties_cpu_features",
+ ":range_reduction_double",
+ ":sincos_eval",
+ ],
+)
+
+libc_math_function(
+ name = "sincosf",
+ additional_deps = [
+ ":__support_fputil_fma",
+ ":__support_fputil_multiply_add",
+ ":__support_fputil_rounding_mode",
+ ":__support_macros_optimization",
+ ":__support_macros_properties_cpu_features",
+ ":sincosf_utils",
+ ],
+)
+
+libc_math_function(
+ name = "sinhf",
+ additional_deps = [
+ ":__support_fputil_fma",
+ ":__support_fputil_multiply_add",
+ ":__support_fputil_nearest_integer",
+ ":__support_fputil_polyeval",
+ ":__support_fputil_rounding_mode",
+ ":__support_macros_optimization",
+ ":common_constants",
+ ":explogxf",
+ ],
+)
+
+libc_math_function(
+ name = "sinpif",
+ additional_deps = [
+ ":sincosf_utils",
+ ],
+)
+
+libc_math_function(
+ name = "sqrt",
+ additional_deps = [
+ ":__support_fputil_sqrt",
+ ],
+)
+
+libc_math_function(
+ name = "sqrtf",
+ additional_deps = [
+ ":__support_fputil_sqrt",
+ ],
+)
+
+libc_math_function(
+ name = "sqrtl",
+ additional_deps = [
+ ":__support_fputil_sqrt",
+ ],
+)
+
+libc_math_function(
+ name = "sqrtf128",
+ additional_deps = [
+ ":__support_fputil_sqrt",
+ ],
+)
+
+libc_math_function(
+ name = "tan",
+ additional_deps = [
+ ":__support_fputil_multiply_add",
+ ":__support_macros_optimization",
+ ":__support_macros_properties_cpu_features",
+ ":range_reduction_double",
+ ":sincos_eval",
+ ],
+)
+
+libc_math_function(
+ name = "tanf",
+ additional_deps = [
+ ":__support_fputil_fma",
+ ":__support_fputil_multiply_add",
+ ":__support_fputil_nearest_integer",
+ ":__support_fputil_polyeval",
+ ":__support_macros_optimization",
+ ":__support_macros_properties_cpu_features",
+ ":range_reduction",
+ ":sincosf_utils",
+ ],
+)
+
+libc_math_function(
+ name = "tanhf",
+ additional_deps = [
+ ":__support_fputil_fma",
+ ":__support_fputil_multiply_add",
+ ":__support_fputil_nearest_integer",
+ ":__support_fputil_polyeval",
+ ":__support_fputil_rounding_mode",
+ ":__support_macros_optimization",
+ ":__support_macros_properties_cpu_features",
+ ":common_constants",
+ ":explogxf",
+ ],
+)
+
+libc_math_function(name = "totalorder")
+
+libc_math_function(name = "totalorderf")
+
+libc_math_function(name = "totalorderl")
+
+libc_math_function(name = "totalorderf128")
+
+libc_math_function(name = "totalordermag")
+
+libc_math_function(name = "totalordermagf")
+
+libc_math_function(name = "totalordermagl")
+
+libc_math_function(name = "totalordermagf128")
+
+libc_math_function(
+ name = "trunc",
+ specializations = [
+ "generic",
+ ],
+)
+
+libc_math_function(
+ name = "truncf",
+ specializations = [
+ "generic",
+ ],
+)
+
+libc_math_function(name = "truncl")
+
+libc_math_function(name = "truncf128")
+
+libc_math_function(name = "ufromfp")
+
+libc_math_function(name = "ufromfpf")
+
+libc_math_function(name = "ufromfpl")
+
+libc_math_function(name = "ufromfpf128")
+
+libc_math_function(name = "ufromfpx")
+
+libc_math_function(name = "ufromfpxf")
+
+libc_math_function(name = "ufromfpxl")
+
+libc_math_function(name = "ufromfpxf128")
+
############################## inttypes targets ##############################
libc_function(
@@ -2360,9 +2983,15 @@ libc_function(
libc_support_library(
name = "qsort_util",
- hdrs = ["src/stdlib/qsort_util.h"],
+ hdrs = [
+ "src/stdlib/heap_sort.h",
+ "src/stdlib/qsort_data.h",
+ "src/stdlib/qsort_util.h",
+ "src/stdlib/quick_sort.h",
+ ],
deps = [
":__support_common",
+ ":__support_cpp_cstddef",
":__support_macros_attributes",
],
)
@@ -2975,17 +3604,6 @@ libc_function(
)
libc_function(
- name = "getpid",
- srcs = ["src/unistd/linux/getpid.cpp"],
- hdrs = ["src/unistd/getpid.h"],
- deps = [
- ":__support_common",
- ":__support_osutil_syscall",
- ":errno",
- ],
-)
-
-libc_function(
name = "getppid",
srcs = ["src/unistd/linux/getppid.cpp"],
hdrs = ["src/unistd/getppid.h"],
@@ -3374,6 +3992,7 @@ libc_support_library(
":__support_macros_attributes",
":printf_main",
":printf_writer",
+ ":types_FILE",
],
)
@@ -3410,18 +4029,20 @@ libc_function(
":__support_arg_list",
":__support_file_file",
":errno",
+ ":types_FILE",
":vfprintf_internal",
],
)
libc_function(
name = "fprintf",
- srcs = ["src/stdio/fprintf.cpp"],
+ srcs = ["src/stdio/generic/fprintf.cpp"],
hdrs = ["src/stdio/fprintf.h"],
deps = [
":__support_arg_list",
":__support_file_file",
":errno",
+ ":types_FILE",
":vfprintf_internal",
],
)
@@ -3459,18 +4080,20 @@ libc_function(
":__support_arg_list",
":__support_file_file",
":errno",
+ ":types_FILE",
":vfprintf_internal",
],
)
libc_function(
name = "vfprintf",
- srcs = ["src/stdio/vfprintf.cpp"],
+ srcs = ["src/stdio/generic/vfprintf.cpp"],
hdrs = ["src/stdio/vfprintf.h"],
deps = [
":__support_arg_list",
":__support_file_file",
":errno",
+ ":types_FILE",
":vfprintf_internal",
],
)
@@ -3483,6 +4106,7 @@ libc_function(
":__support_common",
":__support_osutil_syscall",
":errno",
+ ":types_FILE",
],
)
@@ -3615,25 +4239,23 @@ libc_function(
],
)
-#TODO: Enable once epoll_pwait2 availablilty can be checked first.
-# https://github.com/llvm/llvm-project/issues/80060
-# libc_function(
-# name = "epoll_pwait2",
-# srcs = ["src/sys/epoll/linux/epoll_pwait2.cpp"],
-# hdrs = ["src/sys/epoll/epoll_pwait2.h"],
-# target_compatible_with = select({
-# "@platforms//os:linux": [],
-# "//conditions:default": ["@platforms//:incompatible"],
-# }),
-# weak = True,
-# deps = [
-# ":__support_macros_sanitizer",
-# ":__support_osutil_syscall",
-# ":errno",
-# ":hdr_signal_macros",
-# ":hdr_sys_epoll_macros",
-# ":types_sigset_t",
-# ":types_struct_epoll_event",
-# ":types_struct_timespec",
-# ],
-# )
+libc_function(
+ name = "epoll_pwait2",
+ srcs = ["src/sys/epoll/linux/epoll_pwait2.cpp"],
+ hdrs = ["src/sys/epoll/epoll_pwait2.h"],
+ target_compatible_with = select({
+ "@platforms//os:linux": [],
+ "//conditions:default": ["@platforms//:incompatible"],
+ }),
+ weak = True,
+ deps = [
+ ":__support_macros_sanitizer",
+ ":__support_osutil_syscall",
+ ":errno",
+ ":hdr_signal_macros",
+ ":hdr_sys_epoll_macros",
+ ":types_sigset_t",
+ ":types_struct_epoll_event",
+ ":types_struct_timespec",
+ ],
+)
diff --git a/utils/bazel/llvm-project-overlay/libc/libc_configure_options.bzl b/utils/bazel/llvm-project-overlay/libc/libc_configure_options.bzl
index f780c32..f65da9e 100644
--- a/utils/bazel/llvm-project-overlay/libc/libc_configure_options.bzl
+++ b/utils/bazel/llvm-project-overlay/libc/libc_configure_options.bzl
@@ -25,7 +25,7 @@ LIBC_CONFIGURE_OPTIONS = [
# "LIBC_COPT_MEMCPY_USE_EMBEDDED_TINY",
# "LIBC_COPT_MEMCPY_X86_USE_REPMOVSB_FROM_SIZE",
# "LIBC_COPT_MEMCPY_X86_USE_SOFTWARE_PREFETCHING",
- # "LIBC_COPT_MEMSET_X86_USE_SOFTWARE_PREFETCHING",
+ "LIBC_COPT_MEMSET_X86_USE_SOFTWARE_PREFETCHING",
# Documentation in libc/docs/dev/printf_behavior.rst
# "LIBC_COPT_PRINTF_CONV_ATLAS",
diff --git a/utils/bazel/llvm-project-overlay/libc/test/UnitTest/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/test/UnitTest/BUILD.bazel
index 6126a4a..3e130cd 100644
--- a/utils/bazel/llvm-project-overlay/libc/test/UnitTest/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libc/test/UnitTest/BUILD.bazel
@@ -18,6 +18,7 @@ libc_support_library(
"//libc:__support_big_int",
"//libc:__support_cpp_string",
"//libc:__support_cpp_string_view",
+ "//libc:__support_macros_config",
"//libc:__support_macros_properties_types",
"//libc:__support_osutil_io",
"//libc:__support_uint128",
@@ -52,6 +53,7 @@ libc_support_library(
"//libc:__support_fputil_fp_bits",
"//libc:__support_fputil_fpbits_str",
"//libc:__support_fputil_rounding_mode",
+ "//libc:__support_macros_config",
"//libc:__support_macros_properties_architectures",
"//libc:__support_macros_properties_types",
"//libc:__support_stringutil",
@@ -89,10 +91,11 @@ libc_support_library(
"//libc:__support_fputil_fp_bits",
"//libc:__support_fputil_fpbits_str",
"//libc:__support_fputil_rounding_mode",
+ "//libc:__support_macros_config",
"//libc:__support_macros_properties_architectures",
+ "//libc:hdr_fenv_macros",
"//libc:hdr_math_macros",
- "//libc:hdr_fenv_macros",
- "//libc:types_fenv_t",
+ "//libc:types_fenv_t",
],
)
@@ -110,6 +113,7 @@ libc_support_library(
"//libc:__support_cpp_bitset",
"//libc:__support_cpp_span",
"//libc:__support_cpp_type_traits",
+ "//libc:__support_macros_config",
],
)
@@ -125,6 +129,7 @@ libc_support_library(
":LibcUnitTest",
":string_utils",
"//libc:__support_fputil_fp_bits",
+ "//libc:__support_macros_config",
"//libc:printf_core_structs",
],
)
@@ -138,5 +143,6 @@ libc_support_library(
"//libc:__support_big_int",
"//libc:__support_cpp_string",
"//libc:__support_cpp_type_traits",
+ "//libc:__support_macros_config",
],
)
diff --git a/utils/bazel/llvm-project-overlay/libc/test/libc_test_rules.bzl b/utils/bazel/llvm-project-overlay/libc/test/libc_test_rules.bzl
index ae24a41..1da0a24 100644
--- a/utils/bazel/llvm-project-overlay/libc/test/libc_test_rules.bzl
+++ b/utils/bazel/llvm-project-overlay/libc/test/libc_test_rules.bzl
@@ -34,6 +34,7 @@ def libc_test(name, srcs, libc_function_deps = [], copts = [], deps = [], local_
local_defines = local_defines + LIBC_CONFIGURE_OPTIONS,
deps = [libc_internal_target(d) for d in all_function_deps] + [
"//libc/test/UnitTest:LibcUnitTest",
+ "//libc:__support_macros_config",
] + deps,
features = ["-link_llvmlibc"], # Do not link libllvmlibc.a
copts = copts + libc_common_copts(),
diff --git a/utils/bazel/llvm-project-overlay/libc/test/src/__support/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/test/src/__support/BUILD.bazel
index c8001fe..fae0482 100644
--- a/utils/bazel/llvm-project-overlay/libc/test/src/__support/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libc/test/src/__support/BUILD.bazel
@@ -79,6 +79,7 @@ libc_test(
srcs = ["arg_list_test.cpp"],
deps = [
"//libc:__support_arg_list",
+ "//libc:__support_macros_properties_os",
],
)
diff --git a/utils/bazel/llvm-project-overlay/libc/test/src/__support/FPUtil/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/test/src/__support/FPUtil/BUILD.bazel
index 41b85d2..d3ae91a 100644
--- a/utils/bazel/llvm-project-overlay/libc/test/src/__support/FPUtil/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libc/test/src/__support/FPUtil/BUILD.bazel
@@ -17,6 +17,7 @@ libc_test(
"//libc:__support_fputil_fp_bits",
"//libc:__support_fputil_fpbits_str",
"//libc:__support_integer_literals",
+ "//libc:__support_macros_properties_types",
"//libc:__support_sign",
],
)
@@ -41,7 +42,7 @@ libc_test(
deps = [
"//libc:__support_fputil_rounding_mode",
"//libc:__support_uint128",
+ "//libc:hdr_fenv_macros",
"//libc/utils/MPFRWrapper:mpfr_wrapper",
- "//libc:hdr_fenv_macros",
],
)
diff --git a/utils/bazel/llvm-project-overlay/libc/test/src/fenv/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/test/src/fenv/BUILD.bazel
index 03c94d1..c6ae534 100644
--- a/utils/bazel/llvm-project-overlay/libc/test/src/fenv/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libc/test/src/fenv/BUILD.bazel
@@ -171,6 +171,7 @@ libc_test(
],
deps = [
"//libc:__support_fputil_fenv_impl",
+ "//libc:__support_macros_properties_os",
"//libc:hdr_fenv_macros",
"//libc:types_fenv_t",
"//libc/test/UnitTest:fp_test_helpers",
diff --git a/utils/bazel/llvm-project-overlay/libc/test/src/math/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/test/src/math/BUILD.bazel
index 9f8e217..764c845 100644
--- a/utils/bazel/llvm-project-overlay/libc/test/src/math/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libc/test/src/math/BUILD.bazel
@@ -4,8 +4,7 @@
# Tests for LLVM libc math.h functions.
-load("//libc:libc_build_rules.bzl", "libc_support_library")
-load("//libc/test/src/math:libc_math_test_rules.bzl", "math_test")
+load("//libc/test/src/math:libc_math_test_rules.bzl", "math_mpfr_test")
package(default_visibility = ["//visibility:public"])
@@ -13,808 +12,454 @@ exports_files(["libc_math_test_rules.bzl"])
licenses(["notice"])
-math_test(
- name = "fabs",
- hdrs = ["FAbsTest.h"],
- deps = ["//libc/utils/MPFRWrapper:mpfr_wrapper"],
-)
+math_mpfr_test(name = "acosf")
-math_test(
- name = "fabsf",
- hdrs = ["FAbsTest.h"],
- deps = ["//libc/utils/MPFRWrapper:mpfr_wrapper"],
-)
+math_mpfr_test(name = "acoshf")
-math_test(
- name = "fabsl",
- hdrs = ["FAbsTest.h"],
- deps = ["//libc/utils/MPFRWrapper:mpfr_wrapper"],
-)
+math_mpfr_test(name = "asinf")
+
+math_mpfr_test(name = "asinhf")
+
+math_mpfr_test(name = "atan2")
-math_test(
+math_mpfr_test(name = "atan2f")
+
+math_mpfr_test(name = "atanf")
+
+math_mpfr_test(name = "atanhf")
+
+math_mpfr_test(name = "cbrt")
+
+math_mpfr_test(name = "cbrtf")
+
+math_mpfr_test(
name = "ceil",
hdrs = ["CeilTest.h"],
- deps = ["//libc/utils/MPFRWrapper:mpfr_wrapper"],
)
-math_test(
+math_mpfr_test(
name = "ceilf",
hdrs = ["CeilTest.h"],
- deps = ["//libc/utils/MPFRWrapper:mpfr_wrapper"],
)
-math_test(
+math_mpfr_test(
name = "ceill",
hdrs = ["CeilTest.h"],
- deps = ["//libc/utils/MPFRWrapper:mpfr_wrapper"],
)
-math_test(
- name = "floor",
- hdrs = ["FloorTest.h"],
- deps = ["//libc/utils/MPFRWrapper:mpfr_wrapper"],
-)
+math_mpfr_test(name = "cos")
-math_test(
- name = "floorf",
- hdrs = ["FloorTest.h"],
- deps = ["//libc/utils/MPFRWrapper:mpfr_wrapper"],
+math_mpfr_test(
+ name = "cosf",
+ hdrs = ["sdcomp26094.h"],
+ deps = [
+ "//libc:__support_cpp_array",
+ ],
)
-math_test(
- name = "floorl",
- hdrs = ["FloorTest.h"],
- deps = ["//libc/utils/MPFRWrapper:mpfr_wrapper"],
+math_mpfr_test(
+ name = "coshf",
+ deps = [
+ "//libc:__support_cpp_array",
+ ],
)
-math_test(
- name = "trunc",
- hdrs = ["TruncTest.h"],
- deps = ["//libc/utils/MPFRWrapper:mpfr_wrapper"],
+math_mpfr_test(
+ name = "cospif",
+ hdrs = ["sdcomp26094.h"],
+ deps = [
+ "//libc:__support_cpp_array",
+ ],
)
-math_test(
- name = "truncf",
- hdrs = ["TruncTest.h"],
- deps = ["//libc/utils/MPFRWrapper:mpfr_wrapper"],
+math_mpfr_test(
+ name = "daddl",
+ hdrs = ["AddTest.h"],
)
-math_test(
- name = "truncl",
- hdrs = ["TruncTest.h"],
- deps = ["//libc/utils/MPFRWrapper:mpfr_wrapper"],
+math_mpfr_test(
+ name = "ddivl",
+ hdrs = ["DivTest.h"],
)
-math_test(
- name = "round",
- hdrs = ["RoundTest.h"],
- deps = ["//libc/utils/MPFRWrapper:mpfr_wrapper"],
-)
+# TODO: Add dfmal, dmull test. Missing stdlib/rand dependency.
-math_test(
- name = "roundf",
- hdrs = ["RoundTest.h"],
- deps = ["//libc/utils/MPFRWrapper:mpfr_wrapper"],
+math_mpfr_test(
+ name = "dsqrtl",
+ hdrs = ["SqrtTest.h"],
)
-math_test(
- name = "roundl",
- hdrs = ["RoundTest.h"],
- deps = ["//libc/utils/MPFRWrapper:mpfr_wrapper"],
+math_mpfr_test(
+ name = "dsubl",
+ hdrs = ["SubTest.h"],
)
-math_test(
- name = "frexp",
- hdrs = ["FrexpTest.h"],
- deps = ["//libc/utils/MPFRWrapper:mpfr_wrapper"],
-)
+math_mpfr_test(name = "erff")
-math_test(
- name = "frexpf",
- hdrs = ["FrexpTest.h"],
- deps = ["//libc/utils/MPFRWrapper:mpfr_wrapper"],
-)
+math_mpfr_test(name = "exp")
-math_test(
- name = "frexpl",
- hdrs = ["FrexpTest.h"],
- deps = ["//libc/utils/MPFRWrapper:mpfr_wrapper"],
-)
+math_mpfr_test(name = "expf")
-math_test(
- name = "hypot",
- hdrs = ["HypotTest.h"],
- deps = ["//libc/utils/MPFRWrapper:mpfr_wrapper"],
-)
+math_mpfr_test(name = "exp10")
-math_test(
- name = "hypotf",
- hdrs = [
- "HypotTest.h",
- "hypotf_hard_to_round.h",
+math_mpfr_test(name = "exp10f")
+
+math_mpfr_test(name = "exp2")
+
+math_mpfr_test(name = "exp2f")
+
+math_mpfr_test(
+ name = "exp2m1f",
+ deps = [
+ "//libc:__support_cpp_array",
],
- deps = ["//libc/utils/MPFRWrapper:mpfr_wrapper"],
)
-math_test(
- name = "logb",
- hdrs = ["LogbTest.h"],
- deps = ["//libc/utils/MPFRWrapper:mpfr_wrapper"],
-)
+math_mpfr_test(name = "expm1")
-math_test(
- name = "logbf",
- hdrs = ["LogbTest.h"],
- deps = ["//libc/utils/MPFRWrapper:mpfr_wrapper"],
-)
+math_mpfr_test(name = "expm1f")
-math_test(
- name = "logbl",
- hdrs = ["LogbTest.h"],
- deps = ["//libc/utils/MPFRWrapper:mpfr_wrapper"],
+math_mpfr_test(
+ name = "fabs",
+ hdrs = ["FAbsTest.h"],
)
-math_test(
- name = "modf",
- hdrs = ["ModfTest.h"],
- deps = ["//libc/utils/MPFRWrapper:mpfr_wrapper"],
+math_mpfr_test(
+ name = "fabsf",
+ hdrs = ["FAbsTest.h"],
)
-math_test(
- name = "modff",
- hdrs = ["ModfTest.h"],
- deps = ["//libc/utils/MPFRWrapper:mpfr_wrapper"],
+math_mpfr_test(
+ name = "fabsl",
+ hdrs = ["FAbsTest.h"],
)
-math_test(
- name = "modfl",
- hdrs = ["ModfTest.h"],
- deps = ["//libc/utils/MPFRWrapper:mpfr_wrapper"],
+math_mpfr_test(
+ name = "fadd",
+ hdrs = ["AddTest.h"],
)
-libc_support_library(
- name = "remquo_test_template",
- hdrs = ["RemQuoTest.h"],
- deps = [
- "//libc:__support_fputil_basic_operations",
- "//libc:__support_fputil_fp_bits",
- "//libc:hdr_math_macros",
- "//libc/test/UnitTest:LibcUnitTest",
- "//libc/test/UnitTest:fp_test_helpers",
- "//libc/utils/MPFRWrapper:mpfr_wrapper",
- ],
+math_mpfr_test(
+ name = "faddl",
+ hdrs = ["AddTest.h"],
)
-math_test(
- name = "remquo",
- deps = [
- ":remquo_test_template",
- "//libc/utils/MPFRWrapper:mpfr_wrapper",
- ],
+math_mpfr_test(
+ name = "fdiv",
+ hdrs = ["DivTest.h"],
)
-math_test(
- name = "remquof",
- deps = [
- ":remquo_test_template",
- "//libc/utils/MPFRWrapper:mpfr_wrapper",
- ],
+math_mpfr_test(
+ name = "fdivl",
+ hdrs = ["DivTest.h"],
)
-math_test(
- name = "remquol",
- deps = [
- ":remquo_test_template",
- "//libc/utils/MPFRWrapper:mpfr_wrapper",
- ],
-)
+# TODO: Add ffma, ffmal test. Missing stdlib/rand dependency.
-math_test(
- name = "fmin",
- hdrs = ["FMinTest.h"],
- deps = ["//libc/utils/MPFRWrapper:mpfr_wrapper"],
+math_mpfr_test(
+ name = "floor",
+ hdrs = ["FloorTest.h"],
)
-math_test(
- name = "fminf",
- hdrs = ["FMinTest.h"],
- deps = ["//libc/utils/MPFRWrapper:mpfr_wrapper"],
+math_mpfr_test(
+ name = "floorf",
+ hdrs = ["FloorTest.h"],
)
-math_test(
- name = "fminl",
- hdrs = ["FMinTest.h"],
- deps = ["//libc/utils/MPFRWrapper:mpfr_wrapper"],
+math_mpfr_test(
+ name = "floorl",
+ hdrs = ["FloorTest.h"],
)
-math_test(
- name = "fmax",
- hdrs = ["FMaxTest.h"],
- deps = ["//libc/utils/MPFRWrapper:mpfr_wrapper"],
-)
+# TODO: Add fma, fmaf, fmal, fmul, fmull tests. Missing stdlib/rand dependency.
-math_test(
- name = "fmaxf",
- hdrs = ["FMaxTest.h"],
- deps = ["//libc/utils/MPFRWrapper:mpfr_wrapper"],
+math_mpfr_test(
+ name = "frexp",
+ hdrs = ["FrexpTest.h"],
)
-math_test(
- name = "fmaxl",
- hdrs = ["FMaxTest.h"],
- deps = ["//libc/utils/MPFRWrapper:mpfr_wrapper"],
+math_mpfr_test(
+ name = "frexpf",
+ hdrs = ["FrexpTest.h"],
)
-math_test(
- name = "sqrt",
- hdrs = ["SqrtTest.h"],
- deps = [
- "//libc:__support_cpp_bit",
- "//libc/utils/MPFRWrapper:mpfr_wrapper",
- ],
+math_mpfr_test(
+ name = "frexpl",
+ hdrs = ["FrexpTest.h"],
)
-math_test(
- name = "sqrtf",
+math_mpfr_test(
+ name = "fsqrt",
hdrs = ["SqrtTest.h"],
- deps = [
- "//libc:__support_cpp_bit",
- "//libc/utils/MPFRWrapper:mpfr_wrapper",
- ],
)
-math_test(
- name = "sqrtl",
+math_mpfr_test(
+ name = "fsqrtl",
hdrs = ["SqrtTest.h"],
- deps = [
- "//libc:__support_cpp_bit",
- "//libc/utils/MPFRWrapper:mpfr_wrapper",
- ],
)
-math_test(
- name = "copysign",
- hdrs = ["CopySignTest.h"],
- deps = ["//libc/utils/MPFRWrapper:mpfr_wrapper"],
+math_mpfr_test(
+ name = "fsub",
+ hdrs = ["SubTest.h"],
)
-math_test(
- name = "copysignf",
- hdrs = ["CopySignTest.h"],
- deps = ["//libc/utils/MPFRWrapper:mpfr_wrapper"],
+math_mpfr_test(
+ name = "fsubl",
+ hdrs = ["SubTest.h"],
)
-math_test(
- name = "copysignl",
- hdrs = ["CopySignTest.h"],
- deps = ["//libc/utils/MPFRWrapper:mpfr_wrapper"],
+math_mpfr_test(
+ name = "hypot",
+ hdrs = ["HypotTest.h"],
)
-libc_support_library(
- name = "ilogb_test_template",
- hdrs = ["ILogbTest.h"],
- deps = [
- "//libc:__support_cpp_limits",
- "//libc:__support_fputil_fp_bits",
- "//libc:__support_fputil_manipulation_functions",
- "//libc:hdr_math_macros",
- "//libc/test/UnitTest:fp_test_helpers",
- "//libc/test/UnitTest:LibcUnitTest",
+math_mpfr_test(
+ name = "hypotf",
+ hdrs = [
+ "HypotTest.h",
+ "hypotf_hard_to_round.h",
],
)
-math_test(
- name = "ilogb",
- deps = [":ilogb_test_template"],
-)
-
-math_test(
- name = "ilogbf",
- deps = [":ilogb_test_template"],
-)
-
-math_test(
- name = "ilogbl",
- deps = [":ilogb_test_template"],
+math_mpfr_test(
+ name = "llrint",
+ hdrs = ["RoundToIntegerTest.h"],
)
-libc_support_library(
- name = "fdim_test_template",
- hdrs = ["FDimTest.h"],
- deps = [
- "//libc:__support_fputil_basic_operations",
- "//libc:__support_fputil_fenv_impl",
- "//libc:__support_fputil_fp_bits",
- "//libc:hdr_math_macros",
- "//libc/test/UnitTest:LibcUnitTest",
- "//libc/test/UnitTest:fp_test_helpers",
- ],
+math_mpfr_test(
+ name = "llrintf",
+ hdrs = ["RoundToIntegerTest.h"],
)
-math_test(
- name = "fdim",
- deps = [":fdim_test_template"],
+math_mpfr_test(
+ name = "llrintl",
+ hdrs = ["RoundToIntegerTest.h"],
)
-math_test(
- name = "fdimf",
- deps = [":fdim_test_template"],
+math_mpfr_test(
+ name = "llround",
+ hdrs = ["RoundToIntegerTest.h"],
)
-math_test(
- name = "fdiml",
- deps = [":fdim_test_template"],
+math_mpfr_test(
+ name = "llroundf",
+ hdrs = ["RoundToIntegerTest.h"],
)
-libc_support_library(
- name = "ldexp_test_template",
- hdrs = ["LdExpTest.h"],
- deps = [
- "//libc:__support_cpp_limits",
- "//libc:__support_fputil_fp_bits",
- "//libc:__support_fputil_normal_float",
- "//libc:hdr_math_macros",
- "//libc/test/UnitTest:LibcUnitTest",
- "//libc/test/UnitTest:fp_test_helpers",
- ],
+math_mpfr_test(
+ name = "llroundl",
+ hdrs = ["RoundToIntegerTest.h"],
)
-math_test(
- name = "ldexp",
- deps = [":ldexp_test_template"],
-)
+math_mpfr_test(name = "log")
-math_test(
- name = "ldexpf",
- deps = [":ldexp_test_template"],
-)
+math_mpfr_test(name = "logf")
-math_test(
- name = "ldexpl",
- deps = [":ldexp_test_template"],
-)
+math_mpfr_test(name = "log10")
-libc_support_library(
- name = "rint_test_template",
- hdrs = ["RIntTest.h"],
- deps = [
- "//libc:__support_cpp_algorithm",
- "//libc:__support_fputil_fenv_impl",
- "//libc:__support_fputil_fp_bits",
- "//libc:hdr_fenv_macros",
- "//libc:hdr_math_macros",
- "//libc/test/UnitTest:LibcUnitTest",
- "//libc/test/UnitTest:fp_test_helpers",
- "//libc/utils/MPFRWrapper:mpfr_wrapper",
- ],
-)
+math_mpfr_test(name = "log10f")
-math_test(
- name = "rint",
- deps = [
- ":rint_test_template",
- "//libc/utils/MPFRWrapper:mpfr_wrapper",
- ],
-)
+math_mpfr_test(name = "log1p")
-math_test(
- name = "rintf",
- deps = [
- ":rint_test_template",
- "//libc/utils/MPFRWrapper:mpfr_wrapper",
- ],
-)
+math_mpfr_test(name = "log1pf")
-math_test(
- name = "rintl",
- deps = [
- ":rint_test_template",
- "//libc/utils/MPFRWrapper:mpfr_wrapper",
- ],
-)
+math_mpfr_test(name = "log2")
-libc_support_library(
- name = "round_to_integer_test_template",
- hdrs = ["RoundToIntegerTest.h"],
- deps = [
- "//libc:__support_cpp_algorithm",
- "//libc:__support_fputil_fenv_impl",
- "//libc:__support_fputil_fp_bits",
- "//libc:hdr_math_macros",
- "//libc/test/UnitTest:LibcUnitTest",
- "//libc/test/UnitTest:fp_test_helpers",
- "//libc/utils/MPFRWrapper:mpfr_wrapper",
- ],
-)
+math_mpfr_test(name = "log2f")
-math_test(
+math_mpfr_test(
name = "lrint",
- deps = [
- ":round_to_integer_test_template",
- "//libc/utils/MPFRWrapper:mpfr_wrapper",
- ],
+ hdrs = ["RoundToIntegerTest.h"],
)
-math_test(
+math_mpfr_test(
name = "lrintf",
- deps = [
- ":round_to_integer_test_template",
- "//libc/utils/MPFRWrapper:mpfr_wrapper",
- ],
+ hdrs = ["RoundToIntegerTest.h"],
)
-math_test(
+math_mpfr_test(
name = "lrintl",
- deps = [
- ":round_to_integer_test_template",
- "//libc/utils/MPFRWrapper:mpfr_wrapper",
- ],
-)
-
-math_test(
- name = "llrint",
- deps = [
- ":round_to_integer_test_template",
- "//libc/utils/MPFRWrapper:mpfr_wrapper",
- ],
-)
-
-math_test(
- name = "llrintf",
- deps = [
- ":round_to_integer_test_template",
- "//libc/utils/MPFRWrapper:mpfr_wrapper",
- ],
-)
-
-math_test(
- name = "llrintl",
- deps = [
- ":round_to_integer_test_template",
- "//libc/utils/MPFRWrapper:mpfr_wrapper",
- ],
+ hdrs = ["RoundToIntegerTest.h"],
)
-math_test(
+math_mpfr_test(
name = "lround",
- deps = [
- ":round_to_integer_test_template",
- "//libc/utils/MPFRWrapper:mpfr_wrapper",
- ],
+ hdrs = ["RoundToIntegerTest.h"],
)
-math_test(
+math_mpfr_test(
name = "lroundf",
- deps = [
- ":round_to_integer_test_template",
- "//libc/utils/MPFRWrapper:mpfr_wrapper",
- ],
+ hdrs = ["RoundToIntegerTest.h"],
)
-math_test(
+math_mpfr_test(
name = "lroundl",
- deps = [
- ":round_to_integer_test_template",
- "//libc/utils/MPFRWrapper:mpfr_wrapper",
- ],
-)
-
-math_test(
- name = "llround",
- deps = [
- ":round_to_integer_test_template",
- "//libc/utils/MPFRWrapper:mpfr_wrapper",
- ],
-)
-
-math_test(
- name = "llroundf",
- deps = [
- ":round_to_integer_test_template",
- "//libc/utils/MPFRWrapper:mpfr_wrapper",
- ],
+ hdrs = ["RoundToIntegerTest.h"],
)
-math_test(
- name = "llroundl",
- deps = [
- ":round_to_integer_test_template",
- "//libc/utils/MPFRWrapper:mpfr_wrapper",
- ],
-)
+# TODO: add nan tests.
-libc_support_library(
- name = "nextafter_test_template",
- hdrs = ["NextAfterTest.h"],
+math_mpfr_test(
+ name = "nearbyint",
+ hdrs = ["NearbyIntTest.h"],
deps = [
"//libc:__support_cpp_array",
- "//libc:__support_cpp_bit",
- "//libc:__support_cpp_type_traits",
- "//libc:__support_fputil_basic_operations",
- "//libc:__support_fputil_fenv_impl",
- "//libc:__support_fputil_fp_bits",
- "//libc:hdr_fenv_macros",
- "//libc:hdr_math_macros",
- "//libc/test/UnitTest:LibcUnitTest",
- "//libc/test/UnitTest:fp_test_helpers",
],
)
-math_test(
- name = "nextafter",
- deps = [":nextafter_test_template"],
-)
-
-math_test(
- name = "nextafterf",
- deps = [":nextafter_test_template"],
-)
-
-math_test(
- name = "nextafterl",
- deps = [":nextafter_test_template"],
-)
-
-libc_support_library(
- name = "sdcomp26094",
- hdrs = ["sdcomp26094.h"],
- deps = ["//libc:__support_cpp_array"],
-)
-
-math_test(
- name = "cosf",
+math_mpfr_test(
+ name = "nearbyintf",
+ hdrs = ["NearbyIntTest.h"],
deps = [
- ":sdcomp26094",
"//libc:__support_cpp_array",
- "//libc/utils/MPFRWrapper:mpfr_wrapper",
],
)
-math_test(
- name = "sincosf",
+math_mpfr_test(
+ name = "nearbyintl",
+ hdrs = ["NearbyIntTest.h"],
deps = [
- ":sdcomp26094",
"//libc:__support_cpp_array",
- "//libc/utils/MPFRWrapper:mpfr_wrapper",
],
)
-math_test(
- name = "sinf",
- deps = [
- ":sdcomp26094",
- "//libc:__support_cpp_array",
- "//libc/utils/MPFRWrapper:mpfr_wrapper",
- ],
-)
+math_mpfr_test(name = "pow")
-math_test(
- name = "tanf",
- deps = [
- ":sdcomp26094",
- "//libc:__support_cpp_array",
- "//libc/utils/MPFRWrapper:mpfr_wrapper",
- ],
-)
+math_mpfr_test(name = "powf")
-math_test(
- name = "expf",
- deps = [
- "//libc/utils/MPFRWrapper:mpfr_wrapper",
- ],
+math_mpfr_test(
+ name = "remquo",
+ hdrs = ["RemQuoTest.h"],
)
-math_test(
- name = "exp2f",
- deps = [
- "//libc:__support_macros_properties_cpu_features",
- "//libc/utils/MPFRWrapper:mpfr_wrapper",
- ],
+math_mpfr_test(
+ name = "remquof",
+ hdrs = ["RemQuoTest.h"],
)
-math_test(
- name = "exp10f",
- deps = [
- "//libc/utils/MPFRWrapper:mpfr_wrapper",
- ],
+math_mpfr_test(
+ name = "remquol",
+ hdrs = ["RemQuoTest.h"],
)
-math_test(
- name = "expm1f",
- deps = [
- "//libc/utils/MPFRWrapper:mpfr_wrapper",
- ],
+math_mpfr_test(
+ name = "rint",
+ hdrs = ["RIntTest.h"],
)
-math_test(
- name = "logf",
- deps = [
- "//libc/utils/MPFRWrapper:mpfr_wrapper",
- ],
+math_mpfr_test(
+ name = "rintf",
+ hdrs = ["RIntTest.h"],
)
-math_test(
- name = "log2f",
- deps = [
- "//libc/utils/MPFRWrapper:mpfr_wrapper",
- ],
+math_mpfr_test(
+ name = "rintl",
+ hdrs = ["RIntTest.h"],
)
-math_test(
- name = "log10f",
- deps = [
- "//libc/utils/MPFRWrapper:mpfr_wrapper",
- ],
+math_mpfr_test(
+ name = "roundeven",
+ hdrs = ["RoundEvenTest.h"],
)
-math_test(
- name = "log1pf",
- deps = [
- "//libc/utils/MPFRWrapper:mpfr_wrapper",
- ],
+math_mpfr_test(
+ name = "roundevenf",
+ hdrs = ["RoundEvenTest.h"],
)
-math_test(
- name = "log",
- deps = [
- "//libc/utils/MPFRWrapper:mpfr_wrapper",
- ],
+math_mpfr_test(
+ name = "roundevenl",
+ hdrs = ["RoundEvenTest.h"],
)
-math_test(
- name = "log2",
- deps = [
- "//libc/utils/MPFRWrapper:mpfr_wrapper",
- ],
+math_mpfr_test(
+ name = "round",
+ hdrs = ["RoundTest.h"],
)
-math_test(
- name = "log10",
- deps = [
- "//libc/utils/MPFRWrapper:mpfr_wrapper",
- ],
+math_mpfr_test(
+ name = "roundf",
+ hdrs = ["RoundTest.h"],
)
-math_test(
- name = "log1p",
- deps = [
- "//libc/utils/MPFRWrapper:mpfr_wrapper",
- ],
+math_mpfr_test(
+ name = "roundl",
+ hdrs = ["RoundTest.h"],
)
-math_test(
- name = "sinhf",
- deps = [
- "//libc:__support_cpp_array",
- "//libc/utils/MPFRWrapper:mpfr_wrapper",
- ],
-)
+math_mpfr_test(name = "sin")
-math_test(
- name = "coshf",
+math_mpfr_test(
+ name = "sinf",
+ hdrs = ["sdcomp26094.h"],
deps = [
"//libc:__support_cpp_array",
- "//libc/utils/MPFRWrapper:mpfr_wrapper",
],
)
-math_test(
- name = "tanhf",
- deps = [
- "//libc/utils/MPFRWrapper:mpfr_wrapper",
- ],
-)
-
-math_test(
- name = "asinhf",
- deps = [
- "//libc/utils/MPFRWrapper:mpfr_wrapper",
- ],
-)
-
-math_test(
- name = "acoshf",
- deps = [
- "//libc/utils/MPFRWrapper:mpfr_wrapper",
- ],
-)
-
-math_test(
- name = "atanhf",
- deps = [
- "//libc/utils/MPFRWrapper:mpfr_wrapper",
- ],
-)
+math_mpfr_test(name = "sincos")
-math_test(
- name = "asinf",
+math_mpfr_test(
+ name = "sincosf",
+ hdrs = ["sdcomp26094.h"],
deps = [
- "//libc/utils/MPFRWrapper:mpfr_wrapper",
+ "//libc:__support_cpp_array",
],
)
-math_test(
- name = "acosf",
+math_mpfr_test(
+ name = "sinhf",
deps = [
- "//libc/utils/MPFRWrapper:mpfr_wrapper",
+ "//libc:__support_cpp_array",
],
)
-math_test(
- name = "atanf",
+math_mpfr_test(
+ name = "sinpif",
+ hdrs = ["sdcomp26094.h"],
deps = [
- "//libc/utils/MPFRWrapper:mpfr_wrapper",
+ "//libc:__support_cpp_array",
],
)
-math_test(
- name = "erff",
- deps = [
- "//libc/utils/MPFRWrapper:mpfr_wrapper",
- ],
+math_mpfr_test(
+ name = "sqrt",
+ hdrs = ["SqrtTest.h"],
)
-math_test(
- name = "exp",
- deps = [
- "//libc/utils/MPFRWrapper:mpfr_wrapper",
- ],
+math_mpfr_test(
+ name = "sqrtf",
+ hdrs = ["SqrtTest.h"],
)
-math_test(
- name = "exp2",
- deps = [
- "//libc/utils/MPFRWrapper:mpfr_wrapper",
- ],
+math_mpfr_test(
+ name = "sqrtl",
+ hdrs = ["SqrtTest.h"],
)
-math_test(
- name = "exp10",
- deps = [
- "//libc/utils/MPFRWrapper:mpfr_wrapper",
- ],
-)
+math_mpfr_test(name = "tan")
-math_test(
- name = "powf",
+math_mpfr_test(
+ name = "tanf",
+ hdrs = ["sdcomp26094.h"],
deps = [
- "//libc/utils/MPFRWrapper:mpfr_wrapper",
+ "//libc:__support_cpp_array",
],
)
-math_test(
- name = "fmod",
- hdrs = ["FModTest.h"],
-)
-
-math_test(
- name = "fmodf",
- hdrs = ["FModTest.h"],
-)
+math_mpfr_test(name = "tanhf")
-math_test(
- name = "scalbn",
- hdrs = [
- "LdExpTest.h",
- "ScalbnTest.h",
- ],
- deps = ["//libc:__support_cpp_limits"],
+math_mpfr_test(
+ name = "trunc",
+ hdrs = ["TruncTest.h"],
)
-math_test(
- name = "scalbnf",
- hdrs = [
- "LdExpTest.h",
- "ScalbnTest.h",
- ],
- deps = ["//libc:__support_cpp_limits"],
+math_mpfr_test(
+ name = "truncf",
+ hdrs = ["TruncTest.h"],
)
-math_test(
- name = "scalbnl",
- hdrs = [
- "LdExpTest.h",
- "ScalbnTest.h",
- ],
- deps = ["//libc:__support_cpp_limits"],
+math_mpfr_test(
+ name = "truncl",
+ hdrs = ["TruncTest.h"],
)
diff --git a/utils/bazel/llvm-project-overlay/libc/test/src/math/libc_math_test_rules.bzl b/utils/bazel/llvm-project-overlay/libc/test/src/math/libc_math_test_rules.bzl
index 9ec3a5e..d788705 100644
--- a/utils/bazel/llvm-project-overlay/libc/test/src/math/libc_math_test_rules.bzl
+++ b/utils/bazel/llvm-project-overlay/libc/test/src/math/libc_math_test_rules.bzl
@@ -25,8 +25,9 @@ def math_test(name, hdrs = [], deps = [], **kwargs):
srcs = [test_name + ".cpp"] + hdrs,
libc_function_deps = ["//libc:func_name".replace("func_name", name)],
deps = [
- "//libc/test/UnitTest:fp_test_helpers",
"//libc:__support_cpp_algorithm",
+ "//libc:__support_cpp_bit",
+ "//libc:__support_cpp_limits",
"//libc:__support_fputil_basic_operations",
"//libc:__support_fputil_fenv_impl",
"//libc:__support_fputil_fp_bits",
@@ -34,9 +35,29 @@ def math_test(name, hdrs = [], deps = [], **kwargs):
"//libc:__support_fputil_nearest_integer_operations",
"//libc:__support_fputil_normal_float",
"//libc:__support_macros_properties_architectures",
+ "//libc:__support_macros_properties_os",
"//libc:__support_math_extras",
"//libc:__support_uint128",
+ "//libc:hdr_errno_macros",
+ "//libc:hdr_fenv_macros",
"//libc:hdr_math_macros",
+ "//libc/test/UnitTest:fp_test_helpers",
] + deps,
**kwargs
)
+
+def math_mpfr_test(name, hdrs = [], deps = [], **kwargs):
+ """Add a target for the unittest of a math function.
+
+ Args:
+ name: The name of the function being tested.
+ hdrs: List of headers to add.
+ deps: The list of other libraries to be linked in to the test target.
+ **kwargs: Attributes relevant for a cc_test. For example, name, srcs.
+ """
+ math_test(
+ name = name,
+ hdrs = hdrs,
+ deps = deps + ["//libc/utils/MPFRWrapper:mpfr_wrapper"],
+ **kwargs
+ )
diff --git a/utils/bazel/llvm-project-overlay/libc/test/src/math/smoke/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/test/src/math/smoke/BUILD.bazel
index 2ad2209..8f519e1 100644
--- a/utils/bazel/llvm-project-overlay/libc/test/src/math/smoke/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libc/test/src/math/smoke/BUILD.bazel
@@ -4,16 +4,77 @@
# Smoke tests for LLVM libc math.h functions.
-load("//libc:libc_build_rules.bzl", "libc_support_library")
load("//libc/test/src/math:libc_math_test_rules.bzl", "math_test")
package(default_visibility = ["//visibility:public"])
licenses(["notice"])
+math_test(name = "acosf")
+
+math_test(name = "acoshf")
+
+math_test(name = "asinf")
+
+math_test(name = "asinhf")
+
+math_test(name = "atan2")
+
+math_test(name = "atan2f")
+
+math_test(name = "atanf")
+
+math_test(name = "atanhf")
+
math_test(
- name = "fabsf128",
- hdrs = ["FAbsTest.h"],
+ name = "canonicalize",
+ hdrs = ["CanonicalizeTest.h"],
+ deps = [
+ "//libc:__support_integer_literals",
+ ],
+)
+
+math_test(
+ name = "canonicalizef",
+ hdrs = ["CanonicalizeTest.h"],
+ deps = [
+ "//libc:__support_integer_literals",
+ ],
+)
+
+math_test(
+ name = "canonicalizel",
+ hdrs = ["CanonicalizeTest.h"],
+ deps = [
+ "//libc:__support_integer_literals",
+ ],
+)
+
+math_test(
+ name = "canonicalizef128",
+ hdrs = ["CanonicalizeTest.h"],
+ deps = [
+ "//libc:__support_integer_literals",
+ ],
+)
+
+math_test(name = "cbrt")
+
+math_test(name = "cbrtf")
+
+math_test(
+ name = "ceil",
+ hdrs = ["CeilTest.h"],
+)
+
+math_test(
+ name = "ceilf",
+ hdrs = ["CeilTest.h"],
+)
+
+math_test(
+ name = "ceill",
+ hdrs = ["CeilTest.h"],
)
math_test(
@@ -22,33 +83,338 @@ math_test(
)
math_test(
+ name = "copysign",
+ hdrs = ["CopySignTest.h"],
+)
+
+math_test(
+ name = "copysignf",
+ hdrs = ["CopySignTest.h"],
+)
+
+math_test(
+ name = "copysignl",
+ hdrs = ["CopySignTest.h"],
+)
+
+math_test(
+ name = "copysignf128",
+ hdrs = ["CopySignTest.h"],
+)
+
+math_test(name = "cos")
+
+math_test(name = "cosf")
+
+math_test(
+ name = "coshf",
+ deps = [
+ "//libc:__support_cpp_array",
+ ],
+)
+
+math_test(name = "cospif")
+
+math_test(
+ name = "daddl",
+ hdrs = ["AddTest.h"],
+)
+
+math_test(
+ name = "daddf128",
+ hdrs = ["AddTest.h"],
+)
+
+math_test(
+ name = "ddivl",
+ hdrs = ["DivTest.h"],
+)
+
+math_test(
+ name = "ddivf128",
+ hdrs = ["DivTest.h"],
+)
+
+math_test(
+ name = "dfmal",
+ hdrs = ["FmaTest.h"],
+)
+
+math_test(
+ name = "dfmaf128",
+ hdrs = ["FmaTest.h"],
+)
+
+math_test(
+ name = "dmull",
+ hdrs = ["MulTest.h"],
+)
+
+math_test(
+ name = "dmulf128",
+ hdrs = ["MulTest.h"],
+)
+
+math_test(
+ name = "dsqrtl",
+ hdrs = ["SqrtTest.h"],
+)
+
+math_test(
+ name = "dsqrtf128",
+ hdrs = ["SqrtTest.h"],
+)
+
+math_test(
+ name = "dsubl",
+ hdrs = ["SubTest.h"],
+)
+
+math_test(
+ name = "dsubf128",
+ hdrs = ["SubTest.h"],
+)
+
+math_test(name = "erff")
+
+math_test(name = "exp")
+
+math_test(name = "expf")
+
+math_test(name = "exp10")
+
+math_test(name = "exp10f")
+
+math_test(name = "exp2")
+
+math_test(name = "exp2f")
+
+math_test(name = "exp2m1f")
+
+math_test(name = "expm1")
+
+math_test(name = "expm1f")
+
+math_test(
+ name = "fabs",
+ hdrs = ["FAbsTest.h"],
+)
+
+math_test(
+ name = "fabsf",
+ hdrs = ["FAbsTest.h"],
+)
+
+math_test(
+ name = "fabsl",
+ hdrs = ["FAbsTest.h"],
+)
+
+math_test(
+ name = "fabsf128",
+ hdrs = ["FAbsTest.h"],
+)
+
+math_test(
+ name = "fadd",
+ hdrs = ["AddTest.h"],
+)
+
+math_test(
+ name = "faddl",
+ hdrs = ["AddTest.h"],
+)
+
+math_test(
+ name = "faddf128",
+ hdrs = ["AddTest.h"],
+)
+
+math_test(
+ name = "fdim",
+ hdrs = ["FDimTest.h"],
+)
+
+math_test(
+ name = "fdimf",
+ hdrs = ["FDimTest.h"],
+)
+
+math_test(
+ name = "fdiml",
+ hdrs = ["FDimTest.h"],
+)
+
+math_test(
+ name = "fdimf128",
+ hdrs = ["FDimTest.h"],
+)
+
+math_test(
+ name = "fdiv",
+ hdrs = ["DivTest.h"],
+)
+
+math_test(
+ name = "fdivl",
+ hdrs = ["DivTest.h"],
+)
+
+math_test(
+ name = "fdivf128",
+ hdrs = ["DivTest.h"],
+)
+
+math_test(
+ name = "ffma",
+ hdrs = ["FmaTest.h"],
+)
+
+math_test(
+ name = "ffmal",
+ hdrs = ["FmaTest.h"],
+)
+
+math_test(
+ name = "ffmaf128",
+ hdrs = ["FmaTest.h"],
+)
+
+math_test(
+ name = "floor",
+ hdrs = ["FloorTest.h"],
+)
+
+math_test(
+ name = "floorf",
+ hdrs = ["FloorTest.h"],
+)
+
+math_test(
+ name = "floorl",
+ hdrs = ["FloorTest.h"],
+)
+
+math_test(
name = "floorf128",
hdrs = ["FloorTest.h"],
)
+# TODO: Add fma, fmaf, fmal, fmaf128 tests.
+
math_test(
- name = "truncf128",
- hdrs = ["TruncTest.h"],
+ name = "fmax",
+ hdrs = ["FMaxTest.h"],
)
math_test(
- name = "roundf128",
- hdrs = ["RoundTest.h"],
+ name = "fmaxf",
+ hdrs = ["FMaxTest.h"],
)
math_test(
- name = "frexpf128",
- hdrs = ["FrexpTest.h"],
+ name = "fmaxl",
+ hdrs = ["FMaxTest.h"],
)
math_test(
- name = "logbf128",
- hdrs = ["LogbTest.h"],
+ name = "fmaxf128",
+ hdrs = ["FMaxTest.h"],
)
math_test(
- name = "modff128",
- hdrs = ["ModfTest.h"],
+ name = "fmaximum",
+ hdrs = ["FMaximumTest.h"],
+)
+
+math_test(
+ name = "fmaximumf",
+ hdrs = ["FMaximumTest.h"],
+)
+
+math_test(
+ name = "fmaximuml",
+ hdrs = ["FMaximumTest.h"],
+)
+
+math_test(
+ name = "fmaximumf128",
+ hdrs = ["FMaximumTest.h"],
+)
+
+math_test(
+ name = "fmaximum_mag",
+ hdrs = ["FMaximumMagTest.h"],
+)
+
+math_test(
+ name = "fmaximum_magf",
+ hdrs = ["FMaximumMagTest.h"],
+)
+
+math_test(
+ name = "fmaximum_magl",
+ hdrs = ["FMaximumMagTest.h"],
+)
+
+math_test(
+ name = "fmaximum_magf128",
+ hdrs = ["FMaximumMagTest.h"],
+)
+
+math_test(
+ name = "fmaximum_mag_num",
+ hdrs = ["FMaximumMagNumTest.h"],
+)
+
+math_test(
+ name = "fmaximum_mag_numf",
+ hdrs = ["FMaximumMagNumTest.h"],
+)
+
+math_test(
+ name = "fmaximum_mag_numl",
+ hdrs = ["FMaximumMagNumTest.h"],
+)
+
+math_test(
+ name = "fmaximum_mag_numf128",
+ hdrs = ["FMaximumMagNumTest.h"],
+)
+
+math_test(
+ name = "fmaximum_num",
+ hdrs = ["FMaximumNumTest.h"],
+)
+
+math_test(
+ name = "fmaximum_numf",
+ hdrs = ["FMaximumNumTest.h"],
+)
+
+math_test(
+ name = "fmaximum_numl",
+ hdrs = ["FMaximumNumTest.h"],
+)
+
+math_test(
+ name = "fmaximum_numf128",
+ hdrs = ["FMaximumNumTest.h"],
+)
+
+math_test(
+ name = "fmin",
+ hdrs = ["FMinTest.h"],
+)
+
+math_test(
+ name = "fminf",
+ hdrs = ["FMinTest.h"],
+)
+
+math_test(
+ name = "fminl",
+ hdrs = ["FMinTest.h"],
)
math_test(
@@ -57,59 +423,312 @@ math_test(
)
math_test(
- name = "fmaxf128",
- hdrs = ["FMaxTest.h"],
+ name = "fminimum",
+ hdrs = ["FMinimumTest.h"],
)
math_test(
- name = "sqrtf128",
+ name = "fminimumf",
+ hdrs = ["FMinimumTest.h"],
+)
+
+math_test(
+ name = "fminimuml",
+ hdrs = ["FMinimumTest.h"],
+)
+
+math_test(
+ name = "fminimumf128",
+ hdrs = ["FMinimumTest.h"],
+)
+
+math_test(
+ name = "fminimum_mag",
+ hdrs = ["FMinimumMagTest.h"],
+)
+
+math_test(
+ name = "fminimum_magf",
+ hdrs = ["FMinimumMagTest.h"],
+)
+
+math_test(
+ name = "fminimum_magl",
+ hdrs = ["FMinimumMagTest.h"],
+)
+
+math_test(
+ name = "fminimum_magf128",
+ hdrs = ["FMinimumMagTest.h"],
+)
+
+math_test(
+ name = "fminimum_mag_num",
+ hdrs = ["FMinimumMagNumTest.h"],
+)
+
+math_test(
+ name = "fminimum_mag_numf",
+ hdrs = ["FMinimumMagNumTest.h"],
+)
+
+math_test(
+ name = "fminimum_mag_numl",
+ hdrs = ["FMinimumMagNumTest.h"],
+)
+
+math_test(
+ name = "fminimum_mag_numf128",
+ hdrs = ["FMinimumMagNumTest.h"],
+)
+
+math_test(
+ name = "fminimum_num",
+ hdrs = ["FMinimumNumTest.h"],
+)
+
+math_test(
+ name = "fminimum_numf",
+ hdrs = ["FMinimumNumTest.h"],
+)
+
+math_test(
+ name = "fminimum_numl",
+ hdrs = ["FMinimumNumTest.h"],
+)
+
+math_test(
+ name = "fminimum_numf128",
+ hdrs = ["FMinimumNumTest.h"],
+)
+
+math_test(
+ name = "fmod",
+ hdrs = ["FModTest.h"],
+)
+
+math_test(
+ name = "fmodf",
+ hdrs = ["FModTest.h"],
+)
+
+math_test(
+ name = "fmodl",
+ hdrs = ["FModTest.h"],
+)
+
+math_test(
+ name = "fmodf128",
+ hdrs = ["FModTest.h"],
+)
+
+math_test(
+ name = "fmul",
+ hdrs = ["MulTest.h"],
+)
+
+math_test(
+ name = "fmull",
+ hdrs = ["MulTest.h"],
+)
+
+math_test(
+ name = "fmulf128",
+ hdrs = ["MulTest.h"],
+)
+
+math_test(
+ name = "frexp",
+ hdrs = ["FrexpTest.h"],
+)
+
+math_test(
+ name = "frexpf",
+ hdrs = ["FrexpTest.h"],
+)
+
+math_test(
+ name = "frexpl",
+ hdrs = ["FrexpTest.h"],
+)
+
+math_test(
+ name = "frexpf128",
+ hdrs = ["FrexpTest.h"],
+)
+
+math_test(
+ name = "fromfp",
+ hdrs = ["FromfpTest.h"],
+)
+
+math_test(
+ name = "fromfpf",
+ hdrs = ["FromfpTest.h"],
+)
+
+math_test(
+ name = "fromfpl",
+ hdrs = ["FromfpTest.h"],
+)
+
+math_test(
+ name = "fromfpf128",
+ hdrs = ["FromfpTest.h"],
+)
+
+math_test(
+ name = "fromfpx",
+ hdrs = ["FromfpxTest.h"],
+)
+
+math_test(
+ name = "fromfpxf",
+ hdrs = ["FromfpxTest.h"],
+)
+
+math_test(
+ name = "fromfpxl",
+ hdrs = ["FromfpxTest.h"],
+)
+
+math_test(
+ name = "fromfpxf128",
+ hdrs = ["FromfpxTest.h"],
+)
+
+math_test(
+ name = "fsqrt",
hdrs = ["SqrtTest.h"],
- deps = ["//libc:__support_cpp_bit"],
)
math_test(
- name = "copysignf128",
- hdrs = ["CopySignTest.h"],
+ name = "fsqrtl",
+ hdrs = ["SqrtTest.h"],
+)
+
+math_test(
+ name = "fsqrtf128",
+ hdrs = ["SqrtTest.h"],
+)
+
+math_test(
+ name = "fsub",
+ hdrs = ["SubTest.h"],
+)
+
+math_test(
+ name = "fsubl",
+ hdrs = ["SubTest.h"],
+)
+
+math_test(
+ name = "fsubf128",
+ hdrs = ["SubTest.h"],
+)
+
+math_test(
+ name = "getpayload",
+ hdrs = ["GetPayloadTest.h"],
+)
+
+math_test(
+ name = "getpayloadf",
+ hdrs = ["GetPayloadTest.h"],
+)
+
+math_test(
+ name = "getpayloadl",
+ hdrs = ["GetPayloadTest.h"],
+)
+
+math_test(
+ name = "getpayloadf128",
+ hdrs = ["GetPayloadTest.h"],
+)
+
+math_test(
+ name = "hypot",
+ hdrs = ["HypotTest.h"],
+)
+
+math_test(
+ name = "hypotf",
+ hdrs = ["HypotTest.h"],
+)
+
+math_test(
+ name = "ilogb",
+ hdrs = ["ILogbTest.h"],
+)
+
+math_test(
+ name = "ilogbf",
+ hdrs = ["ILogbTest.h"],
+)
+
+math_test(
+ name = "ilogbl",
+ hdrs = ["ILogbTest.h"],
)
math_test(
name = "ilogbf128",
hdrs = ["ILogbTest.h"],
- deps = ["//libc:__support_cpp_limits"],
)
math_test(
- name = "fdimf128",
- hdrs = ["FDimTest.h"],
+ name = "ldexp",
+ hdrs = ["LdExpTest.h"],
)
-libc_support_library(
- name = "ldexp_test_template",
+math_test(
+ name = "ldexpf",
+ hdrs = ["LdExpTest.h"],
+)
+
+math_test(
+ name = "ldexpl",
hdrs = ["LdExpTest.h"],
- deps = [
- "//libc:__support_cpp_limits",
- "//libc:__support_fputil_fp_bits",
- "//libc:__support_fputil_normal_float",
- "//libc:hdr_math_macros",
- "//libc/test/UnitTest:LibcUnitTest",
- "//libc/test/UnitTest:fp_test_helpers",
- ],
)
math_test(
name = "ldexpf128",
hdrs = ["LdExpTest.h"],
- deps = ["//libc:__support_cpp_limits"],
)
math_test(
- name = "rintf128",
- hdrs = ["RIntTest.h"],
- deps = ["//libc:hdr_fenv_macros"],
+ name = "llogb",
+ hdrs = ["ILogbTest.h"],
)
math_test(
- name = "lrintf128",
+ name = "llogbf",
+ hdrs = ["ILogbTest.h"],
+)
+
+math_test(
+ name = "llogbl",
+ hdrs = ["ILogbTest.h"],
+)
+
+math_test(
+ name = "llogbf128",
+ hdrs = ["ILogbTest.h"],
+)
+
+math_test(
+ name = "llrint",
+ hdrs = ["RoundToIntegerTest.h"],
+)
+
+math_test(
+ name = "llrintf",
+ hdrs = ["RoundToIntegerTest.h"],
+)
+
+math_test(
+ name = "llrintl",
hdrs = ["RoundToIntegerTest.h"],
)
@@ -119,7 +738,17 @@ math_test(
)
math_test(
- name = "lroundf128",
+ name = "llround",
+ hdrs = ["RoundToIntegerTest.h"],
+)
+
+math_test(
+ name = "llroundf",
+ hdrs = ["RoundToIntegerTest.h"],
+)
+
+math_test(
+ name = "llroundl",
hdrs = ["RoundToIntegerTest.h"],
)
@@ -128,24 +757,526 @@ math_test(
hdrs = ["RoundToIntegerTest.h"],
)
-libc_support_library(
- name = "nextafter_test_template",
+math_test(name = "log")
+
+math_test(name = "logf")
+
+math_test(name = "log10")
+
+math_test(name = "log10f")
+
+math_test(name = "log1p")
+
+math_test(name = "log1pf")
+
+math_test(name = "log2")
+
+math_test(name = "log2f")
+
+math_test(
+ name = "logb",
+ hdrs = ["LogbTest.h"],
+)
+
+math_test(
+ name = "logbf",
+ hdrs = ["LogbTest.h"],
+)
+
+math_test(
+ name = "logbl",
+ hdrs = ["LogbTest.h"],
+)
+
+math_test(
+ name = "logbf128",
+ hdrs = ["LogbTest.h"],
+)
+
+math_test(
+ name = "lrint",
+ hdrs = ["RoundToIntegerTest.h"],
+)
+
+math_test(
+ name = "lrintf",
+ hdrs = ["RoundToIntegerTest.h"],
+)
+
+math_test(
+ name = "lrintl",
+ hdrs = ["RoundToIntegerTest.h"],
+)
+
+math_test(
+ name = "lrintf128",
+ hdrs = ["RoundToIntegerTest.h"],
+)
+
+math_test(
+ name = "lround",
+ hdrs = ["RoundToIntegerTest.h"],
+)
+
+math_test(
+ name = "lroundf",
+ hdrs = ["RoundToIntegerTest.h"],
+)
+
+math_test(
+ name = "lroundl",
+ hdrs = ["RoundToIntegerTest.h"],
+)
+
+math_test(
+ name = "lroundf128",
+ hdrs = ["RoundToIntegerTest.h"],
+)
+
+math_test(
+ name = "modf",
+ hdrs = ["ModfTest.h"],
+)
+
+math_test(
+ name = "modff",
+ hdrs = ["ModfTest.h"],
+)
+
+math_test(
+ name = "modfl",
+ hdrs = ["ModfTest.h"],
+)
+
+math_test(
+ name = "modff128",
+ hdrs = ["ModfTest.h"],
+)
+
+# TODO: add nan tests.
+
+math_test(
+ name = "nearbyint",
+ hdrs = ["NearbyIntTest.h"],
+)
+
+math_test(
+ name = "nearbyintf",
+ hdrs = ["NearbyIntTest.h"],
+)
+
+math_test(
+ name = "nearbyintl",
+ hdrs = ["NearbyIntTest.h"],
+)
+
+math_test(
+ name = "nearbyintf128",
+ hdrs = ["NearbyIntTest.h"],
+)
+
+math_test(
+ name = "nextafter",
+ hdrs = ["NextAfterTest.h"],
+)
+
+math_test(
+ name = "nextafterf",
hdrs = ["NextAfterTest.h"],
+)
+
+math_test(
+ name = "nextafterl",
+ hdrs = ["NextAfterTest.h"],
+)
+
+math_test(
+ name = "nextafterf128",
+ hdrs = ["NextAfterTest.h"],
+)
+
+math_test(
+ name = "nextdown",
+ hdrs = ["NextDownTest.h"],
+)
+
+math_test(
+ name = "nextdownf",
+ hdrs = ["NextDownTest.h"],
+)
+
+math_test(
+ name = "nextdownl",
+ hdrs = ["NextDownTest.h"],
+)
+
+math_test(
+ name = "nextdownf128",
+ hdrs = ["NextDownTest.h"],
+)
+
+math_test(
+ name = "nexttoward",
+ hdrs = ["NextTowardTest.h"],
+)
+
+math_test(
+ name = "nexttowardf",
+ hdrs = ["NextTowardTest.h"],
+)
+
+math_test(
+ name = "nexttowardl",
+ hdrs = ["NextTowardTest.h"],
+)
+
+math_test(
+ name = "nextup",
+ hdrs = ["NextUpTest.h"],
+)
+
+math_test(
+ name = "nextupf",
+ hdrs = ["NextUpTest.h"],
+)
+
+math_test(
+ name = "nextupl",
+ hdrs = ["NextUpTest.h"],
+)
+
+math_test(
+ name = "nextupf128",
+ hdrs = ["NextUpTest.h"],
+)
+
+math_test(name = "pow")
+
+math_test(name = "powf")
+
+math_test(
+ name = "remquo",
+ hdrs = ["RemQuoTest.h"],
+)
+
+math_test(
+ name = "remquof",
+ hdrs = ["RemQuoTest.h"],
+)
+
+math_test(
+ name = "remquol",
+ hdrs = ["RemQuoTest.h"],
+)
+
+math_test(
+ name = "remquof128",
+ hdrs = ["RemQuoTest.h"],
+)
+
+math_test(
+ name = "rint",
+ hdrs = ["RIntTest.h"],
+)
+
+math_test(
+ name = "rintf",
+ hdrs = ["RIntTest.h"],
+)
+
+math_test(
+ name = "rintl",
+ hdrs = ["RIntTest.h"],
+)
+
+math_test(
+ name = "rintf128",
+ hdrs = ["RIntTest.h"],
+)
+
+math_test(
+ name = "roundeven",
+ hdrs = ["RoundEvenTest.h"],
+)
+
+math_test(
+ name = "roundevenf",
+ hdrs = ["RoundEvenTest.h"],
+)
+
+math_test(
+ name = "roundevenl",
+ hdrs = ["RoundEvenTest.h"],
+)
+
+math_test(
+ name = "roundevenf128",
+ hdrs = ["RoundEvenTest.h"],
+)
+
+math_test(
+ name = "round",
+ hdrs = ["RoundTest.h"],
+)
+
+math_test(
+ name = "roundf",
+ hdrs = ["RoundTest.h"],
+)
+
+math_test(
+ name = "roundl",
+ hdrs = ["RoundTest.h"],
+)
+
+math_test(
+ name = "roundf128",
+ hdrs = ["RoundTest.h"],
+)
+
+math_test(
+ name = "scalbn",
+ hdrs = [
+ "LdExpTest.h",
+ "ScalbnTest.h",
+ ],
+)
+
+math_test(
+ name = "scalbnf",
+ hdrs = [
+ "LdExpTest.h",
+ "ScalbnTest.h",
+ ],
+)
+
+math_test(
+ name = "scalbnl",
+ hdrs = [
+ "LdExpTest.h",
+ "ScalbnTest.h",
+ ],
+)
+
+math_test(
+ name = "scalbnf128",
+ hdrs = [
+ "LdExpTest.h",
+ "ScalbnTest.h",
+ ],
+)
+
+math_test(
+ name = "scalbln",
+ hdrs = [
+ "LdExpTest.h",
+ "ScalbnTest.h",
+ ],
+)
+
+math_test(
+ name = "scalblnf",
+ hdrs = [
+ "LdExpTest.h",
+ "ScalbnTest.h",
+ ],
+)
+
+math_test(
+ name = "scalblnl",
+ hdrs = [
+ "LdExpTest.h",
+ "ScalbnTest.h",
+ ],
+)
+
+math_test(
+ name = "scalblnf128",
+ hdrs = [
+ "LdExpTest.h",
+ "ScalbnTest.h",
+ ],
+)
+
+math_test(
+ name = "setpayload",
+ hdrs = ["SetPayloadTest.h"],
+)
+
+math_test(
+ name = "setpayloadf",
+ hdrs = ["SetPayloadTest.h"],
+)
+
+math_test(
+ name = "setpayloadl",
+ hdrs = ["SetPayloadTest.h"],
+)
+
+math_test(
+ name = "setpayloadf128",
+ hdrs = ["SetPayloadTest.h"],
+)
+
+math_test(
+ name = "setpayloadsig",
+ hdrs = ["SetPayloadSigTest.h"],
+)
+
+math_test(
+ name = "setpayloadsigf",
+ hdrs = ["SetPayloadSigTest.h"],
+)
+
+math_test(
+ name = "setpayloadsigl",
+ hdrs = ["SetPayloadSigTest.h"],
+)
+
+math_test(
+ name = "setpayloadsigf128",
+ hdrs = ["SetPayloadSigTest.h"],
+)
+
+math_test(name = "sin")
+
+math_test(name = "sinf")
+
+math_test(name = "sincos")
+
+math_test(name = "sincosf")
+
+math_test(
+ name = "sinhf",
deps = [
"//libc:__support_cpp_array",
- "//libc:__support_cpp_bit",
- "//libc:__support_cpp_type_traits",
- "//libc:__support_fputil_basic_operations",
- "//libc:__support_fputil_fenv_impl",
- "//libc:__support_fputil_fp_bits",
- "//libc:hdr_fenv_macros",
- "//libc:hdr_math_macros",
- "//libc/test/UnitTest:LibcUnitTest",
- "//libc/test/UnitTest:fp_test_helpers",
],
)
+math_test(name = "sinpif")
+
math_test(
- name = "nextafterf128",
- deps = [":nextafter_test_template"],
+ name = "sqrt",
+ hdrs = ["SqrtTest.h"],
+)
+
+math_test(
+ name = "sqrtf",
+ hdrs = ["SqrtTest.h"],
+)
+
+math_test(
+ name = "sqrtl",
+ hdrs = ["SqrtTest.h"],
+)
+
+math_test(
+ name = "sqrtf128",
+ hdrs = ["SqrtTest.h"],
+)
+
+math_test(name = "tan")
+
+math_test(name = "tanf")
+
+math_test(name = "tanhf")
+
+math_test(
+ name = "totalorder",
+ hdrs = ["TotalOrderTest.h"],
+)
+
+math_test(
+ name = "totalorderf",
+ hdrs = ["TotalOrderTest.h"],
+)
+
+math_test(
+ name = "totalorderl",
+ hdrs = ["TotalOrderTest.h"],
+)
+
+math_test(
+ name = "totalorderf128",
+ hdrs = ["TotalOrderTest.h"],
+)
+
+math_test(
+ name = "totalordermag",
+ hdrs = ["TotalOrderMagTest.h"],
+)
+
+math_test(
+ name = "totalordermagf",
+ hdrs = ["TotalOrderMagTest.h"],
+)
+
+math_test(
+ name = "totalordermagl",
+ hdrs = ["TotalOrderMagTest.h"],
+)
+
+math_test(
+ name = "totalordermagf128",
+ hdrs = ["TotalOrderMagTest.h"],
+)
+
+math_test(
+ name = "trunc",
+ hdrs = ["TruncTest.h"],
+)
+
+math_test(
+ name = "truncf",
+ hdrs = ["TruncTest.h"],
+)
+
+math_test(
+ name = "truncl",
+ hdrs = ["TruncTest.h"],
+)
+
+math_test(
+ name = "truncf128",
+ hdrs = ["TruncTest.h"],
+)
+
+math_test(
+ name = "ufromfp",
+ hdrs = ["UfromfpTest.h"],
+)
+
+math_test(
+ name = "ufromfpf",
+ hdrs = ["UfromfpTest.h"],
+)
+
+math_test(
+ name = "ufromfpl",
+ hdrs = ["UfromfpTest.h"],
+)
+
+math_test(
+ name = "ufromfpf128",
+ hdrs = ["UfromfpTest.h"],
+)
+
+math_test(
+ name = "ufromfpx",
+ hdrs = ["UfromfpxTest.h"],
+)
+
+math_test(
+ name = "ufromfpxf",
+ hdrs = ["UfromfpxTest.h"],
+)
+
+math_test(
+ name = "ufromfpxl",
+ hdrs = ["UfromfpxTest.h"],
+)
+
+math_test(
+ name = "ufromfpxf128",
+ hdrs = ["UfromfpxTest.h"],
)
diff --git a/utils/bazel/llvm-project-overlay/libc/test/src/stdlib/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/test/src/stdlib/BUILD.bazel
index b34e281..4575c40 100644
--- a/utils/bazel/llvm-project-overlay/libc/test/src/stdlib/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libc/test/src/stdlib/BUILD.bazel
@@ -100,10 +100,39 @@ libc_test(
libc_function_deps = ["//libc:bsearch"],
)
+libc_support_library(
+ name = "qsort_test_helper",
+ hdrs = ["SortingTest.h"],
+ deps = [
+ "//libc:__support_macros_config",
+ "//libc:qsort_util",
+ "//libc/test/UnitTest:LibcUnitTest",
+ ],
+)
+
libc_test(
name = "qsort_test",
srcs = ["qsort_test.cpp"],
libc_function_deps = ["//libc:qsort"],
+ deps = [":qsort_test_helper"],
+)
+
+libc_test(
+ name = "quick_sort_test",
+ srcs = ["quick_sort_test.cpp"],
+ deps = [
+ ":qsort_test_helper",
+ "//libc:qsort_util",
+ ],
+)
+
+libc_test(
+ name = "heap_sort_test",
+ srcs = ["heap_sort_test.cpp"],
+ deps = [
+ ":qsort_test_helper",
+ "//libc:qsort_util",
+ ],
)
libc_test(
diff --git a/utils/bazel/llvm-project-overlay/libc/test/src/string/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/test/src/string/BUILD.bazel
index fb0046e..b11bf16 100644
--- a/utils/bazel/llvm-project-overlay/libc/test/src/string/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libc/test/src/string/BUILD.bazel
@@ -121,6 +121,7 @@ libc_support_library(
deps = [
"//libc:__support_cpp_span",
"//libc:__support_libc_assert",
+ "//libc:__support_macros_config",
"//libc:__support_macros_sanitizer",
"//libc:string_memory_utils",
],
diff --git a/utils/bazel/llvm-project-overlay/libc/test/src/sys/epoll/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/test/src/sys/epoll/BUILD.bazel
index b090bde..7fb5040 100644
--- a/utils/bazel/llvm-project-overlay/libc/test/src/sys/epoll/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libc/test/src/sys/epoll/BUILD.bazel
@@ -78,21 +78,19 @@ libc_test(
],
)
-#TODO: Enable once epoll_pwait2 availablilty can be checked first.
-# https://github.com/llvm/llvm-project/issues/80060
-# libc_test(
-# name = "epoll_pwait2_test",
-# srcs = ["linux/epoll_pwait2_test.cpp"],
-# libc_function_deps = [
-# "//libc:epoll_pwait2",
-# "//libc:epoll_create1",
-# "//libc:epoll_ctl",
-# "//libc:pipe",
-# "//libc:close",
-# ],
-# deps = [
-# "//libc:hdr_sys_epoll_macros",
-# "//libc:types_struct_epoll_event",
-# "//libc:types_struct_timespec",
-# ],
-# )
+libc_test(
+ name = "epoll_pwait2_test",
+ srcs = ["linux/epoll_pwait2_test.cpp"],
+ libc_function_deps = [
+ "//libc:epoll_pwait2",
+ "//libc:epoll_create1",
+ "//libc:epoll_ctl",
+ "//libc:pipe",
+ "//libc:close",
+ ],
+ deps = [
+ "//libc:hdr_sys_epoll_macros",
+ "//libc:types_struct_epoll_event",
+ "//libc:types_struct_timespec",
+ ],
+)
diff --git a/utils/bazel/llvm-project-overlay/libc/test/src/unistd/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/test/src/unistd/BUILD.bazel
index 4549fa2..66d8ddb 100644
--- a/utils/bazel/llvm-project-overlay/libc/test/src/unistd/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libc/test/src/unistd/BUILD.bazel
@@ -261,13 +261,6 @@ libc_test(
# ],
# )
-libc_test(
- name = "getpid_test",
- srcs = ["getpid_test.cpp"],
- libc_function_deps = [
- "//libc:getpid",
- ],
-)
libc_test(
name = "getppid_test",
diff --git a/utils/bazel/llvm-project-overlay/libc/utils/MPFRWrapper/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/utils/MPFRWrapper/BUILD.bazel
index 17ffd29..adf4b23 100644
--- a/utils/bazel/llvm-project-overlay/libc/utils/MPFRWrapper/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libc/utils/MPFRWrapper/BUILD.bazel
@@ -48,10 +48,12 @@ libc_support_library(
"//libc:__support_cpp_type_traits",
"//libc:__support_fputil_fp_bits",
"//libc:__support_fputil_fpbits_str",
+ "//libc:__support_macros_config",
"//libc:__support_macros_properties_types",
"//libc:hdr_math_macros",
"//libc/test/UnitTest:LibcUnitTest",
"//libc/test/UnitTest:fp_test_helpers",
"//libc/utils/MPFRWrapper:mpfr_impl",
+ "@gmp//:gmp_",
],
)
diff --git a/utils/bazel/llvm-project-overlay/lld/BUILD.bazel b/utils/bazel/llvm-project-overlay/lld/BUILD.bazel
index 2ccd6fc..a08ce54 100644
--- a/utils/bazel/llvm-project-overlay/lld/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/lld/BUILD.bazel
@@ -227,6 +227,7 @@ cc_library(
"//llvm:BinaryFormat",
"//llvm:BitReader",
"//llvm:BitWriter",
+ "//llvm:CGData",
"//llvm:Core",
"//llvm:DebugInfoDWARF",
"//llvm:Demangle",
@@ -235,6 +236,7 @@ cc_library(
"//llvm:ObjCARC",
"//llvm:Object",
"//llvm:Option",
+ "//llvm:ProfileData",
"//llvm:Support",
"//llvm:TargetParser",
"//llvm:TextAPI",
diff --git a/utils/bazel/llvm-project-overlay/lldb/BUILD.bazel b/utils/bazel/llvm-project-overlay/lldb/BUILD.bazel
index 50da741..3ed4f55 100644
--- a/utils/bazel/llvm-project-overlay/lldb/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/lldb/BUILD.bazel
@@ -108,6 +108,9 @@ expand_template(
# TODO: lua support
"#cmakedefine01 LLDB_ENABLE_LUA": "#define LLDB_ENABLE_LUA 0",
+ # TODO: curl support
+ "#cmakedefine01 LLVM_ENABLE_CURL": "#define LLVM_ENABLE_CURL 0",
+
# TODO: python support
"#cmakedefine01 LLDB_ENABLE_PYTHON": "#define LLDB_ENABLE_PYTHON 0",
# Only enabled by default on Windows
@@ -429,6 +432,7 @@ cc_library(
":Version",
"//clang:codegen",
"//clang:frontend",
+ "//clang:serialization",
"//llvm:Support",
],
)
@@ -465,7 +469,7 @@ cc_library(
"include/lldb/Host/posix/*.h",
]),
strip_include_prefix = "include",
- deps = [":Utility"],
+ deps = [":UtilityHeaders"],
)
cc_library(
@@ -480,7 +484,7 @@ cc_library(
"@platforms//os:macos": [],
"//conditions:default": ["@platforms//:incompatible"],
}),
- deps = [":Utility"],
+ deps = [":UtilityHeaders"],
)
objc_library(
@@ -498,7 +502,7 @@ objc_library(
":Headers",
":HostMacOSXHeaders",
":HostMacOSXPrivateHeaders",
- ":Utility",
+ ":UtilityHeaders",
"//llvm:Support",
"//llvm:TargetParser",
],
@@ -560,7 +564,7 @@ cc_library(
strip_include_prefix = "include",
deps = [
":Headers",
- ":Utility",
+ ":UtilityHeaders",
"//llvm:Object",
"//llvm:Support",
"//llvm:TargetParser",
@@ -613,7 +617,6 @@ cc_library(
":InterpreterHeaders",
":SymbolHeaders",
":TargetHeaders",
- ":Utility",
"//clang:driver",
"//llvm:Demangle",
"//llvm:Support",
@@ -675,7 +678,10 @@ cc_library(
name = "TargetHeaders",
hdrs = glob(["include/lldb/Target/**/*.h"]),
strip_include_prefix = "include",
- deps = [":AppleArm64ExceptionClass"],
+ deps = [
+ ":AppleArm64ExceptionClass",
+ ":BreakpointHeaders",
+ ],
)
cc_library(
@@ -694,6 +700,7 @@ cc_library(
":TargetHeaders",
":TargetProperties",
":Utility",
+ "//clang:codegen",
"//lldb/source/Plugins:PluginProcessUtility",
"//llvm:BinaryFormat",
"//llvm:MC",
@@ -703,7 +710,9 @@ cc_library(
cc_library(
name = "Headers",
- hdrs = glob(["include/lldb/lldb-*.h"]),
+ hdrs = glob(["include/lldb/lldb-*.h"]) + [
+ "include/lldb/Symbol/SaveCoreOptions.h",
+ ],
strip_include_prefix = "include",
)
@@ -715,12 +724,20 @@ cc_library(
)
cc_library(
+ name = "UtilityHeaders",
+ hdrs = glob(["include/lldb/Utility/**/*.h"]),
+ strip_include_prefix = "include",
+)
+
+cc_library(
name = "Utility",
srcs = glob(["source/Utility/**/*.cpp"]),
hdrs = glob(["include/lldb/Utility/**/*.h"]),
strip_include_prefix = "include",
deps = [
+ ":CoreHeaders",
":Headers",
+ ":TargetHeaders",
":UtilityPrivateHeaders",
"//llvm:BinaryFormat",
"//llvm:Support",
@@ -998,3 +1015,51 @@ cc_binary(
"//conditions:default": [],
}),
)
+
+expand_template(
+ name = "lldb-dap-plist",
+ out = "lldb-dap-Info.plist",
+ substitutions = {
+ "${LLDB_VERSION}": PACKAGE_VERSION,
+ },
+ template = "tools/lldb-dap/lldb-dap-Info.plist.in",
+)
+
+gentbl_cc_library(
+ name = "lldb_dap_opts_gen",
+ strip_include_prefix = "tools/lldb-dap",
+ tbl_outs = [(
+ ["-gen-opt-parser-defs"],
+ "tools/lldb-dap/Options.inc",
+ )],
+ tblgen = "//llvm:llvm-tblgen",
+ td_file = "tools/lldb-dap/Options.td",
+ deps = ["//llvm:OptParserTdFiles"],
+)
+
+cc_binary(
+ name = "lldb-dap",
+ srcs = glob([
+ "tools/lldb-dap/*.cpp",
+ "tools/lldb-dap/*.h",
+ ]),
+ additional_linker_inputs = [
+ ":lldb-dap-plist",
+ ],
+ linkopts = select({
+ "@platforms//os:macos": [
+ "-Wl,-sectcreate,__TEXT,__info_plist,$(location :lldb-dap-plist)",
+ ],
+ "//conditions:default": [],
+ }),
+ deps = [
+ ":lldb_dap_opts_gen",
+ "//lldb:APIHeaders",
+ "//lldb:Headers",
+ "//lldb:Host",
+ "//lldb:liblldb.wrapper",
+ "//llvm:Option",
+ "//llvm:Support",
+ "//llvm:config",
+ ],
+)
diff --git a/utils/bazel/llvm-project-overlay/lldb/source/Plugins/BUILD.bazel b/utils/bazel/llvm-project-overlay/lldb/source/Plugins/BUILD.bazel
index 161b588..a35e6c8 100644
--- a/utils/bazel/llvm-project-overlay/lldb/source/Plugins/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/lldb/source/Plugins/BUILD.bazel
@@ -178,6 +178,7 @@ cc_library(
":PluginCPlusPlusLanguageHeaders",
":PluginExpressionParserClangHeaders",
":PluginObjCRuntime",
+ ":PluginPlatformMacOSX",
":PluginTypeSystemClang",
":PluginTypeSystemClangHeaders",
"//clang:ast",
@@ -445,6 +446,7 @@ cc_library(
"//lldb:Utility",
"//llvm:DebugInfoCodeView",
"//llvm:DebugInfoPDB",
+ "//llvm:config",
],
)
@@ -489,6 +491,7 @@ cc_library(
"//lldb:UtilityPrivateHeaders",
"//llvm:Support",
"//llvm:TargetParser",
+ "//llvm:config",
"@llvm_zlib//:zlib",
],
)
@@ -1086,6 +1089,7 @@ cc_library(
"//lldb:Target",
"//lldb:TargetHeaders",
"//lldb:Utility",
+ "//lldb:UtilityPrivateHeaders",
"//llvm:Core",
"//llvm:TargetParser",
],
@@ -1389,6 +1393,7 @@ cc_library(
"//lldb:SymbolHeaders",
"//lldb:Utility",
"//llvm:Support",
+ "//llvm:config",
"@llvm_zlib//:zlib",
],
)
diff --git a/utils/bazel/llvm-project-overlay/lldb/tools/lldb-dap/BUILD.bazel b/utils/bazel/llvm-project-overlay/lldb/tools/lldb-dap/BUILD.bazel
deleted file mode 100644
index 6d3f190..0000000
--- a/utils/bazel/llvm-project-overlay/lldb/tools/lldb-dap/BUILD.bazel
+++ /dev/null
@@ -1,62 +0,0 @@
-# This file is licensed 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
-
-load("@bazel_skylib//rules:expand_template.bzl", "expand_template")
-load("//:vars.bzl", "PACKAGE_VERSION")
-load("//mlir:tblgen.bzl", "gentbl_cc_library")
-
-package(
- default_visibility = ["//visibility:public"],
- features = ["layering_check"],
-)
-
-licenses(["notice"])
-
-expand_template(
- name = "plist",
- out = "lldb-dap-Info.plist",
- substitutions = {
- "${LLDB_VERSION}": PACKAGE_VERSION,
- },
- template = "lldb-dap-Info.plist.in",
-)
-
-gentbl_cc_library(
- name = "lldb_dap_opts_gen",
- strip_include_prefix = ".",
- tbl_outs = [(
- ["-gen-opt-parser-defs"],
- "Options.inc",
- )],
- tblgen = "//llvm:llvm-tblgen",
- td_file = "Options.td",
- deps = ["//llvm:OptParserTdFiles"],
-)
-
-cc_binary(
- name = "lldb-dap",
- srcs = glob([
- "*.cpp",
- "*.h",
- ]),
- additional_linker_inputs = [
- ":plist",
- ],
- linkopts = select({
- "@platforms//os:macos": [
- "-Wl,-sectcreate,__TEXT,__info_plist,$(location :plist)",
- ],
- "//conditions:default": [],
- }),
- deps = [
- ":lldb_dap_opts_gen",
- "//lldb:APIHeaders",
- "//lldb:Headers",
- "//lldb:Host",
- "//lldb:liblldb.wrapper",
- "//llvm:Option",
- "//llvm:Support",
- "//llvm:config",
- ],
-)
diff --git a/utils/bazel/llvm-project-overlay/llvm/BUILD.bazel b/utils/bazel/llvm-project-overlay/llvm/BUILD.bazel
index 38970d9..4b458e0 100644
--- a/utils/bazel/llvm-project-overlay/llvm/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/llvm/BUILD.bazel
@@ -1297,8 +1297,9 @@ cc_library(
copts = llvm_copts,
includes = ["include"],
textual_hdrs = [
- "include/llvm/TargetParser/ARMTargetParserDef.inc",
+ "include/llvm/TargetParser/AArch64CPUFeatures.inc",
"include/llvm/TargetParser/AArch64TargetParserDef.inc",
+ "include/llvm/TargetParser/ARMTargetParserDef.inc",
"include/llvm/TargetParser/RISCVTargetParserDef.inc",
] + glob([
"include/llvm/TargetParser/*.def",
@@ -1357,11 +1358,9 @@ gentbl(
tblgen = ":llvm-tblgen",
td_file = "lib/Target/AMDGPU/InstCombineTables.td",
td_srcs = glob([
- "include/llvm/CodeGen/*.td",
- "include/llvm/IR/Intrinsics*.td",
+ "lib/Target/AMDGPU/*.td",
]) + [
- "lib/Target/AMDGPU/InstCombineTables.td",
- "include/llvm/TableGen/SearchableTable.td",
+ ":common_target_td_sources",
],
)
@@ -1409,7 +1408,7 @@ cc_library(
"lib/Transforms/Instrumentation/*.inc",
]),
hdrs = glob(["include/llvm/Transforms/Instrumentation/*.h"]) + [
- "include/llvm/Transforms/Instrumentation.h",
+ "include/llvm/Transforms/Utils/Instrumentation.h",
],
copts = llvm_copts,
deps = [
@@ -1419,6 +1418,7 @@ cc_library(
":Demangle",
":MC",
":ProfileData",
+ ":Scalar",
":Support",
":Target",
":TargetParser",
@@ -1446,6 +1446,20 @@ cc_library(
)
cc_library(
+ name = "SandboxIR",
+ srcs = glob([
+ "lib/SandboxIR/*.cpp",
+ ]),
+ hdrs = glob(["include/llvm/SandboxIR/*.h"]),
+ copts = llvm_copts,
+ textual_hdrs = ["include/llvm/SandboxIR/SandboxIRValues.def"],
+ deps = [
+ ":Core",
+ ":Support",
+ ],
+)
+
+cc_library(
name = "Scalar",
srcs = glob([
"lib/Transforms/Scalar/*.cpp",
@@ -1471,16 +1485,17 @@ cc_library(
cc_library(
name = "Vectorize",
srcs = glob([
- "lib/Transforms/Vectorize/*.cpp",
- "lib/Transforms/Vectorize/*.h",
+ "lib/Transforms/Vectorize/**/*.cpp",
+ "lib/Transforms/Vectorize/**/*.h",
]),
hdrs = glob([
- "include/llvm/Transforms/Vectorize/*.h",
+ "include/llvm/Transforms/Vectorize/**/*.h",
]),
copts = llvm_copts,
deps = [
":Analysis",
":Core",
+ ":SandboxIR",
":Scalar",
":Support",
":Target",
@@ -1598,6 +1613,7 @@ cc_library(
":Analysis",
":BitReader",
":Core",
+ ":Demangle",
":FrontendOffloading",
":MC",
":Scalar",
@@ -1854,6 +1870,25 @@ cc_library(
)
cc_library(
+ name = "CGData",
+ srcs = glob(["lib/CGData/**/*.cpp"]),
+ hdrs = glob([
+ "include/llvm/CGData/**/*.h",
+ "include/llvm/CGData/**/*.inc",
+ ]),
+ copts = llvm_copts,
+ deps = [
+ ":BitReader",
+ ":BitWriter",
+ ":Core",
+ ":Object",
+ ":ObjectYAML",
+ ":Support",
+ ":TargetParser",
+ ],
+)
+
+cc_library(
name = "CodeGen",
srcs = glob(
[
@@ -1882,6 +1917,7 @@ cc_library(
":BitReader",
":BitWriter",
":CFGuard",
+ ":CGData",
":CodeGenTypes",
":Core",
":DebugInfoCodeView",
@@ -2326,6 +2362,7 @@ gentbl(
("-gen-global-isel-combiner -combiners=RISCVO0PreLegalizerCombiner", "lib/Target/RISCV/RISCVGenO0PreLegalizeGICombiner.inc"),
("-gen-global-isel-combiner -combiners=RISCVPostLegalizerCombiner", "lib/Target/RISCV/RISCVGenPostLegalizeGICombiner.inc"),
("-gen-global-isel-combiner -combiners=RISCVPreLegalizerCombiner", "lib/Target/RISCV/RISCVGenPreLegalizeGICombiner.inc"),
+ ("-gen-global-isel-combiner -combiners=RISCVPostLegalizerLowering", "lib/Target/RISCV/RISCVGenPostLegalizeGILowering.inc"),
],
tblgen = ":llvm-tblgen",
td_file = "lib/Target/RISCV/RISCVGISel.td",
@@ -3470,6 +3507,39 @@ cc_binary(
],
)
+gentbl(
+ name = "CGDataOptsTableGen",
+ strip_include_prefix = "tools/llvm-cgdata",
+ tbl_outs = [(
+ "-gen-opt-parser-defs",
+ "tools/llvm-cgdata/Opts.inc",
+ )],
+ tblgen = ":llvm-tblgen",
+ td_file = "tools/llvm-cgdata/Opts.td",
+ td_srcs = ["include/llvm/Option/OptParser.td"],
+)
+
+cc_library(
+ name = "llvm-cgdata-lib",
+ srcs = glob(["tools/llvm-cgdata/*.cpp"]),
+ copts = llvm_copts,
+ deps = [
+ ":CGData",
+ ":CGDataOptsTableGen",
+ ":CodeGen",
+ ":Core",
+ ":Object",
+ ":Option",
+ ":Support",
+ ],
+)
+
+llvm_driver_cc_binary(
+ name = "llvm-cgdata",
+ stamp = 0,
+ deps = [":llvm-cgdata-lib"],
+)
+
cc_binary(
name = "llvm-cfi-verify",
srcs = glob([
@@ -3619,22 +3689,41 @@ cc_binary(
],
)
-cc_binary(
- name = "llvm-debuginfod-find",
+gentbl(
+ name = "DebugInfodFindOptsTableGen",
+ strip_include_prefix = "tools/llvm-debuginfod-find",
+ tbl_outs = [(
+ "-gen-opt-parser-defs",
+ "tools/llvm-debuginfod-find/Opts.inc",
+ )],
+ tblgen = ":llvm-tblgen",
+ td_file = "tools/llvm-debuginfod-find/Opts.td",
+ td_srcs = ["include/llvm/Option/OptParser.td"],
+)
+
+cc_library(
+ name = "llvm-debuginfod-find-lib",
srcs = glob([
"tools/llvm-debuginfod-find/*.cpp",
]),
copts = llvm_copts,
- stamp = 0,
deps = [
":BitReader",
":Core",
+ ":DebugInfodFindOptsTableGen",
":Debuginfod",
+ ":Option",
":Support",
":Symbolize",
],
)
+llvm_driver_cc_binary(
+ name = "llvm-debuginfod-find",
+ stamp = 0,
+ deps = [":llvm-debuginfod-find-lib"],
+)
+
cc_binary(
name = "llvm-dis",
srcs = glob([
@@ -4158,6 +4247,7 @@ cc_library(
":Option",
":Support",
":WindowsManifest",
+ ":config",
],
)
@@ -4430,6 +4520,7 @@ cc_library(
copts = llvm_copts,
deps = [
":Core",
+ ":Debuginfod",
":Object",
":ProfileData",
":Support",
@@ -4599,6 +4690,7 @@ cc_binary(
":Target",
":TargetParser",
":TransformUtils",
+ ":config",
],
)
diff --git a/utils/bazel/llvm-project-overlay/llvm/config.bzl b/utils/bazel/llvm-project-overlay/llvm/config.bzl
index 2e3bff5..6e703d2 100644
--- a/utils/bazel/llvm-project-overlay/llvm/config.bzl
+++ b/utils/bazel/llvm-project-overlay/llvm/config.bzl
@@ -6,10 +6,10 @@
load(
"//:vars.bzl",
- "LLVM_VERSION",
"LLVM_VERSION_MAJOR",
"LLVM_VERSION_MINOR",
"LLVM_VERSION_PATCH",
+ "PACKAGE_VERSION",
)
def native_arch_defines(arch, triple):
@@ -47,7 +47,6 @@ posix_defines = [
linux_defines = posix_defines + [
"_GNU_SOURCE",
- "HAVE_LINK_H=1",
"HAVE_MALLINFO=1",
"HAVE_SBRK=1",
"HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC=1",
@@ -108,7 +107,7 @@ llvm_config_defines = os_defines + builtin_thread_pointer + select({
"LLVM_VERSION_MAJOR={}".format(LLVM_VERSION_MAJOR),
"LLVM_VERSION_MINOR={}".format(LLVM_VERSION_MINOR),
"LLVM_VERSION_PATCH={}".format(LLVM_VERSION_PATCH),
- r'LLVM_VERSION_STRING=\"{}git\"'.format(LLVM_VERSION),
+ r'LLVM_VERSION_STRING=\"{}\"'.format(PACKAGE_VERSION),
# These shouldn't be needed by the C++11 standard, but are for some
# platforms (e.g. glibc < 2.18. See
# https://sourceware.org/bugzilla/show_bug.cgi?id=15366). These are also
diff --git a/utils/bazel/llvm-project-overlay/llvm/driver.bzl b/utils/bazel/llvm-project-overlay/llvm/driver.bzl
index a57a14e..66e8af7 100644
--- a/utils/bazel/llvm-project-overlay/llvm/driver.bzl
+++ b/utils/bazel/llvm-project-overlay/llvm/driver.bzl
@@ -14,7 +14,9 @@ _TOOLS = {
"dsymutil": "//llvm:dsymutil-lib",
"lld": "//lld:lld-lib",
"llvm-ar": "//llvm:llvm-ar-lib",
+ "llvm-cgdata": "//llvm:llvm-cgdata-lib",
"llvm-cxxfilt": "//llvm:llvm-cxxfilt-lib",
+ "llvm-debuginfod-find": "//llvm:llvm-debuginfod-find-lib",
"llvm-dwp": "//llvm:llvm-dwp-lib",
"llvm-gsymutil": "//llvm:llvm-gsymutil-lib",
"llvm-ifs": "//llvm:llvm-ifs-lib",
diff --git a/utils/bazel/llvm-project-overlay/llvm/include/llvm/Config/config.h b/utils/bazel/llvm-project-overlay/llvm/include/llvm/Config/config.h
index a4fb47d..15696c3 100644
--- a/utils/bazel/llvm-project-overlay/llvm/include/llvm/Config/config.h
+++ b/utils/bazel/llvm-project-overlay/llvm/include/llvm/Config/config.h
@@ -141,9 +141,6 @@
/* Define to 1 if you have the `pthread_setname_np' function. */
#define HAVE_PTHREAD_SETNAME_NP 1
-/* Define to 1 if you have the <link.h> header file. */
-/* HAVE_LINK_H defined in Bazel */
-
/* Define to 1 if you have the <mach/mach.h> header file. */
/* HAVE_MACH_MACH_H defined in Bazel */
diff --git a/utils/bazel/llvm-project-overlay/llvm/unittests/BUILD.bazel b/utils/bazel/llvm-project-overlay/llvm/unittests/BUILD.bazel
index dfc0f87..1170458 100644
--- a/utils/bazel/llvm-project-overlay/llvm/unittests/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/llvm/unittests/BUILD.bazel
@@ -52,6 +52,7 @@ cc_test(
"//llvm:AsmParser",
"//llvm:CodeGen",
"//llvm:Core",
+ "//llvm:Instrumentation",
"//llvm:Passes",
"//llvm:Support",
"//llvm:TargetParser",
@@ -59,6 +60,7 @@ cc_test(
"//llvm:TransformUtils",
"//llvm:attributes_gen",
"//llvm:config",
+ "//third-party/unittest:gmock",
"//third-party/unittest:gtest",
"//third-party/unittest:gtest_main",
],
@@ -119,6 +121,24 @@ cc_test(
],
)
+cc_test(
+ name = "cgdata_tests",
+ size = "small",
+ srcs = glob(
+ ["CGData/*.cpp"],
+ allow_empty = False,
+ ),
+ deps = [
+ "//llvm:CGData",
+ "//llvm:CodeGen",
+ "//llvm:Core",
+ "//llvm:Support",
+ "//third-party/unittest:gmock",
+ "//third-party/unittest:gtest",
+ "//third-party/unittest:gtest_main",
+ ],
+)
+
cc_library(
name = "codegen_tests_includes",
textual_hdrs = glob(
@@ -620,7 +640,7 @@ cc_test(
allow_empty = False,
),
deps = [
- "//llvm:BitstreamReader",
+ "//llvm:BitReader",
"//llvm:Core",
"//llvm:Coverage",
"//llvm:DebugInfo",
@@ -774,6 +794,7 @@ cc_test(
"//llvm:IPO",
"//llvm:IRReader",
"//llvm:Passes",
+ "//llvm:ProfileData",
"//llvm:Support",
"//llvm:TestingSupport",
"//llvm:TransformUtils",
diff --git a/utils/bazel/llvm-project-overlay/llvm/utils/lit/tests/BUILD.bazel b/utils/bazel/llvm-project-overlay/llvm/utils/lit/tests/BUILD.bazel
index b9e0a2e..d89626a 100644
--- a/utils/bazel/llvm-project-overlay/llvm/utils/lit/tests/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/llvm/utils/lit/tests/BUILD.bazel
@@ -33,5 +33,15 @@ expand_template(
"//llvm:not",
] + glob(["Inputs/**"]),
)
- for src in glob(["*/*.py"])
+ for src in glob(
+ ["**/*.py"],
+ exclude = [
+ "Inputs/**",
+ "discovery.py", # TODO: debug and re-enable
+ "max-time.py",
+ "selecting.py",
+ "shtest-recursive-substitution.py",
+ "use-llvm-tool.py",
+ ],
+ )
]
diff --git a/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel b/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
index c9061e7..034b875 100644
--- a/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
@@ -257,6 +257,14 @@ gentbl_cc_library(
["--gen-typedef-defs"],
"include/mlir/IR/BuiltinTypes.cpp.inc",
),
+ (
+ ["-gen-type-constraint-decls"],
+ "include/mlir/IR/BuiltinTypeConstraints.h.inc",
+ ),
+ (
+ ["-gen-type-constraint-defs"],
+ "include/mlir/IR/BuiltinTypeConstraints.cpp.inc",
+ ),
],
tblgen = ":mlir-tblgen",
td_file = "include/mlir/IR/BuiltinTypes.td",
@@ -342,6 +350,7 @@ cc_library(
"include/mlir/IR/PDLPatternMatch.h.inc",
"include/mlir/Interfaces/CallInterfaces.h",
"include/mlir/Interfaces/DataLayoutInterfaces.h",
+ "include/mlir/Interfaces/InferIntRangeInterface.h",
"include/mlir/Interfaces/SideEffectInterfaces.h",
],
hdrs = glob([
@@ -362,6 +371,7 @@ cc_library(
":BytecodeOpInterfaceIncGen",
":CallOpInterfacesIncGen",
":DataLayoutInterfacesIncGen",
+ ":InferIntRangeInterfaceIncGen",
":OpAsmInterfaceIncGen",
":RegionKindInterfaceIncGen",
":SideEffectInterfacesIncGen",
@@ -431,6 +441,7 @@ mlir_c_api_cc_library(
"include/mlir/CAPI/Interfaces.h",
"include/mlir/CAPI/Pass.h",
"include/mlir/CAPI/Registration.h",
+ "include/mlir/CAPI/Rewrite.h",
"include/mlir/CAPI/Support.h",
"include/mlir/CAPI/Utils.h",
"include/mlir/CAPI/Wrap.h",
@@ -917,24 +928,14 @@ exports_files(
glob(["lib/Bindings/Python/**/*.cpp"]),
)
-# In the targets related to Python bindings, the projects @pybind11 and
-# @local_config_python are defined by @pybind11_bazel. The latter contains
-# python headers, and can be configured in an out-of-tree bazel project via
-#
-# load("@pybind11_bazel//:python_configure.bzl", "python_configure")
-# python_configure(name = "local_config_python")
-#
-# For more up-to-date instructions, see
-# https://github.com/pybind/pybind11_bazel
-#
-# Some out-of-tree projects alias @python_runtime//:headers to
-# @local_config_python//:python_headers.
-
-MLIR_BINDINGS_PYTHON_HEADERS = [
- "lib/Bindings/Python/*.h",
- "include/mlir-c/Bindings/Python/*.h",
- "include/mlir/Bindings/Python/*.h",
-]
+filegroup(
+ name = "MLIRBindingsPythonHeaderFiles",
+ srcs = glob([
+ "lib/Bindings/Python/*.h",
+ "include/mlir-c/Bindings/Python/*.h",
+ "include/mlir/Bindings/Python/*.h",
+ ]),
+)
cc_library(
name = "MLIRBindingsPythonHeaders",
@@ -942,16 +943,12 @@ cc_library(
"include",
"lib/Bindings/Python",
],
- tags = [
- "manual", # External dependency
- "nobuildkite", # TODO(gcmn): Add support for this target
- ],
- textual_hdrs = glob(MLIR_BINDINGS_PYTHON_HEADERS),
+ textual_hdrs = [":MLIRBindingsPythonHeaderFiles"],
deps = [
":CAPIIRHeaders",
":CAPITransformsHeaders",
- "@local_config_python//:python_headers",
"@pybind11",
+ "@rules_python//python/cc:current_py_cc_headers",
],
)
@@ -961,16 +958,12 @@ cc_library(
"include",
"lib/Bindings/Python",
],
- tags = [
- "manual", # External dependency
- "nobuildkite", # TODO(gcmn): Add support for this target
- ],
- textual_hdrs = glob(MLIR_BINDINGS_PYTHON_HEADERS),
+ textual_hdrs = [":MLIRBindingsPythonHeaderFiles"],
deps = [
":CAPIIR",
":CAPITransforms",
- "@local_config_python//:python_headers",
"@pybind11",
+ "@rules_python//python/cc:current_py_cc_headers",
],
)
@@ -985,26 +978,25 @@ PYBIND11_FEATURES = [
"-use_header_modules",
]
-MLIR_PYTHON_BINDINGS_SOURCES = [
- "lib/Bindings/Python/IRAffine.cpp",
- "lib/Bindings/Python/IRAttributes.cpp",
- "lib/Bindings/Python/IRCore.cpp",
- "lib/Bindings/Python/IRInterfaces.cpp",
- "lib/Bindings/Python/IRModule.cpp",
- "lib/Bindings/Python/IRTypes.cpp",
- "lib/Bindings/Python/Pass.cpp",
- "lib/Bindings/Python/Rewrite.cpp",
-]
+filegroup(
+ name = "MLIRBindingsPythonSourceFiles",
+ srcs = [
+ "lib/Bindings/Python/IRAffine.cpp",
+ "lib/Bindings/Python/IRAttributes.cpp",
+ "lib/Bindings/Python/IRCore.cpp",
+ "lib/Bindings/Python/IRInterfaces.cpp",
+ "lib/Bindings/Python/IRModule.cpp",
+ "lib/Bindings/Python/IRTypes.cpp",
+ "lib/Bindings/Python/Pass.cpp",
+ "lib/Bindings/Python/Rewrite.cpp",
+ ],
+)
cc_library(
name = "MLIRBindingsPythonCore",
- srcs = MLIR_PYTHON_BINDINGS_SOURCES,
+ srcs = [":MLIRBindingsPythonSourceFiles"],
copts = PYBIND11_COPTS,
features = PYBIND11_FEATURES,
- tags = [
- "manual", # External dependency
- "nobuildkite", # TODO(gcmn): Add support for this target
- ],
deps = [
":CAPIAsync",
":CAPIDebug",
@@ -1014,30 +1006,26 @@ cc_library(
":Support",
":config",
"//llvm:Support",
- "@local_config_python//:python_headers",
"@pybind11",
+ "@rules_python//python/cc:current_py_cc_headers",
],
)
cc_library(
name = "MLIRBindingsPythonCoreNoCAPI",
- srcs = MLIR_PYTHON_BINDINGS_SOURCES,
+ srcs = [":MLIRBindingsPythonSourceFiles"],
copts = PYBIND11_COPTS,
features = PYBIND11_FEATURES,
- tags = [
- "manual", # External dependency
- "nobuildkite", # TODO(gcmn): Add support for this target
- ],
deps = [
":CAPIAsyncHeaders",
":CAPIDebugHeaders",
":CAPIIRHeaders",
- ":config",
":MLIRBindingsPythonHeaders",
":Support",
+ ":config",
"//llvm:Support",
- "@local_config_python//:python_headers",
"@pybind11",
+ "@rules_python//python/cc:current_py_cc_headers",
],
)
@@ -1045,10 +1033,6 @@ cc_library(
# MLIRBindingsPythonCoreNoCAPI.
cc_library(
name = "MLIRBindingsPythonCAPIObjects",
- tags = [
- "manual", # External dependency
- "nobuildkite", # TODO(gcmn): Add support for this target
- ],
deps = [
":CAPIAsyncObjects",
":CAPIDebugObjects",
@@ -1067,10 +1051,6 @@ cc_binary(
features = PYBIND11_FEATURES,
linkshared = 1,
linkstatic = 0,
- tags = [
- "manual", # External dependency
- "nobuildkite", # TODO(gcmn): Add support for this target
- ],
deps = [
":MLIRBindingsPythonCore",
":MLIRBindingsPythonHeadersAndDeps",
@@ -1084,10 +1064,6 @@ cc_binary(
features = PYBIND11_FEATURES,
linkshared = 1,
linkstatic = 0,
- tags = [
- "manual", # External dependency
- "nobuildkite", # TODO(gcmn): Add support for this target
- ],
deps = [
":CAPIIR",
":CAPILinalg",
@@ -1102,10 +1078,6 @@ cc_binary(
features = PYBIND11_FEATURES,
linkshared = 1,
linkstatic = 0,
- tags = [
- "manual", # External dependency
- "nobuildkite",
- ],
deps = [
":CAPIIR",
":CAPILLVM",
@@ -1121,10 +1093,6 @@ cc_binary(
features = PYBIND11_FEATURES,
linkshared = 1,
linkstatic = 0,
- tags = [
- "manual", # External dependency
- "nobuildkite", # TODO(gcmn): Add support for this target
- ],
deps = [
":CAPIIR",
":CAPIQuant",
@@ -1140,10 +1108,6 @@ cc_binary(
features = PYBIND11_FEATURES,
linkshared = 1,
linkstatic = 0,
- tags = [
- "manual", # External dependency
- "nobuildkite", # TODO(gcmn): Add support for this target
- ],
deps = [
":CAPIIR",
":CAPISparseTensor",
@@ -1160,15 +1124,11 @@ cc_binary(
features = PYBIND11_FEATURES,
linkshared = 1,
linkstatic = 0,
- tags = [
- "manual", # External dependency
- "nobuildkite", # TODO(gcmn): Add support for this target
- ],
deps = [
":CAPIExecutionEngine",
":MLIRBindingsPythonHeadersAndDeps",
- "@local_config_python//:python_headers",
"@pybind11",
+ "@rules_python//python/cc:current_py_cc_headers",
],
)
@@ -1180,15 +1140,11 @@ cc_binary(
features = PYBIND11_FEATURES,
linkshared = 1,
linkstatic = 0,
- tags = [
- "manual", # External dependency
- "nobuildkite", # TODO(gcmn): Add support for this target
- ],
deps = [
":CAPILinalg",
":MLIRBindingsPythonHeadersAndDeps",
- "@local_config_python//:python_headers",
"@pybind11",
+ "@rules_python//python/cc:current_py_cc_headers",
],
)
@@ -1578,6 +1534,7 @@ cc_library(
":BytecodeOpInterface",
":GPUDialect",
":IR",
+ ":ROCDLDialect",
":SideEffectInterfaces",
"//llvm:Support",
],
@@ -2196,6 +2153,7 @@ cc_library(
":FuncTransforms",
":FunctionInterfaces",
":IR",
+ ":IndexDialect",
":LLVMCommonConversion",
":LLVMDialect",
":MemRefDialect",
@@ -2203,6 +2161,7 @@ cc_library(
":SCFDialect",
":SCFTransforms",
":TransformUtils",
+ ":VectorUtils",
"//llvm:Support",
],
)
@@ -2241,6 +2200,7 @@ cc_library(
":Pass",
":TransformUtils",
":VectorDialect",
+ "//llvm:Support",
],
)
@@ -2900,6 +2860,7 @@ cc_library(
":IR",
":LoopLikeInterface",
":SCFDialect",
+ ":SCFToControlFlow",
":SCFTransformOpsIncGen",
":SCFTransforms",
":SCFUtils",
@@ -3319,6 +3280,20 @@ gentbl_cc_library(
],
"include/mlir/Dialect/Mesh/IR/MeshAttributes.cpp.inc",
),
+ (
+ [
+ "-gen-typedef-decls",
+ "-typedefs-dialect=mesh",
+ ],
+ "include/mlir/Dialect/Mesh/IR/MeshTypes.h.inc",
+ ),
+ (
+ [
+ "-gen-typedef-defs",
+ "-typedefs-dialect=mesh",
+ ],
+ "include/mlir/Dialect/Mesh/IR/MeshTypes.cpp.inc",
+ ),
],
tblgen = ":mlir-tblgen",
td_file = "include/mlir/Dialect/Mesh/IR/MeshOps.td",
@@ -3359,6 +3334,7 @@ cc_library(
":MeshDialect",
":MeshShardingInterfaceIncGen",
":Support",
+ ":TensorDialect",
"//llvm:Support",
],
)
@@ -3377,6 +3353,7 @@ cc_library(
":DialectUtils",
":IR",
":InferTypeOpInterface",
+ ":InliningUtils",
":MeshIncGen",
":SideEffectInterfaces",
":Support",
@@ -3440,6 +3417,7 @@ td_library(
srcs = ["include/mlir/Dialect/NVGPU/IR/NVGPU.td"],
includes = ["include"],
deps = [
+ ":InferTypeOpInterfaceTdFiles",
":SideEffectInterfacesTdFiles",
],
)
@@ -3528,6 +3506,7 @@ cc_library(
":BytecodeOpInterface",
":GPUDialect",
":IR",
+ ":InferTypeOpInterface",
":LLVMDialect",
":NVGPUIncGen",
":SideEffectInterfaces",
@@ -4220,6 +4199,7 @@ cc_library(
":MathToFuncs",
":MathToLLVM",
":MathToLibm",
+ ":MathToROCDL",
":MathToSPIRV",
":MemRefToEmitC",
":MemRefToLLVM",
@@ -4874,6 +4854,7 @@ cc_library(
":BuiltinToLLVMIRTranslation",
":ComplexToLLVM",
":ControlFlowToLLVM",
+ ":DLTITransformOps",
":FuncExtensions",
":FuncToLLVM",
":FuncTransformOps",
@@ -4893,6 +4874,7 @@ cc_library(
":ROCDLToLLVMIRTranslation",
":SCFTransformOps",
":SparseTensorTransformOps",
+ ":TensorExtensions",
":TensorTransformOps",
":TransformDebugExtension",
":TransformIRDLExtension",
@@ -5070,6 +5052,7 @@ cc_library(
":BufferizationTransforms",
":DialectUtils",
":FuncDialect",
+ ":FunctionInterfaces",
":IR",
":LinalgDialect",
":MemRefDialect",
@@ -5215,6 +5198,32 @@ cc_library(
)
cc_library(
+ name = "TableGenLspServerLib",
+ srcs = glob([
+ "lib/Tools/tblgen-lsp-server/*.cpp",
+ "lib/Tools/tblgen-lsp-server/*.h",
+ ]),
+ hdrs = glob(["include/mlir/Tools/tblgen-lsp-server/*.h"]),
+ includes = ["include"],
+ deps = [
+ ":MlirLspServerSupportLib",
+ ":Support",
+ "//llvm:Support",
+ "//llvm:TableGen",
+ ],
+)
+
+cc_binary(
+ name = "tblgen-lsp-server",
+ srcs = ["tools/tblgen-lsp-server/tblgen-lsp-server.cpp"],
+ includes = ["include"],
+ deps = [
+ ":Support",
+ ":TableGenLspServerLib",
+ ],
+)
+
+cc_library(
name = "AsmParserTokenKinds",
# strip_include_prefix does not apply to textual_hdrs.
hdrs = ["lib/AsmParser/TokenKinds.def"],
@@ -5408,8 +5417,11 @@ cc_library(
hdrs = glob(["include/mlir/Dialect/LLVMIR/Transforms/*.h"]),
includes = ["include"],
deps = [
+ ":Analysis",
+ ":DataLayoutInterfaces",
":FuncDialect",
":IR",
+ ":InliningUtils",
":LLVMDialect",
":LLVMPassIncGen",
":NVVMDialect",
@@ -5796,6 +5808,7 @@ cc_library(
"lib/Conversion/GPUCommon/OpToFuncCallLowering.h",
],
deps = [
+ ":ArithDialect",
":GPUDialect",
":IR",
":LLVMCommonConversion",
@@ -5832,10 +5845,12 @@ cc_library(
deps = [
":ConversionPassIncGen",
":GPUDialect",
+ ":GPUToGPURuntimeTransforms",
":IR",
":LLVMCommonConversion",
":LLVMDialect",
":Pass",
+ ":SPIRVCommonAttrToLLVMConversion",
":SPIRVDialect",
":Support",
":TransformUtils",
@@ -5870,6 +5885,7 @@ cc_library(
":MathDialect",
":MemRefDialect",
":MemRefToLLVM",
+ ":NVGPUDialect",
":NVVMDialect",
":TransformUtils",
":VectorToLLVM",
@@ -5990,6 +6006,8 @@ cc_library(
":LLVMCommonConversion",
":LLVMDialect",
":MathDialect",
+ ":MathToLLVM",
+ ":MathToROCDL",
":MemRefDialect",
":MemRefToLLVM",
":Pass",
@@ -6027,10 +6045,15 @@ cc_library(
cc_library(
name = "GPUToGPURuntimeTransforms",
srcs = [
+ "lib/Conversion/GPUCommon/AttrToSPIRVConverter.cpp",
"lib/Conversion/GPUCommon/GPUOpsLowering.cpp",
"lib/Conversion/GPUCommon/GPUToLLVMConversion.cpp",
],
- hdrs = ["include/mlir/Conversion/GPUCommon/GPUCommonPass.h"],
+ hdrs = [
+ "include/mlir/Conversion/GPUCommon/AttrToSPIRVConverter.h",
+ "include/mlir/Conversion/GPUCommon/GPUCommonPass.h",
+ "lib/Conversion/GPUCommon/GPUOpsLowering.h",
+ ],
includes = ["include"],
deps = [
":ArithToLLVM",
@@ -6049,6 +6072,7 @@ cc_library(
":LLVMDialect",
":MemRefDialect",
":MemRefToLLVM",
+ ":SPIRVDialect",
":Support",
":VectorToLLVM",
"//llvm:Support",
@@ -6128,6 +6152,7 @@ cc_library(
":LLVMDialect",
":MemRefToLLVM",
":Pass",
+ ":SPIRVCommonAttrToLLVMConversion",
":SPIRVDialect",
":SPIRVUtils",
":Support",
@@ -6530,7 +6555,10 @@ cc_library(
cc_library(
name = "ROCDLTarget",
- srcs = ["lib/Target/LLVM/ROCDL/Target.cpp"],
+ srcs = [
+ "lib/Target/LLVM/ROCDL/Target.cpp",
+ "lib/Target/LLVM/ROCDL/Utils.cpp",
+ ],
hdrs = glob(["include/mlir/Target/LLVM/ROCDL/*.h"]),
includes = ["include"],
deps = [
@@ -6543,6 +6571,7 @@ cc_library(
":TargetLLVM",
":ToLLVMIRTranslation",
"//llvm:Core",
+ "//llvm:FrontendOffloading",
"//llvm:MC",
"//llvm:MCParser",
"//llvm:Support",
@@ -7205,10 +7234,16 @@ cc_library(
hdrs = ["include/mlir/Dialect/SPIRV/Transforms/SPIRVConversion.h"],
includes = ["include"],
deps = [
+ ":ArithDialect",
+ ":DialectUtils",
":FuncDialect",
":IR",
+ ":Pass",
":SPIRVDialect",
+ ":Support",
":TransformUtils",
+ ":VectorDialect",
+ ":VectorTransforms",
"//llvm:Support",
],
)
@@ -7253,6 +7288,16 @@ cc_library(
)
cc_library(
+ name = "SPIRVCommonAttrToLLVMConversion",
+ srcs = ["lib/Conversion/SPIRVCommon/AttrToLLVMConverter.cpp"],
+ hdrs = ["include/mlir/Conversion/SPIRVCommon/AttrToLLVMConverter.h"],
+ includes = ["include"],
+ deps = [
+ ":SPIRVDialect",
+ ],
+)
+
+cc_library(
name = "MathToSPIRV",
srcs = glob([
"lib/Conversion/MathToSPIRV/*.cpp",
@@ -7278,6 +7323,32 @@ cc_library(
)
cc_library(
+ name = "MathToROCDL",
+ srcs = glob([
+ "lib/Conversion/MathToROCDL/*.cpp",
+ ]),
+ hdrs = glob([
+ "include/mlir/Conversion/MathToROCDL/*.h",
+ ]),
+ includes = ["include"],
+ deps = [
+ ":ConversionPassIncGen",
+ ":DialectUtils",
+ ":FuncDialect",
+ ":GPUCommonTransforms",
+ ":GPUToGPURuntimeTransforms",
+ ":IR",
+ ":LLVMCommonConversion",
+ ":LLVMDialect",
+ ":MathDialect",
+ ":Pass",
+ ":ROCDLDialect",
+ ":TransformUtils",
+ ":VectorDialect",
+ ],
+)
+
+cc_library(
name = "FuncToEmitC",
srcs = glob([
"lib/Conversion/FuncToEmitC/*.cpp",
@@ -7520,6 +7591,7 @@ cc_library(
"lib/Dialect/Tensor/IR/ValueBoundsOpInterfaceImpl.cpp",
],
hdrs = [
+ "include/mlir/Dialect/Tensor/IR/ShardingInterfaceImpl.h",
"include/mlir/Dialect/Tensor/IR/Tensor.h",
"include/mlir/Dialect/Tensor/IR/ValueBoundsOpInterfaceImpl.h",
],
@@ -7590,6 +7662,23 @@ cc_library(
)
cc_library(
+ name = "TensorExtensions",
+ srcs = glob(["lib/Dialect/Tensor/Extensions/*.cpp"]),
+ hdrs = glob(["include/mlir/Dialect/Tensor/Extensions/*.h"]),
+ includes = ["include"],
+ deps = [
+ ":DialectUtils",
+ ":IR",
+ ":MeshDialect",
+ ":MeshShardingInterface",
+ ":MeshShardingInterfaceIncGen",
+ ":Support",
+ ":TensorDialect",
+ "//llvm:Support",
+ ],
+)
+
+cc_library(
name = "TensorUtils",
srcs = ["lib/Dialect/Tensor/Utils/Utils.cpp"],
hdrs = ["include/mlir/Dialect/Tensor/Utils/Utils.h"],
@@ -8214,6 +8303,7 @@ cc_library(
":ControlFlowDialect",
":ConversionPassIncGen",
":IR",
+ ":LLVMDialect",
":SCFDialect",
":SCFTransforms",
":TransformUtils",
@@ -8328,8 +8418,11 @@ cc_library(
":ArithTransforms",
":ConversionPassIncGen",
":FuncToSPIRV",
+ ":GPUDialect",
+ ":GPUToSPIRV",
":IR",
":IndexToSPIRV",
+ ":MemRefToSPIRV",
":Pass",
":Rewrite",
":SCFToSPIRV",
@@ -8339,6 +8432,7 @@ cc_library(
":TransformUtils",
":Transforms",
":UBToSPIRV",
+ ":VectorDialect",
":VectorToSPIRV",
":VectorTransforms",
],
@@ -8497,11 +8591,14 @@ cc_library(
includes = ["include"],
deps = [
":AMDGPUDialect",
+ ":AMDGPUUtils",
":ArithDialect",
":ArithUtils",
":ConversionPassIncGen",
":IR",
+ ":LLVMDialect",
":Pass",
+ ":ROCDLDialect",
":Support",
":TransformUtils",
":VectorDialect",
@@ -8542,6 +8639,7 @@ cc_library(
":ArithDialect",
":ConversionPassIncGen",
":EmitCDialect",
+ ":EmitCTransforms",
":IR",
":Pass",
":Support",
@@ -9585,6 +9683,7 @@ cc_binary(
"//mlir/test:TestArmSME",
"//mlir/test:TestBufferization",
"//mlir/test:TestControlFlow",
+ "//mlir/test:TestConvertToSPIRV",
"//mlir/test:TestDLTI",
"//mlir/test:TestDialect",
"//mlir/test:TestFunc",
@@ -9897,6 +9996,7 @@ cc_binary(
deps = [
":ArithDialect",
":BuiltinToLLVMIRTranslation",
+ ":ConvertToSPIRV",
":ExecutionEngineUtils",
":FuncDialect",
":FuncToLLVM",
@@ -10092,6 +10192,7 @@ td_library(
"include/mlir/Dialect/OpenACC/AccCommon.td",
"include/mlir/Dialect/OpenACC/OpenACCBase.td",
"include/mlir/Dialect/OpenACC/OpenACCOps.td",
+ "include/mlir/Dialect/OpenACC/OpenACCOpsInterfaces.td",
"include/mlir/Dialect/OpenACC/OpenACCOpsTypes.td",
"include/mlir/Dialect/OpenACC/OpenACCTypeInterfaces.td",
"include/mlir/Dialect/OpenACCMPCommon/Interfaces/AtomicInterfaces.td",
@@ -10106,6 +10207,23 @@ td_library(
)
gentbl_cc_library(
+ name = "OpenACCOpsInterfacesIncGen",
+ tbl_outs = [
+ (
+ ["-gen-op-interface-decls"],
+ "include/mlir/Dialect/OpenACC/OpenACCOpsInterfaces.h.inc",
+ ),
+ (
+ ["-gen-op-interface-defs"],
+ "include/mlir/Dialect/OpenACC/OpenACCOpsInterfaces.cpp.inc",
+ ),
+ ],
+ tblgen = ":mlir-tblgen",
+ td_file = "include/mlir/Dialect/OpenACC/OpenACCOpsInterfaces.td",
+ deps = [":OpenAccOpsTdFiles"],
+)
+
+gentbl_cc_library(
name = "OpenACCMPOpsInterfacesIncGen",
tbl_outs = [
(
@@ -10248,6 +10366,7 @@ cc_library(
":MemRefDialect",
":OpenACCMPOpsInterfacesIncGen",
":OpenACCOpsIncGen",
+ ":OpenACCOpsInterfacesIncGen",
":OpenACCTypeInterfacesIncGen",
":OpenACCTypesIncGen",
":SideEffectInterfaces",
@@ -10320,6 +10439,7 @@ td_library(
"include/mlir/Dialect/OpenACCMPCommon/Interfaces/OpenACCMPOpsInterfaces.td",
"include/mlir/Dialect/OpenMP/OmpCommon.td",
"include/mlir/Dialect/OpenMP/OpenMPAttrDefs.td",
+ "include/mlir/Dialect/OpenMP/OpenMPClauses.td",
"include/mlir/Dialect/OpenMP/OpenMPDialect.td",
"include/mlir/Dialect/OpenMP/OpenMPEnums.td",
"include/mlir/Dialect/OpenMP/OpenMPOpBase.td",
@@ -10399,6 +10519,10 @@ gentbl_cc_library(
["-gen-op-doc"],
"g3doc/Dialects/OpenMP/OpenMPOps.md",
),
+ (
+ ["-gen-openmp-clause-ops"],
+ "include/mlir/Dialect/OpenMP/OpenMPClauseOps.h.inc",
+ ),
],
tblgen = ":mlir-tblgen",
td_file = "include/mlir/Dialect/OpenMP/OpenMPOps.td",
@@ -11204,6 +11328,7 @@ cc_library(
":AffineDialect",
":Analysis",
":ArithDialect",
+ ":ArithUtils",
":AsmParser",
":BufferizationDialect",
":BufferizationTransforms",
@@ -11662,6 +11787,7 @@ cc_library(
":MaskableOpInterface",
":MemRefDialect",
":Pass",
+ ":TensorDialect",
":ToLLVMIRTranslation",
":TransformUtils",
":VectorDialect",
@@ -11739,6 +11865,7 @@ cc_library(
":ArithDialect",
":ConversionPassIncGen",
":IR",
+ ":LLVMDialect",
":MemRefDialect",
":Pass",
":SCFDialect",
@@ -11747,6 +11874,7 @@ cc_library(
":Transforms",
":VectorDialect",
":VectorTransforms",
+ ":VectorUtils",
],
)
@@ -12675,6 +12803,7 @@ td_library(
":ArithOpsInterfacesTdFiles",
":BuiltinDialectTdFiles",
":CastInterfacesTdFiles",
+ ":ControlFlowInterfacesTdFiles",
":InferIntRangeInterfaceTdFiles",
":InferTypeOpInterfaceTdFiles",
":OpBaseTdFiles",
@@ -13894,7 +14023,10 @@ td_library(
"include/mlir/Dialect/DLTI/DLTIBase.td",
],
includes = ["include"],
- deps = [":OpBaseTdFiles"],
+ deps = [
+ ":DataLayoutInterfacesTdFiles",
+ ":OpBaseTdFiles",
+ ],
)
gentbl_cc_library(
@@ -13960,6 +14092,55 @@ cc_library(
],
)
+td_library(
+ name = "DLTITransformTdFiles",
+ srcs = [
+ "include/mlir/Dialect/DLTI/TransformOps/DLTITransformOps.td",
+ ],
+ includes = ["include"],
+ deps = [":TransformDialectTdFiles"],
+)
+
+gentbl_cc_library(
+ name = "DLTITransformOpsIncGen",
+ tbl_outs = [
+ (
+ [
+ "-gen-op-decls",
+ "-dialect=dlti",
+ ],
+ "include/mlir/Dialect/DLTI/TransformOps/DLTITransformOps.h.inc",
+ ),
+ (
+ [
+ "-gen-op-defs",
+ "-dialect=dlti",
+ ],
+ "include/mlir/Dialect/DLTI/TransformOps/DLTITransformOps.cpp.inc",
+ ),
+ ],
+ tblgen = ":mlir-tblgen",
+ td_file = "include/mlir/Dialect/DLTI/TransformOps/DLTITransformOps.td",
+ deps = [
+ ":DLTITransformTdFiles",
+ ],
+)
+
+cc_library(
+ name = "DLTITransformOps",
+ srcs = glob(["lib/Dialect/DLTI/TransformOps/*.cpp"]),
+ hdrs = glob(["include/mlir/Dialect/DLTI/TransformOps/*.h"]),
+ includes = ["include"],
+ deps = [
+ ":DLTIDialect",
+ ":DLTITransformOpsIncGen",
+ ":DataLayoutInterfaces",
+ ":TransformDialect",
+ ":TransformDialectInterfaces",
+ ":TransformDialectUtils",
+ ],
+)
+
gentbl_cc_library(
name = "ReducerIncGen",
tbl_outs = [
diff --git a/utils/bazel/llvm-project-overlay/mlir/test/BUILD.bazel b/utils/bazel/llvm-project-overlay/mlir/test/BUILD.bazel
index 1d59370..34beb75 100644
--- a/utils/bazel/llvm-project-overlay/mlir/test/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/mlir/test/BUILD.bazel
@@ -657,6 +657,22 @@ cc_library(
)
cc_library(
+ name = "TestConvertToSPIRV",
+ srcs = glob(["lib/Conversion/ConvertToSPIRV/*.cpp"]),
+ deps = [
+ "//mlir:ArithDialect",
+ "//mlir:FuncDialect",
+ "//mlir:Pass",
+ "//mlir:SPIRVConversion",
+ "//mlir:SPIRVDialect",
+ "//mlir:TransformUtils",
+ "//mlir:Transforms",
+ "//mlir:VectorDialect",
+ "//mlir:VectorTransforms",
+ ],
+)
+
+cc_library(
name = "TestAffine",
srcs = glob([
"lib/Dialect/Affine/*.cpp",
diff --git a/utils/bazel/llvm-project-overlay/mlir/test/mlir-tblgen/BUILD.bazel b/utils/bazel/llvm-project-overlay/mlir/test/mlir-tblgen/BUILD.bazel
index 3f00adb..7fe1fdc 100644
--- a/utils/bazel/llvm-project-overlay/mlir/test/mlir-tblgen/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/mlir/test/mlir-tblgen/BUILD.bazel
@@ -26,6 +26,9 @@ package(default_visibility = ["//visibility:public"])
"//mlir:include/mlir/Dialect/OpenMP/OpenMPOpBase.td",
"//mlir:include/mlir/Dialect/OpenMP/OpenMPOpsInterfaces.td",
"//mlir:include/mlir/Dialect/OpenMP/OpenMPTypeInterfaces.td",
+ "//mlir:include/mlir/IR/BuiltinAttributeInterfaces.td",
+ "//mlir:include/mlir/IR/BuiltinAttributes.td",
+ "//mlir:include/mlir/IR/BuiltinDialect.td",
"//mlir:include/mlir/IR/BuiltinDialectBytecode.td",
"//mlir:include/mlir/IR/BytecodeBase.td",
"//mlir:include/mlir/IR/OpBase.td",
diff --git a/utils/bazel/llvm-project-overlay/mlir/unittests/BUILD.bazel b/utils/bazel/llvm-project-overlay/mlir/unittests/BUILD.bazel
index 7172beb..a55c6f5 100644
--- a/utils/bazel/llvm-project-overlay/mlir/unittests/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/mlir/unittests/BUILD.bazel
@@ -138,6 +138,19 @@ cc_test(
)
cc_test(
+ name = "amdgpu_tests",
+ size = "small",
+ srcs = glob([
+ "Dialect/AMDGPU/*.cpp",
+ ]),
+ deps = [
+ "//mlir:AMDGPUUtils",
+ "//third-party/unittest:gtest",
+ "//third-party/unittest:gtest_main",
+ ],
+)
+
+cc_test(
name = "memref_tests",
size = "small",
srcs = glob([
diff --git a/utils/bazel/llvm_configs/config.h.cmake b/utils/bazel/llvm_configs/config.h.cmake
index ff30741..d71ff40 100644
--- a/utils/bazel/llvm_configs/config.h.cmake
+++ b/utils/bazel/llvm_configs/config.h.cmake
@@ -125,8 +125,11 @@
/* Define to 1 if you have the `pthread_setname_np' function. */
#cmakedefine HAVE_PTHREAD_SETNAME_NP ${HAVE_PTHREAD_SETNAME_NP}
-/* Define to 1 if you have the <link.h> header file. */
-#cmakedefine HAVE_LINK_H ${HAVE_LINK_H}
+/* Define to 1 if you have the `pthread_get_name_np' function. */
+#cmakedefine HAVE_PTHREAD_GET_NAME_NP ${HAVE_PTHREAD_GET_NAME_NP}
+
+/* Define to 1 if you have the `pthread_set_name_np' function. */
+#cmakedefine HAVE_PTHREAD_SET_NAME_NP ${HAVE_PTHREAD_SET_NAME_NP}
/* Define to 1 if you have the <mach/mach.h> header file. */
#cmakedefine HAVE_MACH_MACH_H ${HAVE_MACH_MACH_H}
diff --git a/utils/bazel/third_party_build/pybind.BUILD b/utils/bazel/third_party_build/pybind.BUILD
new file mode 100644
index 0000000..d9fb431
--- /dev/null
+++ b/utils/bazel/third_party_build/pybind.BUILD
@@ -0,0 +1,15 @@
+cc_library(
+ name = "pybind11",
+ hdrs = glob(
+ include = ["include/pybind11/**/*.h"],
+ exclude = [
+ # Deprecated file that just emits a warning
+ "include/pybind11/common.h",
+ ],
+ ),
+ includes = ["include"],
+ visibility = ["//visibility:public"],
+ deps = [
+ "@rules_python//python/cc:current_py_cc_headers",
+ ],
+)