aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2026-01-29 14:39:34 -0800
committerPeter Collingbourne <peter@pcc.me.uk>2026-01-29 14:39:34 -0800
commit7b3f189a1369f9348c007730ddea953b1e68acb1 (patch)
tree7db8969ee8a34a10b6c8ae033c939c9d653376f6 /utils
parentf3d6dae13ae710323a2ddbaf87af71b1abcbfada (diff)
parent0893b70ecfc4f4aca0a20a078476d191edc1e623 (diff)
downloadllvm-users/pcc/spr/codegen-introduce-machinefunctiongetpreferredalignment.zip
llvm-users/pcc/spr/codegen-introduce-machinefunctiongetpreferredalignment.tar.gz
llvm-users/pcc/spr/codegen-introduce-machinefunctiongetpreferredalignment.tar.bz2
Created using spr 1.3.6-beta.1
Diffstat (limited to 'utils')
-rw-r--r--utils/bazel/.bazelrc5
-rw-r--r--utils/bazel/llvm-project-overlay/clang/BUILD.bazel70
-rw-r--r--utils/bazel/llvm-project-overlay/compiler-rt/BUILD.bazel7
-rw-r--r--utils/bazel/llvm-project-overlay/libc/BUILD.bazel653
-rw-r--r--utils/bazel/llvm-project-overlay/libc/test/src/stdio/BUILD.bazel2
-rw-r--r--utils/bazel/llvm-project-overlay/lld/BUILD.bazel19
-rw-r--r--utils/bazel/llvm-project-overlay/lldb/BUILD.bazel3
-rw-r--r--utils/bazel/llvm-project-overlay/lldb/source/Plugins/BUILD.bazel2
-rw-r--r--utils/bazel/llvm-project-overlay/llvm/BUILD.bazel145
-rw-r--r--utils/bazel/llvm-project-overlay/mlir/BUILD.bazel55
-rw-r--r--utils/bazel/llvm-project-overlay/mlir/python/BUILD.bazel1
-rw-r--r--utils/bazel/llvm-project-overlay/mlir/test/BUILD.bazel4
-rw-r--r--utils/bazel/third_party_build/mpc.BUILD1
-rw-r--r--utils/bazel/third_party_build/mpfr.BUILD1
-rw-r--r--utils/bazel/third_party_build/nanobind.BUILD2
-rw-r--r--utils/bazel/third_party_build/pfm.BUILD1
-rw-r--r--utils/bazel/third_party_build/pybind.BUILD2
-rw-r--r--utils/bazel/third_party_build/robin_map.BUILD2
-rw-r--r--utils/bazel/third_party_build/vulkan_headers.BUILD2
19 files changed, 833 insertions, 144 deletions
diff --git a/utils/bazel/.bazelrc b/utils/bazel/.bazelrc
index 1f9b7c5..5aa17b8 100644
--- a/utils/bazel/.bazelrc
+++ b/utils/bazel/.bazelrc
@@ -219,6 +219,11 @@ build:ci --test_output=errors
# Only show failing tests to reduce output
build:ci --test_summary=terse
+# Ignore warnings from parse headers actions about "-c" being unnecessary when
+# using "-fsyntax-only".
+# TODO: remove when https://github.com/bazelbuild/rules_cc/pull/573 merges
+build:ci --copt=-Wno-unused-command-line-argument
+
# 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
diff --git a/utils/bazel/llvm-project-overlay/clang/BUILD.bazel b/utils/bazel/llvm-project-overlay/clang/BUILD.bazel
index 2b9c849..c5794a7 100644
--- a/utils/bazel/llvm-project-overlay/clang/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/clang/BUILD.bazel
@@ -2,6 +2,8 @@
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+load("@bazel_skylib//rules:run_binary.bzl", "run_binary")
+load("@bazel_skylib//rules:write_file.bzl", "write_file")
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
load("@rules_python//python:defs.bzl", "py_binary")
load(
@@ -291,6 +293,14 @@ td_library(
)
gentbl_cc_library(
+ name = "basic_builtins_amdgpu_gen",
+ tbl_outs = {"include/clang/Basic/BuiltinsAMDGPU.inc": ["-gen-clang-builtins"]},
+ tblgen = ":clang-tblgen",
+ td_file = "include/clang/Basic/BuiltinsAMDGPU.td",
+ deps = [":BuiltinsBaseTdFiles"],
+)
+
+gentbl_cc_library(
name = "basic_builtins_bpf_gen",
tbl_outs = {"include/clang/Basic/BuiltinsBPF.inc": ["-gen-clang-builtins"]},
tblgen = ":clang-tblgen",
@@ -577,23 +587,18 @@ exports_files(
glob(["include/**/*.td"]),
)
-genrule(
+write_file(
name = "basic_version_gen",
- outs = ["include/clang/Basic/Version.inc"],
- cmd = (
- "echo '#define CLANG_VERSION {vers}' >> $@\n" +
- "echo '#define CLANG_VERSION_MAJOR {major}' >> $@\n" +
- "echo '#define CLANG_VERSION_MAJOR_STRING \"{major}\"' >> $@\n" +
- "echo '#define CLANG_VERSION_MINOR {minor}' >> $@\n" +
- "echo '#define CLANG_VERSION_PATCHLEVEL {patch}' >> $@\n" +
- "echo '#define MAX_CLANG_ABI_COMPAT_VERSION {major}' >> $@\n" +
- "echo '#define CLANG_VERSION_STRING \"{vers}\"' >> $@\n"
- ).format(
- major = LLVM_VERSION_MAJOR,
- minor = LLVM_VERSION_MINOR,
- patch = LLVM_VERSION_PATCH,
- vers = PACKAGE_VERSION,
- ),
+ out = "include/clang/Basic/Version.inc",
+ content = [
+ "#define CLANG_VERSION {}".format(PACKAGE_VERSION),
+ "#define CLANG_VERSION_MAJOR {}".format(LLVM_VERSION_MAJOR),
+ "#define CLANG_VERSION_MAJOR_STRING \"{}\"".format(LLVM_VERSION_MAJOR),
+ "#define CLANG_VERSION_MINOR {}".format(LLVM_VERSION_MINOR),
+ "#define CLANG_VERSION_PATCHLEVEL {}".format(LLVM_VERSION_PATCH),
+ "#define MAX_CLANG_ABI_COMPAT_VERSION {}".format(LLVM_VERSION_MAJOR),
+ "#define CLANG_VERSION_STRING \"{}\"".format(PACKAGE_VERSION),
+ ],
)
cc_library(
@@ -611,13 +616,15 @@ cc_library(
# TODO: This should get replaced with something that actually generates the
# correct version number.
-genrule(
+write_file(
name = "vcs_version_gen",
# This should be under lib/Basic, but because of how the include paths
# are passed through bazel, it's easier to drop generated files next to
# the other includes.
- outs = ["include/VCSVersion.inc"],
- cmd = "echo '#undef CLANG_REVISION' > $@",
+ out = "include/VCSVersion.inc",
+ content = [
+ "#undef CLANG_REVISION",
+ ],
)
py_binary(
@@ -697,6 +704,7 @@ cc_library(
":basic_arm_sve_typeflags_gen",
":basic_attr_gen",
":basic_builtin_templates_gen",
+ ":basic_builtins_amdgpu_gen",
":basic_builtins_bpf_gen",
":basic_builtins_directx_gen",
":basic_builtins_gen",
@@ -979,16 +987,21 @@ cc_library(
],
)
-genrule(
+run_binary(
name = "analysis_htmllogger_gen",
srcs = [
- "lib/Analysis/FlowSensitive/HTMLLogger.html",
"lib/Analysis/FlowSensitive/HTMLLogger.css",
+ "lib/Analysis/FlowSensitive/HTMLLogger.html",
"lib/Analysis/FlowSensitive/HTMLLogger.js",
],
outs = ["lib/Analysis/FlowSensitive/HTMLLogger.inc"],
- cmd = "$(location :bundle_resources) $@ $(SRCS)",
- tools = [":bundle_resources"],
+ args = [
+ "$(execpath lib/Analysis/FlowSensitive/HTMLLogger.inc)",
+ "$(execpath lib/Analysis/FlowSensitive/HTMLLogger.html)",
+ "$(execpath lib/Analysis/FlowSensitive/HTMLLogger.css)",
+ "$(execpath lib/Analysis/FlowSensitive/HTMLLogger.js)",
+ ],
+ tool = ":bundle_resources",
)
cc_library(
@@ -1550,7 +1563,9 @@ cc_library(
"lib/Driver",
],
linkopts = select({
- "@platforms//os:windows": ["version.lib"],
+ "//llvm:is_windows_clang_mingw": ["-lversion"],
+ "//llvm:is_windows_clang_cl": ["version.lib"],
+ "//llvm:is_windows_msvc": ["version.lib"],
"//conditions:default": [],
}),
textual_hdrs = glob([
@@ -1685,6 +1700,11 @@ builtin_headers = glob(
"lib/Headers/riscv_vector.h",
]
+filegroup(
+ name = "builtin_headers_files",
+ srcs = builtin_headers,
+)
+
genrule(
name = "builtin_headers_gen",
srcs = builtin_headers,
@@ -1798,8 +1818,8 @@ cc_library(
"//llvm:AllTargetsAsmParsers",
"//llvm:AllTargetsCodeGens",
"//llvm:Core",
- "//llvm:JITLink",
"//llvm:ExecutionEngine",
+ "//llvm:JITLink",
"//llvm:MC",
"//llvm:Option",
"//llvm:OrcDebugging",
diff --git a/utils/bazel/llvm-project-overlay/compiler-rt/BUILD.bazel b/utils/bazel/llvm-project-overlay/compiler-rt/BUILD.bazel
index 710601b..946f23e1 100644
--- a/utils/bazel/llvm-project-overlay/compiler-rt/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/compiler-rt/BUILD.bazel
@@ -265,6 +265,7 @@ AARCH64_OUTLINE_ATOMICS = [
"2",
"3",
"4",
+ "5",
]
if pat == "cas" or size != "16"
]
@@ -301,6 +302,7 @@ filegroup(
"lib/builtins/aarch64/*.S",
"lib/builtins/aarch64/*.c",
"lib/builtins/aarch64/*.cpp",
+ "lib/builtins/aarch64/*.h",
],
allow_empty = True,
exclude = [
@@ -317,6 +319,7 @@ BUILTINS_ARM_VFP_SRCS_PATTERNS = [
"lib/builtins/arm/*vfp*.S",
"lib/builtins/arm/*vfp*.c",
"lib/builtins/arm/*vfp*.cpp",
+ "lib/builtins/arm/*vfp*.h",
]
# Source files for the ARM VFP-specific builtins.
@@ -336,6 +339,7 @@ filegroup(
"lib/builtins/arm/*.S",
"lib/builtins/arm/*.c",
"lib/builtins/arm/*.cpp",
+ "lib/builtins/arm/*.h",
],
allow_empty = True,
exclude = BUILTINS_ARM_VFP_SRCS_PATTERNS,
@@ -350,6 +354,7 @@ filegroup(
"lib/builtins/ppc/*.S",
"lib/builtins/ppc/*.c",
"lib/builtins/ppc/*.cpp",
+ "lib/builtins/ppc/*.h",
],
allow_empty = True,
),
@@ -386,6 +391,7 @@ filegroup(
"lib/builtins/x86_64/*.S",
"lib/builtins/x86_64/*.c",
"lib/builtins/x86_64/*.cpp",
+ "lib/builtins/x86_64/*.h",
],
allow_empty = True,
),
@@ -399,6 +405,7 @@ filegroup(
"lib/builtins/i386/*.S",
"lib/builtins/i386/*.c",
"lib/builtins/i386/*.cpp",
+ "lib/builtins/i386/*.h",
],
allow_empty = True,
exclude = [
diff --git a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
index c03c21b..a313ba48 100644
--- a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
@@ -199,6 +199,11 @@ libc_support_library(
hdrs = ["include/llvm-libc-types/size_t.h"],
)
+libc_support_library(
+ name = "llvm_libc_types_char8_t",
+ hdrs = ["include/llvm-libc-types/char8_t.h"],
+)
+
########################### Macro Proxy Header Files ###########################
libc_support_library(
@@ -305,6 +310,11 @@ libc_support_library(
)
libc_support_library(
+ name = "hdr_uchar_overlay",
+ hdrs = ["hdr/uchar_overlay.h"],
+)
+
+libc_support_library(
name = "hdr_stdint_proxy",
hdrs = ["hdr/stdint_proxy.h"],
)
@@ -494,6 +504,22 @@ libc_support_library(
],
)
+libc_support_library(
+ name = "types_char32_t",
+ hdrs = ["hdr/types/char32_t.h"],
+ deps = [
+ ":hdr_uchar_overlay",
+ ],
+)
+
+libc_support_library(
+ name = "types_char8_t",
+ hdrs = ["hdr/types/char8_t.h"],
+ deps = [
+ ":llvm_libc_types_char8_t",
+ ],
+)
+
############################### Support libraries ##############################
libc_support_library(
@@ -1390,6 +1416,17 @@ libc_support_library(
],
)
+libc_support_library(
+ name = "__support_math_f16sqrtl",
+ hdrs = ["src/__support/math/f16sqrtl.h"],
+ deps = [
+ ":__support_common",
+ ":__support_fputil_sqrt",
+ ":__support_macros_config",
+ ":llvm_libc_macros_float16_macros",
+ ],
+)
+
fma_common_hdrs = [
"src/__support/FPUtil/FMA.h",
"src/__support/FPUtil/generic/FMA.h",
@@ -1810,6 +1847,43 @@ libc_support_library(
],
)
+libc_support_library(
+ name = "__support_wchar_mbstate",
+ hdrs = ["src/__support/wchar/mbstate.h"],
+ deps = [
+ ":__support_common",
+ ":types_char32_t",
+ ],
+)
+
+libc_support_library(
+ name = "__support_wchar_character_converter",
+ hdrs = ["src/__support/wchar/character_converter.h"],
+ deps = [
+ ":__support_common",
+ ":__support_cpp_bit",
+ ":__support_error_or",
+ ":__support_math_extras",
+ ":__support_wchar_mbstate",
+ ":hdr_errno_macros",
+ ":types_char32_t",
+ ":types_char8_t",
+ ":types_size_t",
+ ],
+)
+
+libc_support_library(
+ name = "__support_wchar_wcrtomb",
+ hdrs = ["src/__support/wchar/wcrtomb.h"],
+ deps = [
+ ":__support_error_or",
+ ":__support_libc_assert",
+ ":__support_macros_null_check",
+ ":__support_wchar_character_converter",
+ ":types_wchar_t",
+ ],
+)
+
########################## externally shared targets ###########################
libc_header_library(
@@ -2343,6 +2417,15 @@ libc_support_library(
)
libc_support_library(
+ name = "__support_math_sqrtf16",
+ hdrs = ["src/__support/math/sqrtf16.h"],
+ deps = [
+ ":__support_fputil_sqrt",
+ ":llvm_libc_macros_float16_macros",
+ ],
+)
+
+libc_support_library(
name = "__support_math_asin_utils",
hdrs = ["src/__support/math/asin_utils.h"],
deps = [
@@ -2805,6 +2888,27 @@ libc_support_library(
)
libc_support_library(
+ name = "__support_math_f16fma",
+ hdrs = ["src/__support/math/f16fma.h"],
+ deps = [
+ ":__support_fputil_fma",
+ ":__support_macros_config",
+ ":llvm_libc_macros_float16_macros",
+ ],
+)
+
+libc_support_library(
+ name = "__support_math_f16fmal",
+ hdrs = ["src/__support/math/f16fmal.h"],
+ deps = [
+ ":__support_common",
+ ":__support_fputil_fma",
+ ":__support_macros_config",
+ ":llvm_libc_macros_float16_macros",
+ ],
+)
+
+libc_support_library(
name = "__support_math_frexpf128",
hdrs = ["src/__support/math/frexpf128.h"],
deps = [
@@ -2814,6 +2918,42 @@ libc_support_library(
)
libc_support_library(
+ name = "__support_math_ilogbf128",
+ hdrs = ["src/__support/math/ilogbf128.h"],
+ deps = [
+ ":__support_fputil_manipulation_functions",
+ ":__support_macros_properties_types",
+ ":llvm_libc_types_float128",
+ ],
+)
+
+libc_support_library(
+ name = "__support_math_fsqrt",
+ hdrs = ["src/__support/math/fsqrt.h"],
+ deps = [
+ ":__support_fputil_sqrt",
+ ],
+)
+
+libc_support_library(
+ name = "__support_math_fsqrtf128",
+ hdrs = ["src/__support/math/fsqrtf128.h"],
+ deps = [
+ ":__support_common",
+ ":__support_fputil_sqrt",
+ ":__support_macros_config",
+ ],
+)
+
+libc_support_library(
+ name = "__support_math_fsqrtl",
+ hdrs = ["src/__support/math/fsqrtl.h"],
+ deps = [
+ ":__support_fputil_sqrt",
+ ],
+)
+
+libc_support_library(
name = "__support_math_inv_trigf_utils",
hdrs = ["src/__support/math/inv_trigf_utils.h"],
deps = [
@@ -2843,6 +2983,16 @@ libc_support_library(
)
libc_support_library(
+ name = "__support_math_ilogb",
+ hdrs = ["src/__support/math/ilogb.h"],
+ deps = [
+ ":__support_common",
+ ":__support_fputil_manipulation_functions",
+ ":__support_macros_config",
+ ],
+)
+
+libc_support_library(
name = "__support_math_ilogbf16",
hdrs = ["src/__support/math/ilogbf16.h"],
deps = [
@@ -2854,6 +3004,24 @@ libc_support_library(
)
libc_support_library(
+ name = "__support_math_ilogbf",
+ hdrs = ["src/__support/math/ilogbf.h"],
+ deps = [
+ ":__support_common",
+ ":__support_fputil_manipulation_functions",
+ ":__support_macros_config",
+ ],
+)
+
+libc_support_library(
+ name = "__support_math_ilogbl",
+ hdrs = ["src/__support/math/ilogbl.h"],
+ deps = [
+ ":__support_fputil_manipulation_functions",
+ ],
+)
+
+libc_support_library(
name = "__support_math_ldexpf128",
hdrs = ["src/__support/math/ldexpf128.h"],
deps = [
@@ -2864,6 +3032,16 @@ libc_support_library(
)
libc_support_library(
+ name = "__support_math_llogbf128",
+ hdrs = ["src/__support/math/llogbf128.h"],
+ deps = [
+ ":__support_fputil_manipulation_functions",
+ ":__support_macros_config",
+ ":llvm_libc_types_float128",
+ ],
+)
+
+libc_support_library(
name = "__support_math_ldexpf16",
hdrs = ["src/__support/math/ldexpf16.h"],
deps = [
@@ -2882,6 +3060,35 @@ libc_support_library(
)
libc_support_library(
+ name = "__support_math_llogbf",
+ hdrs = ["src/__support/math/llogbf.h"],
+ deps = [
+ ":__support_fputil_manipulation_functions",
+ ],
+)
+
+libc_support_library(
+ name = "__support_math_llogb",
+ hdrs = ["src/__support/math/llogb.h"],
+ deps = [
+ ":__support_common",
+ ":__support_fputil_manipulation_functions",
+ ":__support_macros_config",
+ ],
+)
+
+libc_support_library(
+ name = "__support_math_llogbf16",
+ hdrs = ["src/__support/math/llogbf16.h"],
+ deps = [
+ ":__support_common",
+ ":__support_fputil_manipulation_functions",
+ ":__support_macros_config",
+ ":llvm_libc_macros_float16_macros",
+ ],
+)
+
+libc_support_library(
name = "__support_math_log",
hdrs = ["src/__support/math/log.h"],
deps = [
@@ -2899,6 +3106,98 @@ libc_support_library(
)
libc_support_library(
+ name = "__support_math_log10",
+ hdrs = ["src/__support/math/log10.h"],
+ 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",
+ ":__support_math_common_constants",
+ ":__support_math_log_range_reduction",
+ ],
+)
+
+libc_support_library(
+ name = "__support_math_log1p",
+ hdrs = ["src/__support/math/log1p.h"],
+ 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",
+ ":__support_math_common_constants",
+ ],
+)
+
+libc_support_library(
+ name = "__support_math_log2",
+ hdrs = ["src/__support/math/log2.h"],
+ 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",
+ ":__support_math_common_constants",
+ ":__support_math_log_range_reduction",
+ ],
+)
+
+libc_support_library(
+ name = "__support_math_logbf",
+ hdrs = ["src/__support/math/logbf.h"],
+ deps = [
+ ":__support_common",
+ ":__support_fputil_manipulation_functions",
+ ],
+)
+
+libc_support_library(
+ name = "__support_math_logbf128",
+ hdrs = ["src/__support/math/logbf128.h"],
+ deps = [
+ ":__support_fputil_manipulation_functions",
+ ],
+)
+
+libc_support_library(
+ name = "__support_math_logbf16",
+ hdrs = ["src/__support/math/logbf16.h"],
+ deps = [
+ ":__support_fputil_manipulation_functions",
+ ],
+)
+
+libc_support_library(
+ name = "__support_math_logf",
+ hdrs = ["src/__support/math/logf.h"],
+ deps = [
+ ":__support_common",
+ ":__support_fputil_except_value_utils",
+ ":__support_fputil_fenv_impl",
+ ":__support_fputil_fp_bits",
+ ":__support_fputil_multiply_add",
+ ":__support_fputil_polyeval",
+ ":__support_macros_config",
+ ":__support_macros_optimization",
+ ":__support_macros_properties_cpu_features",
+ ":__support_math_common_constants",
+ ],
+)
+
+libc_support_library(
name = "__support_math_exp_constants",
hdrs = ["src/__support/math/exp_constants.h"],
deps = [
@@ -3147,6 +3446,47 @@ libc_support_library(
)
libc_support_library(
+ name = "__support_math_dfmal",
+ hdrs = ["src/__support/math/dfmal.h"],
+ deps = [
+ ":__support_common",
+ ":__support_fputil_fma",
+ ":__support_macros_config",
+ ],
+)
+
+libc_support_library(
+ name = "__support_math_dfmaf128",
+ hdrs = ["src/__support/math/dfmaf128.h"],
+ deps = [
+ ":__support_common",
+ ":__support_fputil_fma",
+ ":__support_macros_config",
+ ],
+)
+
+libc_support_library(
+ name = "__support_math_logf16",
+ hdrs = ["src/__support/math/logf16.h"],
+ deps = [
+ ":__support_common",
+ ":__support_fputil_cast",
+ ":__support_fputil_except_value_utils",
+ ":__support_fputil_fenv_impl",
+ ":__support_fputil_fp_bits",
+ ":__support_fputil_multiply_add",
+ ":__support_fputil_polyeval",
+ ":__support_macros_config",
+ ":__support_macros_optimization",
+ ":__support_macros_properties_cpu_features",
+ ":__support_math_expxf16_utils",
+ ":hdr_errno_macros",
+ ":hdr_fenv_macros",
+ ":llvm_libc_macros_float16_macros",
+ ],
+)
+
+libc_support_library(
name = "__support_range_reduction_double",
hdrs = [
"src/__support/math/range_reduction_double_common.h",
@@ -3233,6 +3573,56 @@ libc_support_library(
)
libc_support_library(
+ name = "__support_math_sinf",
+ hdrs = ["src/__support/math/sinf.h"],
+ deps = [
+ ":__support_fputil_fma",
+ ":__support_fputil_polyeval",
+ ":__support_fputil_rounding_mode",
+ ":__support_macros_optimization",
+ ":__support_macros_properties_cpu_features",
+ ":__support_range_reduction",
+ ":__support_sincosf_utils",
+ ],
+)
+
+libc_support_library(
+ name = "__support_math_sinf16",
+ hdrs = ["src/__support/math/sinf16.h"],
+ deps = [
+ ":__support_fputil_cast",
+ ":__support_fputil_except_value_utils",
+ ":__support_fputil_fenv_impl",
+ ":__support_fputil_fp_bits",
+ ":__support_fputil_multiply_add",
+ ":__support_fputil_nearest_integer",
+ ":__support_fputil_polyeval",
+ ":__support_macros_optimization",
+ ":__support_math_sincosf16_utils",
+ ":hdr_errno_macros",
+ ":hdr_fenv_macros",
+ ":llvm_libc_macros_float16_macros",
+ ],
+)
+
+libc_support_library(
+ name = "__support_math_sinhf16",
+ hdrs = ["src/__support/math/sinhf16.h"],
+ deps = [
+ ":__support_common",
+ ":__support_fputil_except_value_utils",
+ ":__support_fputil_fenv_impl",
+ ":__support_fputil_fp_bits",
+ ":__support_fputil_rounding_mode",
+ ":__support_macros_config",
+ ":__support_macros_optimization",
+ ":__support_math_expxf16_utils",
+ ":hdr_errno_macros",
+ ":hdr_fenv_macros",
+ ],
+)
+
+libc_support_library(
name = "__support_math_sinhfcoshf_utils",
hdrs = ["src/__support/math/sinhfcoshf_utils.h"],
deps = [
@@ -3241,6 +3631,85 @@ libc_support_library(
],
)
+libc_support_library(
+ name = "__support_math_sqrt",
+ hdrs = ["src/__support/math/sqrt.h"],
+ deps = [
+ ":__support_fputil_sqrt",
+ ],
+)
+
+libc_support_library(
+ name = "__support_math_hypotf",
+ hdrs = ["src/__support/math/hypotf.h"],
+ deps = [
+ ":__support_common",
+ ":__support_fputil_double_double",
+ ":__support_fputil_fenv_impl",
+ ":__support_fputil_fp_bits",
+ ":__support_fputil_multiply_add",
+ ":__support_fputil_sqrt",
+ ":__support_macros_config",
+ ":__support_macros_optimization",
+ ],
+)
+
+libc_support_library(
+ name = "__support_math_sinhf",
+ hdrs = ["src/__support/math/sinhf.h"],
+ deps = [
+ ":__support_fputil_fenv_impl",
+ ":__support_fputil_fp_bits",
+ ":__support_fputil_rounding_mode",
+ ":__support_macros_config",
+ ":__support_macros_optimization",
+ ":__support_math_sinhfcoshf_utils",
+ ],
+)
+
+libc_support_library(
+ name = "__support_math_sinpif",
+ hdrs = ["src/__support/math/sinpif.h"],
+ deps = [
+ ":__support_common",
+ ":__support_fputil_fenv_impl",
+ ":__support_fputil_fp_bits",
+ ":__support_fputil_multiply_add",
+ ":__support_fputil_polyeval",
+ ":__support_macros_optimization",
+ ":__support_sincosf_utils",
+ ],
+)
+
+libc_support_library(
+ name = "__support_math_tan",
+ hdrs = ["src/__support/math/tan.h"],
+ deps = [
+ ":__support_fputil_except_value_utils",
+ ":__support_fputil_multiply_add",
+ ":__support_macros_optimization",
+ ":__support_macros_properties_cpu_features",
+ ":__support_range_reduction_double",
+ ":__support_sincos_eval",
+ ],
+)
+
+libc_support_library(
+ name = "__support_math_tanf",
+ hdrs = ["src/__support/math/tanf.h"],
+ deps = [
+ ":__support_fputil_except_value_utils",
+ ":__support_fputil_fma",
+ ":__support_fputil_multiply_add",
+ ":__support_fputil_nearest_integer",
+ ":__support_fputil_polyeval",
+ ":__support_macros_optimization",
+ ":__support_macros_properties_cpu_features",
+ ":__support_range_reduction",
+ ":__support_sincosf_utils",
+ ],
+)
+
############################### complex targets ################################
libc_function(
@@ -3746,14 +4215,15 @@ libc_math_function(name = "ddivf128")
libc_math_function(
name = "dfmal",
additional_deps = [
- ":__support_fputil_fma",
+ ":__support_math_dfmal",
],
)
libc_math_function(
name = "dfmaf128",
additional_deps = [
- ":__support_fputil_fma",
+ ":__support_math_dfmaf128",
+ ":llvm_libc_types_float128",
],
)
@@ -3923,7 +4393,7 @@ libc_math_function(name = "f16divl")
libc_math_function(
name = "f16fma",
additional_deps = [
- ":__support_fputil_fma",
+ ":__support_math_f16fma",
],
)
@@ -3944,7 +4414,7 @@ libc_math_function(
libc_math_function(
name = "f16fmal",
additional_deps = [
- ":__support_fputil_fma",
+ ":__support_math_f16fmal",
],
)
@@ -3980,7 +4450,8 @@ libc_math_function(
libc_math_function(
name = "f16sqrtl",
additional_deps = [
- ":__support_fputil_sqrt",
+ ":__support_math_f16sqrtl",
+ ":errno",
],
)
@@ -4278,21 +4749,22 @@ libc_math_function(name = "fromfpxf16")
libc_math_function(
name = "fsqrt",
additional_deps = [
- ":__support_fputil_sqrt",
+ ":__support_math_fsqrt",
],
)
libc_math_function(
name = "fsqrtl",
additional_deps = [
- ":__support_fputil_sqrt",
+ ":__support_math_fsqrtl",
],
)
libc_math_function(
name = "fsqrtf128",
additional_deps = [
- ":__support_fputil_sqrt",
+ ":__support_math_fsqrtf128",
+ ":errno",
],
)
@@ -4317,8 +4789,8 @@ libc_math_function(name = "hypot")
libc_math_function(
name = "hypotf",
additional_deps = [
- ":__support_fputil_double_double",
- ":__support_fputil_sqrt",
+ ":__support_math_hypotf",
+ ":errno",
],
)
@@ -4330,13 +4802,31 @@ libc_math_function(
],
)
-libc_math_function(name = "ilogb")
+libc_math_function(
+ name = "ilogb",
+ additional_deps = [
+ ":__support_math_ilogb",
+ ],
+)
-libc_math_function(name = "ilogbf")
+libc_math_function(
+ name = "ilogbf",
+ additional_deps = [
+ ":__support_math_ilogbf",
+ ],
+)
-libc_math_function(name = "ilogbl")
+libc_math_function(
+ name = "ilogbl",
+ additional_deps = ["__support_math_ilogbl"],
+)
-libc_math_function(name = "ilogbf128")
+libc_math_function(
+ name = "ilogbf128",
+ additional_deps = [
+ ":__support_math_ilogbf128",
+ ],
+)
libc_math_function(
name = "ilogbf16",
@@ -4370,15 +4860,31 @@ libc_math_function(
],
)
-libc_math_function(name = "llogb")
+libc_math_function(
+ name = "llogb",
+ additional_deps = [
+ ":__support_math_llogb",
+ ],
+)
-libc_math_function(name = "llogbf")
+libc_math_function(
+ name = "llogbf",
+ additional_deps = [":__support_math_llogbf"],
+)
libc_math_function(name = "llogbl")
-libc_math_function(name = "llogbf128")
+libc_math_function(
+ name = "llogbf128",
+ additional_deps = [
+ ":__support_math_llogbf128",
+ ],
+)
-libc_math_function(name = "llogbf16")
+libc_math_function(
+ name = "llogbf16",
+ additional_deps = [":__support_math_llogbf16"],
+)
libc_math_function(name = "llrint")
@@ -4410,35 +4916,21 @@ libc_math_function(
libc_math_function(
name = "logf",
additional_deps = [
- ":__support_fputil_fma",
- ":__support_fputil_multiply_add",
- ":__support_fputil_polyeval",
- ":__support_macros_optimization",
- ":__support_macros_properties_cpu_features",
- ":__support_math_common_constants",
+ ":__support_math_logf",
],
)
libc_math_function(
name = "logf16",
additional_deps = [
- ":__support_math_expxf16_utils",
+ ":__support_math_logf16",
],
)
libc_math_function(
name = "log10",
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",
- ":__support_math_common_constants",
- ":__support_math_log_range_reduction",
+ ":__support_math_log10",
],
)
@@ -4464,15 +4956,7 @@ libc_math_function(
libc_math_function(
name = "log1p",
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",
- ":__support_math_common_constants",
+ ":__support_math_log1p",
],
)
@@ -4491,16 +4975,7 @@ libc_math_function(
libc_math_function(
name = "log2",
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",
- ":__support_math_common_constants",
- ":__support_math_log_range_reduction",
+ ":__support_math_log2",
],
)
@@ -4524,13 +4999,26 @@ libc_math_function(
libc_math_function(name = "logb")
-libc_math_function(name = "logbf")
+libc_math_function(
+ name = "logbf",
+ additional_deps = [
+ ":__support_math_logbf",
+ ],
+)
libc_math_function(name = "logbl")
-libc_math_function(name = "logbf128")
+libc_math_function(
+ name = "logbf128",
+ additional_deps = [":__support_math_logbf128"],
+)
-libc_math_function(name = "logbf16")
+libc_math_function(
+ name = "logbf16",
+ additional_deps = [
+ ":__support_math_logbf16",
+ ],
+)
libc_math_function(name = "lrint")
@@ -4791,22 +5279,15 @@ libc_math_function(
libc_math_function(
name = "sinf",
additional_deps = [
- ":__support_fputil_fma",
- ":__support_fputil_polyeval",
- ":__support_fputil_rounding_mode",
- ":__support_macros_optimization",
- ":__support_macros_properties_cpu_features",
- ":__support_range_reduction",
- ":__support_sincosf_utils",
+ ":__support_math_sinf",
],
)
libc_math_function(
name = "sinf16",
additional_deps = [
- ":__support_fputil_nearest_integer",
- ":__support_fputil_polyeval",
- ":__support_math_sincosf16_utils",
+ ":__support_math_sinf16",
+ ":errno",
],
)
@@ -4836,28 +5317,21 @@ libc_math_function(
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",
- ":__support_math_sinhfcoshf_utils",
- ":__support_math_common_constants",
+ ":__support_math_sinhf",
],
)
libc_math_function(
name = "sinhf16",
additional_deps = [
- ":__support_math_expxf16_utils",
+ ":__support_math_sinhf16",
],
)
libc_math_function(
name = "sinpif",
additional_deps = [
- ":__support_sincosf_utils",
+ ":__support_math_sinpif",
],
)
@@ -4873,7 +5347,7 @@ libc_math_function(
libc_math_function(
name = "sqrt",
additional_deps = [
- ":__support_fputil_sqrt",
+ ":__support_math_sqrt",
],
)
@@ -4901,32 +5375,21 @@ libc_math_function(
libc_math_function(
name = "sqrtf16",
additional_deps = [
- ":__support_fputil_sqrt",
+ ":__support_math_sqrtf16",
],
)
libc_math_function(
name = "tan",
additional_deps = [
- ":__support_fputil_multiply_add",
- ":__support_macros_optimization",
- ":__support_macros_properties_cpu_features",
- ":__support_range_reduction_double",
- ":__support_sincos_eval",
+ ":__support_math_tan",
],
)
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",
- ":__support_range_reduction",
- ":__support_sincosf_utils",
+ ":__support_math_tanf",
],
)
@@ -6543,6 +7006,7 @@ libc_support_library(
":errno",
":printf_config",
":printf_core_structs",
+ ":types_wint_t",
],
)
@@ -6588,9 +7052,14 @@ libc_support_library(
":__support_libc_assert",
":__support_stringutil",
":__support_uint128",
+ ":__support_wchar_mbstate",
+ ":__support_wchar_wcrtomb",
+ ":hdr_wchar_macros",
":printf_config",
":printf_core_structs",
":printf_writer",
+ ":types_wchar_t",
+ ":types_wint_t",
],
)
diff --git a/utils/bazel/llvm-project-overlay/libc/test/src/stdio/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/test/src/stdio/BUILD.bazel
index e33199c..71b5187 100644
--- a/utils/bazel/llvm-project-overlay/libc/test/src/stdio/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libc/test/src/stdio/BUILD.bazel
@@ -62,7 +62,9 @@ libc_test(
srcs = ["sprintf_test.cpp"],
deps = [
"//libc:__support_fputil_fp_bits",
+ "//libc:hdr_wchar_macros",
"//libc:sprintf",
+ "//libc:types_wint_t",
"//libc/test/UnitTest:fp_test_helpers",
],
)
diff --git a/utils/bazel/llvm-project-overlay/lld/BUILD.bazel b/utils/bazel/llvm-project-overlay/lld/BUILD.bazel
index 3804de9..959b9f9 100644
--- a/utils/bazel/llvm-project-overlay/lld/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/lld/BUILD.bazel
@@ -2,6 +2,7 @@
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+load("@bazel_skylib//rules:write_file.bzl", "write_file")
load("@rules_cc//cc:defs.bzl", "cc_library")
load(
"//:vars.bzl",
@@ -19,17 +20,21 @@ package(
licenses(["notice"])
# TODO: Actually compute version info
-genrule(
+write_file(
name = "config_version_gen",
- outs = ["include/lld/Common/Version.inc"],
- cmd = "echo '#define LLD_VERSION_STRING \"{}\"' > $@".format(LLVM_VERSION),
+ out = "include/lld/Common/Version.inc",
+ content = [
+ "#define LLD_VERSION_STRING \"{}\"".format(LLVM_VERSION),
+ ],
)
-genrule(
+write_file(
name = "vcs_version_gen",
- outs = ["Common/VCSVersion.inc"],
- cmd = "echo '#undef LLD_REVISION' >> $@\n" +
- "echo '#undef LLD_REPOSITORY' >> $@\n",
+ out = "Common/VCSVersion.inc",
+ content = [
+ "#undef LLD_REVISION",
+ "#undef LLD_REPOSITORY",
+ ],
)
# See https://github.com/bazelbuild/bazel/issues/13803
diff --git a/utils/bazel/llvm-project-overlay/lldb/BUILD.bazel b/utils/bazel/llvm-project-overlay/lldb/BUILD.bazel
index 852921c..56e64f48 100644
--- a/utils/bazel/llvm-project-overlay/lldb/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/lldb/BUILD.bazel
@@ -514,6 +514,7 @@ objc_library(
":HostMacOSXHeaders",
":HostMacOSXPrivateHeaders",
":UtilityHeaders",
+ "//llvm:DebugInfoDWARF",
"//llvm:Support",
"//llvm:TargetParser",
],
@@ -582,6 +583,7 @@ cc_library(
deps = [
":Headers",
":UtilityHeaders",
+ "//llvm:DebugInfoDWARF",
"//llvm:Object",
"//llvm:Support",
"//llvm:TargetParser",
@@ -767,6 +769,7 @@ cc_library(
":TargetHeaders",
":UtilityPrivateHeaders",
"//llvm:BinaryFormat",
+ "//llvm:DebugInfoDWARF",
"//llvm:Support",
"//llvm:TargetParser",
"//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 3af1c6d..769f9f8 100644
--- a/utils/bazel/llvm-project-overlay/lldb/source/Plugins/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/lldb/source/Plugins/BUILD.bazel
@@ -1159,6 +1159,7 @@ cc_library(
includes = [".."],
deps = [
":PluginDynamicLoaderPosixDYLDHeaders",
+ ":PluginObjectFilePlaceholder",
":PluginProcessElfCore",
":PluginProcessUtility",
"//lldb:Breakpoint",
@@ -1765,6 +1766,7 @@ cc_library(
deps = [
":PluginObjectFileWasm",
"//lldb:Core",
+ "//lldb:Headers",
"//lldb:Host",
"//lldb:HostMacOSXPrivateHeaders",
"//lldb:Symbol",
diff --git a/utils/bazel/llvm-project-overlay/llvm/BUILD.bazel b/utils/bazel/llvm-project-overlay/llvm/BUILD.bazel
index e617ce4..e83a237 100644
--- a/utils/bazel/llvm-project-overlay/llvm/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/llvm/BUILD.bazel
@@ -2,9 +2,12 @@
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+load("@bazel_skylib//lib:selects.bzl", "selects")
load("@bazel_skylib//rules:common_settings.bzl", "string_flag")
load("@bazel_skylib//rules:expand_template.bzl", "expand_template")
-load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
+load("@bazel_skylib//rules:write_file.bzl", "write_file")
+load("@rules_cc//cc:cc_binary.bzl", "cc_binary")
+load("@rules_cc//cc:cc_library.bzl", "cc_library")
load("@rules_python//python:defs.bzl", "py_binary")
load("@rules_shell//shell:sh_binary.bzl", "sh_binary")
load("//mlir:tblgen.bzl", "gentbl_cc_library", "gentbl_filegroup", "td_library")
@@ -208,20 +211,93 @@ cc_library(
deps = [":config"],
)
-genrule(
+write_file(
name = "generate_vcs_revision",
- outs = ["include/llvm/Support/VCSRevision.h"],
- cmd = "echo '#undef LLVM_REVISION' >> $@\n" +
- "echo '#undef LLVM_REPOSITORY' >> $@\n",
+ out = "include/llvm/Support/VCSRevision.h",
+ content = [
+ "#undef LLVM_REVISION",
+ "#undef LLVM_REPOSITORY",
+ ],
)
-genrule(
+write_file(
name = "generate_static_extension_registry",
- outs = ["include/llvm/Support/Extension.def"],
- cmd = "echo -e '// extension handlers' >> $@\n" +
- "echo -e '#undef HANDLE_EXTENSION' >> $@\n",
+ out = "include/llvm/Support/Extension.def",
+ content = [
+ "// extension handlers",
+ "#undef HANDLE_EXTENSION",
+ ],
+)
+
+config_setting(
+ name = "is_windows_clang_mingw",
+ constraint_values = ["@platforms//os:windows"],
+ flag_values = {"@rules_cc//cc/compiler:compiler": "clang"},
+)
+
+config_setting(
+ name = "is_windows_clang_cl",
+ constraint_values = ["@platforms//os:windows"],
+ flag_values = {"@rules_cc//cc/compiler:compiler": "clang-cl"},
+)
+
+config_setting(
+ name = "is_windows_msvc",
+ constraint_values = ["@platforms//os:windows"],
+ flag_values = {"@rules_cc//cc/compiler:compiler": "msvc-cl"},
+)
+
+config_setting(
+ name = "is_x86_64_windows_clang_mingw",
+ constraint_values = [
+ "@platforms//cpu:x86_64",
+ "@platforms//os:windows",
+ ],
+ flag_values = {"@rules_cc//cc/compiler:compiler": "clang"},
+)
+
+# TODO(zbarsky): Is there a better way to express this?
+config_setting(
+ name = "_stamp_binary_on_check",
+ values = {"stamp": "1"},
+)
+
+config_setting(
+ name = "_stamp_binary_off_check",
+ values = {"stamp": "0"},
+)
+
+selects.config_setting_group(
+ name = "_true",
+ match_any = [
+ ":_stamp_binary_on_check",
+ ":_stamp_binary_off_check",
+ ],
+)
+
+alias(
+ name = "non_windows",
+ actual = select({
+ "@platforms//os:windows": "@platforms//os:macos",
+ "//conditions:default": ":_true",
+ }),
)
+selects.config_setting_group(
+ name = "is_x86_64_non_windows",
+ match_all = [
+ "@platforms//cpu:x86_64",
+ ":non_windows",
+ ],
+)
+
+BLAKE3_x86_64_ASM_SOURCE_PATTERNS = [
+ "lib/Support/BLAKE3/blake3_avx2_x86-64_%s.S",
+ "lib/Support/BLAKE3/blake3_avx512_x86-64_%s.S",
+ "lib/Support/BLAKE3/blake3_sse2_x86-64_%s.S",
+ "lib/Support/BLAKE3/blake3_sse41_x86-64_%s.S",
+]
+
cc_library(
name = "Support",
srcs = glob([
@@ -250,11 +326,13 @@ cc_library(
"@platforms//cpu:aarch64": [
"lib/Support/BLAKE3/blake3_neon.c",
],
- "@platforms//cpu:x86_64": [
- "lib/Support/BLAKE3/blake3_avx2_x86-64_unix.S",
- "lib/Support/BLAKE3/blake3_avx512_x86-64_unix.S",
- "lib/Support/BLAKE3/blake3_sse2_x86-64_unix.S",
- "lib/Support/BLAKE3/blake3_sse41_x86-64_unix.S",
+ ":is_x86_64_windows_clang_mingw": [
+ pattern % "windows_gnu"
+ for pattern in BLAKE3_x86_64_ASM_SOURCE_PATTERNS
+ ],
+ ":is_x86_64_non_windows": [
+ pattern % "unix"
+ for pattern in BLAKE3_x86_64_ASM_SOURCE_PATTERNS
],
"//conditions:default": [
],
@@ -297,7 +375,21 @@ cc_library(
}),
includes = ["include"],
linkopts = select({
- "@platforms//os:windows": [
+ ":is_windows_clang_mingw": [
+ "-lole32",
+ "-luuid",
+ "-lws2_32",
+ "-lntdll",
+ ],
+ ":is_windows_clang_cl": [
+ "ole32.lib",
+ "uuid.lib",
+ "ws2_32.lib",
+ "ntdll.lib",
+ ],
+ ":is_windows_msvc": [
+ "ole32.lib",
+ "uuid.lib",
"ws2_32.lib",
"ntdll.lib",
],
@@ -4541,6 +4633,13 @@ cc_library(
"tools/dsymutil/*.h",
]),
copts = llvm_copts,
+ linkopts = select({
+ "@platforms//os:macos": [
+ "-framework",
+ "CoreFoundation",
+ ],
+ "//conditions:default": [],
+ }),
deps = [
":AllTargetsCodeGens",
":BinaryFormat",
@@ -4972,10 +5071,12 @@ cc_binary(
":DebugInfo",
":DebugInfoDWARF",
":DebugInfoDWARFLowLevel",
+ ":IRReader",
":MC",
":Object",
":Support",
":TargetParser",
+ ":ir_headers",
],
)
@@ -6625,11 +6726,17 @@ cc_binary(
cc_binary(
name = "llvm-ir2vec",
testonly = True,
- srcs = glob([
- "tools/llvm-ir2vec/*.cpp",
- "tools/llvm-ir2vec/*.h",
- ]),
+ srcs = glob(
+ [
+ "tools/llvm-ir2vec/**/*.cpp",
+ "tools/llvm-ir2vec/lib/*.h",
+ ],
+ exclude = [
+ "tools/llvm-ir2vec/Bindings/*.cpp",
+ ],
+ ),
copts = llvm_copts,
+ includes = ["tools/llvm-ir2vec/lib"],
stamp = 0,
deps = [
":AllTargetsAsmParsers",
diff --git a/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel b/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
index 9bde52e..369f8a6 100644
--- a/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
@@ -114,6 +114,16 @@ gentbl_cc_library(
)
gentbl_cc_library(
+ name = "OpAsmDialectInterfaceIncGen",
+ tbl_outs = {
+ "include/mlir/IR/OpAsmDialectInterface.h.inc": ["-gen-dialect-interface-decls"],
+ },
+ tblgen = ":mlir-tblgen",
+ td_file = "include/mlir/IR/OpAsmDialectInterface.td",
+ deps = [":OpBaseTdFiles"],
+)
+
+gentbl_cc_library(
name = "TensorEncodingIncGen",
tbl_outs = {
"include/mlir/IR/TensorEncInterfaces.h.inc": ["-gen-attr-interface-decls"],
@@ -397,6 +407,7 @@ cc_library(
"lib/Bytecode/Writer/*.h",
"include/mlir/Bytecode/*.h",
]) + [
+ "include/mlir/IR/OpAsmDialectInterface.h.inc",
"include/mlir/IR/OpAsmOpInterface.h.inc",
"include/mlir/Interfaces/DataLayoutInterfaces.h",
"include/mlir/Interfaces/InferIntRangeInterface.h",
@@ -1686,6 +1697,8 @@ cc_library(
":TransformDialect",
":TransformDialectInterfaces",
":TransformUtils",
+ ":VectorDialect",
+ "//llvm:Support",
],
)
@@ -3453,6 +3466,7 @@ cc_library(
":AffineDialect",
":ArithDialect",
":BufferizationDialect",
+ ":ControlFlowDialect",
":ConversionPassIncGen",
":DLTIDialect",
":DialectUtils",
@@ -3462,6 +3476,7 @@ cc_library(
":LinalgDialect",
":MPIDialect",
":MemRefDialect",
+ ":MemRefUtils",
":Pass",
":SCFDialect",
":ShardDialect",
@@ -3971,6 +3986,7 @@ cc_library(
":SCFTransforms",
":TransformUtils",
":XeGPUDialect",
+ ":XeGPUuArch",
":XeVMDialect",
"//llvm:Support",
],
@@ -7645,7 +7661,6 @@ 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",
],
@@ -7695,6 +7710,7 @@ cc_library(
":IR",
":InferTypeOpInterface",
":TensorDialect",
+ "//llvm:Support",
],
)
@@ -9753,6 +9769,7 @@ cc_library(
":ArithToLLVM",
":ArmNeonTransformOps",
":ArmSVEVectorTransformOps",
+ ":BufferizationExtensions",
":BufferizationTransformOps",
":BuiltinToLLVMIRTranslation",
":ComplexToLLVM",
@@ -10370,6 +10387,7 @@ td_library(
srcs = [
"include/mlir/Dialect/OpenACC/AccCommon.td",
"include/mlir/Dialect/OpenACC/OpenACCBase.td",
+ "include/mlir/Dialect/OpenACC/OpenACCCGOps.td",
"include/mlir/Dialect/OpenACC/OpenACCOps.td",
"include/mlir/Dialect/OpenACC/OpenACCOpsInterfaces.td",
"include/mlir/Dialect/OpenACC/OpenACCOpsTypes.td",
@@ -13193,6 +13211,7 @@ cc_library(
":MathBaseIncGen",
":MathOpsIncGen",
":SideEffectInterfaces",
+ ":Support",
":UBDialect",
":VectorInterfaces",
],
@@ -13243,6 +13262,7 @@ cc_library(
":Pass",
":TransformUtils",
":VectorDialect",
+ "//llvm:Support",
],
)
@@ -13256,6 +13276,24 @@ td_library(
)
td_library(
+ name = "MemoryAccessOpInterfacesTdFiles",
+ srcs = ["include/mlir/Dialect/MemRef/IR/MemoryAccessOpInterfaces.td"],
+ includes = ["include"],
+ deps = [":OpBaseTdFiles"],
+)
+
+gentbl_cc_library(
+ name = "MemoryAccessOpInterfacesIncGen",
+ tbl_outs = {
+ "include/mlir/Dialect/MemRef/IR/MemoryAccessOpInterfaces.h.inc": ["-gen-op-interface-decls"],
+ "include/mlir/Dialect/MemRef/IR/MemoryAccessOpInterfaces.cpp.inc": ["-gen-op-interface-defs"],
+ },
+ tblgen = ":mlir-tblgen",
+ td_file = "include/mlir/Dialect/MemRef/IR/MemoryAccessOpInterfaces.td",
+ deps = [":MemoryAccessOpInterfacesTdFiles"],
+)
+
+td_library(
name = "MemRefOpsTdFiles",
srcs = [
"include/mlir/Dialect/MemRef/IR/MemRefBase.td",
@@ -13341,6 +13379,7 @@ cc_library(
hdrs = [
"include/mlir/Dialect/MemRef/IR/MemRef.h",
"include/mlir/Dialect/MemRef/IR/MemRefMemorySlot.h",
+ "include/mlir/Dialect/MemRef/IR/MemoryAccessOpInterfaces.h",
"include/mlir/Dialect/MemRef/IR/ValueBoundsOpInterfaceImpl.h",
],
includes = ["include"],
@@ -13365,10 +13404,12 @@ cc_library(
":MemOpInterfaces",
":MemRefBaseIncGen",
":MemRefOpsIncGen",
+ ":MemoryAccessOpInterfacesIncGen",
":MemorySlotInterfaces",
":RuntimeVerifiableOpInterface",
":ShapedOpInterfaces",
":SideEffectInterfaces",
+ ":Support",
":UBDialect",
":ValueBoundsOpInterface",
":ViewLikeInterface",
@@ -14052,6 +14093,18 @@ cc_library(
)
cc_library(
+ name = "BufferizationExtensions",
+ srcs = glob(["lib/Dialect/Bufferization/Extensions/*.cpp"]),
+ hdrs = glob(["include/mlir/Dialect/Bufferization/Extensions/*.h"]),
+ includes = ["include"],
+ deps = [
+ ":BufferizationDialect",
+ ":IR",
+ ":ShardingInterface",
+ ],
+)
+
+cc_library(
name = "BufferizationPipelines",
srcs = glob(["lib/Dialect/Bufferization/Pipelines/*.cpp"]),
hdrs = ["include/mlir/Dialect/Bufferization/Pipelines/Passes.h"],
diff --git a/utils/bazel/llvm-project-overlay/mlir/python/BUILD.bazel b/utils/bazel/llvm-project-overlay/mlir/python/BUILD.bazel
index 9658e43..912fcd3 100644
--- a/utils/bazel/llvm-project-overlay/mlir/python/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/mlir/python/BUILD.bazel
@@ -22,6 +22,7 @@ filegroup(
name = "DialectCorePyFiles",
srcs = [
"mlir/dialects/_ods_common.py",
+ "mlir/dialects/ext.py",
],
)
diff --git a/utils/bazel/llvm-project-overlay/mlir/test/BUILD.bazel b/utils/bazel/llvm-project-overlay/mlir/test/BUILD.bazel
index aa61da4..ed1500a 100644
--- a/utils/bazel/llvm-project-overlay/mlir/test/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/mlir/test/BUILD.bazel
@@ -1223,11 +1223,15 @@ cc_library(
srcs = glob(["lib/Dialect/XeGPU/*.cpp"]),
includes = ["lib/Dialect/Test"],
deps = [
+ "//llvm:Support",
+ "//mlir:ArithDialect",
"//mlir:GPUDialect",
"//mlir:IR",
"//mlir:IndexDialect",
+ "//mlir:MathDialect",
"//mlir:MemRefDialect",
"//mlir:Pass",
+ "//mlir:SCFTransforms",
"//mlir:TransformUtils",
"//mlir:VectorTransforms",
"//mlir:XeGPUDialect",
diff --git a/utils/bazel/third_party_build/mpc.BUILD b/utils/bazel/third_party_build/mpc.BUILD
index b55e41a..6af2773 100644
--- a/utils/bazel/third_party_build/mpc.BUILD
+++ b/utils/bazel/third_party_build/mpc.BUILD
@@ -2,6 +2,7 @@
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+load("@rules_cc//cc:defs.bzl", "cc_library")
load("@rules_foreign_cc//foreign_cc:defs.bzl", "configure_make_variant")
filegroup(
diff --git a/utils/bazel/third_party_build/mpfr.BUILD b/utils/bazel/third_party_build/mpfr.BUILD
index 6b47874..8476c8c 100644
--- a/utils/bazel/third_party_build/mpfr.BUILD
+++ b/utils/bazel/third_party_build/mpfr.BUILD
@@ -2,6 +2,7 @@
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+load("@rules_cc//cc:defs.bzl", "cc_library")
load("@rules_foreign_cc//foreign_cc:defs.bzl", "configure_make_variant")
filegroup(
diff --git a/utils/bazel/third_party_build/nanobind.BUILD b/utils/bazel/third_party_build/nanobind.BUILD
index 262d14a..41296d90 100644
--- a/utils/bazel/third_party_build/nanobind.BUILD
+++ b/utils/bazel/third_party_build/nanobind.BUILD
@@ -1,3 +1,5 @@
+load("@rules_cc//cc:defs.bzl", "cc_library")
+
cc_library(
name = "nanobind",
srcs = glob(
diff --git a/utils/bazel/third_party_build/pfm.BUILD b/utils/bazel/third_party_build/pfm.BUILD
index dba7464..91d92d4 100644
--- a/utils/bazel/third_party_build/pfm.BUILD
+++ b/utils/bazel/third_party_build/pfm.BUILD
@@ -2,6 +2,7 @@
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+load("@rules_cc//cc:defs.bzl", "cc_library")
load("@rules_foreign_cc//foreign_cc:defs.bzl", "make_variant")
filegroup(
diff --git a/utils/bazel/third_party_build/pybind.BUILD b/utils/bazel/third_party_build/pybind.BUILD
index d9fb431..43f832f 100644
--- a/utils/bazel/third_party_build/pybind.BUILD
+++ b/utils/bazel/third_party_build/pybind.BUILD
@@ -1,3 +1,5 @@
+load("@rules_cc//cc:defs.bzl", "cc_library")
+
cc_library(
name = "pybind11",
hdrs = glob(
diff --git a/utils/bazel/third_party_build/robin_map.BUILD b/utils/bazel/third_party_build/robin_map.BUILD
index b8d04be..3dbd746 100644
--- a/utils/bazel/third_party_build/robin_map.BUILD
+++ b/utils/bazel/third_party_build/robin_map.BUILD
@@ -1,3 +1,5 @@
+load("@rules_cc//cc:defs.bzl", "cc_library")
+
cc_library(
name = "robin_map",
hdrs = [
diff --git a/utils/bazel/third_party_build/vulkan_headers.BUILD b/utils/bazel/third_party_build/vulkan_headers.BUILD
index 33c0d98..f40a965 100644
--- a/utils/bazel/third_party_build/vulkan_headers.BUILD
+++ b/utils/bazel/third_party_build/vulkan_headers.BUILD
@@ -2,6 +2,8 @@
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+load("@rules_cc//cc:defs.bzl", "cc_library")
+
package(
default_visibility = ["//visibility:public"],
licenses = ["notice"],