aboutsummaryrefslogtreecommitdiff
path: root/utils/bazel
diff options
context:
space:
mode:
Diffstat (limited to 'utils/bazel')
-rw-r--r--utils/bazel/llvm-project-overlay/bolt/BUILD.bazel1
-rw-r--r--utils/bazel/llvm-project-overlay/clang-tools-extra/clangd/BUILD.bazel2
-rw-r--r--utils/bazel/llvm-project-overlay/clang-tools-extra/include-cleaner/BUILD.bazel2
-rw-r--r--utils/bazel/llvm-project-overlay/clang-tools-extra/unittests/BUILD.bazel2
-rw-r--r--utils/bazel/llvm-project-overlay/clang/BUILD.bazel1
-rw-r--r--utils/bazel/llvm-project-overlay/clang/unittests/BUILD.bazel2
-rw-r--r--utils/bazel/llvm-project-overlay/compiler-rt/BUILD.bazel2
-rw-r--r--utils/bazel/llvm-project-overlay/compiler-rt/lib/orc/tests/unit/BUILD.bazel2
-rw-r--r--utils/bazel/llvm-project-overlay/libc/BUILD.bazel173
-rw-r--r--utils/bazel/llvm-project-overlay/libc/libc_build_rules.bzl13
-rw-r--r--utils/bazel/llvm-project-overlay/libc/libc_configure_options.bzl3
-rw-r--r--utils/bazel/llvm-project-overlay/libc/test/libc_test_rules.bzl6
-rw-r--r--utils/bazel/llvm-project-overlay/libc/test/src/wchar/BUILD.bazel1
-rw-r--r--utils/bazel/llvm-project-overlay/libc/utils/MPCWrapper/BUILD.bazel1
-rw-r--r--utils/bazel/llvm-project-overlay/libc/utils/MPFRWrapper/BUILD.bazel1
-rw-r--r--utils/bazel/llvm-project-overlay/libunwind/BUILD.bazel2
-rw-r--r--utils/bazel/llvm-project-overlay/lld/BUILD.bazel1
-rw-r--r--utils/bazel/llvm-project-overlay/lldb/BUILD.bazel1
-rw-r--r--utils/bazel/llvm-project-overlay/lldb/source/Plugins/BUILD.bazel2
-rw-r--r--utils/bazel/llvm-project-overlay/llvm/BUILD.bazel2
-rw-r--r--utils/bazel/llvm-project-overlay/llvm/driver.bzl3
-rw-r--r--utils/bazel/llvm-project-overlay/llvm/unittests/BUILD.bazel2
-rw-r--r--utils/bazel/llvm-project-overlay/mlir/BUILD.bazel260
-rw-r--r--utils/bazel/llvm-project-overlay/mlir/build_defs.bzl8
-rw-r--r--utils/bazel/llvm-project-overlay/mlir/examples/toy/Ch1/BUILD.bazel3
-rw-r--r--utils/bazel/llvm-project-overlay/mlir/examples/toy/Ch2/BUILD.bazel1
-rw-r--r--utils/bazel/llvm-project-overlay/mlir/examples/toy/Ch3/BUILD.bazel1
-rw-r--r--utils/bazel/llvm-project-overlay/mlir/examples/toy/Ch4/BUILD.bazel1
-rw-r--r--utils/bazel/llvm-project-overlay/mlir/examples/toy/Ch5/BUILD.bazel1
-rw-r--r--utils/bazel/llvm-project-overlay/mlir/examples/toy/Ch6/BUILD.bazel1
-rw-r--r--utils/bazel/llvm-project-overlay/mlir/examples/toy/Ch7/BUILD.bazel1
-rw-r--r--utils/bazel/llvm-project-overlay/mlir/examples/transform-opt/BUILD.bazel22
-rw-r--r--utils/bazel/llvm-project-overlay/mlir/examples/transform/Ch2/BUILD.bazel74
-rw-r--r--utils/bazel/llvm-project-overlay/mlir/examples/transform/Ch3/BUILD.bazel93
-rw-r--r--utils/bazel/llvm-project-overlay/mlir/examples/transform/Ch4/BUILD.bazel73
-rw-r--r--utils/bazel/llvm-project-overlay/mlir/linalggen.bzl4
-rw-r--r--utils/bazel/llvm-project-overlay/mlir/tblgen.bzl3
-rw-r--r--utils/bazel/llvm-project-overlay/mlir/test/BUILD.bazel2
-rw-r--r--utils/bazel/llvm-project-overlay/mlir/test/mlir-tblgen/BUILD.bazel1
-rw-r--r--utils/bazel/llvm-project-overlay/mlir/unittests/BUILD.bazel2
-rw-r--r--utils/bazel/llvm-project-overlay/third-party/siphash/BUILD.bazel10
-rw-r--r--utils/bazel/llvm-project-overlay/third-party/unittest/BUILD.bazel2
-rw-r--r--utils/bazel/llvm_configs/llvm-config.h.cmake3
43 files changed, 596 insertions, 195 deletions
diff --git a/utils/bazel/llvm-project-overlay/bolt/BUILD.bazel b/utils/bazel/llvm-project-overlay/bolt/BUILD.bazel
index 97c25bc..167447d 100644
--- a/utils/bazel/llvm-project-overlay/bolt/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/bolt/BUILD.bazel
@@ -3,6 +3,7 @@
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
load("@bazel_skylib//rules:expand_template.bzl", "expand_template")
+load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
load(":targets.bzl", "bolt_targets")
package(
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 2ec99aa..4151e55 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
@@ -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"],
features = ["layering_check"],
diff --git a/utils/bazel/llvm-project-overlay/clang-tools-extra/include-cleaner/BUILD.bazel b/utils/bazel/llvm-project-overlay/clang-tools-extra/include-cleaner/BUILD.bazel
index e34fbe5..6f1f5b8 100644
--- a/utils/bazel/llvm-project-overlay/clang-tools-extra/include-cleaner/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/clang-tools-extra/include-cleaner/BUILD.bazel
@@ -3,7 +3,7 @@
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
load("@bazel_skylib//rules:expand_template.bzl", "expand_template")
-load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
+load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library", "cc_test")
load("//llvm:lit_test.bzl", "lit_test", "package_path")
package(
diff --git a/utils/bazel/llvm-project-overlay/clang-tools-extra/unittests/BUILD.bazel b/utils/bazel/llvm-project-overlay/clang-tools-extra/unittests/BUILD.bazel
index c169529..62bac74 100644
--- a/utils/bazel/llvm-project-overlay/clang-tools-extra/unittests/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/clang-tools-extra/unittests/BUILD.bazel
@@ -3,7 +3,7 @@
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
load("@bazel_skylib//rules:expand_template.bzl", "expand_template")
-load("@rules_cc//cc:defs.bzl", "cc_test")
+load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test")
package(
default_visibility = ["//visibility:public"],
diff --git a/utils/bazel/llvm-project-overlay/clang/BUILD.bazel b/utils/bazel/llvm-project-overlay/clang/BUILD.bazel
index 8462f7a..64f86c4 100644
--- a/utils/bazel/llvm-project-overlay/clang/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/clang/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("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
load("@rules_python//python:defs.bzl", "py_binary")
load(
"//:vars.bzl",
diff --git a/utils/bazel/llvm-project-overlay/clang/unittests/BUILD.bazel b/utils/bazel/llvm-project-overlay/clang/unittests/BUILD.bazel
index c8276ec..cd66c1f 100644
--- a/utils/bazel/llvm-project-overlay/clang/unittests/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/clang/unittests/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("@rules_cc//cc:defs.bzl", "cc_library", "cc_test")
+
package(default_visibility = ["//visibility:public"])
licenses(["notice"])
diff --git a/utils/bazel/llvm-project-overlay/compiler-rt/BUILD.bazel b/utils/bazel/llvm-project-overlay/compiler-rt/BUILD.bazel
index bcf947a..f34d56d 100644
--- a/utils/bazel/llvm-project-overlay/compiler-rt/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/compiler-rt/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("@rules_cc//cc:defs.bzl", "cc_library")
+
package(
default_visibility = ["//visibility:public"],
features = ["layering_check"],
diff --git a/utils/bazel/llvm-project-overlay/compiler-rt/lib/orc/tests/unit/BUILD.bazel b/utils/bazel/llvm-project-overlay/compiler-rt/lib/orc/tests/unit/BUILD.bazel
index 520bf2a..e3233a1 100644
--- a/utils/bazel/llvm-project-overlay/compiler-rt/lib/orc/tests/unit/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/compiler-rt/lib/orc/tests/unit/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("@rules_cc//cc:defs.bzl", "cc_test")
+
package(
default_visibility = ["//visibility:public"],
features = ["layering_check"],
diff --git a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
index 25353e1..a1d5afd 100644
--- a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
@@ -2039,19 +2039,6 @@ libc_support_library(
)
libc_support_library(
- name = "atan_utils",
- hdrs = ["src/math/generic/atan_utils.h"],
- deps = [
- ":__support_fputil_double_double",
- ":__support_fputil_dyadic_float",
- ":__support_fputil_multiply_add",
- ":__support_fputil_polyeval",
- ":__support_integer_literals",
- ":__support_macros_optimization",
- ],
-)
-
-libc_support_library(
name = "log_range_reduction",
hdrs = ["src/math/generic/log_range_reduction.h"],
deps = [
@@ -2232,6 +2219,101 @@ libc_support_library(
)
libc_support_library(
+ name = "__support_math_asinhf",
+ hdrs = ["src/__support/math/asinhf.h"],
+ deps = [
+ ":__support_math_acoshf_utils",
+ ":__support_fputil_fp_bits",
+ ":__support_fputil_polyeval",
+ ":__support_fputil_multiply_add",
+ ":__support_fputil_sqrt",
+ ":__support_macros_config",
+ ":__support_macros_optimization",
+ ],
+)
+
+libc_support_library(
+ name = "__support_math_asinhf16",
+ hdrs = ["src/__support/math/asinhf16.h"],
+ deps = [
+ ":__support_math_acoshf_utils",
+ ":__support_fputil_fenv_impl",
+ ":__support_fputil_fp_bits",
+ ":__support_fputil_polyeval",
+ ":__support_fputil_cast",
+ ":__support_fputil_except_value_utils",
+ ":__support_fputil_multiply_add",
+ ":__support_fputil_rounding_mode",
+ ":__support_fputil_sqrt",
+ ":__support_macros_config",
+ ":__support_macros_optimization",
+ ],
+)
+
+libc_support_library(
+ name = "__support_math_atan_utils",
+ hdrs = ["src/__support/math/atan_utils.h"],
+ deps = [
+ ":__support_fputil_double_double",
+ ":__support_fputil_dyadic_float",
+ ":__support_fputil_multiply_add",
+ ":__support_fputil_polyeval",
+ ":__support_integer_literals",
+ ":__support_macros_optimization",
+ ],
+)
+
+libc_support_library(
+ name = "__support_math_atan",
+ hdrs = ["src/__support/math/atan.h"],
+ deps = [
+ ":__support_fputil_double_double",
+ ":__support_fputil_nearest_integer",
+ ":__support_macros_optimization",
+ ":__support_math_atan_utils",
+ ],
+)
+
+libc_support_library(
+ name = "__support_math_atan2",
+ hdrs = ["src/__support/math/atan2.h"],
+ deps = [
+ ":__support_fputil_double_double",
+ ":__support_fputil_nearest_integer",
+ ":__support_math_atan_utils",
+ ],
+)
+
+libc_support_library(
+ name = "__support_math_atanf",
+ hdrs = ["src/__support/math/atanf.h"],
+ deps = [
+ ":__support_fputil_except_value_utils",
+ ":__support_fputil_multiply_add",
+ ":__support_fputil_nearest_integer",
+ ":__support_fputil_polyeval",
+ ":__support_fputil_rounding_mode",
+ ":__support_macros_optimization",
+ ":__support_math_inv_trigf_utils",
+ ],
+)
+
+libc_support_library(
+ name = "__support_math_atanf16",
+ hdrs = ["src/__support/math/atanf16.h"],
+ deps = [
+ ":__support_fputil_cast",
+ ":__support_fputil_except_value_utils",
+ ":__support_fputil_fenv_impl",
+ ":__support_fputil_fp_bits",
+ ":__support_fputil_polyeval",
+ ":__support_fputil_multiply_add",
+ ":__support_fputil_sqrt",
+ ":__support_macros_optimization",
+ ],
+)
+
+libc_support_library(
name = "__support_math_asinf",
hdrs = ["src/__support/math/asinf.h"],
deps = [
@@ -2248,6 +2330,19 @@ libc_support_library(
)
libc_support_library(
+ name = "__support_math_asinf16",
+ hdrs = ["src/__support/math/asinf16.h"],
+ deps = [
+ ":__support_fputil_fenv_impl",
+ ":__support_fputil_fp_bits",
+ ":__support_fputil_polyeval",
+ ":__support_fputil_multiply_add",
+ ":__support_fputil_sqrt",
+ ":__support_macros_optimization",
+ ],
+)
+
+libc_support_library(
name = "__support_math_erff",
hdrs = ["src/__support/math/erff.h"],
deps = [
@@ -2809,51 +2904,42 @@ libc_math_function(
libc_math_function(
name = "asinf16",
additional_deps = [
- ":__support_fputil_cast",
- ":__support_fputil_fma",
- ":__support_fputil_multiply_add",
- ":__support_fputil_nearest_integer",
- ":__support_fputil_polyeval",
- ":__support_fputil_sqrt",
- ":__support_macros_optimization",
- ":__support_math_inv_trigf_utils",
+ ":__support_math_asinf16",
],
)
libc_math_function(
name = "asinhf",
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",
+ ":__support_math_asinhf",
+ ],
+)
+
+libc_math_function(
+ name = "asinhf16",
+ additional_deps = [
+ ":__support_math_asinhf16",
],
)
libc_math_function(
name = "atanf",
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_inv_trigf_utils",
+ ":__support_math_atanf"
+ ],
+)
+
+libc_math_function(
+ name = "atanf16",
+ additional_deps = [
+ ":__support_math_atanf16"
],
)
libc_math_function(
name = "atan",
additional_deps = [
- ":__support_fputil_double_double",
- ":__support_fputil_nearest_integer",
- ":__support_macros_optimization",
- ":atan_utils",
+ ":__support_math_atan"
],
)
@@ -2869,9 +2955,7 @@ libc_math_function(
libc_math_function(
name = "atan2",
additional_deps = [
- ":__support_fputil_double_double",
- ":__support_fputil_nearest_integer",
- ":atan_utils",
+ ":__support_math_atan2",
],
)
@@ -6239,7 +6323,9 @@ libc_function(
deps = [
":__support_common",
":__support_macros_config",
+ ":__support_macros_null_check",
":types_wchar_t",
+ ":wchar_utils",
],
)
@@ -6366,6 +6452,7 @@ libc_function(
":__support_common",
":__support_macros_null_check",
":types_wchar_t",
+ ":wchar_utils",
],
)
diff --git a/utils/bazel/llvm-project-overlay/libc/libc_build_rules.bzl b/utils/bazel/llvm-project-overlay/libc/libc_build_rules.bzl
index e123e4d..0f296536 100644
--- a/utils/bazel/llvm-project-overlay/libc/libc_build_rules.bzl
+++ b/utils/bazel/llvm-project-overlay/libc/libc_build_rules.bzl
@@ -6,6 +6,7 @@
load("@bazel_skylib//lib:paths.bzl", "paths")
load("@bazel_skylib//lib:selects.bzl", "selects")
+load("@rules_cc//cc:defs.bzl", "cc_library")
load(":libc_configure_options.bzl", "LIBC_CONFIGURE_OPTIONS")
load(":libc_namespace.bzl", "LIBC_NAMESPACE")
load(":platforms.bzl", "PLATFORM_CPU_X86_64")
@@ -52,7 +53,7 @@ def _libc_library(name, **kwargs):
for attr in ["copts", "local_defines"]:
if attr in kwargs:
fail("disallowed attribute: '{}' in rule: '{}'".format(attr, name))
- native.cc_library(
+ cc_library(
name = name,
copts = libc_common_copts(),
local_defines = LIBC_CONFIGURE_OPTIONS,
@@ -188,7 +189,7 @@ def libc_release_library(
name = name + "_textual_hdrs",
libs = libc_functions,
)
- native.cc_library(
+ cc_library(
name = name + "_textual_hdr_library",
textual_hdrs = [":" + name + "_textual_hdrs"],
)
@@ -197,8 +198,7 @@ def libc_release_library(
"LLVM_LIBC_FUNCTION_ATTR_" + name + "='LLVM_LIBC_EMPTY, [[gnu::weak]]'"
for name in weak_symbols
]
-
- native.cc_library(
+ cc_library(
name = name,
srcs = [":" + name + "_srcs"],
copts = libc_common_copts() + libc_release_copts(),
@@ -229,12 +229,11 @@ def libc_header_library(name, hdrs, deps = [], **kwargs):
name = name + "_textual_hdrs",
libs = deps,
)
- native.cc_library(
+ cc_library(
name = name + "_textual_hdr_library",
textual_hdrs = [":" + name + "_textual_hdrs"],
)
-
- native.cc_library(
+ cc_library(
name = name,
hdrs = hdrs,
# We put _hdr_deps in srcs, as they are not a part of this cc_library
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 96d7fa8..b49e7c3 100644
--- a/utils/bazel/llvm-project-overlay/libc/libc_configure_options.bzl
+++ b/utils/bazel/llvm-project-overlay/libc/libc_configure_options.bzl
@@ -46,4 +46,7 @@ LIBC_CONFIGURE_OPTIONS = [
# Documentation in libc/src/__support/libc_assert.h
# "LIBC_COPT_USE_C_ASSERT",
+
+ # Documentation in libc/docs/configure.rst
+ "LIBC_THREAD_MODE=LIBC_THREAD_MODE_PLATFORM",
]
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 8cb7821..e35913d 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
@@ -12,6 +12,7 @@ They come in two flavors:
When performing tests we make sure to always use the internal version.
"""
+load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test")
load("//libc:libc_build_rules.bzl", "libc_common_copts")
load("//libc:libc_configure_options.bzl", "LIBC_CONFIGURE_OPTIONS")
@@ -58,8 +59,7 @@ def libc_test(
if full_build:
copts = copts + _FULL_BUILD_COPTS
-
- native.cc_test(
+ cc_test(
name = name,
local_defines = local_defines + LIBC_CONFIGURE_OPTIONS,
deps = deps,
@@ -77,7 +77,7 @@ def libc_test_library(name, copts = [], local_defines = [], **kwargs):
local_defines: See cc_library.local_defines.
**kwargs: Other attributes relevant to cc_library (e.g. "deps").
"""
- native.cc_library(
+ cc_library(
name = name,
testonly = True,
copts = copts + libc_common_copts(),
diff --git a/utils/bazel/llvm-project-overlay/libc/test/src/wchar/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/test/src/wchar/BUILD.bazel
index b6d6b8f..dbe069f 100644
--- a/utils/bazel/llvm-project-overlay/libc/test/src/wchar/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libc/test/src/wchar/BUILD.bazel
@@ -83,7 +83,6 @@ libc_test(
],
)
-
libc_test(
name = "wcslcat_test",
srcs = ["wcslcat_test.cpp"],
diff --git a/utils/bazel/llvm-project-overlay/libc/utils/MPCWrapper/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/utils/MPCWrapper/BUILD.bazel
index 0db6ce1..79a2096 100644
--- a/utils/bazel/llvm-project-overlay/libc/utils/MPCWrapper/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libc/utils/MPCWrapper/BUILD.bazel
@@ -4,6 +4,7 @@
# A wrapper library over MPC for use with LLVM libc math unittests.
+load("@rules_cc//cc:defs.bzl", "cc_library")
load("//libc/test:libc_test_rules.bzl", "libc_test_library")
package(default_visibility = ["//visibility:public"])
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 64f7837..ff93eb5 100644
--- a/utils/bazel/llvm-project-overlay/libc/utils/MPFRWrapper/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libc/utils/MPFRWrapper/BUILD.bazel
@@ -4,6 +4,7 @@
# A wrapper library over MPFR for use with LLVM libc math unittests.
+load("@rules_cc//cc:defs.bzl", "cc_library")
load("//libc/test:libc_test_rules.bzl", "libc_test_library")
package(default_visibility = ["//visibility:public"])
diff --git a/utils/bazel/llvm-project-overlay/libunwind/BUILD.bazel b/utils/bazel/llvm-project-overlay/libunwind/BUILD.bazel
index f8448fb..c9fdc819 100644
--- a/utils/bazel/llvm-project-overlay/libunwind/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libunwind/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("@rules_cc//cc:defs.bzl", "cc_library")
+
package(
default_visibility = ["//visibility:public"],
)
diff --git a/utils/bazel/llvm-project-overlay/lld/BUILD.bazel b/utils/bazel/llvm-project-overlay/lld/BUILD.bazel
index 76957a9..162c4f9 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("@rules_cc//cc:defs.bzl", "cc_library")
load(
"//:vars.bzl",
"LLVM_VERSION",
diff --git a/utils/bazel/llvm-project-overlay/lldb/BUILD.bazel b/utils/bazel/llvm-project-overlay/lldb/BUILD.bazel
index 202f224..7aa7be6 100644
--- a/utils/bazel/llvm-project-overlay/lldb/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/lldb/BUILD.bazel
@@ -6,6 +6,7 @@ load("@bazel_skylib//lib:selects.bzl", "selects")
load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")
load("@bazel_skylib//rules:expand_template.bzl", "expand_template")
load("@build_bazel_apple_support//rules:apple_genrule.bzl", "apple_genrule")
+load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
load("@rules_python//python:defs.bzl", "py_binary")
load("//:vars.bzl", "LLVM_VERSION_MAJOR", "LLVM_VERSION_MINOR", "LLVM_VERSION_PATCH", "LLVM_VERSION_SUFFIX", "PACKAGE_VERSION")
load("//lldb/source/Plugins:plugin_config.bzl", "DEFAULT_PLUGINS", "DEFAULT_SCRIPT_PLUGINS", "OBJCPP_COPTS")
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 caf609f..96cd788 100644
--- a/utils/bazel/llvm-project-overlay/lldb/source/Plugins/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/lldb/source/Plugins/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:expand_template.bzl", "expand_template")
+load("@rules_cc//cc:defs.bzl", "cc_library")
load("//mlir:tblgen.bzl", "gentbl_cc_library")
load(":plugin_config.bzl", "DEFAULT_PLUGINS", "DEFAULT_SCRIPT_PLUGINS", "OBJCPP_COPTS")
@@ -334,6 +335,7 @@ cc_library(
"//lldb:SymbolHeaders",
"//lldb:TargetHeaders",
"//lldb:Utility",
+ "//lldb:UtilityPrivateHeaders",
"//llvm:BinaryFormat",
"//llvm:DebugInfoDWARF",
"//llvm:Demangle",
diff --git a/utils/bazel/llvm-project-overlay/llvm/BUILD.bazel b/utils/bazel/llvm-project-overlay/llvm/BUILD.bazel
index c2f6c62..5930b85 100644
--- a/utils/bazel/llvm-project-overlay/llvm/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/llvm/BUILD.bazel
@@ -4,6 +4,7 @@
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("@rules_python//python:defs.bzl", "py_binary")
load("//mlir:tblgen.bzl", "gentbl_cc_library", "gentbl_filegroup", "td_library")
load(":binary_alias.bzl", "binary_alias")
@@ -1280,6 +1281,7 @@ cc_library(
":AnalysisFpExc",
":BinaryFormat",
":Core",
+ ":FrontendHLSL",
":Object",
":ProfileData",
":Support",
diff --git a/utils/bazel/llvm-project-overlay/llvm/driver.bzl b/utils/bazel/llvm-project-overlay/llvm/driver.bzl
index 66e8af7..39093db 100644
--- a/utils/bazel/llvm-project-overlay/llvm/driver.bzl
+++ b/utils/bazel/llvm-project-overlay/llvm/driver.bzl
@@ -6,6 +6,7 @@
load("@bazel_skylib//rules:common_settings.bzl", "BuildSettingInfo")
load("@bazel_skylib//rules:expand_template.bzl", "expand_template")
+load("@rules_cc//cc:defs.bzl", "cc_binary")
# Mapping from every tool to the cc_library that implements the tool's entrypoint.
_TOOLS = {
@@ -175,7 +176,7 @@ def llvm_driver_cc_binary(
template = "//llvm:cmake/modules/llvm-driver-template.cpp.in",
)
deps = deps or []
- native.cc_binary(
+ cc_binary(
name = name,
srcs = [name + "-driver.cpp"],
deps = deps + ["//llvm:Support"],
diff --git a/utils/bazel/llvm-project-overlay/llvm/unittests/BUILD.bazel b/utils/bazel/llvm-project-overlay/llvm/unittests/BUILD.bazel
index 142b398..c5fe783 100644
--- a/utils/bazel/llvm-project-overlay/llvm/unittests/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/llvm/unittests/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("@rules_cc//cc:defs.bzl", "cc_library", "cc_test")
load("//mlir:tblgen.bzl", "gentbl_cc_library")
package(
@@ -132,6 +133,7 @@ cc_test(
"//llvm:AsmParser",
"//llvm:CodeGen",
"//llvm:Core",
+ "//llvm:FrontendHLSL",
"//llvm:Instrumentation",
"//llvm:Passes",
"//llvm:Support",
diff --git a/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel b/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
index 178c3ce..f00c310 100644
--- a/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
@@ -7,6 +7,7 @@
load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")
load("@bazel_skylib//rules:expand_template.bzl", "expand_template")
+load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
load(
":build_defs.bzl",
"cc_headers_only",
@@ -1003,6 +1004,9 @@ mlir_c_api_cc_library(
":BuiltinToLLVMIRTranslation",
":IR",
":LLVMToLLVMIRTranslation",
+ ":RegisterAllDialects",
+ ":RegisterAllExtensions",
+ ":RegisterAllPasses",
],
)
@@ -4594,57 +4598,6 @@ cc_library(
cc_library(
name = "AllExtensions",
hdrs = ["include/mlir/InitAllExtensions.h"],
- deps = [
- ":AMXTransforms",
- ":AffineTransformOps",
- ":ArithToEmitC",
- ":ArithToLLVM",
- ":ArmNeonTransformOps",
- ":ArmSVEVectorTransformOps",
- ":BufferizationTransformOps",
- ":BuiltinToLLVMIRTranslation",
- ":ComplexToLLVM",
- ":ControlFlowToLLVM",
- ":DLTITransformOps",
- ":FuncExtensions",
- ":FuncToEmitC",
- ":FuncToLLVM",
- ":FuncTransformOps",
- ":GPUToGPURuntimeTransforms",
- ":GPUToLLVMIRTranslation",
- ":GPUToNVVMTransforms",
- ":GPUTransformOps",
- ":IndexToLLVM",
- ":LLVMToLLVMIRTranslation",
- ":LinalgTransformOps",
- ":MPIToLLVM",
- ":MathToLLVM",
- ":MemRefToEmitC",
- ":MemRefToLLVM",
- ":MemRefTransformOps",
- ":NVGPUTransformOps",
- ":NVVMTarget",
- ":NVVMToLLVM",
- ":OpenMPToLLVM",
- ":ROCDLTarget",
- ":ROCDLToLLVMIRTranslation",
- ":SCFToEmitC",
- ":SCFTransformOps",
- ":ShardDialect",
- ":SparseTensorTransformOps",
- ":TensorExtensions",
- ":TensorTransformOps",
- ":TransformDebugExtension",
- ":TransformIRDLExtension",
- ":TransformLoopExtension",
- ":TransformPDLExtension",
- ":TransformTuneExtension",
- ":UBToLLVM",
- ":VCIXToLLVMIRTranslation",
- ":VectorToLLVM",
- ":VectorTransformOps",
- ":XeVMToLLVM",
- ],
)
# TODO(zinenko): remove this after updating users.
@@ -8716,6 +8669,23 @@ cc_library(
)
cc_library(
+ name = "XeVMToLLVMIRTranslation",
+ srcs = glob(["lib/Target/LLVMIR/Dialect/XeVM/*.cpp"]),
+ hdrs = glob(["include/mlir/Target/LLVMIR/Dialect/XeVM/*.h"]),
+ includes = ["include"],
+ deps = [
+ ":DialectUtils",
+ ":IR",
+ ":LLVMDialect",
+ ":Support",
+ ":ToLLVMIRTranslation",
+ ":XeVMDialect",
+ "//llvm:Core",
+ "//llvm:Support",
+ ],
+)
+
+cc_library(
name = "AllToLLVMIRTranslations",
hdrs = ["include/mlir/Target/LLVMIR/Dialect/All.h"],
includes = ["include"],
@@ -8734,6 +8704,7 @@ cc_library(
":ROCDLToLLVMIRTranslation",
":SPIRVToLLVMIRTranslation",
":VCIXToLLVMIRTranslation",
+ ":XeVMToLLVMIRTranslation",
],
)
@@ -8934,130 +8905,69 @@ cc_library(
"include/mlir/InitAllDialects.h",
"include/mlir/InitAllPasses.h",
],
+)
+
+cc_library(
+ name = "RegisterAllDialects",
+ srcs = ["lib/RegisterAllDialects.cpp"],
deps = [
":AMDGPUDialect",
- ":AMDGPUToROCDL",
- ":AMDGPUTransforms",
":AMXDialect",
- ":AMXTransforms",
":AffineDialect",
- ":AffinePassIncGen",
- ":AffineToStandard",
- ":AffineTransformOps",
- ":AffineTransforms",
+ ":AllPassesAndDialects",
":ArithDialect",
- ":ArithToAMDGPU",
- ":ArithToLLVM",
- ":ArithToSPIRV",
":ArithTransforms",
":ArithValueBoundsOpInterfaceImpl",
":ArmNeonDialect",
":ArmSMEDialect",
":ArmSMETransforms",
":ArmSVEDialect",
- ":ArmSVETransforms",
":AsyncDialect",
- ":AsyncPassIncGen",
- ":AsyncToLLVM",
- ":AsyncTransforms",
":BufferizationDialect",
- ":BufferizationPipelines",
- ":BufferizationTransformOps",
":BufferizationTransforms",
":CastInterfaces",
":ComplexDialect",
- ":ComplexToLLVM",
- ":ComplexToLibm",
- ":ComplexToSPIRV",
":ControlFlowDialect",
":ControlFlowTransforms",
- ":ConversionPasses",
- ":ConvertToEmitC",
- ":ConvertToLLVM",
":DLTIDialect",
":EmitCDialect",
- ":EmitCTransforms",
":FuncDialect",
- ":FuncToLLVM",
- ":FuncToSPIRV",
- ":FuncTransformOps",
- ":FuncTransforms",
- ":FuncTransformsPassIncGen",
":GPUDialect",
- ":GPUPassIncGen",
- ":GPUPipelines",
- ":GPUToGPURuntimeTransforms",
- ":GPUToNVVMTransforms",
- ":GPUToROCDLTransforms",
- ":GPUToSPIRV",
- ":GPUTransformOps",
":GPUTransforms",
":IR",
":IRDLDialect",
":IndexDialect",
":LLVMDialect",
":LLVMIRTransforms",
- ":LLVMPassIncGen",
":LinalgDialect",
- ":LinalgPassIncGen",
- ":LinalgToStandard",
- ":LinalgTransformOps",
":LinalgTransforms",
":MLProgramDialect",
":MLProgramTransforms",
":MPIDialect",
":MathDialect",
- ":MathToFuncs",
- ":MathToLLVM",
- ":MathToLibm",
- ":MathToSPIRV",
- ":MathTransforms",
":MemRefDialect",
- ":MemRefToLLVM",
- ":MemRefToSPIRV",
- ":MemRefTransformOps",
":MemRefTransforms",
":NVGPUDialect",
- ":NVGPUPassIncGen",
- ":NVGPUToNVVM",
- ":NVGPUTransformOps",
- ":NVGPUTransforms",
":NVVMDialect",
":NVVMTarget",
":OpenACCDialect",
- ":OpenACCTransforms",
":OpenMPDialect",
- ":OpenMPToLLVM",
":PDLDialect",
":PDLInterpDialect",
- ":PDLToPDLInterp",
":PtrDialect",
":QuantOps",
- ":QuantTransforms",
":ROCDLDialect",
":ROCDLTarget",
- ":ReconcileUnrealizedCasts",
":SCFDialect",
- ":SCFPassIncGen",
- ":SCFToControlFlow",
- ":SCFToGPU",
":SCFTransformOps",
":SCFTransforms",
":SMTDialect",
":SPIRVDialect",
- ":SPIRVPassIncGen",
":SPIRVTarget",
- ":SPIRVToLLVM",
- ":SPIRVTransforms",
":ShapeDialect",
- ":ShapeToStandard",
":ShapeTransforms",
- ":ShapeTransformsPassIncGen",
":ShardDialect",
- ":ShardTransforms",
":SparseTensorDialect",
- ":SparseTensorPipelines",
- ":SparseTensorTransformOps",
":SparseTensorTransforms",
":TensorDialect",
":TensorInferTypeOpInterfaceImpl",
@@ -9065,29 +8975,112 @@ cc_library(
":TensorTransformOps",
":TensorTransforms",
":TosaDialect",
- ":TosaToLinalg",
- ":TransformDebugExtension",
":TransformDialect",
":TransformDialectTransforms",
- ":TransformLoopExtension",
":TransformPDLExtension",
- ":Transforms",
- ":TransformsPassIncGen",
":UBDialect",
":VectorDialect",
- ":VectorToLLVM",
- ":VectorToSCF",
- ":VectorToSPIRV",
- ":VectorTransformOps",
":VectorTransforms",
":X86VectorDialect",
- ":X86VectorTransforms",
":XeGPUDialect",
- ":XeGPUTransforms",
":XeVMDialect",
],
)
+cc_library(
+ name = "RegisterAllPasses",
+ srcs = ["lib/RegisterAllPasses.cpp"],
+ deps = [
+ ":AMDGPUTransforms",
+ ":AffineTransforms",
+ ":AllPassesAndDialects",
+ ":ArithTransforms",
+ ":ArmSMETransforms",
+ ":ArmSVETransforms",
+ ":AsyncTransforms",
+ ":BufferizationPipelines",
+ ":BufferizationTransforms",
+ ":ConversionPasses",
+ ":EmitCTransforms",
+ ":FuncTransforms",
+ ":GPUPipelines",
+ ":GPUTransforms",
+ ":LLVMIRTransforms",
+ ":LinalgTransforms",
+ ":MLProgramTransforms",
+ ":MathTransforms",
+ ":MemRefTransforms",
+ ":NVGPUTransforms",
+ ":OpenACCTransforms",
+ ":QuantTransforms",
+ ":SCFTransforms",
+ ":SPIRVTransforms",
+ ":ShapeTransforms",
+ ":ShardTransforms",
+ ":SparseTensorPipelines",
+ ":SparseTensorTransforms",
+ ":TensorTransforms",
+ ":TosaDialect",
+ ":TransformDialectTransforms",
+ ":Transforms",
+ ":VectorTransforms",
+ ":XeGPUTransforms",
+ ],
+)
+
+cc_library(
+ name = "RegisterAllExtensions",
+ srcs = ["lib/RegisterAllExtensions.cpp"],
+ deps = [
+ ":AMXTransforms",
+ ":AffineTransformOps",
+ ":AllExtensions",
+ ":ArithToEmitC",
+ ":ArithToLLVM",
+ ":ArmNeonTransformOps",
+ ":ArmSVEVectorTransformOps",
+ ":BufferizationTransformOps",
+ ":BuiltinToLLVMIRTranslation",
+ ":ComplexToLLVM",
+ ":ControlFlowToLLVM",
+ ":DLTITransformOps",
+ ":FuncExtensions",
+ ":FuncToEmitC",
+ ":FuncToLLVM",
+ ":FuncTransformOps",
+ ":GPUToGPURuntimeTransforms",
+ ":GPUToLLVMIRTranslation",
+ ":GPUToNVVMTransforms",
+ ":GPUTransformOps",
+ ":IndexToLLVM",
+ ":LLVMToLLVMIRTranslation",
+ ":LinalgTransformOps",
+ ":MPIToLLVM",
+ ":MathToLLVM",
+ ":MemRefToEmitC",
+ ":MemRefToLLVM",
+ ":MemRefTransformOps",
+ ":NVGPUTransformOps",
+ ":NVVMToLLVM",
+ ":OpenMPToLLVM",
+ ":ROCDLToLLVMIRTranslation",
+ ":SCFToEmitC",
+ ":SCFTransformOps",
+ ":SparseTensorTransformOps",
+ ":TensorExtensions",
+ ":TensorTransformOps",
+ ":TransformDebugExtension",
+ ":TransformIRDLExtension",
+ ":TransformLoopExtension",
+ ":TransformPDLExtension",
+ ":TransformTuneExtension",
+ ":UBToLLVM",
+ ":VectorToLLVM",
+ ":VectorTransformOps",
+ ":XeVMToLLVM",
+ ],
+)
+
cc_binary(
name = "mlir-lsp-server",
srcs = ["tools/mlir-lsp-server/mlir-lsp-server.cpp"],
@@ -9099,6 +9092,8 @@ cc_binary(
":IR",
":MlirLspServerLib",
":MlirLspServerSupportLib",
+ ":RegisterAllDialects",
+ ":RegisterAllExtensions",
"//mlir/test:TestAffine",
"//mlir/test:TestAnalysis",
"//mlir/test:TestArith",
@@ -9153,6 +9148,9 @@ cc_binary(
":OpenMPDialect",
":Pass",
":QuantOps",
+ ":RegisterAllDialects",
+ ":RegisterAllExtensions",
+ ":RegisterAllPasses",
":SCFToGPU",
":Support",
":Transforms",
@@ -9216,6 +9214,7 @@ cc_binary(
":ParseUtilities",
":Parser",
":Pass",
+ ":RegisterAllDialects",
":Support",
":TransformUtils",
":Transforms",
@@ -13228,6 +13227,8 @@ cc_binary(
":AllPassesAndDialects",
":IR",
":MlirReduceLib",
+ ":RegisterAllDialects",
+ ":RegisterAllPasses",
"//mlir/test:TestDialect",
],
)
@@ -13286,6 +13287,7 @@ cc_binary(
":IR",
":MlirQueryLib",
":MlirQueryUtils",
+ ":RegisterAllDialects",
"//mlir/test:TestDialect",
],
)
diff --git a/utils/bazel/llvm-project-overlay/mlir/build_defs.bzl b/utils/bazel/llvm-project-overlay/mlir/build_defs.bzl
index 53767fd0..b3fb4fc 100644
--- a/utils/bazel/llvm-project-overlay/mlir/build_defs.bzl
+++ b/utils/bazel/llvm-project-overlay/mlir/build_defs.bzl
@@ -4,6 +4,8 @@
"""Rules and macros for MLIR"""
+load("@rules_cc//cc:defs.bzl", "cc_library")
+
def if_cuda_available(if_true, if_false = []):
return select({
# CUDA auto-detection is not yet supported.
@@ -49,20 +51,20 @@ def mlir_c_api_cc_library(
"""
capi_header_deps = ["%sHeaders" % d for d in capi_deps]
capi_object_deps = ["%sObjects" % d for d in capi_deps]
- native.cc_library(
+ cc_library(
name = name,
srcs = srcs,
hdrs = hdrs,
deps = deps + capi_deps + header_deps,
**kwargs
)
- native.cc_library(
+ cc_library(
name = name + "Headers",
hdrs = hdrs,
deps = header_deps + capi_header_deps,
**kwargs
)
- native.cc_library(
+ cc_library(
name = name + "Objects",
srcs = srcs,
hdrs = hdrs,
diff --git a/utils/bazel/llvm-project-overlay/mlir/examples/toy/Ch1/BUILD.bazel b/utils/bazel/llvm-project-overlay/mlir/examples/toy/Ch1/BUILD.bazel
index 2d4e1b5d..e097847 100644
--- a/utils/bazel/llvm-project-overlay/mlir/examples/toy/Ch1/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/mlir/examples/toy/Ch1/BUILD.bazel
@@ -1,5 +1,8 @@
# Description:
# MLIR Tutorial
+
+load("@rules_cc//cc:defs.bzl", "cc_binary")
+
licenses(["notice"])
package(default_visibility = ["//visibility:public"])
diff --git a/utils/bazel/llvm-project-overlay/mlir/examples/toy/Ch2/BUILD.bazel b/utils/bazel/llvm-project-overlay/mlir/examples/toy/Ch2/BUILD.bazel
index 0fdda77..98be262 100644
--- a/utils/bazel/llvm-project-overlay/mlir/examples/toy/Ch2/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/mlir/examples/toy/Ch2/BUILD.bazel
@@ -1,6 +1,7 @@
# Description:
# MLIR Tutorial
+load("@rules_cc//cc:defs.bzl", "cc_binary")
load("//mlir:tblgen.bzl", "gentbl_cc_library", "td_library")
licenses(["notice"])
diff --git a/utils/bazel/llvm-project-overlay/mlir/examples/toy/Ch3/BUILD.bazel b/utils/bazel/llvm-project-overlay/mlir/examples/toy/Ch3/BUILD.bazel
index 62e1d68..853db9d 100644
--- a/utils/bazel/llvm-project-overlay/mlir/examples/toy/Ch3/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/mlir/examples/toy/Ch3/BUILD.bazel
@@ -1,6 +1,7 @@
# Description:
# MLIR Tutorial
+load("@rules_cc//cc:defs.bzl", "cc_binary")
load("//mlir:tblgen.bzl", "gentbl_cc_library", "td_library")
licenses(["notice"])
diff --git a/utils/bazel/llvm-project-overlay/mlir/examples/toy/Ch4/BUILD.bazel b/utils/bazel/llvm-project-overlay/mlir/examples/toy/Ch4/BUILD.bazel
index 3ac6ddc..0d71c4f4 100644
--- a/utils/bazel/llvm-project-overlay/mlir/examples/toy/Ch4/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/mlir/examples/toy/Ch4/BUILD.bazel
@@ -1,6 +1,7 @@
# Description:
# MLIR Tutorial
+load("@rules_cc//cc:defs.bzl", "cc_binary")
load("//mlir:tblgen.bzl", "gentbl_cc_library", "td_library")
licenses(["notice"])
diff --git a/utils/bazel/llvm-project-overlay/mlir/examples/toy/Ch5/BUILD.bazel b/utils/bazel/llvm-project-overlay/mlir/examples/toy/Ch5/BUILD.bazel
index 34b7487..2624375 100644
--- a/utils/bazel/llvm-project-overlay/mlir/examples/toy/Ch5/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/mlir/examples/toy/Ch5/BUILD.bazel
@@ -1,6 +1,7 @@
# Description:
# MLIR Tutorial
+load("@rules_cc//cc:defs.bzl", "cc_binary")
load("//mlir:tblgen.bzl", "gentbl_cc_library", "td_library")
licenses(["notice"])
diff --git a/utils/bazel/llvm-project-overlay/mlir/examples/toy/Ch6/BUILD.bazel b/utils/bazel/llvm-project-overlay/mlir/examples/toy/Ch6/BUILD.bazel
index ea1ef88..6427c2a 100644
--- a/utils/bazel/llvm-project-overlay/mlir/examples/toy/Ch6/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/mlir/examples/toy/Ch6/BUILD.bazel
@@ -1,6 +1,7 @@
# Description:
# MLIR Tutorial
+load("@rules_cc//cc:defs.bzl", "cc_binary")
load("//mlir:tblgen.bzl", "gentbl_cc_library", "td_library")
licenses(["notice"])
diff --git a/utils/bazel/llvm-project-overlay/mlir/examples/toy/Ch7/BUILD.bazel b/utils/bazel/llvm-project-overlay/mlir/examples/toy/Ch7/BUILD.bazel
index 6e67715..07ebbb1 100644
--- a/utils/bazel/llvm-project-overlay/mlir/examples/toy/Ch7/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/mlir/examples/toy/Ch7/BUILD.bazel
@@ -1,6 +1,7 @@
# Description:
# MLIR Tutorial
+load("@rules_cc//cc:defs.bzl", "cc_binary")
load("//mlir:tblgen.bzl", "gentbl_cc_library", "td_library")
licenses(["notice"])
diff --git a/utils/bazel/llvm-project-overlay/mlir/examples/transform-opt/BUILD.bazel b/utils/bazel/llvm-project-overlay/mlir/examples/transform-opt/BUILD.bazel
new file mode 100644
index 0000000..22670bd
--- /dev/null
+++ b/utils/bazel/llvm-project-overlay/mlir/examples/transform-opt/BUILD.bazel
@@ -0,0 +1,22 @@
+# MLIR transform dialect standalone example.
+
+package(default_visibility = ["//visibility:public"])
+
+cc_binary(
+ name = "mlir-transform-opt",
+ srcs = ["mlir-transform-opt.cpp"],
+ deps = [
+ "//llvm:Support",
+ "//mlir:AllExtensions",
+ "//mlir:AllPassesAndDialects",
+ "//mlir:IR",
+ "//mlir:MlirOptLib",
+ "//mlir:Parser",
+ "//mlir:RegisterAllDialects",
+ "//mlir:RegisterAllExtensions",
+ "//mlir:RegisterAllPasses",
+ "//mlir:Support",
+ "//mlir:TransformDialect",
+ "//mlir:TransformDialectTransforms",
+ ],
+)
diff --git a/utils/bazel/llvm-project-overlay/mlir/examples/transform/Ch2/BUILD.bazel b/utils/bazel/llvm-project-overlay/mlir/examples/transform/Ch2/BUILD.bazel
new file mode 100644
index 0000000..a6f120c
--- /dev/null
+++ b/utils/bazel/llvm-project-overlay/mlir/examples/transform/Ch2/BUILD.bazel
@@ -0,0 +1,74 @@
+# Description:
+# MLIR Tutorial
+
+load("//mlir:tblgen.bzl", "gentbl_cc_library", "td_library")
+
+licenses(["notice"])
+
+package(default_visibility = ["//visibility:public"])
+
+td_library(
+ name = "TransformTdFiles",
+ srcs = [
+ "include/MyExtension.td",
+ ],
+ includes = ["include"],
+ deps = [
+ "//mlir:OpBaseTdFiles",
+ "//mlir:SideEffectInterfacesTdFiles",
+ "//mlir:TransformDialectTdFiles",
+ ],
+)
+
+gentbl_cc_library(
+ name = "TransformIncGen",
+ tbl_outs = [
+ (
+ ["-gen-op-decls"],
+ "include/MyExtension.h.inc",
+ ),
+ (
+ ["-gen-op-defs"],
+ "include/MyExtension.cpp.inc",
+ ),
+ ],
+ tblgen = "//mlir:mlir-tblgen",
+ td_file = "include/MyExtension.td",
+ deps = [":TransformTdFiles"],
+)
+
+cc_library(
+ name = "MyExtension",
+ srcs = glob(["lib/*.cpp"]),
+ hdrs = glob(["include/*.h"]),
+ includes = ["include"],
+ deps = [
+ ":TransformIncGen",
+ "//llvm:Support",
+ "//mlir:FuncDialect",
+ "//mlir:IR",
+ "//mlir:SCFDialect",
+ "//mlir:SideEffectInterfaces",
+ "//mlir:Support",
+ "//mlir:TransformDialect",
+ "//mlir:TransformDialectInterfaces",
+ ],
+)
+
+cc_binary(
+ name = "transform-opt-ch2",
+ srcs = glob(["transform-opt/*.cpp"]),
+ local_defines = ["MLIR_INCLUDE_TESTS"],
+ deps = [
+ ":MyExtension",
+ "//mlir:AllExtensions",
+ "//mlir:AllPassesAndDialects",
+ "//mlir:IR",
+ "//mlir:MlirOptLib",
+ "//mlir:RegisterAllDialects",
+ "//mlir:RegisterAllExtensions",
+ "//mlir:TransformDialectTransforms",
+ "//mlir:Transforms",
+ "//mlir/test:TestTransformDialect",
+ ],
+)
diff --git a/utils/bazel/llvm-project-overlay/mlir/examples/transform/Ch3/BUILD.bazel b/utils/bazel/llvm-project-overlay/mlir/examples/transform/Ch3/BUILD.bazel
new file mode 100644
index 0000000..cba4339
--- /dev/null
+++ b/utils/bazel/llvm-project-overlay/mlir/examples/transform/Ch3/BUILD.bazel
@@ -0,0 +1,93 @@
+# Description:
+# MLIR Tutorial
+
+load("//mlir:tblgen.bzl", "gentbl_cc_library", "td_library")
+
+licenses(["notice"])
+
+package(default_visibility = ["//visibility:public"])
+
+td_library(
+ name = "TransformTdFiles",
+ srcs = [
+ "include/MyExtension.td",
+ "include/MyExtensionTypes.td",
+ ],
+ includes = ["include"],
+ deps = [
+ "//mlir:OpBaseTdFiles",
+ "//mlir:SideEffectInterfacesTdFiles",
+ "//mlir:TransformDialectTdFiles",
+ ],
+)
+
+gentbl_cc_library(
+ name = "TransformIncGen",
+ tbl_outs = [
+ (
+ ["-gen-op-decls"],
+ "include/MyExtension.h.inc",
+ ),
+ (
+ ["-gen-op-defs"],
+ "include/MyExtension.cpp.inc",
+ ),
+ ],
+ tblgen = "//mlir:mlir-tblgen",
+ td_file = "include/MyExtension.td",
+ deps = [":TransformTdFiles"],
+)
+
+gentbl_cc_library(
+ name = "TransformTypesIncGen",
+ tbl_outs = [
+ (
+ ["-gen-typedef-decls"],
+ "include/MyExtensionTypes.h.inc",
+ ),
+ (
+ ["-gen-typedef-defs"],
+ "include/MyExtensionTypes.cpp.inc",
+ ),
+ ],
+ tblgen = "//mlir:mlir-tblgen",
+ td_file = "include/MyExtensionTypes.td",
+ deps = [":TransformTdFiles"],
+)
+
+cc_library(
+ name = "MyExtension",
+ srcs = glob(["lib/*.cpp"]),
+ hdrs = glob(["include/*.h"]),
+ includes = ["include"],
+ deps = [
+ ":TransformIncGen",
+ ":TransformTypesIncGen",
+ "//llvm:Support",
+ "//mlir:CallOpInterfaces",
+ "//mlir:FuncDialect",
+ "//mlir:IR",
+ "//mlir:SCFDialect",
+ "//mlir:Support",
+ "//mlir:TransformDialect",
+ "//mlir:TransformDialectInterfaces",
+ ],
+)
+
+cc_binary(
+ name = "transform-opt-ch3",
+ srcs = glob(["transform-opt/*.cpp"]),
+ local_defines = ["MLIR_INCLUDE_TESTS"],
+ deps = [
+ ":MyExtension",
+ "//mlir:AllExtensions",
+ "//mlir:AllPassesAndDialects",
+ "//mlir:IR",
+ "//mlir:MlirOptLib",
+ "//mlir:RegisterAllDialects",
+ "//mlir:RegisterAllExtensions",
+ "//mlir:TransformDialectTransforms",
+ "//mlir:Transforms",
+ "//mlir/test:TestTransformDialect",
+ ],
+)
diff --git a/utils/bazel/llvm-project-overlay/mlir/examples/transform/Ch4/BUILD.bazel b/utils/bazel/llvm-project-overlay/mlir/examples/transform/Ch4/BUILD.bazel
new file mode 100644
index 0000000..81c0161
--- /dev/null
+++ b/utils/bazel/llvm-project-overlay/mlir/examples/transform/Ch4/BUILD.bazel
@@ -0,0 +1,73 @@
+# Description:
+# MLIR Tutorial
+
+load("//mlir:tblgen.bzl", "gentbl_cc_library", "td_library")
+
+licenses(["notice"])
+
+package(default_visibility = ["//visibility:public"])
+
+td_library(
+ name = "TransformTdFiles",
+ srcs = [
+ "include/MyExtension.td",
+ ],
+ includes = ["include"],
+ deps = [
+ "//mlir:OpBaseTdFiles",
+ "//mlir:SideEffectInterfacesTdFiles",
+ "//mlir:TransformDialectTdFiles",
+ ],
+)
+
+gentbl_cc_library(
+ name = "TransformIncGen",
+ tbl_outs = [
+ (
+ ["-gen-op-decls"],
+ "include/MyExtension.h.inc",
+ ),
+ (
+ ["-gen-op-defs"],
+ "include/MyExtension.cpp.inc",
+ ),
+ ],
+ tblgen = "//mlir:mlir-tblgen",
+ td_file = "include/MyExtension.td",
+ deps = [":TransformTdFiles"],
+)
+
+cc_library(
+ name = "MyExtension",
+ srcs = glob(["lib/*.cpp"]),
+ hdrs = glob(["include/*.h"]),
+ includes = ["include"],
+ deps = [
+ ":TransformIncGen",
+ "//llvm:Support",
+ "//mlir:FuncDialect",
+ "//mlir:IR",
+ "//mlir:SCFDialect",
+ "//mlir:Support",
+ "//mlir:TransformDialect",
+ "//mlir:TransformDialectInterfaces",
+ ],
+)
+
+cc_binary(
+ name = "transform-opt-ch4",
+ srcs = glob(["transform-opt/*.cpp"]),
+ local_defines = ["MLIR_INCLUDE_TESTS"],
+ deps = [
+ ":MyExtension",
+ "//mlir:AllExtensions",
+ "//mlir:AllPassesAndDialects",
+ "//mlir:IR",
+ "//mlir:MlirOptLib",
+ "//mlir:RegisterAllDialects",
+ "//mlir:RegisterAllExtensions",
+ "//mlir:TransformDialectTransforms",
+ "//mlir:Transforms",
+ "//mlir/test:TestTransformDialect",
+ ],
+)
diff --git a/utils/bazel/llvm-project-overlay/mlir/linalggen.bzl b/utils/bazel/llvm-project-overlay/mlir/linalggen.bzl
index d893471..7e21ac4 100644
--- a/utils/bazel/llvm-project-overlay/mlir/linalggen.bzl
+++ b/utils/bazel/llvm-project-overlay/mlir/linalggen.bzl
@@ -4,6 +4,8 @@
"""BUILD extensions for MLIR linalg generation."""
+load("@rules_cc//cc:defs.bzl", "cc_library")
+
def genlinalg(name, linalggen, src, linalg_outs):
"""genlinalg() generates code from a tc spec file.
@@ -35,7 +37,7 @@ def genlinalg(name, linalggen, src, linalg_outs):
)
hdrs = [f for (opts, f) in linalg_outs]
- native.cc_library(
+ cc_library(
name = name,
hdrs = hdrs,
textual_hdrs = hdrs,
diff --git a/utils/bazel/llvm-project-overlay/mlir/tblgen.bzl b/utils/bazel/llvm-project-overlay/mlir/tblgen.bzl
index 89b1773..2213d220 100644
--- a/utils/bazel/llvm-project-overlay/mlir/tblgen.bzl
+++ b/utils/bazel/llvm-project-overlay/mlir/tblgen.bzl
@@ -4,6 +4,7 @@
"""BUILD extensions for MLIR table generation."""
load("@bazel_skylib//lib:paths.bzl", "paths")
+load("@rules_cc//cc:defs.bzl", "cc_library")
TdInfo = provider(
"Holds TableGen files and the dependencies and include paths necessary to" +
@@ -424,7 +425,7 @@ def gentbl_cc_library(
skip_opts = ["-gen-op-doc"],
**kwargs
)
- native.cc_library(
+ cc_library(
name = name,
# strip_include_prefix does not apply to textual_hdrs.
# https://github.com/bazelbuild/bazel/issues/12424
diff --git a/utils/bazel/llvm-project-overlay/mlir/test/BUILD.bazel b/utils/bazel/llvm-project-overlay/mlir/test/BUILD.bazel
index e7770fc..72398ce 100644
--- a/utils/bazel/llvm-project-overlay/mlir/test/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/mlir/test/BUILD.bazel
@@ -3,6 +3,7 @@
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
load("@bazel_skylib//rules:expand_template.bzl", "expand_template")
+load("@rules_cc//cc:defs.bzl", "cc_library")
load("//llvm:lit_test.bzl", "package_path")
load("//mlir:tblgen.bzl", "gentbl_cc_library", "gentbl_sharded_ops", "td_library")
@@ -37,6 +38,7 @@ expand_template(
# All disabled, but required to substituted because they are not in quotes.
"@LLVM_BUILD_EXAMPLES@": "0",
"@LLVM_HAS_NVPTX_TARGET@": "0",
+ "@LLVM_INCLUDE_SPIRV_TOOLS_TESTS@": "0",
"@MLIR_ENABLE_CUDA_RUNNER@": "0",
"@MLIR_ENABLE_ROCM_CONVERSIONS@": "0",
"@MLIR_ENABLE_ROCM_RUNNER@": "0",
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 1dd418c..5ebdc33 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
@@ -32,6 +32,7 @@ package(default_visibility = ["//visibility:public"])
"//mlir:include/mlir/IR/BuiltinDialectBytecode.td",
"//mlir:include/mlir/IR/BytecodeBase.td",
"//mlir:include/mlir/IR/OpBase.td",
+ "//mlir:include/mlir/Interfaces/CallInterfaces.td",
"//mlir:include/mlir/Interfaces/InferTypeOpInterface.td",
"//mlir:include/mlir/Interfaces/SideEffectInterfaces.td",
"//mlir:include/mlir/Pass/PassBase.td",
diff --git a/utils/bazel/llvm-project-overlay/mlir/unittests/BUILD.bazel b/utils/bazel/llvm-project-overlay/mlir/unittests/BUILD.bazel
index 02dc408..2cf7df7 100644
--- a/utils/bazel/llvm-project-overlay/mlir/unittests/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/mlir/unittests/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("@rules_cc//cc:defs.bzl", "cc_test")
load("//mlir:tblgen.bzl", "gentbl_cc_library")
package(
@@ -419,6 +420,7 @@ cc_test(
"//mlir:Parser",
"//mlir:Pass",
"//mlir:ReconcileUnrealizedCasts",
+ "//mlir:RegisterAllDialects",
"//mlir:ToLLVMIRTranslation",
"//mlir:VectorToLLVM",
"//mlir:VectorToSCF",
diff --git a/utils/bazel/llvm-project-overlay/third-party/siphash/BUILD.bazel b/utils/bazel/llvm-project-overlay/third-party/siphash/BUILD.bazel
index d5b9631..fcea618 100644
--- a/utils/bazel/llvm-project-overlay/third-party/siphash/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/third-party/siphash/BUILD.bazel
@@ -2,12 +2,14 @@
# 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"])
cc_library(
- name = "siphash",
- hdrs = ["include/siphash/SipHash.h"],
- strip_include_prefix = "include",
-) \ No newline at end of file
+ name = "siphash",
+ hdrs = ["include/siphash/SipHash.h"],
+ strip_include_prefix = "include",
+)
diff --git a/utils/bazel/llvm-project-overlay/third-party/unittest/BUILD.bazel b/utils/bazel/llvm-project-overlay/third-party/unittest/BUILD.bazel
index 0b5c084..ff179a7 100644
--- a/utils/bazel/llvm-project-overlay/third-party/unittest/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/third-party/unittest/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("@rules_cc//cc:defs.bzl", "cc_library")
+
package(default_visibility = ["//visibility:public"])
licenses(["notice"])
diff --git a/utils/bazel/llvm_configs/llvm-config.h.cmake b/utils/bazel/llvm_configs/llvm-config.h.cmake
index a683229..39136bc 100644
--- a/utils/bazel/llvm_configs/llvm-config.h.cmake
+++ b/utils/bazel/llvm_configs/llvm-config.h.cmake
@@ -101,6 +101,9 @@
/* Define if LLVM is using tflite */
#cmakedefine LLVM_HAVE_TFLITE
+/* Define if we want to check profile consistency in lit tests */
+#cmakedefine LLVM_ENABLE_PROFCHECK
+
/* Define to 1 if you have the <sysexits.h> header file. */
#cmakedefine HAVE_SYSEXITS_H ${HAVE_SYSEXITS_H}