Merge pull request #3390 from GMNGeoffrey:main-to-google
PiperOrigin-RevId: 335937713
diff --git a/.bazelignore b/.bazelignore
index 743cde4..99f076b 100644
--- a/.bazelignore
+++ b/.bazelignore
@@ -20,7 +20,6 @@
# Ignore third_party directories which contain BUILD files so that recursive
# from root works.
third_party
-build_tools/bazel/third_party_import/llvm-project/overlay
# TODO: enable this when Java bindings are wired up.
bindings/java
diff --git a/.github/workflows/publish_docs.yml b/.github/workflows/publish_docs.yml
index 575151a..05b097d 100644
--- a/.github/workflows/publish_docs.yml
+++ b/.github/workflows/publish_docs.yml
@@ -15,6 +15,7 @@
name: Publish Documentation
on:
+ workflow_dispatch:
schedule:
# Every working day at 12pm UTC
- cron: '0 12 * * 1-5'
diff --git a/.github/workflows/update_tf.yml b/.github/workflows/update_llvm_dependent_submodules.yml
similarity index 72%
rename from .github/workflows/update_tf.yml
rename to .github/workflows/update_llvm_dependent_submodules.yml
index 75f6bbd..981a3a9 100644
--- a/.github/workflows/update_tf.yml
+++ b/.github/workflows/update_llvm_dependent_submodules.yml
@@ -12,15 +12,15 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-# Creates a PR to update the TF submodule to HEAD & copy the latest
-# version of the LLVM Bazel BUILD files from TF.
+# Creates a PR to update all LLVM-dependent submodules to the current LLVM
+# commit in the repo.
-name: Update TensorFlow
+name: Synchronize LLVM Dependents
on:
schedule:
# Every 6 hours at 0, 6, 12, 18 UTC (4, 10, 16, 22 PST)
- - cron: '0 */6 * * *'
+ - cron: "0 */6 * * *"
jobs:
update_tf:
@@ -38,24 +38,26 @@
run: ./scripts/git/update_to_llvm_syncpoint.py
- name: Calculating SHAs
run: |
- echo "::set-env name=TF_SHA::$(git submodule status third_party/tensorflow | awk '{print $1}' | cut -c -12)"
echo "::set-env name=LLVM_SHA::$(git submodule status third_party/llvm-project | awk '{print $1}' | cut -c -12)"
+ echo "::set-env name=TF_SHA::$(git submodule status third_party/tensorflow | awk '{print $1}' | cut -c -12)"
+ echo "::set-env name=LLVM_BAZEL_SHA::$(git submodule status third_party/llvm-bazel | awk '{print $1}' | cut -c -12)"
- name: Creating Pull Request
uses: peter-evans/create-pull-request@v2
with:
# Personal token is required to trigger additional automation (e.g. presubmits).
token: ${{ secrets.GITHUB_WRITE_ACCESS_TOKEN }}
- commit-message: "Integrate TF at tensorflow/tensorflow@${{ env.TF_SHA }}"
- title: "Integrate TF at tensorflow/tensorflow@${{ env.TF_SHA }}"
+ commit-message: "Synchronize submodules with LLVM at llvm/llvm-project@${{ env.LLVM_SHA }}"
+ title: "Synchronize submodules with LLVM at llvm/llvm-project@${{ env.LLVM_SHA }}"
body: |
- Updates TF to
+ Updates LLVM dependencies to match
+ [${{ env.LLVM_SHA }}](https://github.com/llvm/llvm-project/commit/${{ env.LLVM_SHA }}).
+ - llvm-bazel to
+ [${{ env.LLVM_BAZEL_SHA }}](https://github.com/google/llvm-bazel/commit/${{ env.LLVM_BAZEL_SHA }})
+ - TensorFlow to
[${{ env.TF_SHA }}](https://github.com/tensorflow/tensorflow/commit/${{ env.TF_SHA }})
- matching
- [${{ env.LLVM_SHA }}](https://github.com/llvm/llvm-project/commit/${{ env.LLVM_SHA }})
- and copies over the LLVM BUILD files.
`./scripts/git/update_to_llvm_syncpoint.py`
- Automated submodule bump from .github/workflows/update_tf.yml
+ Automated submodule bump from .github/workflows/update_llvm_dependent_submodules.yml
committer: "Submodule Update Action <iree-github-actions-bot@google.com>"
branch: "auto_submodule_update"
diff --git a/.gitmodules b/.gitmodules
index 85b7b8f..a51b4c9 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -59,3 +59,6 @@
[submodule "third_party/cpuinfo"]
path = third_party/cpuinfo
url = https://github.com/pytorch/cpuinfo.git
+[submodule "third_party/llvm-bazel"]
+ path = third_party/llvm-bazel
+ url = https://github.com/google/llvm-bazel.git
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0911bbe..eb5a04b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -290,6 +290,10 @@
# dependency is added prior to including this configuration.
#-------------------------------------------------------------------------------
+# Disable LLVM's warnings.
+set(LLVM_ENABLE_ASSERTIONS OFF CACHE STRING "don't use global flags /facepalm")
+set(LLVM_ENABLE_WARNINGS OFF CACHE STRING "don't use global flags /facepalm")
+
# Adds bundled projects that must be included after the LLVM directory has
# been added and within the scope of its settings (i.e. build type override,
# etc).
@@ -300,13 +304,6 @@
endfunction()
function(add_iree_mlir_src_dep llvm_monorepo_path)
- # If CMAKE_BUILD_TYPE is FastBuild, set to Debug for llvm
- set(_CMAKE_BUILD_TYPE "${CMAKE_BUILD_TYPE}")
- string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE)
- if(NOT uppercase_CMAKE_BUILD_TYPE MATCHES "^(DEBUG|RELEASE|RELWITHDEBINFO|MINSIZEREL)$")
- set(CMAKE_BUILD_TYPE "Debug")
- endif()
-
# experimental model builder uses vulkan runner.
if(${IREE_BUILD_EXPERIMENTAL})
set(MLIR_VULKAN_RUNNER_ENABLED ON)
@@ -345,8 +342,8 @@
include(HandleLLVMOptions)
# Add include/link directories
- include_directories(${LLVM_INCLUDE_DIRS})
- include_directories(${MLIR_INCLUDE_DIRS})
+ include_directories(SYSTEM ${LLVM_INCLUDE_DIRS})
+ include_directories(SYSTEM ${MLIR_INCLUDE_DIRS})
link_directories(${LLVM_BUILD_LIBRARY_DIR})
add_definitions(${LLVM_DEFINITIONS})
else()
diff --git a/SUBMODULE_VERSIONS b/SUBMODULE_VERSIONS
index 9731ca7..7f3d05c 100644
--- a/SUBMODULE_VERSIONS
+++ b/SUBMODULE_VERSIONS
@@ -5,6 +5,7 @@
a5d9d0f7d368054fd1691aedf1db4116efcc233e third_party/flatbuffers
4fb0ff7069bd88ee85902f4d0bb62794e5f6d021 third_party/flatcc
f2fb48c3b3d79a75a88a99fba6576b25d42ec528 third_party/googletest
+f0d426064ff1ed45438424d5c53f753c6d4c809b third_party/llvm-bazel
5e4409f30817798377689ef6c229f1c82815e6e8 third_party/llvm-project
17b12a4481daa150e2d1ea3ada086b551b856707 third_party/marl
d2cdb70e038370b5e28f353fe98ccd70af1cbc25 third_party/mlir-emitc
diff --git a/WORKSPACE b/WORKSPACE
index c907ffb..a6db513 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -107,13 +107,34 @@
###############################################################################
# llvm-project
-load("@iree_core//build_tools/bazel/third_party_import/llvm-project:configure.bzl", "llvm_configure")
+
+maybe(
+ local_repository,
+ name = "llvm_bazel",
+ path = "third_party/llvm-bazel/llvm-bazel",
+)
+
+load("@llvm_bazel//:zlib.bzl", "llvm_zlib_disable")
+
+maybe(
+ llvm_zlib_disable,
+ name = "llvm_zlib",
+)
+
+load("@llvm_bazel//:terminfo.bzl", "llvm_terminfo_disable")
+
+maybe(
+ llvm_terminfo_disable,
+ name = "llvm_terminfo",
+)
+
+load("@llvm_bazel//:configure.bzl", "llvm_configure")
maybe(
llvm_configure,
name = "llvm-project",
- path = "third_party/llvm-project",
- workspace = "@iree_core//:WORKSPACE",
+ src_path = "third_party/llvm-project",
+ src_workspace = "@iree_core//:WORKSPACE",
)
###############################################################################
diff --git a/build_tools/bazel/third_party_import/llvm-project/BUILD.bazel b/build_tools/bazel/third_party_import/llvm-project/BUILD.bazel
deleted file mode 100644
index 9a78dc1..0000000
--- a/build_tools/bazel/third_party_import/llvm-project/BUILD.bazel
+++ /dev/null
@@ -1,15 +0,0 @@
-# Copyright 2019 Google LLC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# Intentionally empty.
diff --git a/build_tools/bazel/third_party_import/llvm-project/configure.bzl b/build_tools/bazel/third_party_import/llvm-project/configure.bzl
deleted file mode 100644
index 6779ebd..0000000
--- a/build_tools/bazel/third_party_import/llvm-project/configure.bzl
+++ /dev/null
@@ -1,99 +0,0 @@
-# Copyright 2019 Google LLC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Configures an LLVM overlay project."""
-
-_OVERLAY_PARENT_PATHS = [
- "llvm",
- "mlir",
- "mlir/test",
-]
-
-def _is_absolute(path):
- """Returns `True` if `path` is an absolute path.
- Args:
- path: A path (which is a string).
- Returns:
- `True` if `path` is an absolute path.
- """
- return path.startswith("/") or (len(path) > 2 and path[1] == ":")
-
-def _join_path(a, b):
- return str(a) + "/" + str(b)
-
-def _symlink_src_dir(repository_ctx, from_path, to_path):
- children = repository_ctx.path(from_path).readdir()
- for from_child_path in children:
- if to_path:
- to_child_path = _join_path(to_path, from_child_path.basename)
- else: # Root
- to_child_path = from_child_path.basename
-
- # Skip paths that are already in the overlay list.
- # They will have this function called on them to populate.
- if to_child_path in _OVERLAY_PARENT_PATHS:
- continue
- repository_ctx.symlink(from_child_path, to_child_path)
-
-def _llvm_configure_impl(repository_ctx):
- # Compute path that sources are symlinked from.
- src_workspace_path = repository_ctx.path(
- repository_ctx.attr.workspace,
- ).dirname
- src_path = repository_ctx.attr.path
- if not _is_absolute(src_path):
- src_path = _join_path(src_workspace_path, src_path)
-
- # Compute path (relative to here) where overlay files
- # are symlinked from.
- this_workspace_path = repository_ctx.path(
- repository_ctx.attr.workspace,
- ).dirname
- overlay_path = _join_path(
- this_workspace_path,
- "build_tools/bazel/third_party_import/llvm-project/overlay",
- )
-
- # Each parent path of an overlay file must have its children manually
- # symlinked. This is because the directory itself must be in the cahche
- # (so that we can modify it without modifying the underlying source
- # path). An alternative to this would be to perform a deep symlink of
- # the entire tree (which would be wasteful).
- for overlay_parent_path in _OVERLAY_PARENT_PATHS:
- src_child_path = _join_path(src_path, overlay_parent_path)
- overlay_child_path = _join_path(overlay_path, overlay_parent_path)
-
- # Symlink from external src path
- _symlink_src_dir(repository_ctx, src_child_path, overlay_parent_path)
-
- # Symlink from the overlay path.
- _symlink_src_dir(repository_ctx, overlay_child_path, overlay_parent_path)
-
- # Then symlink any top-level entries not previously handled.
- # Doing it here means that if we got it wrong, it will fail with a
- # "File Exists" error vs doing the wrong thing.
- _symlink_src_dir(repository_ctx, src_path, "")
-
- # Build files and overlays.
- repository_ctx.file("BUILD") # Root build is empty.
-
-llvm_configure = repository_rule(
- implementation = _llvm_configure_impl,
- local = True,
- attrs = {
- "_this_workspace": attr.label(default = Label("//:WORKSPACE")),
- "workspace": attr.label(default = Label("//:WORKSPACE")),
- "path": attr.string(mandatory = True),
- },
-)
diff --git a/build_tools/bazel/third_party_import/llvm-project/overlay/llvm/BUILD.bazel b/build_tools/bazel/third_party_import/llvm-project/overlay/llvm/BUILD.bazel
deleted file mode 100644
index e0d64fe..0000000
--- a/build_tools/bazel/third_party_import/llvm-project/overlay/llvm/BUILD.bazel
+++ /dev/null
@@ -1,4771 +0,0 @@
-# Bazel BUILD file for LLVM.
-#
-# This BUILD file is auto-generated; do not edit!
-
-licenses(["notice"])
-
-exports_files(["LICENSE.TXT"])
-
-load(
- "@org_tensorflow//third_party/llvm:llvm.bzl",
- "cmake_var_string",
- "expand_cmake_vars",
- "gentbl",
- "llvm_all_cmake_vars",
- "llvm_copts",
- "llvm_defines",
- "llvm_linkopts",
- "llvm_support_platform_specific_srcs_glob",
-)
-load(
- "@org_tensorflow//third_party:common.bzl",
- "template_rule",
-)
-
-package(default_visibility = ["//visibility:public"])
-
-llvm_host_triple = "x86_64-unknown-linux_gnu"
-
-llvm_targets = [
- "AArch64",
- "AMDGPU",
- "ARM",
- "NVPTX",
- "PowerPC",
- "SystemZ",
- "X86",
-]
-
-llvm_target_asm_parsers = llvm_targets
-
-llvm_target_asm_printers = llvm_targets
-
-llvm_target_disassemblers = llvm_targets
-
-# Performs CMake variable substitutions on configuration header files.
-expand_cmake_vars(
- name = "config_gen",
- src = "include/llvm/Config/config.h.cmake",
- cmake_vars = llvm_all_cmake_vars,
- dst = "include/llvm/Config/config.h",
-)
-
-expand_cmake_vars(
- name = "llvm_config_gen",
- src = "include/llvm/Config/llvm-config.h.cmake",
- cmake_vars = llvm_all_cmake_vars,
- dst = "include/llvm/Config/llvm-config.h",
-)
-
-expand_cmake_vars(
- name = "abi_breaking_gen",
- src = "include/llvm/Config/abi-breaking.h.cmake",
- cmake_vars = llvm_all_cmake_vars,
- dst = "include/llvm/Config/abi-breaking.h",
-)
-
-# Performs macro expansions on .def.in files
-template_rule(
- name = "targets_def_gen",
- src = "include/llvm/Config/Targets.def.in",
- out = "include/llvm/Config/Targets.def",
- substitutions = {
- "@LLVM_ENUM_TARGETS@": "\n".join(
- ["LLVM_TARGET({})".format(t) for t in llvm_targets],
- ),
- },
-)
-
-template_rule(
- name = "asm_parsers_def_gen",
- src = "include/llvm/Config/AsmParsers.def.in",
- out = "include/llvm/Config/AsmParsers.def",
- substitutions = {
- "@LLVM_ENUM_ASM_PARSERS@": "\n".join(
- ["LLVM_ASM_PARSER({})".format(t) for t in llvm_target_asm_parsers],
- ),
- },
-)
-
-template_rule(
- name = "asm_printers_def_gen",
- src = "include/llvm/Config/AsmPrinters.def.in",
- out = "include/llvm/Config/AsmPrinters.def",
- substitutions = {
- "@LLVM_ENUM_ASM_PRINTERS@": "\n".join(
- ["LLVM_ASM_PRINTER({})".format(t) for t in llvm_target_asm_printers],
- ),
- },
-)
-
-template_rule(
- name = "disassemblers_def_gen",
- src = "include/llvm/Config/Disassemblers.def.in",
- out = "include/llvm/Config/Disassemblers.def",
- substitutions = {
- "@LLVM_ENUM_DISASSEMBLERS@": "\n".join(
- ["LLVM_DISASSEMBLER({})".format(t) for t in llvm_target_disassemblers],
- ),
- },
-)
-
-# A common library that all LLVM targets depend on.
-# TODO(b/113996071): We need to glob all potentially #included files and stage
-# them here because LLVM's build files are not strict headers clean, and remote
-# build execution requires all inputs to be depended upon.
-cc_library(
- name = "config",
- hdrs = glob([
- "**/*.h",
- "**/*.def",
- "**/*.inc.cpp",
- ]) + [
- "include/llvm/Config/AsmParsers.def",
- "include/llvm/Config/AsmPrinters.def",
- "include/llvm/Config/Disassemblers.def",
- "include/llvm/Config/Targets.def",
- "include/llvm/Config/config.h",
- "include/llvm/Config/llvm-config.h",
- "include/llvm/Config/abi-breaking.h",
- ],
- defines = llvm_defines,
- includes = ["include"],
-)
-
-# A creator of an empty file include/llvm/Support/VCSRevision.h.
-# This is usually populated by the upstream build infrastructure, but in this
-# case we leave it blank. See upstream revision r300160.
-genrule(
- name = "vcs_revision_gen",
- srcs = [],
- outs = ["include/llvm/Support/VCSRevision.h"],
- cmd = "echo '' > \"$@\"",
-)
-
-# Rules that apply the LLVM tblgen tool.
-gentbl(
- name = "attributes_gen",
- tbl_outs = [("-gen-attrs", "include/llvm/IR/Attributes.inc")],
- tblgen = ":llvm-tblgen",
- td_file = "include/llvm/IR/Attributes.td",
- td_srcs = ["include/llvm/IR/Attributes.td"],
-)
-
-gentbl(
- name = "InstCombineTableGen",
- tbl_outs = [(
- "-gen-searchable-tables",
- "lib/Target/AMDGPU/InstCombineTables.inc",
- )],
- tblgen = ":llvm-tblgen",
- td_file = "lib/Target/AMDGPU/InstCombineTables.td",
- td_srcs = glob([
- "include/llvm/CodeGen/*.td",
- "include/llvm/IR/Intrinsics*.td",
- ]) + ["include/llvm/TableGen/SearchableTable.td"],
-)
-
-gentbl(
- name = "intrinsic_enums_gen",
- tbl_outs = [("-gen-intrinsic-enums", "include/llvm/IR/IntrinsicEnums.inc")],
- tblgen = ":llvm-tblgen",
- td_file = "include/llvm/IR/Intrinsics.td",
- td_srcs = glob([
- "include/llvm/CodeGen/*.td",
- "include/llvm/IR/Intrinsics*.td",
- ]),
-)
-
-gentbl(
- name = "aarch64_enums_gen",
- tbl_outs = [(
- "-gen-intrinsic-enums -intrinsic-prefix=aarch64",
- "include/llvm/IR/IntrinsicsAArch64.h",
- )],
- tblgen = ":llvm-tblgen",
- td_file = "include/llvm/IR/Intrinsics.td",
- td_srcs = glob([
- "include/llvm/CodeGen/*.td",
- "include/llvm/IR/Intrinsics*.td",
- ]),
-)
-
-gentbl(
- name = "amdgcn_enums_gen",
- tbl_outs = [(
- "-gen-intrinsic-enums -intrinsic-prefix=amdgcn",
- "include/llvm/IR/IntrinsicsAMDGPU.h",
- )],
- tblgen = ":llvm-tblgen",
- td_file = "include/llvm/IR/Intrinsics.td",
- td_srcs = glob([
- "include/llvm/CodeGen/*.td",
- "include/llvm/IR/Intrinsics*.td",
- ]),
-)
-
-gentbl(
- name = "arm_enums_gen",
- tbl_outs = [(
- "-gen-intrinsic-enums -intrinsic-prefix=arm",
- "include/llvm/IR/IntrinsicsARM.h",
- )],
- tblgen = ":llvm-tblgen",
- td_file = "include/llvm/IR/Intrinsics.td",
- td_srcs = glob([
- "include/llvm/CodeGen/*.td",
- "include/llvm/IR/Intrinsics*.td",
- ]),
-)
-
-gentbl(
- name = "bpf_enums_gen",
- tbl_outs = [(
- "-gen-intrinsic-enums -intrinsic-prefix=bpf",
- "include/llvm/IR/IntrinsicsBPF.h",
- )],
- tblgen = ":llvm-tblgen",
- td_file = "include/llvm/IR/Intrinsics.td",
- td_srcs = glob([
- "include/llvm/CodeGen/*.td",
- "include/llvm/IR/Intrinsics*.td",
- ]),
-)
-
-gentbl(
- name = "hexagon_enums_gen",
- tbl_outs = [(
- "-gen-intrinsic-enums -intrinsic-prefix=hexagon",
- "include/llvm/IR/IntrinsicsHexagon.h",
- )],
- tblgen = ":llvm-tblgen",
- td_file = "include/llvm/IR/Intrinsics.td",
- td_srcs = glob([
- "include/llvm/CodeGen/*.td",
- "include/llvm/IR/Intrinsics*.td",
- ]),
-)
-
-gentbl(
- name = "mips_enums_gen",
- tbl_outs = [(
- "-gen-intrinsic-enums -intrinsic-prefix=mips",
- "include/llvm/IR/IntrinsicsMips.h",
- )],
- tblgen = ":llvm-tblgen",
- td_file = "include/llvm/IR/Intrinsics.td",
- td_srcs = glob([
- "include/llvm/CodeGen/*.td",
- "include/llvm/IR/Intrinsics*.td",
- ]),
-)
-
-gentbl(
- name = "nvvm_enums_gen",
- tbl_outs = [(
- "-gen-intrinsic-enums -intrinsic-prefix=nvvm",
- "include/llvm/IR/IntrinsicsNVPTX.h",
- )],
- tblgen = ":llvm-tblgen",
- td_file = "include/llvm/IR/Intrinsics.td",
- td_srcs = glob([
- "include/llvm/CodeGen/*.td",
- "include/llvm/IR/Intrinsics*.td",
- ]),
-)
-
-gentbl(
- name = "ppc_enums_gen",
- tbl_outs = [(
- "-gen-intrinsic-enums -intrinsic-prefix=ppc",
- "include/llvm/IR/IntrinsicsPowerPC.h",
- )],
- tblgen = ":llvm-tblgen",
- td_file = "include/llvm/IR/Intrinsics.td",
- td_srcs = glob([
- "include/llvm/CodeGen/*.td",
- "include/llvm/IR/Intrinsics*.td",
- ]),
-)
-
-gentbl(
- name = "r600_enums_gen",
- tbl_outs = [(
- "-gen-intrinsic-enums -intrinsic-prefix=r600",
- "include/llvm/IR/IntrinsicsR600.h",
- )],
- tblgen = ":llvm-tblgen",
- td_file = "include/llvm/IR/Intrinsics.td",
- td_srcs = glob([
- "include/llvm/CodeGen/*.td",
- "include/llvm/IR/Intrinsics*.td",
- ]),
-)
-
-gentbl(
- name = "riscv_enums_gen",
- tbl_outs = [(
- "-gen-intrinsic-enums -intrinsic-prefix=riscv",
- "include/llvm/IR/IntrinsicsRISCV.h",
- )],
- tblgen = ":llvm-tblgen",
- td_file = "include/llvm/IR/Intrinsics.td",
- td_srcs = glob([
- "include/llvm/CodeGen/*.td",
- "include/llvm/IR/Intrinsics*.td",
- ]),
-)
-
-gentbl(
- name = "s390_enums_gen",
- tbl_outs = [(
- "-gen-intrinsic-enums -intrinsic-prefix=s390",
- "include/llvm/IR/IntrinsicsS390.h",
- )],
- tblgen = ":llvm-tblgen",
- td_file = "include/llvm/IR/Intrinsics.td",
- td_srcs = glob([
- "include/llvm/CodeGen/*.td",
- "include/llvm/IR/Intrinsics*.td",
- ]),
-)
-
-gentbl(
- name = "wasm_enums_gen",
- tbl_outs = [(
- "-gen-intrinsic-enums -intrinsic-prefix=wasm",
- "include/llvm/IR/IntrinsicsWebAssembly.h",
- )],
- tblgen = ":llvm-tblgen",
- td_file = "include/llvm/IR/Intrinsics.td",
- td_srcs = glob([
- "include/llvm/CodeGen/*.td",
- "include/llvm/IR/Intrinsics*.td",
- ]),
-)
-
-gentbl(
- name = "x86_enums_gen",
- tbl_outs = [(
- "-gen-intrinsic-enums -intrinsic-prefix=x86",
- "include/llvm/IR/IntrinsicsX86.h",
- )],
- tblgen = ":llvm-tblgen",
- td_file = "include/llvm/IR/Intrinsics.td",
- td_srcs = glob([
- "include/llvm/CodeGen/*.td",
- "include/llvm/IR/Intrinsics*.td",
- ]),
-)
-
-gentbl(
- name = "xcore_enums_gen",
- tbl_outs = [(
- "-gen-intrinsic-enums -intrinsic-prefix=xcore",
- "include/llvm/IR/IntrinsicsXCore.h",
- )],
- tblgen = ":llvm-tblgen",
- td_file = "include/llvm/IR/Intrinsics.td",
- td_srcs = glob([
- "include/llvm/CodeGen/*.td",
- "include/llvm/IR/Intrinsics*.td",
- ]),
-)
-
-gentbl(
- name = "intrinsics_impl_gen",
- tbl_outs = [("-gen-intrinsic-impl", "include/llvm/IR/IntrinsicImpl.inc")],
- tblgen = ":llvm-tblgen",
- td_file = "include/llvm/IR/Intrinsics.td",
- td_srcs = glob([
- "include/llvm/CodeGen/*.td",
- "include/llvm/IR/Intrinsics*.td",
- ]),
-)
-
-cc_library(
- name = "tblgen",
- srcs = glob([
- "utils/TableGen/*.cpp",
- "utils/TableGen/*.h",
- "utils/TableGen/GlobalISel/*.cpp",
- ]),
- hdrs = glob([
- "utils/TableGen/GlobalISel/*.h",
- ]),
- deps = [
- ":MC",
- ":Support",
- ":TableGen",
- ":config",
- ],
-)
-
-# Binary targets used by Tensorflow.
-cc_binary(
- name = "llvm-tblgen",
- srcs = glob([
- "utils/TableGen/*.cpp",
- "utils/TableGen/*.h",
- ]),
- copts = llvm_copts,
- linkopts = llvm_linkopts,
- stamp = 0,
- deps = [
- ":Support",
- ":TableGen",
- ":config",
- ":tblgen",
- ],
-)
-
-cc_library(
- name = "FileCheckLib",
- srcs = glob([
- "lib/FileCheck/*.cpp",
- "lib/FileCheck/*.h",
- ]),
- hdrs = glob([
- "include/llvm/FileCheck/*.h",
- ]),
- includes = ["include"],
- deps = [":Support"],
-)
-
-cc_binary(
- name = "FileCheck",
- testonly = 1,
- srcs = glob([
- "utils/FileCheck/*.cpp",
- "utils/FileCheck/*.h",
- ]),
- copts = llvm_copts,
- linkopts = llvm_linkopts,
- stamp = 0,
- deps = [
- ":FileCheckLib",
- ":Support",
- ],
-)
-
-llvm_target_list = [
- {
- "name": "AArch64",
- "lower_name": "aarch64",
- "short_name": "AArch64",
- "dir_name": "AArch64",
- "tbl_outs": [
- ("-gen-register-bank", "lib/Target/AArch64/AArch64GenRegisterBank.inc"),
- ("-gen-register-info", "lib/Target/AArch64/AArch64GenRegisterInfo.inc"),
- ("-gen-instr-info", "lib/Target/AArch64/AArch64GenInstrInfo.inc"),
- ("-gen-emitter", "lib/Target/AArch64/AArch64GenMCCodeEmitter.inc"),
- ("-gen-pseudo-lowering", "lib/Target/AArch64/AArch64GenMCPseudoLowering.inc"),
- ("-gen-asm-writer", "lib/Target/AArch64/AArch64GenAsmWriter.inc"),
- ("-gen-asm-writer -asmwriternum=1", "lib/Target/AArch64/AArch64GenAsmWriter1.inc"),
- ("-gen-asm-matcher", "lib/Target/AArch64/AArch64GenAsmMatcher.inc"),
- ("-gen-dag-isel", "lib/Target/AArch64/AArch64GenDAGISel.inc"),
- ("-gen-fast-isel", "lib/Target/AArch64/AArch64GenFastISel.inc"),
- ("-gen-global-isel", "lib/Target/AArch64/AArch64GenGlobalISel.inc"),
- ("-gen-global-isel-combiner -combiners=AArch64PreLegalizerCombinerHelper", "lib/Target/AArch64/AArch64GenPreLegalizeGICombiner.inc"),
- ("-gen-global-isel-combiner -combiners=AArch64PostLegalizerCombinerHelper", "lib/Target/AArch64/AArch64GenPostLegalizeGICombiner.inc"),
- ("-gen-callingconv", "lib/Target/AArch64/AArch64GenCallingConv.inc"),
- ("-gen-subtarget", "lib/Target/AArch64/AArch64GenSubtargetInfo.inc"),
- ("-gen-disassembler", "lib/Target/AArch64/AArch64GenDisassemblerTables.inc"),
- ("-gen-searchable-tables", "lib/Target/AArch64/AArch64GenSystemOperands.inc"),
- ],
- },
- {
- "name": "AMDGPU",
- "lower_name": "amdgpu",
- "short_name": "AMDGPU",
- "dir_name": "AMDGPU",
- "tbl_outs": [
- ("-gen-register-bank", "lib/Target/AMDGPU/AMDGPUGenRegisterBank.inc"),
- ("-gen-register-info", "lib/Target/AMDGPU/AMDGPUGenRegisterInfo.inc"),
- ("-gen-instr-info", "lib/Target/AMDGPU/AMDGPUGenInstrInfo.inc"),
- ("-gen-emitter", "lib/Target/AMDGPU/AMDGPUGenMCCodeEmitter.inc"),
- ("-gen-pseudo-lowering", "lib/Target/AMDGPU/AMDGPUGenMCPseudoLowering.inc"),
- ("-gen-asm-writer", "lib/Target/AMDGPU/AMDGPUGenAsmWriter.inc"),
- ("-gen-asm-matcher", "lib/Target/AMDGPU/AMDGPUGenAsmMatcher.inc"),
- ("-gen-dag-isel", "lib/Target/AMDGPU/AMDGPUGenDAGISel.inc"),
- ("-gen-callingconv", "lib/Target/AMDGPU/AMDGPUGenCallingConv.inc"),
- ("-gen-subtarget", "lib/Target/AMDGPU/AMDGPUGenSubtargetInfo.inc"),
- ("-gen-disassembler", "lib/Target/AMDGPU/AMDGPUGenDisassemblerTables.inc"),
- ("-gen-searchable-tables", "lib/Target/AMDGPU/AMDGPUGenSearchableTables.inc"),
- ],
- "tbl_deps": [
- ":amdgpu_isel_target_gen",
- ],
- },
- {
- "name": "ARM",
- "lower_name": "arm",
- "short_name": "ARM",
- "dir_name": "ARM",
- "tbl_outs": [
- ("-gen-register-bank", "lib/Target/ARM/ARMGenRegisterBank.inc"),
- ("-gen-register-info", "lib/Target/ARM/ARMGenRegisterInfo.inc"),
- ("-gen-searchable-tables", "lib/Target/ARM/ARMGenSystemRegister.inc"),
- ("-gen-instr-info", "lib/Target/ARM/ARMGenInstrInfo.inc"),
- ("-gen-emitter", "lib/Target/ARM/ARMGenMCCodeEmitter.inc"),
- ("-gen-pseudo-lowering", "lib/Target/ARM/ARMGenMCPseudoLowering.inc"),
- ("-gen-asm-writer", "lib/Target/ARM/ARMGenAsmWriter.inc"),
- ("-gen-asm-matcher", "lib/Target/ARM/ARMGenAsmMatcher.inc"),
- ("-gen-dag-isel", "lib/Target/ARM/ARMGenDAGISel.inc"),
- ("-gen-fast-isel", "lib/Target/ARM/ARMGenFastISel.inc"),
- ("-gen-global-isel", "lib/Target/ARM/ARMGenGlobalISel.inc"),
- ("-gen-callingconv", "lib/Target/ARM/ARMGenCallingConv.inc"),
- ("-gen-subtarget", "lib/Target/ARM/ARMGenSubtargetInfo.inc"),
- ("-gen-disassembler", "lib/Target/ARM/ARMGenDisassemblerTables.inc"),
- ],
- },
- {
- "name": "NVPTX",
- "lower_name": "nvptx",
- "short_name": "NVPTX",
- "dir_name": "NVPTX",
- "tbl_outs": [
- ("-gen-register-info", "lib/Target/NVPTX/NVPTXGenRegisterInfo.inc"),
- ("-gen-instr-info", "lib/Target/NVPTX/NVPTXGenInstrInfo.inc"),
- ("-gen-asm-writer", "lib/Target/NVPTX/NVPTXGenAsmWriter.inc"),
- ("-gen-dag-isel", "lib/Target/NVPTX/NVPTXGenDAGISel.inc"),
- ("-gen-subtarget", "lib/Target/NVPTX/NVPTXGenSubtargetInfo.inc"),
- ],
- },
- {
- "name": "PowerPC",
- "lower_name": "powerpc",
- "short_name": "PPC",
- "dir_name": "PowerPC",
- "tbl_outs": [
- ("-gen-asm-writer", "lib/Target/PowerPC/PPCGenAsmWriter.inc"),
- ("-gen-asm-matcher", "lib/Target/PowerPC/PPCGenAsmMatcher.inc"),
- ("-gen-emitter", "lib/Target/PowerPC/PPCGenMCCodeEmitter.inc"),
- ("-gen-register-info", "lib/Target/PowerPC/PPCGenRegisterInfo.inc"),
- ("-gen-instr-info", "lib/Target/PowerPC/PPCGenInstrInfo.inc"),
- ("-gen-dag-isel", "lib/Target/PowerPC/PPCGenDAGISel.inc"),
- ("-gen-fast-isel", "lib/Target/PowerPC/PPCGenFastISel.inc"),
- ("-gen-callingconv", "lib/Target/PowerPC/PPCGenCallingConv.inc"),
- ("-gen-subtarget", "lib/Target/PowerPC/PPCGenSubtargetInfo.inc"),
- ("-gen-disassembler", "lib/Target/PowerPC/PPCGenDisassemblerTables.inc"),
- ("-gen-register-bank", "lib/Target/PowerPC/PPCGenRegisterBank.inc"),
- ("-gen-global-isel", "lib/Target/PowerPC/PPCGenGlobalISel.inc"),
- ],
- },
- {
- "name": "SystemZ",
- "lower_name": "system_z",
- "short_name": "SystemZ",
- "dir_name": "SystemZ",
- "tbl_outs": [
- ("-gen-asm-writer", "lib/Target/SystemZ/SystemZGenAsmWriter.inc"),
- ("-gen-asm-matcher", "lib/Target/SystemZ/SystemZGenAsmMatcher.inc"),
- ("-gen-emitter", "lib/Target/SystemZ/SystemZGenMCCodeEmitter.inc"),
- ("-gen-register-info", "lib/Target/SystemZ/SystemZGenRegisterInfo.inc"),
- ("-gen-instr-info", "lib/Target/SystemZ/SystemZGenInstrInfo.inc"),
- ("-gen-dag-isel", "lib/Target/SystemZ/SystemZGenDAGISel.inc"),
- ("-gen-callingconv", "lib/Target/SystemZ/SystemZGenCallingConv.inc"),
- ("-gen-subtarget", "lib/Target/SystemZ/SystemZGenSubtargetInfo.inc"),
- ("-gen-disassembler", "lib/Target/SystemZ/SystemZGenDisassemblerTables.inc"),
- ],
- },
- {
- "name": "X86",
- "lower_name": "x86",
- "short_name": "X86",
- "dir_name": "X86",
- "tbl_outs": [
- ("-gen-register-bank", "lib/Target/X86/X86GenRegisterBank.inc"),
- ("-gen-register-info", "lib/Target/X86/X86GenRegisterInfo.inc"),
- ("-gen-disassembler", "lib/Target/X86/X86GenDisassemblerTables.inc"),
- ("-gen-instr-info", "lib/Target/X86/X86GenInstrInfo.inc"),
- ("-gen-asm-writer", "lib/Target/X86/X86GenAsmWriter.inc"),
- ("-gen-asm-writer -asmwriternum=1", "lib/Target/X86/X86GenAsmWriter1.inc"),
- ("-gen-asm-matcher", "lib/Target/X86/X86GenAsmMatcher.inc"),
- ("-gen-dag-isel", "lib/Target/X86/X86GenDAGISel.inc"),
- ("-gen-fast-isel", "lib/Target/X86/X86GenFastISel.inc"),
- ("-gen-global-isel", "lib/Target/X86/X86GenGlobalISel.inc"),
- ("-gen-callingconv", "lib/Target/X86/X86GenCallingConv.inc"),
- ("-gen-subtarget", "lib/Target/X86/X86GenSubtargetInfo.inc"),
- ("-gen-x86-EVEX2VEX-tables", "lib/Target/X86/X86GenEVEX2VEXTables.inc"),
- ("-gen-exegesis", "lib/Target/X86/X86GenExegesis.inc"),
- ],
- },
-]
-
-filegroup(
- name = "common_target_td_sources",
- srcs = glob([
- "include/llvm/CodeGen/*.td",
- "include/llvm/Frontend/Directive/*.td",
- "include/llvm/IR/Intrinsics*.td",
- "include/llvm/TableGen/*.td",
- "include/llvm/Target/*.td",
- "include/llvm/Target/GlobalISel/*.td",
- ]),
-)
-
-gentbl(
- name = "amdgpu_isel_target_gen",
- tbl_outs = [
- ("-gen-global-isel", "lib/Target/AMDGPU/AMDGPUGenGlobalISel.inc"),
- ("-gen-global-isel-combiner -combiners=AMDGPUPreLegalizerCombinerHelper", "lib/Target/AMDGPU/AMDGPUGenPreLegalizeGICombiner.inc"),
- ("-gen-global-isel-combiner -combiners=AMDGPUPostLegalizerCombinerHelper", "lib/Target/AMDGPU/AMDGPUGenPostLegalizeGICombiner.inc"),
- ("-gen-global-isel-combiner -combiners=AMDGPURegBankCombinerHelper", "lib/Target/AMDGPU/AMDGPUGenRegBankGICombiner.inc"),
- ],
- tblgen = ":llvm-tblgen",
- td_file = "lib/Target/AMDGPU/AMDGPUGISel.td",
- td_srcs = [
- ":common_target_td_sources",
- ] + glob([
- "lib/Target/AMDGPU/*.td",
- ]),
-)
-
-gentbl(
- name = "r600_target_gen",
- tbl_outs = [
- ("-gen-asm-writer", "lib/Target/AMDGPU/R600GenAsmWriter.inc"),
- ("-gen-callingconv", "lib/Target/AMDGPU/R600GenCallingConv.inc"),
- ("-gen-dag-isel", "lib/Target/AMDGPU/R600GenDAGISel.inc"),
- ("-gen-dfa-packetizer", "lib/Target/AMDGPU/R600GenDFAPacketizer.inc"),
- ("-gen-instr-info", "lib/Target/AMDGPU/R600GenInstrInfo.inc"),
- ("-gen-emitter", "lib/Target/AMDGPU/R600GenMCCodeEmitter.inc"),
- ("-gen-register-info", "lib/Target/AMDGPU/R600GenRegisterInfo.inc"),
- ("-gen-subtarget", "lib/Target/AMDGPU/R600GenSubtargetInfo.inc"),
- ],
- tblgen = ":llvm-tblgen",
- td_file = "lib/Target/AMDGPU/R600.td",
- td_srcs = [
- ":common_target_td_sources",
- ] + glob([
- "lib/Target/AMDGPU/*.td",
- ]),
-)
-
-[gentbl(
- name = target["name"] + "CommonTableGen",
- tbl_outs = target["tbl_outs"],
- tblgen = ":llvm-tblgen",
- td_file = "lib/Target/" + target["dir_name"] + "/" + target["short_name"] + ".td",
- td_srcs = [
- ":common_target_td_sources",
- ] + glob([
- "lib/Target/" + target["dir_name"] + "/*.td",
- "lib/Target/" + target["name"] + "/GISel/*.td",
- ]),
- deps = target.get("tbl_deps", []),
-) for target in llvm_target_list]
-
-# This target is used to provide *.def files to x86_code_gen.
-# Files with '.def' extension are not allowed in 'srcs' of 'cc_library' rule.
-cc_library(
- name = "x86_defs",
- hdrs = glob([
- "lib/Target/X86/*.def",
- ]),
- visibility = ["//visibility:private"],
-)
-
-# This filegroup provides the docker build script in LLVM repo
-filegroup(
- name = "docker",
- srcs = glob([
- "utils/docker/build_docker_image.sh",
- ]),
- visibility = ["//visibility:public"],
-)
-
-py_binary(
- name = "lit",
- srcs = ["utils/lit/lit.py"] + glob(["utils/lit/lit/**/*.py"]),
-)
-
-cc_binary(
- name = "count",
- srcs = ["utils/count/count.c"],
-)
-
-cc_binary(
- name = "not",
- srcs = ["utils/not/not.cpp"],
- copts = llvm_copts,
- linkopts = llvm_linkopts,
- deps = [
- ":Support",
- ],
-)
-
-cc_library(
- name = "AllTargetsCodeGens",
- deps = [
- target["name"] + "CodeGen"
- for target in llvm_target_list
- ],
-)
-
-exports_files([
- "include/llvm/Frontend/OpenMP/OMP.td",
-])
-
-filegroup(
- name = "omp_td_files",
- srcs = glob([
- "include/llvm/Frontend/OpenMP/*.td",
- "include/llvm/Frontend/Directive/*.td",
- ]),
-)
-
-gentbl(
- name = "omp_gen",
- tbl_outs = [("--gen-directive-decl", "include/llvm/Frontend/OpenMP/OMP.h.inc")],
- tblgen = ":llvm-tblgen",
- td_file = "include/llvm/Frontend/OpenMP/OMP.td",
- td_srcs = [
- ":omp_td_files",
- ],
-)
-
-gentbl(
- name = "omp_gen_impl",
- tbl_outs = [("--gen-directive-impl", "include/llvm/Frontend/OpenMP/OMP.cpp")],
- tblgen = ":llvm-tblgen",
- td_file = "include/llvm/Frontend/OpenMP/OMP.td",
- td_srcs = [
- ":omp_td_files",
- ],
-)
-
-# TODO(b/159809163): autogenerate this after enabling release-mode ML
-# InlineAdvisor
-cc_library(
- name = "Analysis",
- srcs = glob(
- [
- "lib/Analysis/*.c",
- "lib/Analysis/*.cpp",
- "lib/Analysis/*.inc",
- "include/llvm/Transforms/Utils/Local.h",
- "include/llvm/Transforms/Scalar.h",
- "lib/Analysis/*.h",
- ],
- exclude = [
- "lib/Analysis/DevelopmentModeInlineAdvisor.cpp",
- "lib/Analysis/MLInlineAdvisor.cpp",
- "lib/Analysis/ReleaseModeModelRunner.cpp",
- "lib/Analysis/TFUtils.cpp",
- ],
- ),
- hdrs = glob([
- "include/llvm/Analysis/*.h",
- "include/llvm/Analysis/*.def",
- "include/llvm/Analysis/*.inc",
- ]),
- copts = llvm_copts,
- deps = [
- ":BinaryFormat",
- ":Core",
- ":Object",
- ":ProfileData",
- ":Support",
- ":config",
- ],
-)
-
-########################## Begin generated content ##########################
-cc_library(
- name = "AArch64AsmParser",
- srcs = glob([
- "lib/Target/AArch64/AsmParser/*.c",
- "lib/Target/AArch64/AsmParser/*.cpp",
- "lib/Target/AArch64/AsmParser/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/AArch64/AsmParser/*.h",
- "include/llvm/Target/AArch64/AsmParser/*.def",
- "include/llvm/Target/AArch64/AsmParser/*.inc",
- "lib/Target/AArch64/AsmParser/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/AArch64"],
- deps = [
- ":AArch64Desc",
- ":AArch64Info",
- ":AArch64Utils",
- ":MC",
- ":MCParser",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "AArch64CodeGen",
- srcs = glob([
- "lib/Target/AArch64/*.c",
- "lib/Target/AArch64/*.cpp",
- "lib/Target/AArch64/*.inc",
- "lib/Target/AArch64/GISel/*.cpp",
- ]),
- hdrs = glob([
- "include/llvm/Target/AArch64/*.h",
- "include/llvm/Target/AArch64/*.def",
- "include/llvm/Target/AArch64/*.inc",
- "lib/Target/AArch64/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/AArch64"],
- deps = [
- ":AArch64Desc",
- ":AArch64Info",
- ":AArch64Utils",
- ":Analysis",
- ":AsmPrinter",
- ":CFGuard",
- ":CodeGen",
- ":Core",
- ":GlobalISel",
- ":MC",
- ":Scalar",
- ":SelectionDAG",
- ":Support",
- ":Target",
- ":TransformUtils",
- ":config",
- ],
-)
-
-cc_library(
- name = "AArch64Desc",
- srcs = glob([
- "lib/Target/AArch64/MCTargetDesc/*.c",
- "lib/Target/AArch64/MCTargetDesc/*.cpp",
- "lib/Target/AArch64/MCTargetDesc/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/AArch64/MCTargetDesc/*.h",
- "include/llvm/Target/AArch64/MCTargetDesc/*.def",
- "include/llvm/Target/AArch64/MCTargetDesc/*.inc",
- "lib/Target/AArch64/MCTargetDesc/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/AArch64"],
- deps = [
- ":AArch64CommonTableGen",
- ":AArch64Info",
- ":AArch64Utils",
- ":BinaryFormat",
- ":MC",
- ":Support",
- ":attributes_gen",
- ":config",
- ":intrinsic_enums_gen",
- ":intrinsics_impl_gen",
- ],
-)
-
-cc_library(
- name = "AArch64Disassembler",
- srcs = glob([
- "lib/Target/AArch64/Disassembler/*.c",
- "lib/Target/AArch64/Disassembler/*.cpp",
- "lib/Target/AArch64/Disassembler/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/AArch64/Disassembler/*.h",
- "include/llvm/Target/AArch64/Disassembler/*.def",
- "include/llvm/Target/AArch64/Disassembler/*.inc",
- "lib/Target/AArch64/Disassembler/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/AArch64"],
- deps = [
- ":AArch64Desc",
- ":AArch64Info",
- ":AArch64Utils",
- ":MC",
- ":MCDisassembler",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "AArch64Info",
- srcs = glob([
- "lib/Target/AArch64/TargetInfo/*.c",
- "lib/Target/AArch64/TargetInfo/*.cpp",
- "lib/Target/AArch64/TargetInfo/*.inc",
- "lib/Target/AArch64/MCTargetDesc/*.h",
- ]),
- hdrs = glob([
- "include/llvm/Target/AArch64/TargetInfo/*.h",
- "include/llvm/Target/AArch64/TargetInfo/*.def",
- "include/llvm/Target/AArch64/TargetInfo/*.inc",
- "lib/Target/AArch64/*.def",
- "lib/Target/AArch64/AArch64*.h",
- "lib/Target/AArch64/TargetInfo/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/AArch64"],
- deps = [
- ":CodeGen",
- ":Support",
- ":Target",
- ":config",
- ],
-)
-
-cc_library(
- name = "AArch64Utils",
- srcs = glob([
- "lib/Target/AArch64/Utils/*.c",
- "lib/Target/AArch64/Utils/*.cpp",
- "lib/Target/AArch64/Utils/*.inc",
- "lib/Target/AArch64/MCTargetDesc/*.h",
- ]),
- hdrs = glob([
- "include/llvm/Target/AArch64/Utils/*.h",
- "include/llvm/Target/AArch64/Utils/*.def",
- "include/llvm/Target/AArch64/Utils/*.inc",
- "lib/Target/AArch64/Utils/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/AArch64"],
- deps = [
- ":AArch64CommonTableGen",
- ":MC",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "AMDGPUAsmParser",
- srcs = glob([
- "lib/Target/AMDGPU/AsmParser/*.c",
- "lib/Target/AMDGPU/AsmParser/*.cpp",
- "lib/Target/AMDGPU/AsmParser/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/AMDGPU/AsmParser/*.h",
- "include/llvm/Target/AMDGPU/AsmParser/*.def",
- "include/llvm/Target/AMDGPU/AsmParser/*.inc",
- "lib/Target/AMDGPU/AsmParser/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/AMDGPU"],
- deps = [
- ":AMDGPUDesc",
- ":AMDGPUInfo",
- ":AMDGPUUtils",
- ":MC",
- ":MCParser",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "AMDGPUCodeGen",
- srcs = glob([
- "lib/Target/AMDGPU/*.c",
- "lib/Target/AMDGPU/*.cpp",
- "lib/Target/AMDGPU/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/AMDGPU/*.h",
- "include/llvm/Target/AMDGPU/*.def",
- "include/llvm/Target/AMDGPU/*.inc",
- "lib/Target/AMDGPU/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/AMDGPU"],
- deps = [
- ":AMDGPUDesc",
- ":AMDGPUInfo",
- ":AMDGPUUtils",
- ":Analysis",
- ":AsmPrinter",
- ":BinaryFormat",
- ":CodeGen",
- ":Core",
- ":GlobalISel",
- ":IPO",
- ":MC",
- ":MIRParser",
- ":Scalar",
- ":SelectionDAG",
- ":Support",
- ":Target",
- ":TransformUtils",
- ":Vectorize",
- ":config",
- ],
-)
-
-cc_library(
- name = "AMDGPUDesc",
- srcs = glob([
- "lib/Target/AMDGPU/MCTargetDesc/*.c",
- "lib/Target/AMDGPU/MCTargetDesc/*.cpp",
- "lib/Target/AMDGPU/MCTargetDesc/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/AMDGPU/MCTargetDesc/*.h",
- "include/llvm/Target/AMDGPU/MCTargetDesc/*.def",
- "include/llvm/Target/AMDGPU/MCTargetDesc/*.inc",
- "lib/Target/AMDGPU/MCTargetDesc/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/AMDGPU"],
- deps = [
- ":AMDGPUInfo",
- ":AMDGPUUtils",
- ":BinaryFormat",
- ":Core",
- ":MC",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "AMDGPUDisassembler",
- srcs = glob([
- "lib/Target/AMDGPU/Disassembler/*.c",
- "lib/Target/AMDGPU/Disassembler/*.cpp",
- "lib/Target/AMDGPU/Disassembler/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/AMDGPU/Disassembler/*.h",
- "include/llvm/Target/AMDGPU/Disassembler/*.def",
- "include/llvm/Target/AMDGPU/Disassembler/*.inc",
- "lib/Target/AMDGPU/Disassembler/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/AMDGPU"],
- deps = [
- ":AMDGPUDesc",
- ":AMDGPUInfo",
- ":AMDGPUUtils",
- ":MC",
- ":MCDisassembler",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "AMDGPUInfo",
- srcs = glob([
- "lib/Target/AMDGPU/TargetInfo/*.c",
- "lib/Target/AMDGPU/TargetInfo/*.cpp",
- "lib/Target/AMDGPU/TargetInfo/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/AMDGPU/TargetInfo/*.h",
- "include/llvm/Target/AMDGPU/TargetInfo/*.def",
- "include/llvm/Target/AMDGPU/TargetInfo/*.inc",
- "lib/Target/AMDGPU/TargetInfo/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/AMDGPU"],
- deps = [
- ":AMDGPUCommonTableGen",
- ":Core",
- ":Support",
- ":config",
- ":r600_target_gen",
- ],
-)
-
-cc_library(
- name = "AMDGPUUtils",
- srcs = glob([
- "lib/Target/AMDGPU/Utils/*.c",
- "lib/Target/AMDGPU/Utils/*.cpp",
- "lib/Target/AMDGPU/Utils/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/AMDGPU/Utils/*.h",
- "include/llvm/Target/AMDGPU/Utils/*.def",
- "include/llvm/Target/AMDGPU/Utils/*.inc",
- "lib/Target/AMDGPU/Utils/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/AMDGPU"],
- deps = [
- ":AMDGPUCommonTableGen",
- ":BinaryFormat",
- ":Core",
- ":MC",
- ":Support",
- ":config",
- ":r600_target_gen",
- ],
-)
-
-cc_library(
- name = "ARCCodeGen",
- srcs = glob([
- "lib/Target/ARC/*.c",
- "lib/Target/ARC/*.cpp",
- "lib/Target/ARC/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/ARC/*.h",
- "include/llvm/Target/ARC/*.def",
- "include/llvm/Target/ARC/*.inc",
- "lib/Target/ARC/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/ARC"],
- deps = [
- ":ARCDesc",
- ":ARCInfo",
- ":Analysis",
- ":AsmPrinter",
- ":CodeGen",
- ":Core",
- ":MC",
- ":SelectionDAG",
- ":Support",
- ":Target",
- ":TransformUtils",
- ":config",
- ],
-)
-
-cc_library(
- name = "ARCDesc",
- srcs = glob([
- "lib/Target/ARC/MCTargetDesc/*.c",
- "lib/Target/ARC/MCTargetDesc/*.cpp",
- "lib/Target/ARC/MCTargetDesc/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/ARC/MCTargetDesc/*.h",
- "include/llvm/Target/ARC/MCTargetDesc/*.def",
- "include/llvm/Target/ARC/MCTargetDesc/*.inc",
- "lib/Target/ARC/MCTargetDesc/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/ARC"],
- deps = [
- ":ARCInfo",
- ":MC",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "ARCDisassembler",
- srcs = glob([
- "lib/Target/ARC/Disassembler/*.c",
- "lib/Target/ARC/Disassembler/*.cpp",
- "lib/Target/ARC/Disassembler/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/ARC/Disassembler/*.h",
- "include/llvm/Target/ARC/Disassembler/*.def",
- "include/llvm/Target/ARC/Disassembler/*.inc",
- "lib/Target/ARC/Disassembler/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/ARC"],
- deps = [
- ":ARCInfo",
- ":MCDisassembler",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "ARCInfo",
- srcs = glob([
- "lib/Target/ARC/TargetInfo/*.c",
- "lib/Target/ARC/TargetInfo/*.cpp",
- "lib/Target/ARC/TargetInfo/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/ARC/TargetInfo/*.h",
- "include/llvm/Target/ARC/TargetInfo/*.def",
- "include/llvm/Target/ARC/TargetInfo/*.inc",
- "lib/Target/ARC/TargetInfo/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/ARC"],
- deps = [
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "ARMAsmParser",
- srcs = glob([
- "lib/Target/ARM/AsmParser/*.c",
- "lib/Target/ARM/AsmParser/*.cpp",
- "lib/Target/ARM/AsmParser/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/ARM/AsmParser/*.h",
- "include/llvm/Target/ARM/AsmParser/*.def",
- "include/llvm/Target/ARM/AsmParser/*.inc",
- "lib/Target/ARM/AsmParser/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/ARM"],
- deps = [
- ":ARMDesc",
- ":ARMInfo",
- ":ARMUtils",
- ":MC",
- ":MCParser",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "ARMCodeGen",
- srcs = glob([
- "lib/Target/ARM/*.c",
- "lib/Target/ARM/*.cpp",
- "lib/Target/ARM/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/ARM/*.h",
- "include/llvm/Target/ARM/*.def",
- "include/llvm/Target/ARM/*.inc",
- "lib/Target/ARM/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/ARM"],
- deps = [
- ":ARMDesc",
- ":ARMInfo",
- ":ARMUtils",
- ":Analysis",
- ":AsmPrinter",
- ":CFGuard",
- ":CodeGen",
- ":Core",
- ":GlobalISel",
- ":MC",
- ":Scalar",
- ":SelectionDAG",
- ":Support",
- ":Target",
- ":TransformUtils",
- ":config",
- ],
-)
-
-cc_library(
- name = "ARMDesc",
- srcs = glob([
- "lib/Target/ARM/MCTargetDesc/*.c",
- "lib/Target/ARM/MCTargetDesc/*.cpp",
- "lib/Target/ARM/MCTargetDesc/*.inc",
- "lib/Target/ARM/*.h",
- "include/llvm/CodeGen/GlobalISel/*.h",
- ]),
- hdrs = glob([
- "include/llvm/Target/ARM/MCTargetDesc/*.h",
- "include/llvm/Target/ARM/MCTargetDesc/*.def",
- "include/llvm/Target/ARM/MCTargetDesc/*.inc",
- "lib/Target/ARM/MCTargetDesc/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/ARM"],
- deps = [
- ":ARMCommonTableGen",
- ":ARMInfo",
- ":ARMUtils",
- ":BinaryFormat",
- ":MC",
- ":MCDisassembler",
- ":Support",
- ":attributes_gen",
- ":config",
- ":intrinsic_enums_gen",
- ":intrinsics_impl_gen",
- ],
-)
-
-cc_library(
- name = "ARMDisassembler",
- srcs = glob([
- "lib/Target/ARM/Disassembler/*.c",
- "lib/Target/ARM/Disassembler/*.cpp",
- "lib/Target/ARM/Disassembler/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/ARM/Disassembler/*.h",
- "include/llvm/Target/ARM/Disassembler/*.def",
- "include/llvm/Target/ARM/Disassembler/*.inc",
- "lib/Target/ARM/Disassembler/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/ARM"],
- deps = [
- ":ARMDesc",
- ":ARMInfo",
- ":ARMUtils",
- ":MCDisassembler",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "ARMInfo",
- srcs = glob([
- "lib/Target/ARM/TargetInfo/*.c",
- "lib/Target/ARM/TargetInfo/*.cpp",
- "lib/Target/ARM/TargetInfo/*.inc",
- "lib/Target/ARM/MCTargetDesc/*.h",
- ]),
- hdrs = glob([
- "include/llvm/Target/ARM/TargetInfo/*.h",
- "include/llvm/Target/ARM/TargetInfo/*.def",
- "include/llvm/Target/ARM/TargetInfo/*.inc",
- "lib/Target/ARM/TargetInfo/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/ARM"],
- deps = [
- ":ARMCommonTableGen",
- ":Support",
- ":Target",
- ":config",
- ],
-)
-
-cc_library(
- name = "ARMUtils",
- srcs = glob([
- "lib/Target/ARM/Utils/*.c",
- "lib/Target/ARM/Utils/*.cpp",
- "lib/Target/ARM/Utils/*.inc",
- "lib/Target/ARM/MCTargetDesc/*.h",
- ]),
- hdrs = glob([
- "include/llvm/Target/ARM/Utils/*.h",
- "include/llvm/Target/ARM/Utils/*.def",
- "include/llvm/Target/ARM/Utils/*.inc",
- "lib/Target/ARM/Utils/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/ARM"],
- deps = [
- ":ARMCommonTableGen",
- ":MC",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "AVRAsmParser",
- srcs = glob([
- "lib/Target/AVR/AsmParser/*.c",
- "lib/Target/AVR/AsmParser/*.cpp",
- "lib/Target/AVR/AsmParser/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/AVR/AsmParser/*.h",
- "include/llvm/Target/AVR/AsmParser/*.def",
- "include/llvm/Target/AVR/AsmParser/*.inc",
- "lib/Target/AVR/AsmParser/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/AVR"],
- deps = [
- ":AVRDesc",
- ":AVRInfo",
- ":MC",
- ":MCParser",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "AVRCodeGen",
- srcs = glob([
- "lib/Target/AVR/*.c",
- "lib/Target/AVR/*.cpp",
- "lib/Target/AVR/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/AVR/*.h",
- "include/llvm/Target/AVR/*.def",
- "include/llvm/Target/AVR/*.inc",
- "lib/Target/AVR/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/AVR"],
- deps = [
- ":AVRDesc",
- ":AVRInfo",
- ":AsmPrinter",
- ":CodeGen",
- ":Core",
- ":MC",
- ":SelectionDAG",
- ":Support",
- ":Target",
- ":config",
- ],
-)
-
-cc_library(
- name = "AVRDesc",
- srcs = glob([
- "lib/Target/AVR/MCTargetDesc/*.c",
- "lib/Target/AVR/MCTargetDesc/*.cpp",
- "lib/Target/AVR/MCTargetDesc/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/AVR/MCTargetDesc/*.h",
- "include/llvm/Target/AVR/MCTargetDesc/*.def",
- "include/llvm/Target/AVR/MCTargetDesc/*.inc",
- "lib/Target/AVR/MCTargetDesc/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/AVR"],
- deps = [
- ":AVRInfo",
- ":MC",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "AVRDisassembler",
- srcs = glob([
- "lib/Target/AVR/Disassembler/*.c",
- "lib/Target/AVR/Disassembler/*.cpp",
- "lib/Target/AVR/Disassembler/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/AVR/Disassembler/*.h",
- "include/llvm/Target/AVR/Disassembler/*.def",
- "include/llvm/Target/AVR/Disassembler/*.inc",
- "lib/Target/AVR/Disassembler/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/AVR"],
- deps = [
- ":AVRInfo",
- ":MCDisassembler",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "AVRInfo",
- srcs = glob([
- "lib/Target/AVR/TargetInfo/*.c",
- "lib/Target/AVR/TargetInfo/*.cpp",
- "lib/Target/AVR/TargetInfo/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/AVR/TargetInfo/*.h",
- "include/llvm/Target/AVR/TargetInfo/*.def",
- "include/llvm/Target/AVR/TargetInfo/*.inc",
- "lib/Target/AVR/TargetInfo/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/AVR"],
- deps = [
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "AggressiveInstCombine",
- srcs = glob([
- "lib/Transforms/AggressiveInstCombine/*.c",
- "lib/Transforms/AggressiveInstCombine/*.cpp",
- "lib/Transforms/AggressiveInstCombine/*.inc",
- "lib/Transforms/AggressiveInstCombine/*.h",
- ]),
- hdrs = glob([
- "include/llvm/Transforms/AggressiveInstCombine/*.h",
- "include/llvm/Transforms/AggressiveInstCombine/*.def",
- "include/llvm/Transforms/AggressiveInstCombine/*.inc",
- ]),
- copts = llvm_copts,
- deps = [
- ":Analysis",
- ":Core",
- ":Support",
- ":TransformUtils",
- ":config",
- ],
-)
-
-cc_library(
- name = "AsmParser",
- srcs = glob([
- "lib/AsmParser/*.c",
- "lib/AsmParser/*.cpp",
- "lib/AsmParser/*.inc",
- "lib/AsmParser/*.h",
- ]),
- hdrs = glob([
- "include/llvm/AsmParser/*.h",
- "include/llvm/AsmParser/*.def",
- "include/llvm/AsmParser/*.inc",
- ]),
- copts = llvm_copts,
- deps = [
- ":BinaryFormat",
- ":Core",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "AsmPrinter",
- srcs = glob([
- "lib/CodeGen/AsmPrinter/*.c",
- "lib/CodeGen/AsmPrinter/*.cpp",
- "lib/CodeGen/AsmPrinter/*.inc",
- "lib/CodeGen/AsmPrinter/*.h",
- ]),
- hdrs = glob([
- "include/llvm/CodeGen/AsmPrinter/*.h",
- "include/llvm/CodeGen/AsmPrinter/*.def",
- "include/llvm/CodeGen/AsmPrinter/*.inc",
- "lib/CodeGen/AsmPrinter/*.def",
- ]),
- copts = llvm_copts,
- deps = [
- ":Analysis",
- ":BinaryFormat",
- ":CodeGen",
- ":Core",
- ":DebugInfoCodeView",
- ":DebugInfoDWARF",
- ":DebugInfoMSF",
- ":MC",
- ":MCParser",
- ":Remarks",
- ":Support",
- ":Target",
- ":config",
- ],
-)
-
-cc_library(
- name = "BPFAsmParser",
- srcs = glob([
- "lib/Target/BPF/AsmParser/*.c",
- "lib/Target/BPF/AsmParser/*.cpp",
- "lib/Target/BPF/AsmParser/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/BPF/AsmParser/*.h",
- "include/llvm/Target/BPF/AsmParser/*.def",
- "include/llvm/Target/BPF/AsmParser/*.inc",
- "lib/Target/BPF/AsmParser/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/BPF"],
- deps = [
- ":BPFDesc",
- ":BPFInfo",
- ":MC",
- ":MCParser",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "BPFCodeGen",
- srcs = glob([
- "lib/Target/BPF/*.c",
- "lib/Target/BPF/*.cpp",
- "lib/Target/BPF/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/BPF/*.h",
- "include/llvm/Target/BPF/*.def",
- "include/llvm/Target/BPF/*.inc",
- "lib/Target/BPF/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/BPF"],
- deps = [
- ":AsmPrinter",
- ":BPFDesc",
- ":BPFInfo",
- ":CodeGen",
- ":Core",
- ":IPO",
- ":MC",
- ":Scalar",
- ":SelectionDAG",
- ":Support",
- ":Target",
- ":config",
- ],
-)
-
-cc_library(
- name = "BPFDesc",
- srcs = glob([
- "lib/Target/BPF/MCTargetDesc/*.c",
- "lib/Target/BPF/MCTargetDesc/*.cpp",
- "lib/Target/BPF/MCTargetDesc/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/BPF/MCTargetDesc/*.h",
- "include/llvm/Target/BPF/MCTargetDesc/*.def",
- "include/llvm/Target/BPF/MCTargetDesc/*.inc",
- "lib/Target/BPF/MCTargetDesc/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/BPF"],
- deps = [
- ":BPFInfo",
- ":MC",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "BPFDisassembler",
- srcs = glob([
- "lib/Target/BPF/Disassembler/*.c",
- "lib/Target/BPF/Disassembler/*.cpp",
- "lib/Target/BPF/Disassembler/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/BPF/Disassembler/*.h",
- "include/llvm/Target/BPF/Disassembler/*.def",
- "include/llvm/Target/BPF/Disassembler/*.inc",
- "lib/Target/BPF/Disassembler/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/BPF"],
- deps = [
- ":BPFInfo",
- ":MCDisassembler",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "BPFInfo",
- srcs = glob([
- "lib/Target/BPF/TargetInfo/*.c",
- "lib/Target/BPF/TargetInfo/*.cpp",
- "lib/Target/BPF/TargetInfo/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/BPF/TargetInfo/*.h",
- "include/llvm/Target/BPF/TargetInfo/*.def",
- "include/llvm/Target/BPF/TargetInfo/*.inc",
- "lib/Target/BPF/TargetInfo/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/BPF"],
- deps = [
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "BinaryFormat",
- srcs = glob([
- "lib/BinaryFormat/*.c",
- "lib/BinaryFormat/*.cpp",
- "lib/BinaryFormat/*.inc",
- "lib/BinaryFormat/*.h",
- ]),
- hdrs = glob([
- "include/llvm/BinaryFormat/*.h",
- "include/llvm/BinaryFormat/*.def",
- "include/llvm/BinaryFormat/*.inc",
- "include/llvm/BinaryFormat/ELFRelocs/*.def",
- "include/llvm/BinaryFormat/WasmRelocs/*.def",
- ]),
- copts = llvm_copts,
- deps = [
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "BitReader",
- srcs = glob([
- "lib/Bitcode/Reader/*.c",
- "lib/Bitcode/Reader/*.cpp",
- "lib/Bitcode/Reader/*.inc",
- "lib/Bitcode/Reader/*.h",
- ]),
- hdrs = glob([
- "include/llvm/Bitcode/Reader/*.h",
- "include/llvm/Bitcode/Reader/*.def",
- "include/llvm/Bitcode/Reader/*.inc",
- "include/llvm/Bitcode/BitstreamReader.h",
- ]),
- copts = llvm_copts,
- deps = [
- ":BitstreamReader",
- ":Core",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "BitWriter",
- srcs = glob([
- "lib/Bitcode/Writer/*.c",
- "lib/Bitcode/Writer/*.cpp",
- "lib/Bitcode/Writer/*.inc",
- "lib/Bitcode/Writer/*.h",
- ]),
- hdrs = glob([
- "include/llvm/Bitcode/Writer/*.h",
- "include/llvm/Bitcode/Writer/*.def",
- "include/llvm/Bitcode/Writer/*.inc",
- "include/llvm/Bitcode/BitcodeWriter.h",
- "include/llvm/Bitcode/BitcodeWriterPass.h",
- "include/llvm/Bitcode/BitstreamWriter.h",
- ]),
- copts = llvm_copts,
- deps = [
- ":Analysis",
- ":Core",
- ":MC",
- ":Object",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "BitstreamReader",
- srcs = glob([
- "lib/Bitstream/Reader/*.c",
- "lib/Bitstream/Reader/*.cpp",
- "lib/Bitstream/Reader/*.inc",
- "lib/Bitstream/Reader/*.h",
- ]),
- hdrs = glob([
- "include/llvm/Bitstream/Reader/*.h",
- "include/llvm/Bitstream/Reader/*.def",
- "include/llvm/Bitstream/Reader/*.inc",
- ]),
- copts = llvm_copts,
- deps = [
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "CFGuard",
- srcs = glob([
- "lib/Transforms/CFGuard/*.c",
- "lib/Transforms/CFGuard/*.cpp",
- "lib/Transforms/CFGuard/*.inc",
- "lib/Transforms/CFGuard/*.h",
- ]),
- hdrs = glob([
- "include/llvm/Transforms/CFGuard/*.h",
- "include/llvm/Transforms/CFGuard/*.def",
- "include/llvm/Transforms/CFGuard/*.inc",
- ]),
- copts = llvm_copts,
- deps = [
- ":Core",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "CodeGen",
- srcs = glob([
- "lib/CodeGen/*.c",
- "lib/CodeGen/*.cpp",
- "lib/CodeGen/*.inc",
- "lib/CodeGen/LiveDebugValues/*.cpp",
- "lib/CodeGen/*.h",
- ]),
- hdrs = glob([
- "include/llvm/CodeGen/*.h",
- "include/llvm/CodeGen/*.def",
- "include/llvm/CodeGen/*.inc",
- "include/llvm/CodeGen/**/*.h",
- ]),
- copts = llvm_copts,
- deps = [
- ":Analysis",
- ":BitReader",
- ":BitWriter",
- ":Core",
- ":Instrumentation",
- ":MC",
- ":ProfileData",
- ":Scalar",
- ":Support",
- ":Target",
- ":TransformUtils",
- ":config",
- ],
-)
-
-cc_library(
- name = "Core",
- srcs = glob([
- "lib/IR/*.c",
- "lib/IR/*.cpp",
- "lib/IR/*.inc",
- "include/llvm/Analysis/*.h",
- "include/llvm/Bitcode/BitcodeReader.h",
- "include/llvm/Bitcode/BitCodes.h",
- "include/llvm/Bitcode/LLVMBitCodes.h",
- "include/llvm/CodeGen/MachineValueType.h",
- "include/llvm/CodeGen/ValueTypes.h",
- "lib/IR/*.h",
- ]),
- hdrs = glob([
- "include/llvm/IR/*.h",
- "include/llvm/IR/*.def",
- "include/llvm/IR/*.inc",
- "include/llvm/*.h",
- "include/llvm/Analysis/*.def",
- ]),
- copts = llvm_copts,
- deps = [
- ":BinaryFormat",
- ":Remarks",
- ":Support",
- ":aarch64_enums_gen",
- ":amdgcn_enums_gen",
- ":arm_enums_gen",
- ":attributes_gen",
- ":bpf_enums_gen",
- ":config",
- ":hexagon_enums_gen",
- ":intrinsic_enums_gen",
- ":intrinsics_impl_gen",
- ":mips_enums_gen",
- ":nvvm_enums_gen",
- ":ppc_enums_gen",
- ":r600_enums_gen",
- ":riscv_enums_gen",
- ":s390_enums_gen",
- ":wasm_enums_gen",
- ":x86_enums_gen",
- ":xcore_enums_gen",
- ],
-)
-
-cc_library(
- name = "Coroutines",
- srcs = glob([
- "lib/Transforms/Coroutines/*.c",
- "lib/Transforms/Coroutines/*.cpp",
- "lib/Transforms/Coroutines/*.inc",
- "lib/Transforms/Coroutines/*.h",
- ]),
- hdrs = glob([
- "include/llvm/Transforms/Coroutines/*.h",
- "include/llvm/Transforms/Coroutines/*.def",
- "include/llvm/Transforms/Coroutines/*.inc",
- ]),
- copts = llvm_copts,
- deps = [
- ":Analysis",
- ":Core",
- ":IPO",
- ":Scalar",
- ":Support",
- ":TransformUtils",
- ":config",
- ],
-)
-
-cc_library(
- name = "Coverage",
- srcs = glob([
- "lib/ProfileData/Coverage/*.c",
- "lib/ProfileData/Coverage/*.cpp",
- "lib/ProfileData/Coverage/*.inc",
- "lib/ProfileData/Coverage/*.h",
- ]),
- hdrs = glob([
- "include/llvm/ProfileData/Coverage/*.h",
- "include/llvm/ProfileData/Coverage/*.def",
- "include/llvm/ProfileData/Coverage/*.inc",
- ]),
- copts = llvm_copts,
- deps = [
- ":Core",
- ":Object",
- ":ProfileData",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "DWARFLinker",
- srcs = glob([
- "lib/DWARFLinker/*.c",
- "lib/DWARFLinker/*.cpp",
- "lib/DWARFLinker/*.inc",
- "lib/DWARFLinker/*.h",
- ]),
- hdrs = glob([
- "include/llvm/DWARFLinker/*.h",
- "include/llvm/DWARFLinker/*.def",
- "include/llvm/DWARFLinker/*.inc",
- ]),
- copts = llvm_copts,
- deps = [
- ":AsmPrinter",
- ":CodeGen",
- ":DebugInfoDWARF",
- ":MC",
- ":Object",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "DebugInfoCodeView",
- srcs = glob([
- "lib/DebugInfo/CodeView/*.c",
- "lib/DebugInfo/CodeView/*.cpp",
- "lib/DebugInfo/CodeView/*.inc",
- "lib/DebugInfo/CodeView/*.h",
- ]),
- hdrs = glob([
- "include/llvm/DebugInfo/CodeView/*.h",
- "include/llvm/DebugInfo/CodeView/*.def",
- "include/llvm/DebugInfo/CodeView/*.inc",
- ]),
- copts = llvm_copts,
- deps = [
- ":BinaryFormat",
- ":DebugInfoMSF",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "DebugInfoDWARF",
- srcs = glob([
- "lib/DebugInfo/DWARF/*.c",
- "lib/DebugInfo/DWARF/*.cpp",
- "lib/DebugInfo/DWARF/*.inc",
- "lib/DebugInfo/DWARF/*.h",
- ]),
- hdrs = glob([
- "include/llvm/DebugInfo/DWARF/*.h",
- "include/llvm/DebugInfo/DWARF/*.def",
- "include/llvm/DebugInfo/DWARF/*.inc",
- ]),
- copts = llvm_copts,
- deps = [
- ":BinaryFormat",
- ":MC",
- ":Object",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "DebugInfoGSYM",
- srcs = glob([
- "lib/DebugInfo/GSYM/*.c",
- "lib/DebugInfo/GSYM/*.cpp",
- "lib/DebugInfo/GSYM/*.inc",
- "lib/DebugInfo/GSYM/*.h",
- ]),
- hdrs = glob([
- "include/llvm/DebugInfo/GSYM/*.h",
- "include/llvm/DebugInfo/GSYM/*.def",
- "include/llvm/DebugInfo/GSYM/*.inc",
- ]),
- copts = llvm_copts,
- deps = [
- ":DebugInfoDWARF",
- ":MC",
- ":Object",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "DebugInfoMSF",
- srcs = glob([
- "lib/DebugInfo/MSF/*.c",
- "lib/DebugInfo/MSF/*.cpp",
- "lib/DebugInfo/MSF/*.inc",
- "lib/DebugInfo/MSF/*.h",
- ]),
- hdrs = glob([
- "include/llvm/DebugInfo/MSF/*.h",
- "include/llvm/DebugInfo/MSF/*.def",
- "include/llvm/DebugInfo/MSF/*.inc",
- ]),
- copts = llvm_copts,
- deps = [
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "DebugInfoPDB",
- srcs = glob([
- "lib/DebugInfo/PDB/*.c",
- "lib/DebugInfo/PDB/*.cpp",
- "lib/DebugInfo/PDB/*.inc",
- "lib/DebugInfo/PDB/*.h",
- ]),
- hdrs = glob([
- "include/llvm/DebugInfo/PDB/*.h",
- "include/llvm/DebugInfo/PDB/*.def",
- "include/llvm/DebugInfo/PDB/*.inc",
- ]),
- copts = llvm_copts,
- deps = [
- ":BinaryFormat",
- ":DebugInfoCodeView",
- ":DebugInfoMSF",
- ":Object",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "Demangle",
- srcs = glob([
- "lib/Demangle/*.c",
- "lib/Demangle/*.cpp",
- "lib/Demangle/*.inc",
- "lib/Demangle/*.h",
- ]),
- hdrs = glob([
- "include/llvm/Demangle/*.h",
- "include/llvm/Demangle/*.def",
- "include/llvm/Demangle/*.inc",
- ]),
- copts = llvm_copts,
- deps = [":config"],
-)
-
-cc_library(
- name = "DlltoolDriver",
- srcs = glob([
- "lib/ToolDrivers/llvm-dlltool/*.c",
- "lib/ToolDrivers/llvm-dlltool/*.cpp",
- "lib/ToolDrivers/llvm-dlltool/*.inc",
- "lib/ToolDrivers/llvm-dlltool/*.h",
- ]),
- hdrs = glob([
- "include/llvm/ToolDrivers/llvm-dlltool/*.h",
- "include/llvm/ToolDrivers/llvm-dlltool/*.def",
- "include/llvm/ToolDrivers/llvm-dlltool/*.inc",
- ]),
- copts = llvm_copts,
- deps = [
- ":Object",
- ":Option",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "ExecutionEngine",
- srcs = glob([
- "lib/ExecutionEngine/*.c",
- "lib/ExecutionEngine/*.cpp",
- "lib/ExecutionEngine/*.inc",
- "lib/ExecutionEngine/*.h",
- ]),
- hdrs = glob([
- "include/llvm/ExecutionEngine/*.h",
- "include/llvm/ExecutionEngine/*.def",
- "include/llvm/ExecutionEngine/*.inc",
- ]),
- copts = llvm_copts,
- deps = [
- ":Core",
- ":MC",
- ":Object",
- ":RuntimeDyld",
- ":Support",
- ":Target",
- ":config",
- ],
-)
-
-cc_library(
- name = "Extensions",
- srcs = glob([
- "lib/Extensions/*.c",
- "lib/Extensions/*.cpp",
- "lib/Extensions/*.inc",
- "lib/Extensions/*.h",
- ]),
- hdrs = glob([
- "include/llvm/Extensions/*.h",
- "include/llvm/Extensions/*.def",
- "include/llvm/Extensions/*.inc",
- ]),
- copts = llvm_copts,
- deps = [
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "FrontendOpenMP",
- srcs = glob([
- "lib/Frontend/OpenMP/*.c",
- "lib/Frontend/OpenMP/*.cpp",
- "lib/Frontend/OpenMP/*.inc",
- "lib/Frontend/OpenMP/*.h",
- ]) + ["include/llvm/Frontend/OpenMP/OMP.cpp"],
- hdrs = glob([
- "include/llvm/Frontend/OpenMP/*.h",
- "include/llvm/Frontend/OpenMP/*.def",
- "include/llvm/Frontend/OpenMP/*.inc",
- ]),
- copts = llvm_copts,
- deps = [
- ":Core",
- ":Support",
- ":TransformUtils",
- ":config",
- ":omp_gen",
- ":omp_gen_impl",
- ],
-)
-
-cc_library(
- name = "FuzzMutate",
- srcs = glob([
- "lib/FuzzMutate/*.c",
- "lib/FuzzMutate/*.cpp",
- "lib/FuzzMutate/*.inc",
- "lib/FuzzMutate/*.h",
- ]),
- hdrs = glob([
- "include/llvm/FuzzMutate/*.h",
- "include/llvm/FuzzMutate/*.def",
- "include/llvm/FuzzMutate/*.inc",
- ]),
- copts = llvm_copts,
- deps = [
- ":Analysis",
- ":BitReader",
- ":BitWriter",
- ":Core",
- ":Scalar",
- ":Support",
- ":Target",
- ":config",
- ],
-)
-
-cc_library(
- name = "GlobalISel",
- srcs = glob([
- "lib/CodeGen/GlobalISel/*.c",
- "lib/CodeGen/GlobalISel/*.cpp",
- "lib/CodeGen/GlobalISel/*.inc",
- "lib/CodeGen/GlobalISel/*.h",
- ]),
- hdrs = glob([
- "include/llvm/CodeGen/GlobalISel/*.h",
- "include/llvm/CodeGen/GlobalISel/*.def",
- "include/llvm/CodeGen/GlobalISel/*.inc",
- ]),
- copts = llvm_copts,
- deps = [
- ":Analysis",
- ":CodeGen",
- ":Core",
- ":MC",
- ":SelectionDAG",
- ":Support",
- ":Target",
- ":TransformUtils",
- ":config",
- ],
-)
-
-cc_library(
- name = "HelloNew",
- srcs = glob([
- "lib/Transforms/HelloNew/*.c",
- "lib/Transforms/HelloNew/*.cpp",
- "lib/Transforms/HelloNew/*.inc",
- "lib/Transforms/HelloNew/*.h",
- ]),
- hdrs = glob([
- "include/llvm/Transforms/HelloNew/*.h",
- "include/llvm/Transforms/HelloNew/*.def",
- "include/llvm/Transforms/HelloNew/*.inc",
- ]),
- copts = llvm_copts,
- deps = [
- ":Core",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "HexagonAsmParser",
- srcs = glob([
- "lib/Target/Hexagon/AsmParser/*.c",
- "lib/Target/Hexagon/AsmParser/*.cpp",
- "lib/Target/Hexagon/AsmParser/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/Hexagon/AsmParser/*.h",
- "include/llvm/Target/Hexagon/AsmParser/*.def",
- "include/llvm/Target/Hexagon/AsmParser/*.inc",
- "lib/Target/Hexagon/AsmParser/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/Hexagon"],
- deps = [
- ":HexagonDesc",
- ":HexagonInfo",
- ":MC",
- ":MCParser",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "HexagonCodeGen",
- srcs = glob([
- "lib/Target/Hexagon/*.c",
- "lib/Target/Hexagon/*.cpp",
- "lib/Target/Hexagon/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/Hexagon/*.h",
- "include/llvm/Target/Hexagon/*.def",
- "include/llvm/Target/Hexagon/*.inc",
- "lib/Target/Hexagon/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/Hexagon"],
- deps = [
- ":Analysis",
- ":AsmPrinter",
- ":CodeGen",
- ":Core",
- ":HexagonAsmParser",
- ":HexagonDesc",
- ":HexagonInfo",
- ":IPO",
- ":MC",
- ":Scalar",
- ":SelectionDAG",
- ":Support",
- ":Target",
- ":TransformUtils",
- ":config",
- ],
-)
-
-cc_library(
- name = "HexagonDesc",
- srcs = glob([
- "lib/Target/Hexagon/MCTargetDesc/*.c",
- "lib/Target/Hexagon/MCTargetDesc/*.cpp",
- "lib/Target/Hexagon/MCTargetDesc/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/Hexagon/MCTargetDesc/*.h",
- "include/llvm/Target/Hexagon/MCTargetDesc/*.def",
- "include/llvm/Target/Hexagon/MCTargetDesc/*.inc",
- "lib/Target/Hexagon/MCTargetDesc/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/Hexagon"],
- deps = [
- ":HexagonInfo",
- ":MC",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "HexagonDisassembler",
- srcs = glob([
- "lib/Target/Hexagon/Disassembler/*.c",
- "lib/Target/Hexagon/Disassembler/*.cpp",
- "lib/Target/Hexagon/Disassembler/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/Hexagon/Disassembler/*.h",
- "include/llvm/Target/Hexagon/Disassembler/*.def",
- "include/llvm/Target/Hexagon/Disassembler/*.inc",
- "lib/Target/Hexagon/Disassembler/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/Hexagon"],
- deps = [
- ":HexagonDesc",
- ":HexagonInfo",
- ":MC",
- ":MCDisassembler",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "HexagonInfo",
- srcs = glob([
- "lib/Target/Hexagon/TargetInfo/*.c",
- "lib/Target/Hexagon/TargetInfo/*.cpp",
- "lib/Target/Hexagon/TargetInfo/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/Hexagon/TargetInfo/*.h",
- "include/llvm/Target/Hexagon/TargetInfo/*.def",
- "include/llvm/Target/Hexagon/TargetInfo/*.inc",
- "lib/Target/Hexagon/TargetInfo/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/Hexagon"],
- deps = [
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "IPO",
- srcs = glob([
- "lib/Transforms/IPO/*.c",
- "lib/Transforms/IPO/*.cpp",
- "lib/Transforms/IPO/*.inc",
- "include/llvm/Transforms/SampleProfile.h",
- "include/llvm-c/Transforms/IPO.h",
- "include/llvm-c/Transforms/PassManagerBuilder.h",
- "lib/Transforms/IPO/*.h",
- ]),
- hdrs = glob([
- "include/llvm/Transforms/IPO/*.h",
- "include/llvm/Transforms/IPO/*.def",
- "include/llvm/Transforms/IPO/*.inc",
- ]),
- copts = llvm_copts,
- deps = [
- ":AggressiveInstCombine",
- ":Analysis",
- ":BitReader",
- ":BitWriter",
- ":Core",
- ":FrontendOpenMP",
- ":IRReader",
- ":InstCombine",
- ":Instrumentation",
- ":Linker",
- ":Object",
- ":ProfileData",
- ":Scalar",
- ":Support",
- ":TransformUtils",
- ":Vectorize",
- ":config",
- ],
-)
-
-cc_library(
- name = "IRReader",
- srcs = glob([
- "lib/IRReader/*.c",
- "lib/IRReader/*.cpp",
- "lib/IRReader/*.inc",
- "lib/IRReader/*.h",
- ]),
- hdrs = glob([
- "include/llvm/IRReader/*.h",
- "include/llvm/IRReader/*.def",
- "include/llvm/IRReader/*.inc",
- ]),
- copts = llvm_copts,
- deps = [
- ":AsmParser",
- ":BitReader",
- ":Core",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "InstCombine",
- srcs = glob([
- "lib/Transforms/InstCombine/*.c",
- "lib/Transforms/InstCombine/*.cpp",
- "lib/Transforms/InstCombine/*.inc",
- "lib/Transforms/InstCombine/*.h",
- ]),
- hdrs = glob([
- "include/llvm/Transforms/InstCombine/*.h",
- "include/llvm/Transforms/InstCombine/*.def",
- "include/llvm/Transforms/InstCombine/*.inc",
- ]),
- copts = llvm_copts,
- deps = [
- ":Analysis",
- ":Core",
- ":InstCombineTableGen",
- ":Support",
- ":TransformUtils",
- ":config",
- ],
-)
-
-cc_library(
- name = "Instrumentation",
- srcs = glob([
- "lib/Transforms/Instrumentation/*.c",
- "lib/Transforms/Instrumentation/*.cpp",
- "lib/Transforms/Instrumentation/*.inc",
- "lib/Transforms/Instrumentation/*.h",
- ]),
- hdrs = glob([
- "include/llvm/Transforms/Instrumentation/*.h",
- "include/llvm/Transforms/Instrumentation/*.def",
- "include/llvm/Transforms/Instrumentation/*.inc",
- "include/llvm/Transforms/GCOVProfiler.h",
- "include/llvm/Transforms/Instrumentation.h",
- "include/llvm/Transforms/InstrProfiling.h",
- "include/llvm/Transforms/PGOInstrumentation.h",
- ]),
- copts = llvm_copts,
- deps = [
- ":Analysis",
- ":Core",
- ":MC",
- ":ProfileData",
- ":Support",
- ":TransformUtils",
- ":config",
- ],
-)
-
-cc_library(
- name = "InterfaceStub",
- srcs = glob([
- "lib/InterfaceStub/*.c",
- "lib/InterfaceStub/*.cpp",
- "lib/InterfaceStub/*.inc",
- "lib/InterfaceStub/*.h",
- ]),
- hdrs = glob([
- "include/llvm/InterfaceStub/*.h",
- "include/llvm/InterfaceStub/*.def",
- "include/llvm/InterfaceStub/*.inc",
- ]),
- copts = llvm_copts,
- deps = [
- ":Object",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "Interpreter",
- srcs = glob([
- "lib/ExecutionEngine/Interpreter/*.c",
- "lib/ExecutionEngine/Interpreter/*.cpp",
- "lib/ExecutionEngine/Interpreter/*.inc",
- "lib/ExecutionEngine/Interpreter/*.h",
- ]),
- hdrs = glob([
- "include/llvm/ExecutionEngine/Interpreter/*.h",
- "include/llvm/ExecutionEngine/Interpreter/*.def",
- "include/llvm/ExecutionEngine/Interpreter/*.inc",
- ]),
- copts = llvm_copts,
- deps = [
- ":CodeGen",
- ":Core",
- ":ExecutionEngine",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "JITLink",
- srcs = glob([
- "lib/ExecutionEngine/JITLink/*.c",
- "lib/ExecutionEngine/JITLink/*.cpp",
- "lib/ExecutionEngine/JITLink/*.inc",
- "lib/ExecutionEngine/JITLink/*.h",
- ]),
- hdrs = glob([
- "include/llvm/ExecutionEngine/JITLink/*.h",
- "include/llvm/ExecutionEngine/JITLink/*.def",
- "include/llvm/ExecutionEngine/JITLink/*.inc",
- ]),
- copts = llvm_copts,
- deps = [
- ":BinaryFormat",
- ":Object",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "LTO",
- srcs = glob([
- "lib/LTO/*.c",
- "lib/LTO/*.cpp",
- "lib/LTO/*.inc",
- "lib/LTO/*.h",
- ]),
- hdrs = glob([
- "include/llvm/LTO/*.h",
- "include/llvm/LTO/*.def",
- "include/llvm/LTO/*.inc",
- ]),
- copts = llvm_copts,
- deps = [
- ":AggressiveInstCombine",
- ":Analysis",
- ":BinaryFormat",
- ":BitReader",
- ":BitWriter",
- ":CodeGen",
- ":Core",
- ":Extensions",
- ":IPO",
- ":InstCombine",
- ":Linker",
- ":MC",
- ":ObjCARC",
- ":Object",
- ":Passes",
- ":Remarks",
- ":Scalar",
- ":Support",
- ":Target",
- ":TransformUtils",
- ":config",
- ],
-)
-
-cc_library(
- name = "LanaiAsmParser",
- srcs = glob([
- "lib/Target/Lanai/AsmParser/*.c",
- "lib/Target/Lanai/AsmParser/*.cpp",
- "lib/Target/Lanai/AsmParser/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/Lanai/AsmParser/*.h",
- "include/llvm/Target/Lanai/AsmParser/*.def",
- "include/llvm/Target/Lanai/AsmParser/*.inc",
- "lib/Target/Lanai/AsmParser/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/Lanai"],
- deps = [
- ":LanaiDesc",
- ":LanaiInfo",
- ":MC",
- ":MCParser",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "LanaiCodeGen",
- srcs = glob([
- "lib/Target/Lanai/*.c",
- "lib/Target/Lanai/*.cpp",
- "lib/Target/Lanai/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/Lanai/*.h",
- "include/llvm/Target/Lanai/*.def",
- "include/llvm/Target/Lanai/*.inc",
- "lib/Target/Lanai/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/Lanai"],
- deps = [
- ":Analysis",
- ":AsmPrinter",
- ":CodeGen",
- ":Core",
- ":LanaiAsmParser",
- ":LanaiDesc",
- ":LanaiInfo",
- ":MC",
- ":SelectionDAG",
- ":Support",
- ":Target",
- ":TransformUtils",
- ":config",
- ],
-)
-
-cc_library(
- name = "LanaiDesc",
- srcs = glob([
- "lib/Target/Lanai/MCTargetDesc/*.c",
- "lib/Target/Lanai/MCTargetDesc/*.cpp",
- "lib/Target/Lanai/MCTargetDesc/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/Lanai/MCTargetDesc/*.h",
- "include/llvm/Target/Lanai/MCTargetDesc/*.def",
- "include/llvm/Target/Lanai/MCTargetDesc/*.inc",
- "lib/Target/Lanai/MCTargetDesc/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/Lanai"],
- deps = [
- ":LanaiInfo",
- ":MC",
- ":MCDisassembler",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "LanaiDisassembler",
- srcs = glob([
- "lib/Target/Lanai/Disassembler/*.c",
- "lib/Target/Lanai/Disassembler/*.cpp",
- "lib/Target/Lanai/Disassembler/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/Lanai/Disassembler/*.h",
- "include/llvm/Target/Lanai/Disassembler/*.def",
- "include/llvm/Target/Lanai/Disassembler/*.inc",
- "lib/Target/Lanai/Disassembler/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/Lanai"],
- deps = [
- ":LanaiDesc",
- ":LanaiInfo",
- ":MC",
- ":MCDisassembler",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "LanaiInfo",
- srcs = glob([
- "lib/Target/Lanai/TargetInfo/*.c",
- "lib/Target/Lanai/TargetInfo/*.cpp",
- "lib/Target/Lanai/TargetInfo/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/Lanai/TargetInfo/*.h",
- "include/llvm/Target/Lanai/TargetInfo/*.def",
- "include/llvm/Target/Lanai/TargetInfo/*.inc",
- "lib/Target/Lanai/TargetInfo/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/Lanai"],
- deps = [
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "LibDriver",
- srcs = glob([
- "lib/ToolDrivers/llvm-lib/*.c",
- "lib/ToolDrivers/llvm-lib/*.cpp",
- "lib/ToolDrivers/llvm-lib/*.inc",
- "lib/ToolDrivers/llvm-lib/*.h",
- ]),
- hdrs = glob([
- "include/llvm/ToolDrivers/llvm-lib/*.h",
- "include/llvm/ToolDrivers/llvm-lib/*.def",
- "include/llvm/ToolDrivers/llvm-lib/*.inc",
- ]),
- copts = llvm_copts,
- deps = [
- ":BinaryFormat",
- ":BitReader",
- ":Object",
- ":Option",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "LineEditor",
- srcs = glob([
- "lib/LineEditor/*.c",
- "lib/LineEditor/*.cpp",
- "lib/LineEditor/*.inc",
- "lib/LineEditor/*.h",
- ]),
- hdrs = glob([
- "include/llvm/LineEditor/*.h",
- "include/llvm/LineEditor/*.def",
- "include/llvm/LineEditor/*.inc",
- ]),
- copts = llvm_copts,
- deps = [
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "Linker",
- srcs = glob([
- "lib/Linker/*.c",
- "lib/Linker/*.cpp",
- "lib/Linker/*.inc",
- "lib/Linker/*.h",
- ]),
- hdrs = glob([
- "include/llvm/Linker/*.h",
- "include/llvm/Linker/*.def",
- "include/llvm/Linker/*.inc",
- ]),
- copts = llvm_copts,
- deps = [
- ":Core",
- ":Support",
- ":TransformUtils",
- ":config",
- ],
-)
-
-cc_library(
- name = "MC",
- srcs = glob([
- "lib/MC/*.c",
- "lib/MC/*.cpp",
- "lib/MC/*.inc",
- "lib/MC/*.h",
- ]),
- hdrs = glob([
- "include/llvm/MC/*.h",
- "include/llvm/MC/*.def",
- "include/llvm/MC/*.inc",
- ]),
- copts = llvm_copts,
- deps = [
- ":BinaryFormat",
- ":DebugInfoCodeView",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "MCA",
- srcs = glob([
- "lib/MCA/*.c",
- "lib/MCA/*.cpp",
- "lib/MCA/*.inc",
- "lib/MCA/*.h",
- ]),
- hdrs = glob([
- "include/llvm/MCA/*.h",
- "include/llvm/MCA/*.def",
- "include/llvm/MCA/*.inc",
- ]),
- copts = llvm_copts,
- deps = [
- ":MC",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "MCDisassembler",
- srcs = glob([
- "lib/MC/MCDisassembler/*.c",
- "lib/MC/MCDisassembler/*.cpp",
- "lib/MC/MCDisassembler/*.inc",
- "lib/MC/MCDisassembler/*.h",
- ]),
- hdrs = glob([
- "include/llvm/MC/MCDisassembler/*.h",
- "include/llvm/MC/MCDisassembler/*.def",
- "include/llvm/MC/MCDisassembler/*.inc",
- ]),
- copts = llvm_copts,
- deps = [
- ":MC",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "MCJIT",
- srcs = glob([
- "lib/ExecutionEngine/MCJIT/*.c",
- "lib/ExecutionEngine/MCJIT/*.cpp",
- "lib/ExecutionEngine/MCJIT/*.inc",
- "lib/ExecutionEngine/MCJIT/*.h",
- ]),
- hdrs = glob([
- "include/llvm/ExecutionEngine/MCJIT/*.h",
- "include/llvm/ExecutionEngine/MCJIT/*.def",
- "include/llvm/ExecutionEngine/MCJIT/*.inc",
- ]),
- copts = llvm_copts,
- deps = [
- ":Core",
- ":ExecutionEngine",
- ":Object",
- ":RuntimeDyld",
- ":Support",
- ":Target",
- ":config",
- ],
-)
-
-cc_library(
- name = "MCParser",
- srcs = glob([
- "lib/MC/MCParser/*.c",
- "lib/MC/MCParser/*.cpp",
- "lib/MC/MCParser/*.inc",
- "lib/MC/MCParser/*.h",
- ]),
- hdrs = glob([
- "include/llvm/MC/MCParser/*.h",
- "include/llvm/MC/MCParser/*.def",
- "include/llvm/MC/MCParser/*.inc",
- ]),
- copts = llvm_copts,
- deps = [
- ":MC",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "MIRParser",
- srcs = glob([
- "lib/CodeGen/MIRParser/*.c",
- "lib/CodeGen/MIRParser/*.cpp",
- "lib/CodeGen/MIRParser/*.inc",
- "lib/CodeGen/MIRParser/*.h",
- ]),
- hdrs = glob([
- "include/llvm/CodeGen/MIRParser/*.h",
- "include/llvm/CodeGen/MIRParser/*.def",
- "include/llvm/CodeGen/MIRParser/*.inc",
- ]),
- copts = llvm_copts,
- deps = [
- ":AsmParser",
- ":BinaryFormat",
- ":CodeGen",
- ":Core",
- ":MC",
- ":Support",
- ":Target",
- ":config",
- ],
-)
-
-cc_library(
- name = "MSP430AsmParser",
- srcs = glob([
- "lib/Target/MSP430/AsmParser/*.c",
- "lib/Target/MSP430/AsmParser/*.cpp",
- "lib/Target/MSP430/AsmParser/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/MSP430/AsmParser/*.h",
- "include/llvm/Target/MSP430/AsmParser/*.def",
- "include/llvm/Target/MSP430/AsmParser/*.inc",
- "lib/Target/MSP430/AsmParser/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/MSP430"],
- deps = [
- ":MC",
- ":MCParser",
- ":MSP430Desc",
- ":MSP430Info",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "MSP430CodeGen",
- srcs = glob([
- "lib/Target/MSP430/*.c",
- "lib/Target/MSP430/*.cpp",
- "lib/Target/MSP430/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/MSP430/*.h",
- "include/llvm/Target/MSP430/*.def",
- "include/llvm/Target/MSP430/*.inc",
- "lib/Target/MSP430/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/MSP430"],
- deps = [
- ":AsmPrinter",
- ":CodeGen",
- ":Core",
- ":MC",
- ":MSP430Desc",
- ":MSP430Info",
- ":SelectionDAG",
- ":Support",
- ":Target",
- ":config",
- ],
-)
-
-cc_library(
- name = "MSP430Desc",
- srcs = glob([
- "lib/Target/MSP430/MCTargetDesc/*.c",
- "lib/Target/MSP430/MCTargetDesc/*.cpp",
- "lib/Target/MSP430/MCTargetDesc/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/MSP430/MCTargetDesc/*.h",
- "include/llvm/Target/MSP430/MCTargetDesc/*.def",
- "include/llvm/Target/MSP430/MCTargetDesc/*.inc",
- "lib/Target/MSP430/MCTargetDesc/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/MSP430"],
- deps = [
- ":MC",
- ":MSP430Info",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "MSP430Disassembler",
- srcs = glob([
- "lib/Target/MSP430/Disassembler/*.c",
- "lib/Target/MSP430/Disassembler/*.cpp",
- "lib/Target/MSP430/Disassembler/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/MSP430/Disassembler/*.h",
- "include/llvm/Target/MSP430/Disassembler/*.def",
- "include/llvm/Target/MSP430/Disassembler/*.inc",
- "lib/Target/MSP430/Disassembler/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/MSP430"],
- deps = [
- ":MCDisassembler",
- ":MSP430Info",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "MSP430Info",
- srcs = glob([
- "lib/Target/MSP430/TargetInfo/*.c",
- "lib/Target/MSP430/TargetInfo/*.cpp",
- "lib/Target/MSP430/TargetInfo/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/MSP430/TargetInfo/*.h",
- "include/llvm/Target/MSP430/TargetInfo/*.def",
- "include/llvm/Target/MSP430/TargetInfo/*.inc",
- "lib/Target/MSP430/TargetInfo/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/MSP430"],
- deps = [
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "MipsAsmParser",
- srcs = glob([
- "lib/Target/Mips/AsmParser/*.c",
- "lib/Target/Mips/AsmParser/*.cpp",
- "lib/Target/Mips/AsmParser/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/Mips/AsmParser/*.h",
- "include/llvm/Target/Mips/AsmParser/*.def",
- "include/llvm/Target/Mips/AsmParser/*.inc",
- "lib/Target/Mips/AsmParser/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/Mips"],
- deps = [
- ":MC",
- ":MCParser",
- ":MipsDesc",
- ":MipsInfo",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "MipsCodeGen",
- srcs = glob([
- "lib/Target/Mips/*.c",
- "lib/Target/Mips/*.cpp",
- "lib/Target/Mips/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/Mips/*.h",
- "include/llvm/Target/Mips/*.def",
- "include/llvm/Target/Mips/*.inc",
- "lib/Target/Mips/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/Mips"],
- deps = [
- ":Analysis",
- ":AsmPrinter",
- ":CodeGen",
- ":Core",
- ":GlobalISel",
- ":MC",
- ":MipsDesc",
- ":MipsInfo",
- ":SelectionDAG",
- ":Support",
- ":Target",
- ":config",
- ],
-)
-
-cc_library(
- name = "MipsDesc",
- srcs = glob([
- "lib/Target/Mips/MCTargetDesc/*.c",
- "lib/Target/Mips/MCTargetDesc/*.cpp",
- "lib/Target/Mips/MCTargetDesc/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/Mips/MCTargetDesc/*.h",
- "include/llvm/Target/Mips/MCTargetDesc/*.def",
- "include/llvm/Target/Mips/MCTargetDesc/*.inc",
- "lib/Target/Mips/MCTargetDesc/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/Mips"],
- deps = [
- ":MC",
- ":MipsInfo",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "MipsDisassembler",
- srcs = glob([
- "lib/Target/Mips/Disassembler/*.c",
- "lib/Target/Mips/Disassembler/*.cpp",
- "lib/Target/Mips/Disassembler/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/Mips/Disassembler/*.h",
- "include/llvm/Target/Mips/Disassembler/*.def",
- "include/llvm/Target/Mips/Disassembler/*.inc",
- "lib/Target/Mips/Disassembler/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/Mips"],
- deps = [
- ":MCDisassembler",
- ":MipsInfo",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "MipsInfo",
- srcs = glob([
- "lib/Target/Mips/TargetInfo/*.c",
- "lib/Target/Mips/TargetInfo/*.cpp",
- "lib/Target/Mips/TargetInfo/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/Mips/TargetInfo/*.h",
- "include/llvm/Target/Mips/TargetInfo/*.def",
- "include/llvm/Target/Mips/TargetInfo/*.inc",
- "lib/Target/Mips/TargetInfo/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/Mips"],
- deps = [
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "NVPTXCodeGen",
- srcs = glob([
- "lib/Target/NVPTX/*.c",
- "lib/Target/NVPTX/*.cpp",
- "lib/Target/NVPTX/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/NVPTX/*.h",
- "include/llvm/Target/NVPTX/*.def",
- "include/llvm/Target/NVPTX/*.inc",
- "lib/Target/NVPTX/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/NVPTX"],
- deps = [
- ":Analysis",
- ":AsmPrinter",
- ":CodeGen",
- ":Core",
- ":IPO",
- ":MC",
- ":NVPTXDesc",
- ":NVPTXInfo",
- ":Scalar",
- ":SelectionDAG",
- ":Support",
- ":Target",
- ":TransformUtils",
- ":Vectorize",
- ":config",
- ],
-)
-
-cc_library(
- name = "NVPTXDesc",
- srcs = glob([
- "lib/Target/NVPTX/MCTargetDesc/*.c",
- "lib/Target/NVPTX/MCTargetDesc/*.cpp",
- "lib/Target/NVPTX/MCTargetDesc/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/NVPTX/MCTargetDesc/*.h",
- "include/llvm/Target/NVPTX/MCTargetDesc/*.def",
- "include/llvm/Target/NVPTX/MCTargetDesc/*.inc",
- "lib/Target/NVPTX/MCTargetDesc/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/NVPTX"],
- deps = [
- ":MC",
- ":NVPTXCommonTableGen",
- ":NVPTXInfo",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "NVPTXInfo",
- srcs = glob([
- "lib/Target/NVPTX/TargetInfo/*.c",
- "lib/Target/NVPTX/TargetInfo/*.cpp",
- "lib/Target/NVPTX/TargetInfo/*.inc",
- "lib/Target/NVPTX/MCTargetDesc/*.h",
- ]),
- hdrs = glob([
- "include/llvm/Target/NVPTX/TargetInfo/*.h",
- "include/llvm/Target/NVPTX/TargetInfo/*.def",
- "include/llvm/Target/NVPTX/TargetInfo/*.inc",
- "lib/Target/NVPTX/NVPTX.h",
- "lib/Target/NVPTX/TargetInfo/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/NVPTX"],
- deps = [
- ":Core",
- ":NVPTXCommonTableGen",
- ":Support",
- ":Target",
- ":attributes_gen",
- ":config",
- ],
-)
-
-cc_library(
- name = "ObjCARC",
- srcs = glob([
- "lib/Transforms/ObjCARC/*.c",
- "lib/Transforms/ObjCARC/*.cpp",
- "lib/Transforms/ObjCARC/*.inc",
- "include/llvm/Transforms/ObjCARC.h",
- "lib/Transforms/ObjCARC/*.h",
- ]),
- hdrs = glob([
- "include/llvm/Transforms/ObjCARC/*.h",
- "include/llvm/Transforms/ObjCARC/*.def",
- "include/llvm/Transforms/ObjCARC/*.inc",
- ]),
- copts = llvm_copts,
- deps = [
- ":Analysis",
- ":Core",
- ":Support",
- ":TransformUtils",
- ":config",
- ],
-)
-
-cc_library(
- name = "Object",
- srcs = glob([
- "lib/Object/*.c",
- "lib/Object/*.cpp",
- "lib/Object/*.inc",
- "lib/Object/*.h",
- ]),
- hdrs = glob([
- "include/llvm/Object/*.h",
- "include/llvm/Object/*.def",
- "include/llvm/Object/*.inc",
- ]),
- copts = llvm_copts,
- deps = [
- ":BinaryFormat",
- ":BitReader",
- ":Core",
- ":MC",
- ":MCParser",
- ":Support",
- ":TextAPI",
- ":config",
- ],
-)
-
-cc_library(
- name = "ObjectYAML",
- srcs = glob([
- "lib/ObjectYAML/*.c",
- "lib/ObjectYAML/*.cpp",
- "lib/ObjectYAML/*.inc",
- "lib/ObjectYAML/*.h",
- ]),
- hdrs = glob([
- "include/llvm/ObjectYAML/*.h",
- "include/llvm/ObjectYAML/*.def",
- "include/llvm/ObjectYAML/*.inc",
- ]),
- copts = llvm_copts,
- deps = [
- ":BinaryFormat",
- ":DebugInfoCodeView",
- ":MC",
- ":Object",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "Option",
- srcs = glob([
- "lib/Option/*.c",
- "lib/Option/*.cpp",
- "lib/Option/*.inc",
- "lib/Option/*.h",
- ]),
- hdrs = glob([
- "include/llvm/Option/*.h",
- "include/llvm/Option/*.def",
- "include/llvm/Option/*.inc",
- ]),
- copts = llvm_copts,
- deps = [
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "OrcError",
- srcs = glob([
- "lib/ExecutionEngine/OrcError/*.c",
- "lib/ExecutionEngine/OrcError/*.cpp",
- "lib/ExecutionEngine/OrcError/*.inc",
- "lib/ExecutionEngine/OrcError/*.h",
- ]),
- hdrs = glob([
- "include/llvm/ExecutionEngine/OrcError/*.h",
- "include/llvm/ExecutionEngine/OrcError/*.def",
- "include/llvm/ExecutionEngine/OrcError/*.inc",
- ]),
- copts = llvm_copts,
- deps = [
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "OrcJIT",
- srcs = glob([
- "lib/ExecutionEngine/Orc/*.c",
- "lib/ExecutionEngine/Orc/*.cpp",
- "lib/ExecutionEngine/Orc/*.inc",
- "lib/ExecutionEngine/Orc/*.h",
- ]),
- hdrs = glob([
- "include/llvm/ExecutionEngine/Orc/*.h",
- "include/llvm/ExecutionEngine/Orc/*.def",
- "include/llvm/ExecutionEngine/Orc/*.inc",
- ]),
- copts = llvm_copts,
- deps = [
- ":Core",
- ":ExecutionEngine",
- ":JITLink",
- ":MC",
- ":Object",
- ":OrcError",
- ":Passes",
- ":RuntimeDyld",
- ":Support",
- ":Target",
- ":TransformUtils",
- ":config",
- ],
-)
-
-cc_library(
- name = "Passes",
- srcs = glob([
- "lib/Passes/*.c",
- "lib/Passes/*.cpp",
- "lib/Passes/*.inc",
- "lib/Passes/*.h",
- ]),
- hdrs = glob([
- "include/llvm/Passes/*.h",
- "include/llvm/Passes/*.def",
- "include/llvm/Passes/*.inc",
- ]),
- copts = llvm_copts,
- deps = [
- ":AggressiveInstCombine",
- ":Analysis",
- ":CodeGen",
- ":Core",
- ":Coroutines",
- ":HelloNew",
- ":IPO",
- ":InstCombine",
- ":Instrumentation",
- ":ObjCARC",
- ":Scalar",
- ":Support",
- ":Target",
- ":TransformUtils",
- ":Vectorize",
- ":config",
- ],
-)
-
-cc_library(
- name = "PowerPCAsmParser",
- srcs = glob([
- "lib/Target/PowerPC/AsmParser/*.c",
- "lib/Target/PowerPC/AsmParser/*.cpp",
- "lib/Target/PowerPC/AsmParser/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/PowerPC/AsmParser/*.h",
- "include/llvm/Target/PowerPC/AsmParser/*.def",
- "include/llvm/Target/PowerPC/AsmParser/*.inc",
- "lib/Target/PowerPC/AsmParser/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/PowerPC"],
- deps = [
- ":MC",
- ":MCParser",
- ":PowerPCDesc",
- ":PowerPCInfo",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "PowerPCCodeGen",
- srcs = glob([
- "lib/Target/PowerPC/*.c",
- "lib/Target/PowerPC/*.cpp",
- "lib/Target/PowerPC/*.inc",
- "lib/Target/PowerPC/GISel/*.cpp",
- ]),
- hdrs = glob([
- "include/llvm/Target/PowerPC/*.h",
- "include/llvm/Target/PowerPC/*.def",
- "include/llvm/Target/PowerPC/*.inc",
- "lib/Target/PowerPC/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/PowerPC"],
- deps = [
- ":Analysis",
- ":AsmPrinter",
- ":CodeGen",
- ":Core",
- ":GlobalISel",
- ":MC",
- ":PowerPCDesc",
- ":PowerPCInfo",
- ":Scalar",
- ":SelectionDAG",
- ":Support",
- ":Target",
- ":TransformUtils",
- ":config",
- ],
-)
-
-cc_library(
- name = "PowerPCDesc",
- srcs = glob([
- "lib/Target/PowerPC/MCTargetDesc/*.c",
- "lib/Target/PowerPC/MCTargetDesc/*.cpp",
- "lib/Target/PowerPC/MCTargetDesc/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/PowerPC/MCTargetDesc/*.h",
- "include/llvm/Target/PowerPC/MCTargetDesc/*.def",
- "include/llvm/Target/PowerPC/MCTargetDesc/*.inc",
- "lib/Target/PowerPC/MCTargetDesc/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/PowerPC"],
- deps = [
- ":BinaryFormat",
- ":MC",
- ":PowerPCCommonTableGen",
- ":PowerPCInfo",
- ":Support",
- ":attributes_gen",
- ":config",
- ":intrinsic_enums_gen",
- ":intrinsics_impl_gen",
- ],
-)
-
-cc_library(
- name = "PowerPCDisassembler",
- srcs = glob([
- "lib/Target/PowerPC/Disassembler/*.c",
- "lib/Target/PowerPC/Disassembler/*.cpp",
- "lib/Target/PowerPC/Disassembler/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/PowerPC/Disassembler/*.h",
- "include/llvm/Target/PowerPC/Disassembler/*.def",
- "include/llvm/Target/PowerPC/Disassembler/*.inc",
- "lib/Target/PowerPC/Disassembler/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/PowerPC"],
- deps = [
- ":MCDisassembler",
- ":PowerPCInfo",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "PowerPCInfo",
- srcs = glob([
- "lib/Target/PowerPC/TargetInfo/*.c",
- "lib/Target/PowerPC/TargetInfo/*.cpp",
- "lib/Target/PowerPC/TargetInfo/*.inc",
- "lib/Target/PowerPC/MCTargetDesc/*.h",
- ]),
- hdrs = glob([
- "include/llvm/Target/PowerPC/TargetInfo/*.h",
- "include/llvm/Target/PowerPC/TargetInfo/*.def",
- "include/llvm/Target/PowerPC/TargetInfo/*.inc",
- "lib/Target/PowerPC/PPC*.h",
- "lib/Target/PowerPC/TargetInfo/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/PowerPC"],
- deps = [
- ":Core",
- ":PowerPCCommonTableGen",
- ":Support",
- ":Target",
- ":attributes_gen",
- ":config",
- ],
-)
-
-cc_library(
- name = "ProfileData",
- srcs = glob([
- "lib/ProfileData/*.c",
- "lib/ProfileData/*.cpp",
- "lib/ProfileData/*.inc",
- "lib/ProfileData/*.h",
- ]),
- hdrs = glob([
- "include/llvm/ProfileData/*.h",
- "include/llvm/ProfileData/*.def",
- "include/llvm/ProfileData/*.inc",
- ]),
- copts = llvm_copts,
- deps = [
- ":Core",
- ":Demangle",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "RISCVAsmParser",
- srcs = glob([
- "lib/Target/RISCV/AsmParser/*.c",
- "lib/Target/RISCV/AsmParser/*.cpp",
- "lib/Target/RISCV/AsmParser/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/RISCV/AsmParser/*.h",
- "include/llvm/Target/RISCV/AsmParser/*.def",
- "include/llvm/Target/RISCV/AsmParser/*.inc",
- "lib/Target/RISCV/AsmParser/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/RISCV"],
- deps = [
- ":MC",
- ":MCParser",
- ":RISCVDesc",
- ":RISCVInfo",
- ":RISCVUtils",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "RISCVCodeGen",
- srcs = glob([
- "lib/Target/RISCV/*.c",
- "lib/Target/RISCV/*.cpp",
- "lib/Target/RISCV/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/RISCV/*.h",
- "include/llvm/Target/RISCV/*.def",
- "include/llvm/Target/RISCV/*.inc",
- "lib/Target/RISCV/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/RISCV"],
- deps = [
- ":Analysis",
- ":AsmPrinter",
- ":CodeGen",
- ":Core",
- ":GlobalISel",
- ":MC",
- ":RISCVDesc",
- ":RISCVInfo",
- ":RISCVUtils",
- ":SelectionDAG",
- ":Support",
- ":Target",
- ":config",
- ],
-)
-
-cc_library(
- name = "RISCVDesc",
- srcs = glob([
- "lib/Target/RISCV/MCTargetDesc/*.c",
- "lib/Target/RISCV/MCTargetDesc/*.cpp",
- "lib/Target/RISCV/MCTargetDesc/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/RISCV/MCTargetDesc/*.h",
- "include/llvm/Target/RISCV/MCTargetDesc/*.def",
- "include/llvm/Target/RISCV/MCTargetDesc/*.inc",
- "lib/Target/RISCV/MCTargetDesc/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/RISCV"],
- deps = [
- ":MC",
- ":RISCVInfo",
- ":RISCVUtils",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "RISCVDisassembler",
- srcs = glob([
- "lib/Target/RISCV/Disassembler/*.c",
- "lib/Target/RISCV/Disassembler/*.cpp",
- "lib/Target/RISCV/Disassembler/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/RISCV/Disassembler/*.h",
- "include/llvm/Target/RISCV/Disassembler/*.def",
- "include/llvm/Target/RISCV/Disassembler/*.inc",
- "lib/Target/RISCV/Disassembler/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/RISCV"],
- deps = [
- ":MCDisassembler",
- ":RISCVInfo",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "RISCVInfo",
- srcs = glob([
- "lib/Target/RISCV/TargetInfo/*.c",
- "lib/Target/RISCV/TargetInfo/*.cpp",
- "lib/Target/RISCV/TargetInfo/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/RISCV/TargetInfo/*.h",
- "include/llvm/Target/RISCV/TargetInfo/*.def",
- "include/llvm/Target/RISCV/TargetInfo/*.inc",
- "lib/Target/RISCV/TargetInfo/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/RISCV"],
- deps = [
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "RISCVUtils",
- srcs = glob([
- "lib/Target/RISCV/Utils/*.c",
- "lib/Target/RISCV/Utils/*.cpp",
- "lib/Target/RISCV/Utils/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/RISCV/Utils/*.h",
- "include/llvm/Target/RISCV/Utils/*.def",
- "include/llvm/Target/RISCV/Utils/*.inc",
- "lib/Target/RISCV/Utils/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/RISCV"],
- deps = [
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "Remarks",
- srcs = glob([
- "lib/Remarks/*.c",
- "lib/Remarks/*.cpp",
- "lib/Remarks/*.inc",
- "lib/Remarks/*.h",
- ]),
- hdrs = glob([
- "include/llvm/Remarks/*.h",
- "include/llvm/Remarks/*.def",
- "include/llvm/Remarks/*.inc",
- ]),
- copts = llvm_copts,
- deps = [
- ":BitstreamReader",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "RuntimeDyld",
- srcs = glob([
- "lib/ExecutionEngine/RuntimeDyld/*.c",
- "lib/ExecutionEngine/RuntimeDyld/*.cpp",
- "lib/ExecutionEngine/RuntimeDyld/*.inc",
- "include/llvm/ExecutionEngine/JITSymbol.h",
- "include/llvm/ExecutionEngine/RTDyldMemoryManager.h",
- "lib/ExecutionEngine/RuntimeDyld/*.h",
- "lib/ExecutionEngine/RuntimeDyld/Targets/*.h",
- "lib/ExecutionEngine/RuntimeDyld/Targets/*.cpp",
- "lib/ExecutionEngine/RuntimeDyld/*.h",
- ]),
- hdrs = glob([
- "include/llvm/ExecutionEngine/RuntimeDyld/*.h",
- "include/llvm/ExecutionEngine/RuntimeDyld/*.def",
- "include/llvm/ExecutionEngine/RuntimeDyld/*.inc",
- "include/llvm/DebugInfo/DIContext.h",
- "include/llvm/ExecutionEngine/RTDyldMemoryManager.h",
- "include/llvm/ExecutionEngine/RuntimeDyld*.h",
- ]),
- copts = llvm_copts,
- deps = [
- ":Core",
- ":MC",
- ":MCDisassembler",
- ":Object",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "Scalar",
- srcs = glob([
- "lib/Transforms/Scalar/*.c",
- "lib/Transforms/Scalar/*.cpp",
- "lib/Transforms/Scalar/*.inc",
- "include/llvm-c/Transforms/Scalar.h",
- "include/llvm/Transforms/Scalar.h",
- "include/llvm/Target/TargetMachine.h",
- "lib/Transforms/Scalar/*.h",
- ]),
- hdrs = glob([
- "include/llvm/Transforms/Scalar/*.h",
- "include/llvm/Transforms/Scalar/*.def",
- "include/llvm/Transforms/Scalar/*.inc",
- "include/llvm/Transforms/IPO.h",
- "include/llvm/Transforms/IPO/SCCP.h",
- ]),
- copts = llvm_copts,
- deps = [
- ":AggressiveInstCombine",
- ":Analysis",
- ":Core",
- ":InstCombine",
- ":Support",
- ":Target",
- ":TransformUtils",
- ":config",
- ],
-)
-
-cc_library(
- name = "SelectionDAG",
- srcs = glob([
- "lib/CodeGen/SelectionDAG/*.c",
- "lib/CodeGen/SelectionDAG/*.cpp",
- "lib/CodeGen/SelectionDAG/*.inc",
- "lib/CodeGen/SelectionDAG/*.h",
- ]),
- hdrs = glob([
- "include/llvm/CodeGen/SelectionDAG/*.h",
- "include/llvm/CodeGen/SelectionDAG/*.def",
- "include/llvm/CodeGen/SelectionDAG/*.inc",
- ]),
- copts = llvm_copts,
- deps = [
- ":Analysis",
- ":CodeGen",
- ":Core",
- ":MC",
- ":Support",
- ":Target",
- ":TransformUtils",
- ":config",
- ],
-)
-
-cc_library(
- name = "SparcAsmParser",
- srcs = glob([
- "lib/Target/Sparc/AsmParser/*.c",
- "lib/Target/Sparc/AsmParser/*.cpp",
- "lib/Target/Sparc/AsmParser/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/Sparc/AsmParser/*.h",
- "include/llvm/Target/Sparc/AsmParser/*.def",
- "include/llvm/Target/Sparc/AsmParser/*.inc",
- "lib/Target/Sparc/AsmParser/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/Sparc"],
- deps = [
- ":MC",
- ":MCParser",
- ":SparcDesc",
- ":SparcInfo",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "SparcCodeGen",
- srcs = glob([
- "lib/Target/Sparc/*.c",
- "lib/Target/Sparc/*.cpp",
- "lib/Target/Sparc/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/Sparc/*.h",
- "include/llvm/Target/Sparc/*.def",
- "include/llvm/Target/Sparc/*.inc",
- "lib/Target/Sparc/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/Sparc"],
- deps = [
- ":AsmPrinter",
- ":CodeGen",
- ":Core",
- ":MC",
- ":SelectionDAG",
- ":SparcDesc",
- ":SparcInfo",
- ":Support",
- ":Target",
- ":config",
- ],
-)
-
-cc_library(
- name = "SparcDesc",
- srcs = glob([
- "lib/Target/Sparc/MCTargetDesc/*.c",
- "lib/Target/Sparc/MCTargetDesc/*.cpp",
- "lib/Target/Sparc/MCTargetDesc/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/Sparc/MCTargetDesc/*.h",
- "include/llvm/Target/Sparc/MCTargetDesc/*.def",
- "include/llvm/Target/Sparc/MCTargetDesc/*.inc",
- "lib/Target/Sparc/MCTargetDesc/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/Sparc"],
- deps = [
- ":MC",
- ":SparcInfo",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "SparcDisassembler",
- srcs = glob([
- "lib/Target/Sparc/Disassembler/*.c",
- "lib/Target/Sparc/Disassembler/*.cpp",
- "lib/Target/Sparc/Disassembler/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/Sparc/Disassembler/*.h",
- "include/llvm/Target/Sparc/Disassembler/*.def",
- "include/llvm/Target/Sparc/Disassembler/*.inc",
- "lib/Target/Sparc/Disassembler/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/Sparc"],
- deps = [
- ":MCDisassembler",
- ":SparcInfo",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "SparcInfo",
- srcs = glob([
- "lib/Target/Sparc/TargetInfo/*.c",
- "lib/Target/Sparc/TargetInfo/*.cpp",
- "lib/Target/Sparc/TargetInfo/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/Sparc/TargetInfo/*.h",
- "include/llvm/Target/Sparc/TargetInfo/*.def",
- "include/llvm/Target/Sparc/TargetInfo/*.inc",
- "lib/Target/Sparc/TargetInfo/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/Sparc"],
- deps = [
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "Support",
- srcs = glob([
- "lib/Support/*.c",
- "lib/Support/*.cpp",
- "lib/Support/*.inc",
- "include/llvm-c/*.h",
- "include/llvm/CodeGen/MachineValueType.h",
- "include/llvm/BinaryFormat/COFF.h",
- "include/llvm/BinaryFormat/MachO.h",
- "lib/Support/*.h",
- ]) + llvm_support_platform_specific_srcs_glob(),
- hdrs = glob([
- "include/llvm/Support/*.h",
- "include/llvm/Support/*.def",
- "include/llvm/Support/*.inc",
- "include/llvm/ADT/*.h",
- "include/llvm/Support/ELFRelocs/*.def",
- "include/llvm/Support/WasmRelocs/*.def",
- ]) + [
- "include/llvm/BinaryFormat/MachO.def",
- "include/llvm/Support/VCSRevision.h",
- ],
- copts = llvm_copts,
- deps = [
- ":Demangle",
- ":config",
- "@zlib",
- ],
-)
-
-cc_library(
- name = "Symbolize",
- srcs = glob([
- "lib/DebugInfo/Symbolize/*.c",
- "lib/DebugInfo/Symbolize/*.cpp",
- "lib/DebugInfo/Symbolize/*.inc",
- "lib/DebugInfo/Symbolize/*.h",
- ]),
- hdrs = glob([
- "include/llvm/DebugInfo/Symbolize/*.h",
- "include/llvm/DebugInfo/Symbolize/*.def",
- "include/llvm/DebugInfo/Symbolize/*.inc",
- ]),
- copts = llvm_copts,
- deps = [
- ":DebugInfoDWARF",
- ":DebugInfoPDB",
- ":Demangle",
- ":Object",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "SystemZAsmParser",
- srcs = glob([
- "lib/Target/SystemZ/AsmParser/*.c",
- "lib/Target/SystemZ/AsmParser/*.cpp",
- "lib/Target/SystemZ/AsmParser/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/SystemZ/AsmParser/*.h",
- "include/llvm/Target/SystemZ/AsmParser/*.def",
- "include/llvm/Target/SystemZ/AsmParser/*.inc",
- "lib/Target/SystemZ/AsmParser/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/SystemZ"],
- deps = [
- ":MC",
- ":MCParser",
- ":Support",
- ":SystemZDesc",
- ":SystemZInfo",
- ":config",
- ],
-)
-
-cc_library(
- name = "SystemZCodeGen",
- srcs = glob([
- "lib/Target/SystemZ/*.c",
- "lib/Target/SystemZ/*.cpp",
- "lib/Target/SystemZ/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/SystemZ/*.h",
- "include/llvm/Target/SystemZ/*.def",
- "include/llvm/Target/SystemZ/*.inc",
- "lib/Target/SystemZ/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/SystemZ"],
- deps = [
- ":Analysis",
- ":AsmPrinter",
- ":CodeGen",
- ":Core",
- ":MC",
- ":Scalar",
- ":SelectionDAG",
- ":Support",
- ":SystemZDesc",
- ":SystemZInfo",
- ":Target",
- ":config",
- ],
-)
-
-cc_library(
- name = "SystemZDesc",
- srcs = glob([
- "lib/Target/SystemZ/MCTargetDesc/*.c",
- "lib/Target/SystemZ/MCTargetDesc/*.cpp",
- "lib/Target/SystemZ/MCTargetDesc/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/SystemZ/MCTargetDesc/*.h",
- "include/llvm/Target/SystemZ/MCTargetDesc/*.def",
- "include/llvm/Target/SystemZ/MCTargetDesc/*.inc",
- "lib/Target/SystemZ/MCTargetDesc/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/SystemZ"],
- deps = [
- ":MC",
- ":Support",
- ":SystemZCommonTableGen",
- ":SystemZInfo",
- ":config",
- ],
-)
-
-cc_library(
- name = "SystemZDisassembler",
- srcs = glob([
- "lib/Target/SystemZ/Disassembler/*.c",
- "lib/Target/SystemZ/Disassembler/*.cpp",
- "lib/Target/SystemZ/Disassembler/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/SystemZ/Disassembler/*.h",
- "include/llvm/Target/SystemZ/Disassembler/*.def",
- "include/llvm/Target/SystemZ/Disassembler/*.inc",
- "lib/Target/SystemZ/Disassembler/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/SystemZ"],
- deps = [
- ":MC",
- ":MCDisassembler",
- ":Support",
- ":SystemZDesc",
- ":SystemZInfo",
- ":config",
- ],
-)
-
-cc_library(
- name = "SystemZInfo",
- srcs = glob([
- "lib/Target/SystemZ/TargetInfo/*.c",
- "lib/Target/SystemZ/TargetInfo/*.cpp",
- "lib/Target/SystemZ/TargetInfo/*.inc",
- "lib/Target/SystemZ/MCTargetDesc/*.h",
- ]),
- hdrs = glob([
- "include/llvm/Target/SystemZ/TargetInfo/*.h",
- "include/llvm/Target/SystemZ/TargetInfo/*.def",
- "include/llvm/Target/SystemZ/TargetInfo/*.inc",
- "lib/Target/SystemZ/TargetInfo/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/SystemZ"],
- deps = [
- ":Support",
- ":SystemZCommonTableGen",
- ":config",
- ],
-)
-
-cc_library(
- name = "TableGen",
- srcs = glob([
- "lib/TableGen/*.c",
- "lib/TableGen/*.cpp",
- "lib/TableGen/*.inc",
- "include/llvm/CodeGen/*.h",
- "lib/TableGen/*.h",
- ]),
- hdrs = glob([
- "include/llvm/TableGen/*.h",
- "include/llvm/TableGen/*.def",
- "include/llvm/TableGen/*.inc",
- "include/llvm/Target/*.def",
- ]),
- copts = llvm_copts,
- deps = [
- ":MC",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "Target",
- srcs = glob([
- "lib/Target/*.c",
- "lib/Target/*.cpp",
- "lib/Target/*.inc",
- "include/llvm/CodeGen/*.h",
- "include/llvm-c/Initialization.h",
- "include/llvm-c/Target.h",
- "lib/Target/*.h",
- ]),
- hdrs = glob([
- "include/llvm/Target/*.h",
- "include/llvm/Target/*.def",
- "include/llvm/Target/*.inc",
- "include/llvm/CodeGen/*.def",
- "include/llvm/CodeGen/*.inc",
- ]),
- copts = llvm_copts,
- deps = [
- ":Analysis",
- ":Core",
- ":MC",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "TestingSupport",
- srcs = glob([
- "lib/Testing/Support/*.c",
- "lib/Testing/Support/*.cpp",
- "lib/Testing/Support/*.inc",
- "lib/Testing/Support/*.h",
- ]),
- hdrs = glob([
- "include/llvm/Testing/Support/*.h",
- "include/llvm/Testing/Support/*.def",
- "include/llvm/Testing/Support/*.inc",
- ]),
- copts = llvm_copts,
- deps = [
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "TextAPI",
- srcs = glob([
- "lib/TextAPI/*.c",
- "lib/TextAPI/*.cpp",
- "lib/TextAPI/*.inc",
- "lib/TextAPI/ELF/*.cpp",
- "lib/TextAPI/MachO/*.cpp",
- "lib/TextAPI/MachO/*.h",
- "lib/TextAPI/*.h",
- ]),
- hdrs = glob([
- "include/llvm/TextAPI/*.h",
- "include/llvm/TextAPI/*.def",
- "include/llvm/TextAPI/*.inc",
- ]) + [
- "include/llvm/TextAPI/MachO/Architecture.def",
- "include/llvm/TextAPI/MachO/PackedVersion.h",
- "include/llvm/TextAPI/MachO/InterfaceFile.h",
- "include/llvm/TextAPI/MachO/Symbol.h",
- "include/llvm/TextAPI/MachO/ArchitectureSet.h",
- "include/llvm/TextAPI/MachO/TextAPIWriter.h",
- "include/llvm/TextAPI/MachO/TextAPIReader.h",
- "include/llvm/TextAPI/MachO/Architecture.h",
- ],
- copts = llvm_copts,
- deps = [
- ":BinaryFormat",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "TransformUtils",
- srcs = glob([
- "lib/Transforms/Utils/*.c",
- "lib/Transforms/Utils/*.cpp",
- "lib/Transforms/Utils/*.inc",
- "include/llvm/Transforms/IPO.h",
- "include/llvm/Transforms/Scalar.h",
- "lib/Transforms/Utils/*.h",
- ]),
- hdrs = glob([
- "include/llvm/Transforms/Utils/*.h",
- "include/llvm/Transforms/Utils/*.def",
- "include/llvm/Transforms/Utils/*.inc",
- ]),
- copts = llvm_copts,
- deps = [
- ":Analysis",
- ":Core",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "VEAsmParser",
- srcs = glob([
- "lib/Target/VE/AsmParser/*.c",
- "lib/Target/VE/AsmParser/*.cpp",
- "lib/Target/VE/AsmParser/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/VE/AsmParser/*.h",
- "include/llvm/Target/VE/AsmParser/*.def",
- "include/llvm/Target/VE/AsmParser/*.inc",
- "lib/Target/VE/AsmParser/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/VE"],
- deps = [
- ":MC",
- ":MCParser",
- ":Support",
- ":VEDesc",
- ":VEInfo",
- ":config",
- ],
-)
-
-cc_library(
- name = "VECodeGen",
- srcs = glob([
- "lib/Target/VE/*.c",
- "lib/Target/VE/*.cpp",
- "lib/Target/VE/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/VE/*.h",
- "include/llvm/Target/VE/*.def",
- "include/llvm/Target/VE/*.inc",
- "lib/Target/VE/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/VE"],
- deps = [
- ":Analysis",
- ":AsmPrinter",
- ":CodeGen",
- ":Core",
- ":MC",
- ":SelectionDAG",
- ":Support",
- ":Target",
- ":VEDesc",
- ":VEInfo",
- ":config",
- ],
-)
-
-cc_library(
- name = "VEDesc",
- srcs = glob([
- "lib/Target/VE/MCTargetDesc/*.c",
- "lib/Target/VE/MCTargetDesc/*.cpp",
- "lib/Target/VE/MCTargetDesc/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/VE/MCTargetDesc/*.h",
- "include/llvm/Target/VE/MCTargetDesc/*.def",
- "include/llvm/Target/VE/MCTargetDesc/*.inc",
- "lib/Target/VE/MCTargetDesc/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/VE"],
- deps = [
- ":MC",
- ":Support",
- ":VEInfo",
- ":config",
- ],
-)
-
-cc_library(
- name = "VEDisassembler",
- srcs = glob([
- "lib/Target/VE/Disassembler/*.c",
- "lib/Target/VE/Disassembler/*.cpp",
- "lib/Target/VE/Disassembler/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/VE/Disassembler/*.h",
- "include/llvm/Target/VE/Disassembler/*.def",
- "include/llvm/Target/VE/Disassembler/*.inc",
- "lib/Target/VE/Disassembler/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/VE"],
- deps = [
- ":MCDisassembler",
- ":Support",
- ":VEInfo",
- ":config",
- ],
-)
-
-cc_library(
- name = "VEInfo",
- srcs = glob([
- "lib/Target/VE/TargetInfo/*.c",
- "lib/Target/VE/TargetInfo/*.cpp",
- "lib/Target/VE/TargetInfo/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/VE/TargetInfo/*.h",
- "include/llvm/Target/VE/TargetInfo/*.def",
- "include/llvm/Target/VE/TargetInfo/*.inc",
- "lib/Target/VE/TargetInfo/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/VE"],
- deps = [
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "Vectorize",
- srcs = glob([
- "lib/Transforms/Vectorize/*.c",
- "lib/Transforms/Vectorize/*.cpp",
- "lib/Transforms/Vectorize/*.inc",
- "include/llvm-c/Transforms/Vectorize.h",
- "lib/Transforms/Vectorize/*.h",
- ]),
- hdrs = glob([
- "include/llvm/Transforms/Vectorize/*.h",
- "include/llvm/Transforms/Vectorize/*.def",
- "include/llvm/Transforms/Vectorize/*.inc",
- "include/llvm/Transforms/Vectorize.h",
- ]),
- copts = llvm_copts,
- deps = [
- ":Analysis",
- ":Core",
- ":Scalar",
- ":Support",
- ":TransformUtils",
- ":config",
- ],
-)
-
-cc_library(
- name = "WebAssemblyAsmParser",
- srcs = glob([
- "lib/Target/WebAssembly/AsmParser/*.c",
- "lib/Target/WebAssembly/AsmParser/*.cpp",
- "lib/Target/WebAssembly/AsmParser/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/WebAssembly/AsmParser/*.h",
- "include/llvm/Target/WebAssembly/AsmParser/*.def",
- "include/llvm/Target/WebAssembly/AsmParser/*.inc",
- "lib/Target/WebAssembly/AsmParser/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/WebAssembly"],
- deps = [
- ":MC",
- ":MCParser",
- ":Support",
- ":WebAssemblyInfo",
- ":config",
- ],
-)
-
-cc_library(
- name = "WebAssemblyCodeGen",
- srcs = glob([
- "lib/Target/WebAssembly/*.c",
- "lib/Target/WebAssembly/*.cpp",
- "lib/Target/WebAssembly/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/WebAssembly/*.h",
- "include/llvm/Target/WebAssembly/*.def",
- "include/llvm/Target/WebAssembly/*.inc",
- "lib/Target/WebAssembly/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/WebAssembly"],
- deps = [
- ":Analysis",
- ":AsmPrinter",
- ":BinaryFormat",
- ":CodeGen",
- ":Core",
- ":MC",
- ":Scalar",
- ":SelectionDAG",
- ":Support",
- ":Target",
- ":TransformUtils",
- ":WebAssemblyDesc",
- ":WebAssemblyInfo",
- ":config",
- ],
-)
-
-cc_library(
- name = "WebAssemblyDesc",
- srcs = glob([
- "lib/Target/WebAssembly/MCTargetDesc/*.c",
- "lib/Target/WebAssembly/MCTargetDesc/*.cpp",
- "lib/Target/WebAssembly/MCTargetDesc/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/WebAssembly/MCTargetDesc/*.h",
- "include/llvm/Target/WebAssembly/MCTargetDesc/*.def",
- "include/llvm/Target/WebAssembly/MCTargetDesc/*.inc",
- "lib/Target/WebAssembly/MCTargetDesc/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/WebAssembly"],
- deps = [
- ":MC",
- ":Support",
- ":WebAssemblyInfo",
- ":config",
- ],
-)
-
-cc_library(
- name = "WebAssemblyDisassembler",
- srcs = glob([
- "lib/Target/WebAssembly/Disassembler/*.c",
- "lib/Target/WebAssembly/Disassembler/*.cpp",
- "lib/Target/WebAssembly/Disassembler/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/WebAssembly/Disassembler/*.h",
- "include/llvm/Target/WebAssembly/Disassembler/*.def",
- "include/llvm/Target/WebAssembly/Disassembler/*.inc",
- "lib/Target/WebAssembly/Disassembler/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/WebAssembly"],
- deps = [
- ":MC",
- ":MCDisassembler",
- ":Support",
- ":WebAssemblyDesc",
- ":WebAssemblyInfo",
- ":config",
- ],
-)
-
-cc_library(
- name = "WebAssemblyInfo",
- srcs = glob([
- "lib/Target/WebAssembly/TargetInfo/*.c",
- "lib/Target/WebAssembly/TargetInfo/*.cpp",
- "lib/Target/WebAssembly/TargetInfo/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/WebAssembly/TargetInfo/*.h",
- "include/llvm/Target/WebAssembly/TargetInfo/*.def",
- "include/llvm/Target/WebAssembly/TargetInfo/*.inc",
- "lib/Target/WebAssembly/TargetInfo/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/WebAssembly"],
- deps = [
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "WindowsManifest",
- srcs = glob([
- "lib/WindowsManifest/*.c",
- "lib/WindowsManifest/*.cpp",
- "lib/WindowsManifest/*.inc",
- "lib/WindowsManifest/*.h",
- ]),
- hdrs = glob([
- "include/llvm/WindowsManifest/*.h",
- "include/llvm/WindowsManifest/*.def",
- "include/llvm/WindowsManifest/*.inc",
- ]),
- copts = llvm_copts,
- deps = [
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "X86AsmParser",
- srcs = glob([
- "lib/Target/X86/AsmParser/*.c",
- "lib/Target/X86/AsmParser/*.cpp",
- "lib/Target/X86/AsmParser/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/X86/AsmParser/*.h",
- "include/llvm/Target/X86/AsmParser/*.def",
- "include/llvm/Target/X86/AsmParser/*.inc",
- "lib/Target/X86/AsmParser/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/X86"],
- deps = [
- ":MC",
- ":MCParser",
- ":Support",
- ":X86Desc",
- ":X86Info",
- ":config",
- ],
-)
-
-cc_library(
- name = "X86CodeGen",
- srcs = glob([
- "lib/Target/X86/*.c",
- "lib/Target/X86/*.cpp",
- "lib/Target/X86/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/X86/*.h",
- "include/llvm/Target/X86/*.def",
- "include/llvm/Target/X86/*.inc",
- "lib/Target/X86/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/X86"],
- deps = [
- ":Analysis",
- ":AsmPrinter",
- ":CFGuard",
- ":CodeGen",
- ":Core",
- ":GlobalISel",
- ":MC",
- ":ProfileData",
- ":SelectionDAG",
- ":Support",
- ":Target",
- ":X86Desc",
- ":X86Info",
- ":config",
- ":x86_defs",
- ],
-)
-
-cc_library(
- name = "X86Desc",
- srcs = glob([
- "lib/Target/X86/MCTargetDesc/*.c",
- "lib/Target/X86/MCTargetDesc/*.cpp",
- "lib/Target/X86/MCTargetDesc/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/X86/MCTargetDesc/*.h",
- "include/llvm/Target/X86/MCTargetDesc/*.def",
- "include/llvm/Target/X86/MCTargetDesc/*.inc",
- "lib/Target/X86/MCTargetDesc/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/X86"],
- deps = [
- ":BinaryFormat",
- ":MC",
- ":MCDisassembler",
- ":Support",
- ":X86Info",
- ":config",
- ],
-)
-
-cc_library(
- name = "X86Disassembler",
- srcs = glob([
- "lib/Target/X86/Disassembler/*.c",
- "lib/Target/X86/Disassembler/*.cpp",
- "lib/Target/X86/Disassembler/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/X86/Disassembler/*.h",
- "include/llvm/Target/X86/Disassembler/*.def",
- "include/llvm/Target/X86/Disassembler/*.inc",
- "lib/Target/X86/Disassembler/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/X86"],
- deps = [
- ":MCDisassembler",
- ":Support",
- ":X86Info",
- ":config",
- ],
-)
-
-cc_library(
- name = "X86Info",
- srcs = glob([
- "lib/Target/X86/TargetInfo/*.c",
- "lib/Target/X86/TargetInfo/*.cpp",
- "lib/Target/X86/TargetInfo/*.inc",
- "lib/Target/X86/MCTargetDesc/*.h",
- ]),
- hdrs = glob([
- "include/llvm/Target/X86/TargetInfo/*.h",
- "include/llvm/Target/X86/TargetInfo/*.def",
- "include/llvm/Target/X86/TargetInfo/*.inc",
- "lib/Target/X86/TargetInfo/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/X86"],
- deps = [
- ":MC",
- ":Support",
- ":X86CommonTableGen",
- ":config",
- ],
-)
-
-cc_library(
- name = "XCoreCodeGen",
- srcs = glob([
- "lib/Target/XCore/*.c",
- "lib/Target/XCore/*.cpp",
- "lib/Target/XCore/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/XCore/*.h",
- "include/llvm/Target/XCore/*.def",
- "include/llvm/Target/XCore/*.inc",
- "lib/Target/XCore/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/XCore"],
- deps = [
- ":Analysis",
- ":AsmPrinter",
- ":CodeGen",
- ":Core",
- ":MC",
- ":SelectionDAG",
- ":Support",
- ":Target",
- ":TransformUtils",
- ":XCoreDesc",
- ":XCoreInfo",
- ":config",
- ],
-)
-
-cc_library(
- name = "XCoreDesc",
- srcs = glob([
- "lib/Target/XCore/MCTargetDesc/*.c",
- "lib/Target/XCore/MCTargetDesc/*.cpp",
- "lib/Target/XCore/MCTargetDesc/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/XCore/MCTargetDesc/*.h",
- "include/llvm/Target/XCore/MCTargetDesc/*.def",
- "include/llvm/Target/XCore/MCTargetDesc/*.inc",
- "lib/Target/XCore/MCTargetDesc/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/XCore"],
- deps = [
- ":MC",
- ":Support",
- ":XCoreInfo",
- ":config",
- ],
-)
-
-cc_library(
- name = "XCoreDisassembler",
- srcs = glob([
- "lib/Target/XCore/Disassembler/*.c",
- "lib/Target/XCore/Disassembler/*.cpp",
- "lib/Target/XCore/Disassembler/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/XCore/Disassembler/*.h",
- "include/llvm/Target/XCore/Disassembler/*.def",
- "include/llvm/Target/XCore/Disassembler/*.inc",
- "lib/Target/XCore/Disassembler/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/XCore"],
- deps = [
- ":MCDisassembler",
- ":Support",
- ":XCoreInfo",
- ":config",
- ],
-)
-
-cc_library(
- name = "XCoreInfo",
- srcs = glob([
- "lib/Target/XCore/TargetInfo/*.c",
- "lib/Target/XCore/TargetInfo/*.cpp",
- "lib/Target/XCore/TargetInfo/*.inc",
- ]),
- hdrs = glob([
- "include/llvm/Target/XCore/TargetInfo/*.h",
- "include/llvm/Target/XCore/TargetInfo/*.def",
- "include/llvm/Target/XCore/TargetInfo/*.inc",
- "lib/Target/XCore/TargetInfo/*.h",
- ]),
- copts = llvm_copts + ["-Iexternal/llvm-project/llvm/lib/Target/XCore"],
- deps = [
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "XRay",
- srcs = glob([
- "lib/XRay/*.c",
- "lib/XRay/*.cpp",
- "lib/XRay/*.inc",
- "lib/XRay/*.h",
- ]),
- hdrs = glob([
- "include/llvm/XRay/*.h",
- "include/llvm/XRay/*.def",
- "include/llvm/XRay/*.inc",
- ]),
- copts = llvm_copts,
- deps = [
- ":Object",
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "gtest",
- srcs = glob([
- "utils/unittest/*.c",
- "utils/unittest/*.cpp",
- "utils/unittest/*.inc",
- "utils/unittest/*.h",
- ]),
- hdrs = glob([
- "utils/unittest/*.h",
- "utils/unittest/*.def",
- "utils/unittest/*.inc",
- ]),
- copts = llvm_copts,
- deps = [
- ":Support",
- ":config",
- ],
-)
-
-cc_library(
- name = "gtest_main",
- srcs = glob([
- "utils/unittest/*.c",
- "utils/unittest/*.cpp",
- "utils/unittest/*.inc",
- "utils/unittest/*.h",
- ]),
- hdrs = glob([
- "utils/unittest/*.h",
- "utils/unittest/*.def",
- "utils/unittest/*.inc",
- ]),
- copts = llvm_copts,
- deps = [
- ":config",
- ":gtest",
- ],
-)
diff --git a/build_tools/bazel/third_party_import/llvm-project/overlay/mlir/BUILD.bazel b/build_tools/bazel/third_party_import/llvm-project/overlay/mlir/BUILD.bazel
deleted file mode 100644
index 1c82ec2..0000000
--- a/build_tools/bazel/third_party_import/llvm-project/overlay/mlir/BUILD.bazel
+++ /dev/null
@@ -1,4050 +0,0 @@
-# Description:
-# The MLIR "Multi-Level Intermediate Representation" Compiler Infrastructure
-
-load("@org_tensorflow//third_party/mlir:tblgen.bzl", "gentbl")
-load("@org_tensorflow//third_party/mlir:linalggen.bzl", "genlinalg")
-
-package(
- default_visibility = [":friends"],
- licenses = ["notice"],
-)
-
-package_group(
- name = "subpackages",
- packages = ["//..."],
-)
-
-package_group(
- name = "friends",
- packages = ["//..."],
-)
-
-exports_files([
- "LICENSE.TXT",
- "include/mlir/Dialect/LLVMIR/LLVMOps.td",
- "run_lit.sh",
-])
-
-[
- gentbl(
- name = name + "IncGen",
- strip_include_prefix = "include",
- tbl_outs = [
- (
- "-gen-op-interface-decls",
- "include/mlir/IR/" + name + ".h.inc",
- ),
- (
- "-gen-op-interface-defs",
- "include/mlir/IR/" + name + ".cpp.inc",
- ),
- ],
- tblgen = ":mlir-tblgen",
- td_file = "include/mlir/IR/" + name + ".td",
- td_srcs = [
- ":OpBaseTdFiles",
- ],
- )
- for name in [
- "OpAsmInterface",
- "RegionKindInterface",
- "SymbolInterfaces",
- ]
-]
-
-cc_library(
- name = "IR",
- srcs = glob([
- "lib/IR/*.cpp",
- "lib/IR/*.h",
- ]),
- hdrs = glob([
- "include/mlir/IR/*.h",
- ]) + [
- "include/mlir/Interfaces/CallInterfaces.h",
- "include/mlir/Interfaces/DecodeAttributesInterfaces.h",
- "include/mlir/Interfaces/FoldInterfaces.h",
- ],
- includes = ["include"],
- deps = [
- ":CallOpInterfacesIncGen",
- ":InferTypeOpInterfaceIncGen",
- ":OpAsmInterfaceIncGen",
- ":RegionKindInterfaceIncGen",
- ":SideEffectInterfacesIncGen",
- ":Support",
- ":SymbolInterfacesIncGen",
- "@llvm-project//llvm:Support",
- ],
-)
-
-cc_library(
- name = "Pass",
- srcs = glob([
- "lib/Pass/*.cpp",
- "lib/Pass/*.h",
- ]),
- hdrs = glob([
- "include/mlir/Pass/*.h",
- ]),
- includes = ["include"],
- linkopts = [
- "-lm",
- "-lpthread",
- ],
- deps = [
- ":IR",
- ":Support",
- "@llvm-project//llvm:Support",
- ],
-)
-
-# TODO(ntv): Update these to enable simplifying the cmake and build files.
-cc_library(
- name = "EDSC",
- srcs = [
- "lib/EDSC/Builders.cpp",
- ],
- hdrs = [
- "include/mlir-c/Core.h",
- "include/mlir/EDSC/Builders.h",
- ],
- includes = ["include"],
- deps = [
- ":IR",
- ":Support",
- "@llvm-project//llvm:Support",
- ],
-)
-
-cc_library(
- name = "CAPIIR",
- srcs = [
- "lib/CAPI/IR/AffineMap.cpp",
- "lib/CAPI/IR/IR.cpp",
- "lib/CAPI/IR/StandardAttributes.cpp",
- "lib/CAPI/IR/StandardTypes.cpp",
- "lib/CAPI/IR/Support.cpp",
- "lib/CAPI/Standard/StandardDialect.cpp",
- ],
- hdrs = [
- "include/mlir-c/AffineMap.h",
- "include/mlir-c/IR.h",
- "include/mlir-c/StandardAttributes.h",
- "include/mlir-c/StandardDialect.h",
- "include/mlir-c/StandardTypes.h",
- "include/mlir-c/Support.h",
- "include/mlir/CAPI/AffineMap.h",
- "include/mlir/CAPI/IR.h",
- "include/mlir/CAPI/Support.h",
- "include/mlir/CAPI/Utils.h",
- "include/mlir/CAPI/Wrap.h",
- ],
- includes = ["include"],
- deps = [
- ":IR",
- ":Parser",
- ":StandardOps",
- ":Support",
- "@llvm-project//llvm:Support",
- ],
-)
-
-cc_library(
- name = "MLIRBindingsPythonExtension",
- hdrs = [
- "include/mlir-c/Bindings/Python/Interop.h",
- ],
- deps = [
- ":CAPIIR",
- "//third_party/python_runtime:headers",
- ],
-)
-
-cc_library(
- name = "CAPIRegistration",
- srcs = [
- "lib/CAPI/Registration/Registration.cpp",
- ],
- hdrs = [
- "include/mlir-c/Registration.h",
- ],
- includes = ["include"],
- deps = [
- ":AllPassesAndDialectsNoRegistration",
- ":CAPIIR",
- ],
-)
-
-filegroup(
- name = "OpBaseTdFiles",
- srcs = [
- "include/mlir/Dialect/StandardOps/IR/StandardOpsBase.td",
- "include/mlir/IR/OpBase.td",
- ],
-)
-
-##---------------------------------------------------------------------------##
-# Affine dialect.
-##---------------------------------------------------------------------------##
-
-filegroup(
- name = "PassBaseTdFiles",
- srcs = [
- "include/mlir/Pass/PassBase.td",
- ],
-)
-
-filegroup(
- name = "AffineOpsTdFiles",
- srcs = [
- "include/mlir/Dialect/Affine/IR/AffineMemoryOpInterfaces.td",
- "include/mlir/Dialect/Affine/IR/AffineOps.td",
- "include/mlir/Interfaces/ControlFlowInterfaces.td",
- "include/mlir/Interfaces/LoopLikeInterface.td",
- "include/mlir/Interfaces/SideEffectInterfaces.td",
- ":OpBaseTdFiles",
- ],
-)
-
-gentbl(
- name = "AffineOpsIncGen",
- strip_include_prefix = "include",
- tbl_outs = [
- (
- "-gen-op-decls",
- "include/mlir/Dialect/Affine/IR/AffineOps.h.inc",
- ),
- (
- "-gen-op-defs",
- "include/mlir/Dialect/Affine/IR/AffineOps.cpp.inc",
- ),
- (
- "-gen-dialect-decls",
- "include/mlir/Dialect/Affine/IR/AffineOpsDialect.h.inc",
- ),
- ],
- tblgen = ":mlir-tblgen",
- td_file = "include/mlir/Dialect/Affine/IR/AffineOps.td",
- td_srcs = [
- ":AffineOpsTdFiles",
- ],
-)
-
-gentbl(
- name = "AffineMemoryOpInterfacesIncGen",
- strip_include_prefix = "include",
- tbl_outs = [
- (
- "-gen-op-interface-decls",
- "include/mlir/Dialect/Affine/IR/AffineMemoryOpInterfaces.h.inc",
- ),
- (
- "-gen-op-interface-defs",
- "include/mlir/Dialect/Affine/IR/AffineMemoryOpInterfaces.cpp.inc",
- ),
- ],
- tblgen = ":mlir-tblgen",
- td_file = "include/mlir/Dialect/Affine/IR/AffineMemoryOpInterfaces.td",
- td_srcs = [
- ":AffineOpsTdFiles",
- ],
-)
-
-##---------------------------------------------------------------------------##
-# Async dialect.
-##---------------------------------------------------------------------------##
-
-filegroup(
- name = "AsyncOpsTdFiles",
- srcs = [
- "include/mlir/Dialect/Async/IR/AsyncBase.td",
- "include/mlir/Dialect/Async/IR/AsyncOps.td",
- "include/mlir/Interfaces/SideEffectInterfaces.td",
- ":OpBaseTdFiles",
- ],
-)
-
-gentbl(
- name = "AsyncOpsIncGen",
- strip_include_prefix = "include",
- tbl_outs = [
- (
- "-gen-op-decls",
- "include/mlir/Dialect/Async/IR/AsyncOps.h.inc",
- ),
- (
- "-gen-op-defs",
- "include/mlir/Dialect/Async/IR/AsyncOps.cpp.inc",
- ),
- (
- "-gen-dialect-decls",
- "include/mlir/Dialect/Async/IR/AsyncOpsDialect.h.inc",
- ),
- ],
- tblgen = ":mlir-tblgen",
- td_file = "include/mlir/Dialect/Async/IR/AsyncOps.td",
- td_srcs = [
- ":AsyncOpsTdFiles",
- ],
-)
-
-##---------------------------------------------------------------------------##
-# AVX512 dialect.
-##---------------------------------------------------------------------------##
-
-filegroup(
- name = "AVX512TdFiles",
- srcs = [
- "include/mlir/Dialect/AVX512/AVX512.td",
- "include/mlir/Dialect/LLVMIR/LLVMOpBase.td",
- "include/mlir/IR/OpBase.td",
- "include/mlir/Interfaces/SideEffectInterfaces.td",
- ],
-)
-
-gentbl(
- name = "AVX512IncGen",
- strip_include_prefix = "include",
- tbl_outs = [
- (
- "-gen-dialect-decls -dialect=avx512",
- "include/mlir/Dialect/AVX512/AVX512Dialect.h.inc",
- ),
- (
- "-gen-op-decls",
- "include/mlir/Dialect/AVX512/AVX512.h.inc",
- ),
- (
- "-gen-op-defs",
- "include/mlir/Dialect/AVX512/AVX512.cpp.inc",
- ),
- (
- "-gen-op-doc",
- "g3doc/Dialects/AVX512/AVX512.md",
- ),
- ],
- tblgen = ":mlir-tblgen",
- td_file = "include/mlir/Dialect/AVX512/AVX512.td",
- td_srcs = [
- ":AVX512TdFiles",
- ],
-)
-
-cc_library(
- name = "AVX512",
- srcs = [
- "lib/Dialect/AVX512/IR/AVX512Dialect.cpp",
- ],
- hdrs = [
- "include/mlir/Dialect/AVX512/AVX512Dialect.h",
- ],
- includes = ["include"],
- deps = [
- ":AVX512IncGen",
- ":IR",
- ":SideEffectInterfaces",
- ":VectorOps",
- "@llvm-project//llvm:Core",
- "@llvm-project//llvm:Support",
- ],
-)
-
-cc_library(
- name = "AVX512ToLLVM",
- srcs = glob([
- "lib/Conversion/AVX512ToLLVM/*.cpp",
- ]) + ["lib/Conversion/PassDetail.h"],
- hdrs = glob([
- "include/mlir/Conversion/AVX512ToLLVM/*.h",
- ]),
- includes = ["include"],
- deps = [
- ":AVX512",
- ":ConversionPassIncGen",
- ":EDSC",
- ":IR",
- ":LLVMAVX512",
- ":LLVMDialect",
- ":Pass",
- ":StandardOps",
- ":StandardToLLVM",
- ":Support",
- ":Transforms",
- ":VectorOps",
- ":VectorToLLVM",
- ":VectorToSCF",
- "@llvm-project//llvm:Core",
- "@llvm-project//llvm:Support",
- ],
-)
-
-filegroup(
- name = "SCFTdFiles",
- srcs = [
- "include/mlir/Dialect/SCF/SCFOps.td",
- "include/mlir/Interfaces/ControlFlowInterfaces.td",
- "include/mlir/Interfaces/LoopLikeInterface.td",
- "include/mlir/Interfaces/SideEffectInterfaces.td",
- ":OpBaseTdFiles",
- ],
-)
-
-gentbl(
- name = "SCFIncGen",
- strip_include_prefix = "include",
- tbl_outs = [
- (
- "-gen-op-decls",
- "include/mlir/Dialect/SCF/SCFOps.h.inc",
- ),
- (
- "-gen-op-defs",
- "include/mlir/Dialect/SCF/SCFOps.cpp.inc",
- ),
- (
- "-gen-dialect-decls",
- "include/mlir/Dialect/SCF/SCFOpsDialect.h.inc",
- ),
- ],
- tblgen = ":mlir-tblgen",
- td_file = "include/mlir/Dialect/SCF/SCFOps.td",
- td_srcs = [
- ":SCFTdFiles",
- ],
-)
-
-gentbl(
- name = "SCFPassIncGen",
- strip_include_prefix = "include",
- tbl_outs = [
- (
- "-gen-pass-decls -name SCF",
- "include/mlir/Dialect/SCF/Passes.h.inc",
- ),
- ],
- tblgen = ":mlir-tblgen",
- td_file = "include/mlir/Dialect/SCF/Passes.td",
- td_srcs = [
- ":PassBaseTdFiles",
- ],
-)
-
-cc_library(
- name = "SCFTransforms",
- srcs = glob([
- "lib/Dialect/SCF/Transforms/*.cpp",
- "lib/Dialect/SCF/Transforms/*.h",
- ]),
- hdrs = ["include/mlir/Dialect/SCF/Passes.h"],
- includes = ["include"],
- deps = [
- ":Affine",
- ":IR",
- ":Pass",
- ":SCFDialect",
- ":SCFPassIncGen",
- ":StandardOps",
- ":Transforms",
- "@llvm-project//llvm:Support",
- ],
-)
-
-filegroup(
- name = "StdOpsTdFiles",
- srcs = [
- "include/mlir/Dialect/StandardOps/IR/Ops.td",
- "include/mlir/IR/OpAsmInterface.td",
- "include/mlir/Interfaces/CallInterfaces.td",
- "include/mlir/Interfaces/ControlFlowInterfaces.td",
- "include/mlir/Interfaces/SideEffectInterfaces.td",
- "include/mlir/Interfaces/VectorInterfaces.td",
- "include/mlir/Interfaces/ViewLikeInterface.td",
- ":OpBaseTdFiles",
- ],
-)
-
-gentbl(
- name = "StandardOpsIncGen",
- strip_include_prefix = "include",
- tbl_outs = [
- (
- "-gen-op-decls",
- "include/mlir/Dialect/StandardOps/IR/Ops.h.inc",
- ),
- (
- "-gen-op-defs",
- "include/mlir/Dialect/StandardOps/IR/Ops.cpp.inc",
- ),
- (
- "-gen-dialect-decls",
- "include/mlir/Dialect/StandardOps/IR/OpsDialect.h.inc",
- ),
- (
- "-gen-enum-decls",
- "include/mlir/Dialect/StandardOps/IR/OpsEnums.h.inc",
- ),
- (
- "-gen-enum-defs",
- "include/mlir/Dialect/StandardOps/IR/OpsEnums.cpp.inc",
- ),
- ],
- tblgen = ":mlir-tblgen",
- td_file = "include/mlir/Dialect/StandardOps/IR/Ops.td",
- td_srcs = [
- ":StdOpsTdFiles",
- ],
-)
-
-cc_library(
- name = "Dialect",
- srcs = glob([
- "lib/Dialect/*.cpp",
- "lib/Dialect/*.h",
- ]),
- hdrs = glob([
- "include/mlir/Dialect/*.h",
- ]),
- includes = ["include"],
- deps = [
- ":IR",
- "@llvm-project//llvm:Support",
- ],
-)
-
-cc_library(
- name = "DialectUtils",
- srcs = glob([
- "lib/Dialect/Utils/*.cpp",
- "lib/Dialect/Utils/*.h",
- ]),
- hdrs = glob([
- "include/mlir/Dialect/Utils/*.h",
- ]),
- includes = ["include"],
- deps = [
- ":IR",
- ":Support",
- "@llvm-project//llvm:Support",
- ],
-)
-
-cc_library(
- name = "Affine",
- srcs = glob(
- [
- "lib/Dialect/Affine/IR/*.cpp",
- "lib/Dialect/Affine/IR/*.h",
- "lib/Dialect/Affine/EDSC/*.cpp",
- ],
- ) + [
- "include/mlir/Transforms/InliningUtils.h",
- ],
- hdrs = glob([
- "include/mlir/Dialect/Affine/IR/*.h",
- "include/mlir/Dialect/Affine/EDSC/*.h",
- ]),
- includes = ["include"],
- deps = [
- ":AffineMemoryOpInterfacesIncGen",
- ":AffineOpsIncGen",
- ":EDSC",
- ":IR",
- ":LoopLikeInterface",
- ":SideEffectInterfaces",
- ":StandardOps",
- ":Support",
- "@llvm-project//llvm:Support",
- ],
-)
-
-cc_library(
- name = "Async",
- srcs = glob([
- "lib/Dialect/Async/IR/*.cpp",
- ]),
- hdrs = glob([
- "include/mlir/Dialect/Async/IR/*.h",
- ]),
- includes = ["include"],
- deps = [
- ":AsyncOpsIncGen",
- ":Dialect",
- ":IR",
- ":SideEffectInterfaces",
- ":StandardOps",
- ":Support",
- "@llvm-project//llvm:Support",
- ],
-)
-
-cc_library(
- name = "AffineUtils",
- srcs = glob(
- [
- "lib/Dialect/Affine/Utils/*.cpp",
- "lib/Dialect/Affine/Utils/*.h",
- ],
- ),
- hdrs = ["include/mlir/Dialect/Affine/Utils.h"],
- includes = ["include"],
- deps = [
- ":Affine",
- ":IR",
- ":Support",
- "@llvm-project//llvm:Support",
- ],
-)
-
-gentbl(
- name = "AffinePassIncGen",
- strip_include_prefix = "include",
- tbl_outs = [
- (
- "-gen-pass-decls -name Affine",
- "include/mlir/Dialect/Affine/Passes.h.inc",
- ),
- ],
- tblgen = ":mlir-tblgen",
- td_file = "include/mlir/Dialect/Affine/Passes.td",
- td_srcs = [
- ":PassBaseTdFiles",
- ],
-)
-
-cc_library(
- name = "AffineTransforms",
- srcs = glob([
- "lib/Dialect/Affine/Transforms/*.cpp",
- "lib/Dialect/Affine/Transforms/*.h",
- ]),
- hdrs = [
- "include/mlir/Dialect/Affine/Passes.h",
- ],
- includes = ["include"],
- deps = [
- ":Affine",
- ":AffinePassIncGen",
- ":AffineUtils",
- ":Analysis",
- ":IR",
- ":Pass",
- ":SCFDialect",
- ":StandardOps",
- ":Support",
- ":Transforms",
- ":VectorOps",
- "@llvm-project//llvm:Support",
- ],
-)
-
-gentbl(
- name = "ConversionPassIncGen",
- strip_include_prefix = "include",
- tbl_outs = [
- (
- "-gen-pass-decls -name Conversion",
- "include/mlir/Conversion/Passes.h.inc",
- ),
- ],
- tblgen = ":mlir-tblgen",
- td_file = "include/mlir/Conversion/Passes.td",
- td_srcs = [
- ":PassBaseTdFiles",
- ],
-)
-
-cc_library(
- name = "ConversionPasses",
- hdrs = ["include/mlir/Conversion/Passes.h"],
- includes = ["include"],
- deps = [
- ":AVX512ToLLVM",
- ":AffineToStandard",
- ":ConversionPassIncGen",
- ":GPUToGPURuntimeTransforms",
- ":GPUToNVVMTransforms",
- ":GPUToROCDLTransforms",
- ":GPUToSPIRVTransforms",
- ":GPUToVulkanTransforms",
- ":LinalgToLLVM",
- ":LinalgToSPIRV",
- ":LinalgToStandard",
- ":OpenMPToLLVM",
- ":SCFToGPUPass",
- ":SCFToStandard",
- ":SPIRVToLLVM",
- ":ShapeToStandard",
- ":StandardToLLVM",
- ":StandardToSPIRVTransforms",
- ":VectorToLLVM",
- ":VectorToROCDL",
- ":VectorToSCF",
- ":VectorToSPIRV",
- ],
-)
-
-cc_library(
- name = "AffineToStandard",
- srcs = glob([
- "lib/Conversion/AffineToStandard/*.cpp",
- "lib/Conversion/AffineToStandard/*.h",
- ]) + ["lib/Conversion/PassDetail.h"],
- hdrs = glob(["include/mlir/Conversion/AffineToStandard/*.h"]),
- includes = ["include"],
- deps = [
- ":Affine",
- ":ConversionPassIncGen",
- ":IR",
- ":Pass",
- ":SCFDialect",
- ":StandardOps",
- ":Support",
- ":Transforms",
- ":VectorOps",
- ],
-)
-
-alias(
- name = "AffineToStandardTransforms",
- actual = "AffineToStandard",
-)
-
-# SDBM dialect only contains attribute components that can be constructed given
-# a dialect object, so whenever it is used it must also be registered. Therefore
-# we don't split out the registration library for it.
-cc_library(
- name = "SDBM",
- srcs = glob([
- "lib/Dialect/SDBM/*.cpp",
- "lib/Dialect/SDBM/*.h",
- ]),
- hdrs = glob([
- "include/mlir/Dialect/SDBM/*.h",
- ]),
- includes = ["include"],
- deps = [
- ":IR",
- ":Support",
- "@llvm-project//llvm:Support",
- ],
-)
-
-cc_library(
- name = "SCFDialect",
- srcs = glob(
- [
- "lib/Dialect/SCF/*.cpp",
- "lib/Dialect/SCF/*.h",
- "lib/Dialect/SCF/EDSC/*.cpp",
- ],
- ),
- hdrs = glob([
- "include/mlir/Dialect/SCF/*.h",
- "include/mlir/Dialect/SCF/EDSC/*.h",
- ]),
- includes = ["include"],
- deps = [
- ":ControlFlowInterfaces",
- ":EDSC",
- ":IR",
- ":LoopLikeInterface",
- ":Pass",
- ":SCFIncGen",
- ":SCFPassIncGen",
- ":SideEffectInterfaces",
- ":StandardOps",
- ":Support",
- "@llvm-project//llvm:Support",
- ],
-)
-
-cc_library(
- name = "LoopLikeInterface",
- srcs = ["lib/Interfaces/LoopLikeInterface.cpp"],
- hdrs = ["include/mlir/Interfaces/LoopLikeInterface.h"],
- includes = ["include"],
- deps = [
- ":IR",
- ":LoopLikeInterfaceIncGen",
- ],
-)
-
-cc_library(
- name = "VectorInterfaces",
- srcs = ["lib/Interfaces/VectorInterfaces.cpp"],
- hdrs = ["include/mlir/Interfaces/VectorInterfaces.h"],
- includes = ["include"],
- deps = [
- ":IR",
- ":VectorInterfacesIncGen",
- ],
-)
-
-cc_library(
- name = "ViewLikeInterface",
- srcs = ["lib/Interfaces/ViewLikeInterface.cpp"],
- hdrs = ["include/mlir/Interfaces/ViewLikeInterface.h"],
- includes = ["include"],
- deps = [
- ":IR",
- ":ViewLikeInterfaceIncGen",
- ],
-)
-
-cc_library(
- name = "CopyOpInterface",
- srcs = ["lib/Interfaces/CopyOpInterface.cpp"],
- hdrs = ["include/mlir/Interfaces/CopyOpInterface.h"],
- includes = ["include"],
- deps = [
- ":CopyOpInterfaceIncGen",
- ":IR",
- ],
-)
-
-gentbl(
- name = "ShapeOpsIncGen",
- strip_include_prefix = "include",
- tbl_outs = [
- (
- "-gen-op-decls",
- "include/mlir/Dialect/Shape/IR/ShapeOps.h.inc",
- ),
- (
- "-gen-op-defs",
- "include/mlir/Dialect/Shape/IR/ShapeOps.cpp.inc",
- ),
- (
- "-gen-dialect-decls",
- "include/mlir/Dialect/Shape/IR/ShapeOpsDialect.h.inc",
- ),
- ],
- tblgen = ":mlir-tblgen",
- td_file = "include/mlir/Dialect/Shape/IR/ShapeOps.td",
- td_srcs = [
- ":StdOpsTdFiles",
- "include/mlir/Dialect/Shape/IR/ShapeBase.td",
- "include/mlir/Interfaces/InferTypeOpInterface.td",
- ],
-)
-
-gentbl(
- name = "MLIRShapeCanonicalizationIncGen",
- strip_include_prefix = "include/mlir/Dialect/Shape/IR",
- tbl_outs = [
- (
- "-gen-rewriters",
- "include/mlir/Dialect/Shape/IR/ShapeCanonicalization.inc",
- ),
- ],
- tblgen = ":mlir-tblgen",
- td_file = "lib/Dialect/Shape/IR/ShapeCanonicalization.td",
- td_srcs = [
- ":StdOpsTdFiles",
- "include/mlir/Dialect/Shape/IR/ShapeBase.td",
- "include/mlir/Dialect/Shape/IR/ShapeOps.td",
- "include/mlir/Interfaces/InferTypeOpInterface.td",
- ],
-)
-
-cc_library(
- name = "Shape",
- srcs = glob(["lib/Dialect/Shape/IR/*.cpp"]),
- hdrs = ["include/mlir/Dialect/Shape/IR/Shape.h"],
- includes = ["include"],
- deps = [
- ":CallOpInterfaces",
- ":CommonFolders",
- ":ControlFlowInterfaces",
- ":Dialect",
- ":IR",
- ":InferTypeOpInterface",
- ":MLIRShapeCanonicalizationIncGen",
- ":ShapeOpsIncGen",
- ":SideEffectInterfaces",
- ":StandardOps",
- ":Support",
- "@llvm-project//llvm:Support",
- ],
-)
-
-cc_library(
- name = "ShapeToStandard",
- srcs = glob([
- "lib/Conversion/ShapeToStandard/*.cpp",
- "lib/Conversion/ShapeToStandard/*.h",
- ]) + ["lib/Conversion/PassDetail.h"],
- hdrs = ["include/mlir/Conversion/ShapeToStandard/ShapeToStandard.h"],
- includes = ["include"],
- deps = [
- ":ConversionPassIncGen",
- ":IR",
- ":Pass",
- ":SCFDialect",
- ":Shape",
- ":StandardOps",
- ":Support",
- ":Transforms",
- ],
-)
-
-gentbl(
- name = "ShapeTransformsPassIncGen",
- strip_include_prefix = "include",
- tbl_outs = [(
- "-gen-pass-decls -name Shape",
- "include/mlir/Dialect/Shape/Transforms/Passes.h.inc",
- )],
- tblgen = ":mlir-tblgen",
- td_file = "include/mlir/Dialect/Shape/Transforms/Passes.td",
- td_srcs = [":PassBaseTdFiles"],
-)
-
-cc_library(
- name = "ShapeTransforms",
- srcs = glob([
- "lib/Dialect/Shape/Transforms/*.cpp",
- "lib/Dialect/Shape/Transforms/*.h",
- ]),
- hdrs = ["include/mlir/Dialect/Shape/Transforms/Passes.h"],
- includes = ["include"],
- deps = [
- ":IR",
- ":Pass",
- ":Shape",
- ":ShapeTransformsPassIncGen",
- ":StandardOps",
- ":Transforms",
- ],
-)
-
-cc_library(
- name = "StandardOps",
- srcs = glob(
- [
- "lib/Dialect/StandardOps/IR/*.cpp",
- "lib/Dialect/StandardOps/IR/*.h",
- "lib/Dialect/StandardOps/EDSC/*.cpp",
- ],
- ),
- hdrs = glob([
- "include/mlir/Dialect/StandardOps/IR/*.h",
- "include/mlir/Dialect/StandardOps/EDSC/*.h",
- ]) + ["include/mlir/Transforms/InliningUtils.h"],
- includes = ["include"],
- deps = [
- ":CallOpInterfaces",
- ":CommonFolders",
- ":ControlFlowInterfaces",
- ":EDSC",
- ":IR",
- ":SideEffectInterfaces",
- ":StandardOpsIncGen",
- ":Support",
- ":VectorInterfaces",
- ":ViewLikeInterface",
- "@llvm-project//llvm:Support",
- ],
-)
-
-gentbl(
- name = "StandardOpsTransformsPassIncGen",
- strip_include_prefix = "include",
- tbl_outs = [(
- "-gen-pass-decls -name Standard",
- "include/mlir/Dialect/StandardOps/Transforms/Passes.h.inc",
- )],
- tblgen = ":mlir-tblgen",
- td_file = "include/mlir/Dialect/StandardOps/Transforms/Passes.td",
- td_srcs = [":PassBaseTdFiles"],
-)
-
-cc_library(
- name = "StandardOpsTransforms",
- srcs = glob([
- "lib/Dialect/StandardOps/Transforms/*.cpp",
- "lib/Dialect/StandardOps/Transforms/*.h",
- ]),
- hdrs = glob(["include/mlir/Dialect/StandardOps/Transforms/*.h"]),
- includes = ["include"],
- deps = [
- ":Analysis",
- ":ControlFlowInterfaces",
- ":IR",
- ":Pass",
- ":StandardOps",
- ":StandardOpsTransformsPassIncGen",
- ":Support",
- ":Transforms",
- "@llvm-project//llvm:Support",
- ],
-)
-
-cc_library(
- name = "VectorOps",
- srcs = glob(
- [
- "lib/Dialect/Vector/*.cpp",
- "lib/Dialect/Vector/*.h",
- "lib/Dialect/Vector/EDSC/*.cpp",
- "lib/Dialect/Vector/EDSC/*.h",
- ],
- ),
- hdrs = glob([
- "include/mlir/Dialect/Vector/*.h",
- "include/mlir/Dialect/Vector/EDSC/*.h",
- ]),
- includes = ["include"],
- deps = [
- ":Affine",
- ":Analysis",
- ":DialectUtils",
- ":EDSC",
- ":IR",
- ":LinalgOps",
- ":SCFDialect",
- ":SideEffectInterfaces",
- ":StandardOps",
- ":Support",
- ":VectorInterfaces",
- ":VectorOpsIncGen",
- "@llvm-project//llvm:Support",
- ],
-)
-
-cc_library(
- name = "Support",
- srcs = glob(
- [
- "lib/Support/*.cpp",
- "lib/Support/*.h",
- ],
- exclude = [
- # TODO(jpienaar): Move this out, else Support depends on Analysis/
- "lib/Support/MlirOptMain.cpp",
- ],
- ),
- hdrs = glob(
- [
- "include/mlir/Support/*.h",
- ],
- exclude = [
- "include/mlir/Support/MlirOptMain.h",
- ],
- ),
- includes = ["include"],
- deps = [
- "@llvm-project//llvm:Support",
- ],
-)
-
-cc_library(
- name = "ParserTokenKinds",
- # strip_include_prefix does not apply to textual_hdrs.
- hdrs = ["lib/Parser/TokenKinds.def"],
- strip_include_prefix = "lib/Parser",
- textual_hdrs = ["lib/Parser/TokenKinds.def"],
-)
-
-cc_library(
- name = "Parser",
- srcs = glob([
- "lib/Parser/*.cpp",
- "lib/Parser/*.h",
- ]),
- hdrs = [
- "include/mlir/Parser.h",
- ],
- includes = ["include"],
- deps = [
- ":IR",
- ":ParserTokenKinds",
- ":Support",
- "@llvm-project//llvm:Support",
- ],
-)
-
-filegroup(
- name = "LLVMAVX512TdFiles",
- srcs = [
- "include/mlir/Dialect/LLVMIR/LLVMAVX512.td",
- ":LLVMOpsTdFiles",
- ],
-)
-
-gentbl(
- name = "LLVMAVX512IncGen",
- strip_include_prefix = "include",
- tbl_outs = [
- (
- "-gen-dialect-decls -dialect=llvm_avx512",
- "include/mlir/Dialect/LLVMIR/LLVMAVX512Dialect.h.inc",
- ),
- (
- "-gen-op-decls",
- "include/mlir/Dialect/LLVMIR/LLVMAVX512.h.inc",
- ),
- (
- "-gen-op-defs",
- "include/mlir/Dialect/LLVMIR/LLVMAVX512.cpp.inc",
- ),
- (
- "-gen-op-doc",
- "g3doc/Dialects/LLVMIR/LLVMAVX512.md",
- ),
- ],
- tblgen = ":mlir-tblgen",
- td_file = "include/mlir/Dialect/LLVMIR/LLVMAVX512.td",
- td_srcs = [
- ":LLVMAVX512TdFiles",
- ],
-)
-
-cc_library(
- name = "LLVMAVX512",
- srcs = [
- "lib/Dialect/LLVMIR/IR/LLVMAVX512Dialect.cpp",
- ],
- hdrs = [
- "include/mlir/Dialect/LLVMIR/LLVMAVX512Dialect.h",
- ],
- includes = ["include"],
- deps = [
- ":IR",
- ":LLVMAVX512IncGen",
- ":LLVMDialect",
- "@llvm-project//llvm:Core",
- "@llvm-project//llvm:Support",
- ],
-)
-
-gentbl(
- name = "LLVMAVX512ConversionIncGen",
- strip_include_prefix = "include",
- tbl_outs = [
- (
- "-gen-llvmir-conversions",
- "include/mlir/Dialect/LLVMIR/LLVMAVX512Conversions.inc",
- ),
- ],
- tblgen = ":mlir-tblgen",
- td_file = "include/mlir/Dialect/LLVMIR/LLVMAVX512.td",
- td_srcs = [
- ":LLVMAVX512TdFiles",
- ],
-)
-
-cc_library(
- name = "TargetLLVMAVX512Intr",
- srcs = [
- "lib/Target/LLVMIR/LLVMAVX512Intr.cpp",
- ],
- includes = ["include"],
- deps = [
- ":IR",
- ":LLVMAVX512",
- ":LLVMAVX512ConversionIncGen",
- ":LLVMIRModuleTranslation",
- ":Translation",
- "@llvm-project//llvm:Core",
- "@llvm-project//llvm:Support",
- ],
-)
-
-cc_library(
- name = "LLVMDialect",
- srcs = glob(
- [
- "lib/Dialect/LLVMIR/IR/*.cpp",
- "lib/Dialect/LLVMIR/IR/*.h",
- ],
- exclude = [
- "lib/Dialect/LLVMIR/IR/*AVX512*.cpp",
- "lib/Dialect/LLVMIR/IR/*AVX512*.h",
- "lib/Dialect/LLVMIR/IR/NVVM*.cpp",
- "lib/Dialect/LLVMIR/IR/NVVM*.h",
- "lib/Dialect/LLVMIR/IR/ROCDL*.cpp",
- "lib/Dialect/LLVMIR/IR/ROCDL*.h",
- ],
- ),
- hdrs = glob(
- [
- "include/mlir/Dialect/LLVMIR/*.h",
- ],
- exclude = [
- "include/mlir/Dialect/LLVMIR/*AVX512*.h",
- "include/mlir/Dialect/LLVMIR/NVVM*.h",
- "include/mlir/Dialect/LLVMIR/ROCDL*.h",
- ],
- ),
- includes = ["include"],
- deps = [
- ":ControlFlowInterfaces",
- ":IR",
- ":LLVMOpsIncGen",
- ":OpenMPDialect",
- ":SideEffectInterfaces",
- ":Support",
- "@llvm-project//llvm:AsmParser",
- "@llvm-project//llvm:BitReader",
- "@llvm-project//llvm:BitWriter",
- "@llvm-project//llvm:Core",
- "@llvm-project//llvm:Support",
- ],
-)
-
-gentbl(
- name = "LLVMPassIncGen",
- strip_include_prefix = "include",
- tbl_outs = [
- (
- "-gen-pass-decls -name LLVM",
- "include/mlir/Dialect/LLVMIR/Transforms/Passes.h.inc",
- ),
- ],
- tblgen = ":mlir-tblgen",
- td_file = "include/mlir/Dialect/LLVMIR/Transforms/Passes.td",
- td_srcs = [
- ":PassBaseTdFiles",
- ],
-)
-
-cc_library(
- name = "LLVMIRTransforms",
- srcs = glob([
- "lib/Dialect/LLVMIR/Transforms/*.cpp",
- "lib/Dialect/LLVMIR/Transforms/*.h",
- ]),
- hdrs = glob(["include/mlir/Dialect/LLVMIR/Transforms/*.h"]),
- includes = ["include"],
- deps = [
- ":IR",
- ":LLVMDialect",
- ":LLVMPassIncGen",
- ":Pass",
- ],
-)
-
-filegroup(
- name = "GPUOpsTdFiles",
- srcs = [
- "include/mlir/Dialect/GPU/GPUBase.td",
- "include/mlir/Dialect/GPU/GPUOps.td",
- "include/mlir/Dialect/LLVMIR/LLVMOpBase.td",
- "include/mlir/IR/SymbolInterfaces.td",
- "include/mlir/Interfaces/SideEffectInterfaces.td",
- ":OpBaseTdFiles",
- ],
-)
-
-gentbl(
- name = "ParallelLoopMapperAttrGen",
- strip_include_prefix = "include",
- tbl_outs = [
- (
- "-gen-struct-attr-decls",
- "include/mlir/Dialect/GPU/ParallelLoopMapperAttr.h.inc",
- ),
- (
- "-gen-struct-attr-defs",
- "include/mlir/Dialect/GPU/ParallelLoopMapperAttr.cpp.inc",
- ),
- (
- "-gen-enum-decls",
- "include/mlir/Dialect/GPU/ParallelLoopMapperEnums.h.inc",
- ),
- (
- "-gen-enum-defs",
- "include/mlir/Dialect/GPU/ParallelLoopMapperEnums.cpp.inc",
- ),
- ],
- tblgen = ":mlir-tblgen",
- td_file = "include/mlir/Dialect/GPU/ParallelLoopMapperAttr.td",
- td_srcs = [
- ":GPUOpsTdFiles",
- ":AffineOpsTdFiles",
- ],
-)
-
-gentbl(
- name = "GPUOpsIncGen",
- strip_include_prefix = "include",
- tbl_outs = [
- (
- "-gen-op-decls",
- "include/mlir/Dialect/GPU/GPUOps.h.inc",
- ),
- (
- "-gen-op-defs",
- "include/mlir/Dialect/GPU/GPUOps.cpp.inc",
- ),
- (
- "-gen-dialect-decls -dialect=gpu",
- "include/mlir/Dialect/GPU/GPUOpsDialect.h.inc",
- ),
- ],
- tblgen = ":mlir-tblgen",
- td_file = "include/mlir/Dialect/GPU/GPUOps.td",
- td_srcs = [
- ":GPUOpsTdFiles",
- ],
-)
-
-cc_library(
- name = "GPUDialect",
- srcs = glob(
- [
- "lib/Dialect/GPU/IR/*.cpp",
- "lib/Dialect/GPU/IR/*.h",
- ],
- ),
- hdrs = glob([
- "include/mlir/Dialect/GPU/GPUDialect.h",
- ]),
- includes = ["include"],
- deps = [
- ":GPUOpsIncGen",
- ":IR",
- ":LLVMDialect",
- ":SideEffectInterfaces",
- ":StandardOps",
- ":Support",
- ],
-)
-
-gentbl(
- name = "GPUPassIncGen",
- strip_include_prefix = "include",
- tbl_outs = [
- (
- "-gen-pass-decls -name GPU",
- "include/mlir/Dialect/GPU/Passes.h.inc",
- ),
- ],
- tblgen = ":mlir-tblgen",
- td_file = "include/mlir/Dialect/GPU/Passes.td",
- td_srcs = [
- ":PassBaseTdFiles",
- ],
-)
-
-cc_library(
- name = "GPUTransforms",
- srcs = glob(
- [
- "lib/Dialect/GPU/Transforms/*.cpp",
- "lib/Dialect/GPU/Transforms/*.h",
- ],
- ),
- hdrs = [
- "include/mlir/Dialect/GPU/MemoryPromotion.h",
- "include/mlir/Dialect/GPU/ParallelLoopMapper.h",
- "include/mlir/Dialect/GPU/Passes.h",
- "include/mlir/Dialect/GPU/Utils.h",
- ],
- includes = ["include"],
- deps = [
- ":EDSC",
- ":GPUDialect",
- ":GPUPassIncGen",
- ":IR",
- ":ParallelLoopMapperAttrGen",
- ":Pass",
- ":SCFDialect",
- ":StandardOps",
- ":Support",
- ":Transforms",
- "@llvm-project//llvm:Support",
- ],
-)
-
-filegroup(
- name = "LLVMOpsTdFiles",
- srcs = [
- "include/mlir/Dialect/LLVMIR/LLVMOpBase.td",
- "include/mlir/Dialect/LLVMIR/LLVMOps.td",
- "include/mlir/IR/SymbolInterfaces.td",
- "include/mlir/Interfaces/ControlFlowInterfaces.td",
- "include/mlir/Interfaces/SideEffectInterfaces.td",
- ":OpBaseTdFiles",
- ],
-)
-
-cc_library(
- name = "GPUCommonTransforms",
- hdrs = [
- "lib/Conversion/GPUCommon/IndexIntrinsicsOpLowering.h",
- "lib/Conversion/GPUCommon/OpToFuncCallLowering.h",
- ],
- # TODO(b/155492113): Move back to hdrs once fixed.
- textual_hdrs = [
- "lib/Conversion/GPUCommon/GPUOpsLowering.h",
- ],
- deps = [
- ":GPUDialect",
- ":IR",
- ":LLVMDialect",
- ":StandardOps",
- ":StandardToLLVM",
- "@llvm-project//llvm:Support",
- ],
-)
-
-gentbl(
- name = "GPUToNVVMGen",
- strip_include_prefix = "lib/Conversion/GPUToNVVM",
- tbl_outs = [
- (
- "-gen-rewriters",
- "lib/Conversion/GPUToNVVM/GPUToNVVM.cpp.inc",
- ),
- ],
- tblgen = ":mlir-tblgen",
- td_file = "lib/Conversion/GPUToNVVM/GPUToNVVM.td",
- td_srcs = [
- ":GPUOpsTdFiles",
- ":NVVMOpsTdFiles",
- ],
-)
-
-cc_library(
- name = "GPUToNVVMTransforms",
- srcs = glob([
- "lib/Conversion/GPUToNVVM/*.cpp",
- "lib/Conversion/GPUToNVVM/*.h",
- ]) + ["lib/Conversion/PassDetail.h"],
- hdrs = glob([
- "include/mlir/Conversion/GPUToNVVM/*.h",
- ]),
- includes = ["include"],
- deps = [
- ":ConversionPassIncGen",
- ":GPUCommonTransforms",
- ":GPUDialect",
- ":GPUToNVVMGen",
- ":GPUTransforms",
- ":IR",
- ":NVVMDialect",
- ":Pass",
- ":StandardToLLVM",
- ":Transforms",
- "@llvm-project//llvm:Support",
- ],
-)
-
-cc_library(
- name = "VectorToROCDL",
- srcs = [
- "lib/Conversion/PassDetail.h",
- "lib/Conversion/VectorToROCDL/VectorToROCDL.cpp",
- ],
- hdrs = [
- "include/mlir/Conversion/VectorToROCDL/VectorToROCDL.h",
- ],
- includes = ["include"],
- deps = [
- ":ConversionPassIncGen",
- ":GPUDialect",
- ":LLVMDialect",
- ":Pass",
- ":ROCDLDialect",
- ":StandardOps",
- ":StandardToLLVM",
- ":Transforms",
- ":VectorOps",
- ],
-)
-
-cc_library(
- name = "VectorToSPIRV",
- srcs = [
- "lib/Conversion/PassDetail.h",
- "lib/Conversion/VectorToSPIRV/VectorToSPIRV.cpp",
- ],
- hdrs = [
- "include/mlir/Conversion/VectorToSPIRV/ConvertVectorToSPIRV.h",
- "include/mlir/Conversion/VectorToSPIRV/ConvertVectorToSPIRVPass.h",
- ],
- includes = ["include"],
- deps = [
- ":ConversionPassIncGen",
- ":Pass",
- ":SPIRVDialect",
- ":SPIRVLowering",
- ":Transforms",
- ":VectorOps",
- ],
-)
-
-gentbl(
- name = "GPUToROCDLTGen",
- strip_include_prefix = "lib/Conversion/GPUToROCDL",
- tbl_outs = [
- (
- "-gen-rewriters",
- "lib/Conversion/GPUToROCDL/GPUToROCDL.cpp.inc",
- ),
- ],
- tblgen = ":mlir-tblgen",
- td_file = "lib/Conversion/GPUToROCDL/GPUToROCDL.td",
- td_srcs = [
- ":GPUOpsTdFiles",
- ":ROCDLOpsTdFiles",
- ],
-)
-
-cc_library(
- name = "GPUToROCDLTransforms",
- srcs = [
- "lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp",
- "lib/Conversion/PassDetail.h",
- ],
- hdrs = [
- "include/mlir/Conversion/GPUToROCDL/GPUToROCDLPass.h",
- ],
- includes = ["include"],
- deps = [
- ":ConversionPassIncGen",
- ":GPUCommonTransforms",
- ":GPUDialect",
- ":GPUToROCDLTGen",
- ":GPUTransforms",
- ":Pass",
- ":ROCDLDialect",
- ":StandardToLLVM",
- ":Transforms",
- ":VectorOps",
- ":VectorToLLVM",
- ":VectorToROCDL",
- ":VectorToSCF",
- "@llvm-project//llvm:Support",
- ],
-)
-
-cc_library(
- name = "GPUToVulkanTransforms",
- srcs = [
- "lib/Conversion/GPUToVulkan/ConvertGPULaunchFuncToVulkanLaunchFunc.cpp",
- "lib/Conversion/GPUToVulkan/ConvertLaunchFuncToVulkanCalls.cpp",
- "lib/Conversion/PassDetail.h",
- ],
- hdrs = ["include/mlir/Conversion/GPUToVulkan/ConvertGPUToVulkanPass.h"],
- includes = ["include"],
- deps = [
- ":ConversionPassIncGen",
- ":GPUDialect",
- ":IR",
- ":LLVMDialect",
- ":Pass",
- ":SPIRVDialect",
- ":SPIRVSerialization",
- ":StandardOps",
- ":Support",
- "@llvm-project//llvm:Support",
- ],
-)
-
-cc_library(
- name = "GPUToGPURuntimeTransforms",
- srcs = [
- "lib/Conversion/GPUCommon/ConvertKernelFuncToBlob.cpp",
- "lib/Conversion/GPUCommon/ConvertLaunchFuncToRuntimeCalls.cpp",
- "lib/Conversion/PassDetail.h",
- ],
- hdrs = ["include/mlir/Conversion/GPUCommon/GPUCommonPass.h"],
- includes = ["include"],
- deps = [
- ":ConversionPassIncGen",
- ":GPUDialect",
- ":IR",
- ":LLVMDialect",
- ":Pass",
- ":StandardToLLVM",
- ":Support",
- ":TargetNVVMIR",
- "@llvm-project//llvm:Core",
- "@llvm-project//llvm:NVPTXCodeGen",
- "@llvm-project//llvm:Support",
- "@llvm-project//llvm:Target",
- ],
-)
-
-gentbl(
- name = "GPUToSPIRVIncGen",
- strip_include_prefix = "lib/Conversion/GPUToSPIRV",
- tbl_outs = [
- (
- "-gen-rewriters",
- "lib/Conversion/GPUToSPIRV/GPUToSPIRV.cpp.inc",
- ),
- ],
- tblgen = ":mlir-tblgen",
- td_file = "lib/Conversion/GPUToSPIRV/GPUToSPIRV.td",
- td_srcs = [
- ":GPUOpsTdFiles",
- ":SPIRVOpsTdFiles",
- ],
-)
-
-cc_library(
- name = "GPUToSPIRVTransforms",
- srcs = [
- "lib/Conversion/GPUToSPIRV/ConvertGPUToSPIRV.cpp",
- "lib/Conversion/GPUToSPIRV/ConvertGPUToSPIRVPass.cpp",
- "lib/Conversion/PassDetail.h",
- ],
- hdrs = [
- "include/mlir/Conversion/GPUToSPIRV/ConvertGPUToSPIRV.h",
- "include/mlir/Conversion/GPUToSPIRV/ConvertGPUToSPIRVPass.h",
- ],
- includes = [
- "include",
- "lib/Conversions/GPUToSPIRV",
- ],
- deps = [
- ":ConversionPassIncGen",
- ":GPUDialect",
- ":GPUToSPIRVIncGen",
- ":IR",
- ":Pass",
- ":SCFDialect",
- ":SCFToSPIRV",
- ":SPIRVDialect",
- ":SPIRVLowering",
- ":StandardToSPIRVTransforms",
- ":Support",
- ":Transforms",
- ":VectorToSPIRV",
- ],
-)
-
-cc_library(
- name = "SPIRVToLLVM",
- srcs = glob([
- "lib/Conversion/SPIRVToLLVM/*.cpp",
- ]) + [
- "lib/Conversion/PassDetail.h",
- ],
- hdrs = glob([
- "include/mlir/Conversion/SPIRVToLLVM/*.h",
- ]),
- includes = ["include"],
- deps = [
- ":ConversionPassIncGen",
- ":IR",
- ":LLVMDialect",
- ":Pass",
- ":SPIRVDialect",
- ":StandardOps",
- ":StandardToLLVM",
- ":Support",
- ":Transforms",
- "@llvm-project//llvm:Support",
- ],
-)
-
-gentbl(
- name = "LLVMOpsIncGen",
- strip_include_prefix = "include",
- tbl_outs = [
- (
- "-gen-op-decls",
- "include/mlir/Dialect/LLVMIR/LLVMOps.h.inc",
- ),
- (
- "-gen-op-defs",
- "include/mlir/Dialect/LLVMIR/LLVMOps.cpp.inc",
- ),
- (
- "-gen-dialect-decls",
- "include/mlir/Dialect/LLVMIR/LLVMOpsDialect.h.inc",
- ),
- (
- "-gen-enum-decls",
- "include/mlir/Dialect/LLVMIR/LLVMOpsEnums.h.inc",
- ),
- (
- "-gen-enum-defs",
- "include/mlir/Dialect/LLVMIR/LLVMOpsEnums.cpp.inc",
- ),
- ],
- tblgen = ":mlir-tblgen",
- td_file = "include/mlir/Dialect/LLVMIR/LLVMOps.td",
- td_srcs = [
- ":LLVMOpsTdFiles",
- ],
-)
-
-gentbl(
- name = "LLVMConversionIncGen",
- strip_include_prefix = "include",
- tbl_outs = [
- (
- "-gen-llvmir-conversions",
- "include/mlir/Dialect/LLVMIR/LLVMConversions.inc",
- ),
- (
- "-gen-enum-to-llvmir-conversions",
- "include/mlir/Dialect/LLVMIR/LLVMConversionEnumsToLLVM.inc",
- ),
- (
- "-gen-enum-from-llvmir-conversions",
- "include/mlir/Dialect/LLVMIR/LLVMConversionEnumsFromLLVM.inc",
- ),
- ],
- tblgen = ":mlir-tblgen",
- td_file = "include/mlir/Dialect/LLVMIR/LLVMOps.td",
- td_srcs = [
- ":LLVMOpsTdFiles",
- ],
-)
-
-cc_library(
- name = "NVVMDialect",
- srcs = [
- "lib/Dialect/LLVMIR/IR/NVVMDialect.cpp",
- ],
- hdrs = [
- "include/mlir/Dialect/LLVMIR/NVVMDialect.h",
- ],
- includes = ["include"],
- deps = [
- ":IR",
- ":LLVMDialect",
- ":NVVMOpsIncGen",
- ":SideEffectInterfaces",
- ":StandardOps",
- ":Support",
- "@llvm-project//llvm:AsmParser",
- "@llvm-project//llvm:Core",
- "@llvm-project//llvm:Support",
- ],
-)
-
-filegroup(
- name = "NVVMOpsTdFiles",
- srcs = [
- "include/mlir/Dialect/LLVMIR/LLVMOpBase.td",
- "include/mlir/Dialect/LLVMIR/NVVMOps.td",
- "include/mlir/Interfaces/SideEffectInterfaces.td",
- ":OpBaseTdFiles",
- ],
-)
-
-gentbl(
- name = "NVVMOpsIncGen",
- strip_include_prefix = "include",
- tbl_outs = [
- (
- "-gen-op-decls",
- "include/mlir/Dialect/LLVMIR/NVVMOps.h.inc",
- ),
- (
- "-gen-op-defs",
- "include/mlir/Dialect/LLVMIR/NVVMOps.cpp.inc",
- ),
- (
- "-gen-dialect-decls -dialect=nvvm",
- "include/mlir/Dialect/LLVMIR/NVVMOpsDialect.h.inc",
- ),
- ],
- tblgen = ":mlir-tblgen",
- td_file = "include/mlir/Dialect/LLVMIR/NVVMOps.td",
- td_srcs = [
- ":NVVMOpsTdFiles",
- ],
-)
-
-gentbl(
- name = "NVVMConversionIncGen",
- strip_include_prefix = "include",
- tbl_outs = [
- (
- "-gen-llvmir-conversions",
- "include/mlir/Dialect/LLVMIR/NVVMConversions.inc",
- ),
- ],
- tblgen = ":mlir-tblgen",
- td_file = "include/mlir/Dialect/LLVMIR/NVVMOps.td",
- td_srcs = [
- ":NVVMOpsTdFiles",
- ],
-)
-
-cc_library(
- name = "ROCDLDialect",
- srcs = [
- "lib/Dialect/LLVMIR/IR/ROCDLDialect.cpp",
- ],
- hdrs = [
- "include/mlir/Dialect/LLVMIR/ROCDLDialect.h",
- ],
- includes = ["include"],
- deps = [
- ":IR",
- ":LLVMDialect",
- ":ROCDLOpsIncGen",
- ":SideEffectInterfaces",
- ":StandardOps",
- ":Support",
- "@llvm-project//llvm:AsmParser",
- "@llvm-project//llvm:Core",
- "@llvm-project//llvm:Support",
- ],
-)
-
-filegroup(
- name = "ROCDLOpsTdFiles",
- srcs = [
- "include/mlir/Dialect/LLVMIR/LLVMOpBase.td",
- "include/mlir/Dialect/LLVMIR/ROCDLOps.td",
- "include/mlir/Interfaces/SideEffectInterfaces.td",
- ":OpBaseTdFiles",
- ],
-)
-
-gentbl(
- name = "ROCDLOpsIncGen",
- strip_include_prefix = "include",
- tbl_outs = [
- (
- "-gen-op-decls",
- "include/mlir/Dialect/LLVMIR/ROCDLOps.h.inc",
- ),
- (
- "-gen-op-defs",
- "include/mlir/Dialect/LLVMIR/ROCDLOps.cpp.inc",
- ),
- (
- "-gen-dialect-decls -dialect=rocdl",
- "include/mlir/Dialect/LLVMIR/ROCDLOpsDialect.h.inc",
- ),
- ],
- tblgen = ":mlir-tblgen",
- td_file = "include/mlir/Dialect/LLVMIR/ROCDLOps.td",
- td_srcs = [
- ":ROCDLOpsTdFiles",
- ],
-)
-
-gentbl(
- name = "ROCDLConversionIncGen",
- strip_include_prefix = "include",
- tbl_outs = [
- (
- "-gen-llvmir-conversions",
- "include/mlir/Dialect/LLVMIR/ROCDLConversions.inc",
- ),
- ],
- tblgen = ":mlir-tblgen",
- td_file = "include/mlir/Dialect/LLVMIR/ROCDLOps.td",
- td_srcs = [
- ":ROCDLOpsTdFiles",
- ],
-)
-
-cc_library(
- name = "PDLDialect",
- srcs = glob([
- "lib/Dialect/PDL/IR/*.cpp",
- "lib/Dialect/PDL/IR/*.h",
- ]),
- hdrs = glob([
- "include/mlir/Dialect/PDL/IR/*.h",
- ]),
- includes = ["include"],
- deps = [
- ":IR",
- ":InferTypeOpInterface",
- ":PDLOpsIncGen",
- ":SideEffects",
- ":Support",
- "@llvm-project//llvm:Support",
- ],
-)
-
-filegroup(
- name = "PDLOpsTdFiles",
- srcs = [
- "include/mlir/Dialect/PDL/IR/PDLBase.td",
- "include/mlir/Dialect/PDL/IR/PDLOps.td",
- "include/mlir/IR/SymbolInterfaces.td",
- "include/mlir/Interfaces/SideEffectInterfaces.td",
- ":OpBaseTdFiles",
- ],
-)
-
-gentbl(
- name = "PDLOpsIncGen",
- strip_include_prefix = "include",
- tbl_outs = [
- (
- "-gen-op-decls",
- "include/mlir/Dialect/PDL/IR/PDLOps.h.inc",
- ),
- (
- "-gen-op-defs",
- "include/mlir/Dialect/PDL/IR/PDLOps.cpp.inc",
- ),
- (
- "-gen-dialect-decls",
- "include/mlir/Dialect/PDL/IR/PDLOpsDialect.h.inc",
- ),
- ],
- tblgen = ":mlir-tblgen",
- td_file = "include/mlir/Dialect/PDL/IR/PDLOps.td",
- td_srcs = [
- ":PDLOpsTdFiles",
- ],
-)
-
-cc_library(
- name = "PDLInterpDialect",
- srcs = glob([
- "lib/Dialect/PDLInterp/IR/*.cpp",
- "lib/Dialect/PDLInterp/IR/*.h",
- ]),
- hdrs = glob([
- "include/mlir/Dialect/PDLInterp/IR/*.h",
- ]),
- includes = ["include"],
- deps = [
- ":IR",
- ":InferTypeOpInterface",
- ":PDLDialect",
- ":PDLInterpOpsIncGen",
- ":SideEffects",
- ":Support",
- "@llvm-project//llvm:Support",
- ],
-)
-
-filegroup(
- name = "PDLInterpOpsTdFiles",
- srcs = [
- "include/mlir/Dialect/PDL/IR/PDLBase.td",
- "include/mlir/Dialect/PDLInterp/IR/PDLInterpOps.td",
- "include/mlir/Interfaces/SideEffectInterfaces.td",
- ":OpBaseTdFiles",
- ],
-)
-
-gentbl(
- name = "PDLInterpOpsIncGen",
- strip_include_prefix = "include",
- tbl_outs = [
- (
- "-gen-op-decls",
- "include/mlir/Dialect/PDLInterp/IR/PDLInterpOps.h.inc",
- ),
- (
- "-gen-op-defs",
- "include/mlir/Dialect/PDLInterp/IR/PDLInterpOps.cpp.inc",
- ),
- (
- "-gen-dialect-decls -dialect=pdl_interp",
- "include/mlir/Dialect/PDLInterp/IR/PDLInterpOpsDialect.h.inc",
- ),
- ],
- tblgen = ":mlir-tblgen",
- td_file = "include/mlir/Dialect/PDLInterp/IR/PDLInterpOps.td",
- td_srcs = [
- ":PDLInterpOpsTdFiles",
- ],
-)
-
-# TODO(gcmn): Update SPIRV dependencies so that they map better to cmake files.
-filegroup(
- name = "SPIRVOpsTdFiles",
- srcs = [
- "include/mlir/IR/SymbolInterfaces.td",
- "include/mlir/Interfaces/CallInterfaces.td",
- "include/mlir/Interfaces/ControlFlowInterfaces.td",
- "include/mlir/Interfaces/SideEffectInterfaces.td",
- ":OpBaseTdFiles",
- ] + glob(["include/mlir/Dialect/SPIRV/*.td"]),
-)
-
-gentbl(
- name = "SPIRVOpsIncGen",
- strip_include_prefix = "include",
- tbl_outs = [
- (
- "-gen-op-decls",
- "include/mlir/Dialect/SPIRV/SPIRVOps.h.inc",
- ),
- (
- "-gen-op-defs",
- "include/mlir/Dialect/SPIRV/SPIRVOps.cpp.inc",
- ),
- (
- "-gen-dialect-decls",
- "include/mlir/Dialect/SPIRV/SPIRVOpsDialect.h.inc",
- ),
- (
- "-gen-op-doc",
- "g3doc/Dialects/SPIRV/SPIRVOps.md",
- ),
- (
- "-gen-enum-decls",
- "include/mlir/Dialect/SPIRV/SPIRVEnums.h.inc",
- ),
- (
- "-gen-enum-defs",
- "include/mlir/Dialect/SPIRV/SPIRVEnums.cpp.inc",
- ),
- (
- "-gen-spirv-enum-avail-decls",
- "include/mlir/Dialect/SPIRV/SPIRVEnumAvailability.h.inc",
- ),
- (
- "-gen-spirv-enum-avail-defs",
- "include/mlir/Dialect/SPIRV/SPIRVEnumAvailability.cpp.inc",
- ),
- (
- "-gen-spirv-capability-implication",
- "include/mlir/Dialect/SPIRV/SPIRVCapabilityImplication.inc",
- ),
- ],
- tblgen = ":mlir-tblgen",
- td_file = "include/mlir/Dialect/SPIRV/SPIRVOps.td",
- td_srcs = [
- ":SPIRVOpsTdFiles",
- ],
-)
-
-gentbl(
- name = "SPIRVCanonicalizationIncGen",
- strip_include_prefix = "lib/Dialect/SPIRV",
- tbl_outs = [
- (
- "-gen-rewriters",
- "lib/Dialect/SPIRV/SPIRVCanonicalization.inc",
- ),
- ],
- tblgen = ":mlir-tblgen",
- td_file = "lib/Dialect/SPIRV/SPIRVCanonicalization.td",
- td_srcs = [
- ":SPIRVOpsTdFiles",
- "lib/Dialect/SPIRV/SPIRVCanonicalization.td",
- ],
-)
-
-gentbl(
- name = "SPIRVAvailabilityIncGen",
- strip_include_prefix = "include",
- tbl_outs = [
- (
- "-gen-avail-interface-decls",
- "include/mlir/Dialect/SPIRV/SPIRVAvailability.h.inc",
- ),
- (
- "-gen-avail-interface-defs",
- "include/mlir/Dialect/SPIRV/SPIRVAvailability.cpp.inc",
- ),
- (
- "-gen-spirv-avail-impls",
- "include/mlir/Dialect/SPIRV/SPIRVOpAvailabilityImpl.inc",
- ),
- ],
- tblgen = ":mlir-tblgen",
- td_file = "include/mlir/Dialect/SPIRV/SPIRVOps.td",
- td_srcs = [
- ":SPIRVOpsTdFiles",
- ],
-)
-
-gentbl(
- name = "SPIRVTargetAndABIStructGen",
- tbl_outs = [
- (
- "-gen-struct-attr-decls",
- "include/mlir/Dialect/SPIRV/TargetAndABI.h.inc",
- ),
- (
- "-gen-struct-attr-defs",
- "include/mlir/Dialect/SPIRV/TargetAndABI.cpp.inc",
- ),
- ],
- tblgen = ":mlir-tblgen",
- td_file = "include/mlir/Dialect/SPIRV/TargetAndABI.td",
- td_srcs = [
- ":SPIRVOpsTdFiles",
- ":StdOpsTdFiles",
- ],
-)
-
-gentbl(
- name = "SPIRVOpUtilsIncGen",
- strip_include_prefix = "include",
- tbl_outs = [
- (
- "-gen-spirv-op-utils",
- "include/mlir/Dialect/SPIRV/SPIRVOpUtils.inc",
- ),
- ],
- tblgen = ":mlir-tblgen",
- td_file = "include/mlir/Dialect/SPIRV/SPIRVBase.td",
- td_srcs = [
- ":SPIRVOpsTdFiles",
- ":SPIRVAvailabilityIncGen",
- ],
-)
-
-gentbl(
- name = "SPIRVSerializationGen",
- strip_include_prefix = "include",
- tbl_outs = [
- (
- "-gen-spirv-serialization",
- "include/mlir/Dialect/SPIRV/SPIRVSerialization.inc",
- ),
- ],
- tblgen = ":mlir-tblgen",
- td_file = "include/mlir/Dialect/SPIRV/SPIRVOps.td",
- td_srcs = [
- ":SPIRVOpsTdFiles",
- ],
-)
-
-cc_library(
- name = "SPIRVDialect",
- srcs = glob(
- [
- "lib/Dialect/SPIRV/*.cpp",
- "lib/Dialect/SPIRV/*.h",
- ],
- exclude = [
- "lib/Dialect/SPIRV/SPIRVLowering.cpp",
- ],
- ) + [
- "include/mlir/Transforms/InliningUtils.h",
- ],
- hdrs = glob(
- [
- "include/mlir/Dialect/SPIRV/*.h",
- ],
- exclude = [
- "include/mlir/Dialect/SPIRV/SPIRVBinaryUtils.h",
- "include/mlir/Dialect/SPIRV/SPIRVLowering.h",
- ],
- ),
- includes = ["include"],
- deps = [
- ":CommonFolders",
- ":ControlFlowInterfaces",
- ":IR",
- ":Parser",
- ":Pass",
- ":SPIRVAvailabilityIncGen",
- ":SPIRVCanonicalizationIncGen",
- ":SPIRVOpUtilsIncGen",
- ":SPIRVOpsIncGen",
- ":SPIRVPassIncGen",
- ":SPIRVSerializationGen",
- ":SPIRVTargetAndABIStructGen",
- ":SideEffectInterfaces",
- ":Support",
- ":Transforms",
- "@llvm-project//llvm:Support",
- ],
-)
-
-gentbl(
- name = "SPIRVPassIncGen",
- strip_include_prefix = "include",
- tbl_outs = [
- (
- "-gen-pass-decls -name SPIRV",
- "include/mlir/Dialect/SPIRV/Passes.h.inc",
- ),
- ],
- tblgen = ":mlir-tblgen",
- td_file = "include/mlir/Dialect/SPIRV/Passes.td",
- td_srcs = [
- ":PassBaseTdFiles",
- ],
-)
-
-cc_library(
- name = "SPIRVLowering",
- srcs = glob([
- "lib/Dialect/SPIRV/Transforms/*.cpp",
- "lib/Dialect/SPIRV/Transforms/*.h",
- ]) + [
- "lib/Dialect/SPIRV/SPIRVLowering.cpp",
- ],
- hdrs = [
- "include/mlir/Dialect/SPIRV/Passes.h",
- "include/mlir/Dialect/SPIRV/SPIRVLowering.h",
- "include/mlir/Dialect/SPIRV/TargetAndABI.h",
- ],
- includes = [
- "include",
- ],
- deps = [
- ":IR",
- ":Pass",
- ":SPIRVDialect",
- ":SPIRVPassIncGen",
- ":SPIRVTargetAndABIStructGen",
- ":StandardOps",
- ":Support",
- ":Transforms",
- "@llvm-project//llvm:Support",
- ],
-)
-
-cc_library(
- name = "StandardToSPIRVTransforms",
- srcs = glob([
- "lib/Conversion/StandardToSPIRV/*.cpp",
- "lib/Conversion/StandardToSPIRV/*.h",
- ]) + ["lib/Conversion/PassDetail.h"],
- hdrs = glob([
- "include/mlir/Conversion/StandardToSPIRV/*.h",
- ]),
- includes = [
- "include",
- "lib/Conversion/StandardToSPIRV",
- ],
- deps = [
- ":ConversionPassIncGen",
- ":IR",
- ":Pass",
- ":SPIRVDialect",
- ":SPIRVLowering",
- ":StandardOps",
- ":Support",
- ":Transforms",
- ":VectorOps",
- "@llvm-project//llvm:Support",
- ],
-)
-
-alias(
- name = "StandardToSPIRVConversions",
- actual = "StandardToSPIRVTransforms",
-)
-
-cc_library(
- name = "SPIRVSerialization",
- srcs = glob(
- [
- "lib/Dialect/SPIRV/Serialization/*.cpp",
- ],
- exclude = [
- "lib/Dialect/SPIRV/Serialization/TranslateRegistration.cpp",
- ],
- ),
- hdrs = [
- "include/mlir/Dialect/SPIRV/SPIRVBinaryUtils.h",
- "include/mlir/Dialect/SPIRV/Serialization.h",
- ],
- includes = ["include"],
- deps = [
- ":IR",
- ":SPIRVDialect",
- ":SPIRVOpUtilsIncGen",
- ":SPIRVOpsIncGen",
- ":SPIRVSerializationGen",
- ":Support",
- ":Transforms",
- "@llvm-project//llvm:Support",
- ],
-)
-
-cc_library(
- name = "SPIRVTranslateRegistration",
- srcs = [
- "lib/Dialect/SPIRV/Serialization/TranslateRegistration.cpp",
- ],
- includes = ["include"],
- deps = [
- ":IR",
- ":Parser",
- ":SPIRVDialect",
- ":SPIRVSerialization",
- ":Support",
- ":Translation",
- "@llvm-project//llvm:Support",
- ],
-)
-
-cc_library(
- name = "TransformUtils",
- srcs = glob([
- "lib/Transforms/Utils/*.cpp",
- "lib/Transforms/Utils/*.h",
- ]),
- hdrs = glob([
- "include/mlir/Transforms/*.h",
- ]),
- includes = ["include"],
- deps = [
- ":Affine",
- ":Analysis",
- ":ControlFlowInterfaces",
- ":IR",
- ":Pass",
- ":SCFDialect",
- ":SideEffectInterfaces",
- ":StandardOps",
- ":Support",
- ":TransformsPassIncGen",
- "@llvm-project//llvm:Support",
- ],
-)
-
-gentbl(
- name = "DerivedAttributeOpInterfaceIncGen",
- strip_include_prefix = "include",
- tbl_outs = [
- (
- "-gen-op-interface-decls",
- "include/mlir/Interfaces/DerivedAttributeOpInterface.h.inc",
- ),
- (
- "-gen-op-interface-defs",
- "include/mlir/Interfaces/DerivedAttributeOpInterface.cpp.inc",
- ),
- ],
- tblgen = ":mlir-tblgen",
- td_file = "include/mlir/Interfaces/DerivedAttributeOpInterface.td",
- td_srcs = [
- ":OpBaseTdFiles",
- ],
-)
-
-cc_library(
- name = "DerivedAttributeOpInterface",
- srcs = [
- "lib/Interfaces/DerivedAttributeOpInterface.cpp",
- ],
- hdrs = [
- "include/mlir/Interfaces/DerivedAttributeOpInterface.h",
- ],
- includes = ["include"],
- deps = [
- ":DerivedAttributeOpInterfaceIncGen",
- ":IR",
- ":Support",
- "@llvm-project//llvm:Support",
- ],
-)
-
-gentbl(
- name = "LoopLikeInterfaceIncGen",
- strip_include_prefix = "include",
- tbl_outs = [
- (
- "-gen-op-interface-decls",
- "include/mlir/Interfaces/LoopLikeInterface.h.inc",
- ),
- (
- "-gen-op-interface-defs",
- "include/mlir/Interfaces/LoopLikeInterface.cpp.inc",
- ),
- ],
- tblgen = ":mlir-tblgen",
- td_file = "include/mlir/Interfaces/LoopLikeInterface.td",
- td_srcs = [
- ":OpBaseTdFiles",
- ],
-)
-
-gentbl(
- name = "VectorInterfacesIncGen",
- strip_include_prefix = "include",
- tbl_outs = [
- (
- "-gen-op-interface-decls",
- "include/mlir/Interfaces/VectorInterfaces.h.inc",
- ),
- (
- "-gen-op-interface-defs",
- "include/mlir/Interfaces/VectorInterfaces.cpp.inc",
- ),
- ],
- tblgen = ":mlir-tblgen",
- td_file = "include/mlir/Interfaces/VectorInterfaces.td",
- td_srcs = [
- ":OpBaseTdFiles",
- ],
-)
-
-gentbl(
- name = "ViewLikeInterfaceIncGen",
- strip_include_prefix = "include",
- tbl_outs = [
- (
- "-gen-op-interface-decls",
- "include/mlir/Interfaces/ViewLikeInterface.h.inc",
- ),
- (
- "-gen-op-interface-defs",
- "include/mlir/Interfaces/ViewLikeInterface.cpp.inc",
- ),
- ],
- tblgen = ":mlir-tblgen",
- td_file = "include/mlir/Interfaces/ViewLikeInterface.td",
- td_srcs = [
- ":OpBaseTdFiles",
- ],
-)
-
-gentbl(
- name = "CopyOpInterfaceIncGen",
- strip_include_prefix = "include",
- tbl_outs = [
- (
- "-gen-op-interface-decls",
- "include/mlir/Interfaces/CopyOpInterface.h.inc",
- ),
- (
- "-gen-op-interface-defs",
- "include/mlir/Interfaces/CopyOpInterface.cpp.inc",
- ),
- ],
- tblgen = ":mlir-tblgen",
- td_file = "include/mlir/Interfaces/CopyOpInterface.td",
- td_srcs = [
- ":OpBaseTdFiles",
- ],
-)
-
-gentbl(
- name = "TransformsPassIncGen",
- strip_include_prefix = "include",
- tbl_outs = [
- (
- "-gen-pass-decls -name Transforms",
- "include/mlir/Transforms/Passes.h.inc",
- ),
- ],
- tblgen = ":mlir-tblgen",
- td_file = "include/mlir/Transforms/Passes.td",
- td_srcs = [
- ":PassBaseTdFiles",
- ],
-)
-
-cc_library(
- name = "Transforms",
- srcs = glob([
- "lib/Transforms/*.cpp",
- "lib/Transforms/*.h",
- ]),
- hdrs = glob(["include/mlir/Transforms/*.h"]),
- includes = ["include"],
- deps = [
- ":Affine",
- ":Analysis",
- ":ControlFlowInterfaces",
- ":CopyOpInterface",
- ":IR",
- ":LinalgOps",
- ":LoopLikeInterface",
- ":Pass",
- ":SCFDialect",
- ":SideEffectInterfaces",
- ":StandardOps",
- ":Support",
- ":TransformUtils",
- ":TransformsPassIncGen",
- "@llvm-project//llvm:Support",
- ],
-)
-
-cc_library(
- name = "CommonFolders",
- srcs = [
- ],
- hdrs = [
- "include/mlir/Dialect/CommonFolders.h",
- ],
- includes = ["include"],
- deps = [
- ":IR",
- "@llvm-project//llvm:Support",
- ],
-)
-
-cc_library(
- name = "SCFToGPU",
- srcs = ["lib/Conversion/SCFToGPU/SCFToGPU.cpp"],
- hdrs = ["include/mlir/Conversion/SCFToGPU/SCFToGPU.h"],
- includes = ["include"],
- deps = [
- ":Affine",
- ":AffineToStandard",
- ":ConversionPassIncGen",
- ":GPUDialect",
- ":GPUTransforms",
- ":IR",
- ":Pass",
- ":SCFDialect",
- ":StandardOps",
- ":Support",
- ":TransformUtils",
- ":Transforms",
- "@llvm-project//llvm:Support",
- ],
-)
-
-cc_library(
- name = "SCFToGPUPass",
- srcs = [
- "lib/Conversion/PassDetail.h",
- "lib/Conversion/SCFToGPU/SCFToGPUPass.cpp",
- ],
- hdrs = [
- "include/mlir/Conversion/SCFToGPU/SCFToGPUPass.h",
- ],
- includes = ["include"],
- deps = [
- ":Affine",
- ":ConversionPassIncGen",
- ":GPUDialect",
- ":Pass",
- ":SCFDialect",
- ":SCFToGPU",
- ":StandardOps",
- ":Support",
- ":Transforms",
- "@llvm-project//llvm:Support",
- ],
-)
-
-cc_library(
- name = "SCFToSPIRV",
- srcs = ["lib/Conversion/SCFToSPIRV/SCFToSPIRV.cpp"],
- hdrs = ["include/mlir/Conversion/SCFToSPIRV/SCFToSPIRV.h"],
- includes = ["include"],
- deps = [
- ":Affine",
- ":AffineToStandard",
- ":ConversionPassIncGen",
- ":IR",
- ":Pass",
- ":SCFDialect",
- ":SPIRVDialect",
- ":SPIRVLowering",
- ":StandardOps",
- ":Support",
- ":TransformUtils",
- ":Transforms",
- "@llvm-project//llvm:Support",
- ],
-)
-
-cc_library(
- name = "SCFToStandard",
- srcs = [
- "lib/Conversion/PassDetail.h",
- "lib/Conversion/SCFToStandard/SCFToStandard.cpp",
- ],
- hdrs = [
- "include/mlir/Conversion/SCFToStandard/SCFToStandard.h",
- ],
- includes = ["include"],
- deps = [
- ":ConversionPassIncGen",
- ":IR",
- ":LLVMDialect",
- ":Pass",
- ":SCFDialect",
- ":StandardOps",
- ":Support",
- ":TransformUtils",
- ":Transforms",
- ],
-)
-
-alias(
- name = "CFGTransforms",
- actual = "SCFToStandard",
-)
-
-cc_library(
- name = "StandardToLLVM",
- srcs = [
- "lib/Conversion/PassDetail.h",
- "lib/Conversion/StandardToLLVM/StandardToLLVM.cpp",
- ],
- hdrs = [
- "include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h",
- "include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVMPass.h",
- ],
- includes = ["include"],
- deps = [
- ":ConversionPassIncGen",
- ":IR",
- ":LLVMDialect",
- ":Parser",
- ":Pass",
- ":StandardOps",
- ":Support",
- ":TransformUtils",
- ":Transforms",
- "@llvm-project//llvm:Core",
- "@llvm-project//llvm:Support",
- ],
-)
-
-alias(
- name = "LLVMTransforms",
- actual = "StandardToLLVM",
-)
-
-gentbl(
- name = "CallOpInterfacesIncGen",
- strip_include_prefix = "include",
- tbl_outs = [
- (
- "-gen-op-interface-decls",
- "include/mlir/Interfaces/CallInterfaces.h.inc",
- ),
- (
- "-gen-op-interface-defs",
- "include/mlir/Interfaces/CallInterfaces.cpp.inc",
- ),
- ],
- tblgen = ":mlir-tblgen",
- td_file = "include/mlir/Interfaces/CallInterfaces.td",
- td_srcs = [
- ":OpBaseTdFiles",
- ],
-)
-
-cc_library(
- name = "CallOpInterfaces",
- srcs = [
- "lib/Interfaces/CallInterfaces.cpp",
- ],
- hdrs = [
- "include/mlir/Interfaces/CallInterfaces.h",
- ],
- includes = ["include"],
- deps = [
- ":CallOpInterfacesIncGen",
- ":IR",
- ":Support",
- "@llvm-project//llvm:Support",
- ],
-)
-
-gentbl(
- name = "ControlFlowInterfacesIncGen",
- strip_include_prefix = "include",
- tbl_outs = [
- (
- "-gen-op-interface-decls",
- "include/mlir/Interfaces/ControlFlowInterfaces.h.inc",
- ),
- (
- "-gen-op-interface-defs",
- "include/mlir/Interfaces/ControlFlowInterfaces.cpp.inc",
- ),
- ],
- tblgen = ":mlir-tblgen",
- td_file = "include/mlir/Interfaces/ControlFlowInterfaces.td",
- td_srcs = [
- ":OpBaseTdFiles",
- ],
-)
-
-cc_library(
- name = "ControlFlowInterfaces",
- srcs = [
- "lib/Interfaces/ControlFlowInterfaces.cpp",
- ],
- hdrs = [
- "include/mlir/Interfaces/ControlFlowInterfaces.h",
- ],
- includes = ["include"],
- deps = [
- ":ControlFlowInterfacesIncGen",
- ":IR",
- ":Support",
- "@llvm-project//llvm:Support",
- ],
-)
-
-gentbl(
- name = "InferTypeOpInterfaceIncGen",
- strip_include_prefix = "include",
- tbl_outs = [
- (
- "-gen-op-interface-decls",
- "include/mlir/Interfaces/InferTypeOpInterface.h.inc",
- ),
- (
- "-gen-op-interface-defs",
- "include/mlir/Interfaces/InferTypeOpInterface.cpp.inc",
- ),
- ],
- tblgen = ":mlir-tblgen",
- td_file = "include/mlir/Interfaces/InferTypeOpInterface.td",
- td_srcs = [
- ":OpBaseTdFiles",
- ],
-)
-
-cc_library(
- name = "InferTypeOpInterface",
- srcs = [
- "lib/Interfaces/InferTypeOpInterface.cpp",
- ],
- hdrs = [
- "include/mlir/Interfaces/InferTypeOpInterface.h",
- ],
- includes = ["include"],
- deps = [
- ":IR",
- ":InferTypeOpInterfaceIncGen",
- ":Support",
- "@llvm-project//llvm:Support",
- ],
-)
-
-gentbl(
- name = "SideEffectInterfacesIncGen",
- strip_include_prefix = "include",
- tbl_outs = [
- (
- "-gen-op-interface-decls",
- "include/mlir/Interfaces/SideEffectInterfaces.h.inc",
- ),
- (
- "-gen-op-interface-defs",
- "include/mlir/Interfaces/SideEffectInterfaces.cpp.inc",
- ),
- ],
- tblgen = ":mlir-tblgen",
- td_file = "include/mlir/Interfaces/SideEffectInterfaces.td",
- td_srcs = [
- ":OpBaseTdFiles",
- ],
-)
-
-cc_library(
- name = "SideEffectInterfaces",
- srcs = [
- "lib/Interfaces/SideEffectInterfaces.cpp",
- ],
- hdrs = [
- "include/mlir/Interfaces/SideEffectInterfaces.h",
- ],
- includes = ["include"],
- deps = [
- ":IR",
- ":SideEffectInterfacesIncGen",
- ":Support",
- "@llvm-project//llvm:Support",
- ],
-)
-
-alias(
- name = "SideEffects",
- actual = "SideEffectInterfaces",
-)
-
-cc_library(
- name = "Analysis",
- srcs = glob(
- [
- "lib/Analysis/*.cpp",
- "lib/Analysis/*.h",
- "lib/Analysis/*/*.cpp",
- "lib/Analysis/*/*.h",
- ],
- exclude = [
- "lib/Analysis/Vector*.cpp",
- "lib/Analysis/Vector*.h",
- ],
- ),
- hdrs = glob(
- [
- "include/mlir/Analysis/*.h",
- "include/mlir/Analysis/*/*.h",
- ],
- exclude = [
- "include/mlir/Analysis/Vector*.h",
- ],
- ),
- includes = ["include"],
- deps = [
- ":Affine",
- ":CallOpInterfaces",
- ":IR",
- ":LinalgOps",
- ":SCFDialect",
- ":StandardOps",
- ":Support",
- "@llvm-project//llvm:Support",
- ],
-)
-
-cc_library(
- name = "Translation",
- srcs = glob([
- "lib/Translation/*.cpp",
- "lib/Translation/*.h",
- ]),
- hdrs = [
- "include/mlir/Translation.h",
- ],
- includes = ["include"],
- deps = [
- ":Analysis",
- ":IR",
- ":Parser",
- ":Support",
- "@llvm-project//llvm:Support",
- ],
-)
-
-cc_library(
- name = "LLVMIRModuleTranslation",
- srcs = [
- "lib/Target/LLVMIR/DebugTranslation.cpp",
- "lib/Target/LLVMIR/DebugTranslation.h",
- "lib/Target/LLVMIR/ModuleTranslation.cpp",
- "lib/Target/LLVMIR/TypeTranslation.cpp",
- ],
- hdrs = [
- "include/mlir/Target/LLVMIR/ModuleTranslation.h",
- "include/mlir/Target/LLVMIR/TypeTranslation.h",
- ],
- includes = ["include"],
- deps = [
- ":IR",
- ":LLVMConversionIncGen",
- ":LLVMDialect",
- ":LLVMIRTransforms",
- ":OpenMPDialect",
- ":Support",
- "@llvm-project//llvm:Core",
- "@llvm-project//llvm:FrontendOpenMP",
- "@llvm-project//llvm:Support",
- "@llvm-project//llvm:TransformUtils",
- ],
-)
-
-cc_library(
- name = "TargetLLVMIR",
- srcs = [
- "lib/Target/LLVMIR/ConvertFromLLVMIR.cpp",
- "lib/Target/LLVMIR/ConvertToLLVMIR.cpp",
- ],
- hdrs = [
- "include/mlir/Target/LLVMIR.h",
- ],
- includes = ["include"],
- deps = [
- ":IR",
- ":LLVMConversionIncGen",
- ":LLVMDialect",
- ":LLVMIRModuleTranslation",
- ":Support",
- ":TargetLLVMAVX512Intr",
- ":Translation",
- "@llvm-project//llvm:Core",
- "@llvm-project//llvm:IRReader",
- "@llvm-project//llvm:Support",
- ],
-)
-
-cc_library(
- name = "TargetNVVMIR",
- srcs = [
- "lib/Target/LLVMIR/ConvertToNVVMIR.cpp",
- ],
- hdrs = [
- "include/mlir/Target/NVVMIR.h",
- ],
- includes = ["include"],
- deps = [
- ":GPUDialect",
- ":IR",
- ":LLVMDialect",
- ":LLVMIRModuleTranslation",
- ":NVVMConversionIncGen",
- ":NVVMDialect",
- ":Support",
- ":Translation",
- "@llvm-project//llvm:Core",
- "@llvm-project//llvm:Support",
- ],
-)
-
-cc_library(
- name = "TargetROCDLIR",
- srcs = [
- "lib/Target/LLVMIR/ConvertToROCDLIR.cpp",
- ],
- hdrs = [
- "include/mlir/Target/ROCDLIR.h",
- ],
- includes = ["include"],
- deps = [
- ":GPUDialect",
- ":IR",
- ":LLVMDialect",
- ":LLVMIRModuleTranslation",
- ":ROCDLConversionIncGen",
- ":ROCDLDialect",
- ":Support",
- ":Translation",
- "@llvm-project//llvm:Core",
- "@llvm-project//llvm:Support",
- ],
-)
-
-# TODO(zinenko): Update these so that we can simplify mapping to cmake.
-cc_library(
- name = "ExecutionEngine",
- srcs = [
- "lib/ExecutionEngine/ExecutionEngine.cpp",
- ],
- hdrs = [
- "include/mlir/ExecutionEngine/ExecutionEngine.h",
- ],
- includes = ["include"],
- deps = [
- ":IR",
- ":LLVMDialect",
- ":Support",
- ":TargetLLVMIR",
- ":Translation",
- "@llvm-project//llvm:BitReader",
- "@llvm-project//llvm:BitWriter",
- "@llvm-project//llvm:Core",
- "@llvm-project//llvm:ExecutionEngine",
- "@llvm-project//llvm:MC",
- "@llvm-project//llvm:OrcJIT",
- "@llvm-project//llvm:Support",
- "@llvm-project//llvm:Target", # fixdeps: keep
- "@llvm-project//llvm:TransformUtils",
- "@llvm-project//llvm:X86CodeGen", # fixdeps: keep
- "@llvm-project//llvm:X86Disassembler", # fixdeps: keep
- ],
-)
-
-cc_library(
- name = "ExecutionEngineUtils",
- srcs = [
- "lib/ExecutionEngine/OptUtils.cpp",
- ],
- hdrs = [
- "include/mlir/ExecutionEngine/OptUtils.h",
- ],
- includes = ["include"],
- deps = [
- "@llvm-project//llvm:Analysis",
- "@llvm-project//llvm:Core",
- "@llvm-project//llvm:IPO",
- "@llvm-project//llvm:Support",
- "@llvm-project//llvm:Target",
- ],
-)
-
-# TODO(jpienaar): Update this.
-cc_library(
- name = "MlirOptLib",
- srcs = [
- "lib/Support/MlirOptMain.cpp",
- ],
- hdrs = [
- "include/mlir/Support/MlirOptMain.h",
- ],
- includes = ["include"],
- deps = [
- ":Analysis",
- ":ConversionPasses",
- ":GPUToGPURuntimeTransforms",
- ":GPUToNVVMTransforms",
- ":GPUToROCDLTransforms",
- ":GPUToSPIRVTransforms",
- ":GPUTransforms",
- ":IR",
- ":LLVMDialect",
- ":LinalgToLLVM",
- ":LinalgToSPIRV",
- ":LinalgToStandard",
- ":NVVMDialect",
- ":Parser",
- ":Pass",
- ":SCFTransforms",
- ":ShapeToStandard",
- ":ShapeTransforms",
- ":StandardOpsTransforms",
- ":StandardToLLVM",
- ":StandardToSPIRVTransforms",
- ":Support",
- ":Transforms",
- ":VectorToLLVM",
- ":VectorToSCF",
- "@llvm-project//llvm:Support",
- "@llvm-project//mlir/test:TestAffine",
- "@llvm-project//mlir/test:TestDialect",
- "@llvm-project//mlir/test:TestIR",
- "@llvm-project//mlir/test:TestPass",
- "@llvm-project//mlir/test:TestReducer",
- "@llvm-project//mlir/test:TestSPIRV",
- "@llvm-project//mlir/test:TestTransforms",
- "@llvm-project//mlir/test:TestTypeDialect",
- ],
-)
-
-cc_library(
- name = "AllTranslations",
- hdrs = ["include/mlir/InitAllTranslations.h"],
- deps = [
- ":SPIRVTranslateRegistration",
- ":TargetLLVMIR",
- ":TargetNVVMIR",
- ":TargetROCDLIR",
- ],
-)
-
-cc_library(
- name = "MlirTranslateMain",
- srcs = ["tools/mlir-translate/mlir-translate.cpp"],
- deps = [
- ":AllPassesAndDialectsNoRegistration",
- ":AllTranslations",
- ":IR",
- ":Parser",
- ":Support",
- ":Translation",
- "@llvm-project//llvm:Support",
- ],
-)
-
-cc_binary(
- name = "mlir-translate",
- deps = [
- ":MlirTranslateMain",
- ],
-)
-
-cc_library(
- name = "AllPassesAndDialectsNoRegistration",
- hdrs = [
- "include/mlir/InitAllDialects.h",
- "include/mlir/InitAllPasses.h",
- ],
- defines = ["MLIR_CUDA_CONVERSIONS_ENABLED"],
- deps = [
- ":AVX512",
- ":AVX512ToLLVM",
- ":Affine",
- ":AffinePassIncGen",
- ":AffineToStandard",
- ":AffineTransforms",
- ":Async",
- ":ConversionPasses",
- ":GPUDialect",
- ":GPUPassIncGen",
- ":GPUToGPURuntimeTransforms",
- ":GPUToNVVMTransforms",
- ":GPUToROCDLTransforms",
- ":GPUToSPIRVTransforms",
- ":GPUToVulkanTransforms",
- ":GPUTransforms",
- ":IR",
- ":LLVMAVX512",
- ":LLVMDialect",
- ":LLVMIRTransforms",
- ":LLVMPassIncGen",
- ":LinalgOps",
- ":LinalgPassIncGen",
- ":LinalgToLLVM",
- ":LinalgToSPIRV",
- ":LinalgToStandard",
- ":LinalgTransforms",
- ":NVVMDialect",
- ":OpenACCDialect",
- ":OpenMPDialect",
- ":OpenMPToLLVM",
- ":PDLDialect",
- ":PDLInterpDialect",
- ":QuantOps",
- ":QuantPassIncGen",
- ":ROCDLDialect",
- ":SCFDialect",
- ":SCFPassIncGen",
- ":SCFToGPUPass",
- ":SCFToStandard",
- ":SCFTransforms",
- ":SDBM",
- ":SPIRVDialect",
- ":SPIRVLowering",
- ":SPIRVPassIncGen",
- ":SPIRVToLLVM",
- ":Shape",
- ":ShapeToStandard",
- ":ShapeTransforms",
- ":ShapeTransformsPassIncGen",
- ":StandardOps",
- ":StandardOpsTransforms",
- ":StandardOpsTransformsPassIncGen",
- ":StandardToLLVM",
- ":StandardToSPIRVTransforms",
- ":Transforms",
- ":TransformsPassIncGen",
- ":VectorOps",
- ":VectorToLLVM",
- ":VectorToROCDL",
- ":VectorToSCF",
- ":VectorToSPIRV",
- ],
-)
-
-cc_library(
- name = "AllPassesAndDialects",
- deps = [
- ":AllPassesAndDialectsNoRegistration",
- ],
-)
-
-cc_binary(
- name = "mlir-opt",
- srcs = [
- "tools/mlir-opt/mlir-opt.cpp",
- ],
- copts = ["-DMLIR_INCLUDE_TESTS"],
- deps = [
- ":AllPassesAndDialectsNoRegistration",
- ":Analysis",
- ":IR",
- ":MlirOptLib",
- ":OpenMPDialect",
- ":Pass",
- ":QuantOps",
- ":SCFToGPUPass",
- ":Support",
- ":Transforms",
- "@llvm-project//llvm:AllTargetsCodeGens",
- "@llvm-project//llvm:Support",
- "@llvm-project//mlir/test:TestAffine",
- "@llvm-project//mlir/test:TestDialect",
- "@llvm-project//mlir/test:TestIR",
- "@llvm-project//mlir/test:TestPass",
- "@llvm-project//mlir/test:TestReducer",
- "@llvm-project//mlir/test:TestSPIRV",
- "@llvm-project//mlir/test:TestTransforms",
- "@llvm-project//mlir/test:TestTypeDialect",
- ],
-)
-
-cc_library(
- name = "MlirJitRunner",
- srcs = ["lib/ExecutionEngine/JitRunner.cpp"],
- hdrs = ["include/mlir/ExecutionEngine/JitRunner.h"],
- includes = ["include"],
- deps = [
- ":AllPassesAndDialectsNoRegistration",
- ":ExecutionEngine",
- ":ExecutionEngineUtils",
- ":IR",
- ":LLVMDialect",
- ":Parser",
- ":Pass",
- ":SCFToStandard",
- ":Support",
- "@llvm-project//llvm:Core",
- "@llvm-project//llvm:OrcJIT",
- "@llvm-project//llvm:Support",
- ],
-)
-
-cc_library(
- name = "mlir_c_runner_utils",
- srcs = [
- "lib/ExecutionEngine/CRunnerUtils.cpp",
- "lib/ExecutionEngine/SparseUtils.cpp",
- ],
- hdrs = [
- "include/mlir/ExecutionEngine/CRunnerUtils.h",
- ],
- includes = ["include"],
-)
-
-cc_library(
- name = "mlir_runner_utils",
- srcs = [
- "lib/ExecutionEngine/RunnerUtils.cpp",
- ],
- hdrs = [
- "include/mlir/ExecutionEngine/RunnerUtils.h",
- ],
- includes = ["include"],
- deps = [
- ":mlir_c_runner_utils",
- ],
-)
-
-cc_binary(
- name = "mlir-cpu-runner",
- srcs = ["tools/mlir-cpu-runner/mlir-cpu-runner.cpp"],
- linkopts = ["-ldl"],
- deps = [
- ":AllPassesAndDialectsNoRegistration",
- ":ExecutionEngineUtils",
- ":MlirJitRunner",
- "@llvm-project//llvm:Support",
- ],
-)
-
-cc_library(
- name = "tools/libcuda-runtime-wrappers",
- srcs = ["tools/mlir-cuda-runner/cuda-runtime-wrappers.cpp"],
- compatible_with = ["//buildenv/target:prod"],
- deps = [
- ":mlir_c_runner_utils",
- "//third_party/gpus/cuda:cuda_headers",
- "//third_party/gpus/cuda:cuda_runtime",
- "//third_party/gpus/cuda:libcuda",
- "@llvm-project//llvm:Support",
- ],
-)
-
-cc_binary(
- name = "tools/libcuda-runtime-wrappers.so",
- linkshared = True,
- deps = [":tools/libcuda-runtime-wrappers"],
-)
-
-cc_library(
- name = "VulkanRuntime",
- srcs = [
- "tools/mlir-vulkan-runner/VulkanRuntime.cpp",
- ],
- hdrs = [
- "tools/mlir-vulkan-runner/VulkanRuntime.h",
- ],
- deps = [
- ":IR",
- ":Pass",
- ":SPIRVDialect",
- ":SideEffectInterfaces",
- ":StandardOps",
- ":Support",
- "@llvm-project//llvm:Support",
- "@vulkan_headers",
- "@vulkan_sdk//:sdk",
- ],
-)
-
-cc_binary(
- name = "tools/libvulkan-runtime-wrappers.so",
- srcs = ["tools/mlir-vulkan-runner/vulkan-runtime-wrappers.cpp"],
- linkshared = True,
- deps = [
- ":VulkanRuntime",
- "@llvm-project//llvm:Support",
- ],
-)
-
-cc_binary(
- name = "mlir-cuda-runner",
- srcs = ["tools/mlir-cuda-runner/mlir-cuda-runner.cpp"],
- data = [":tools/libcuda-runtime-wrappers.so"],
- deps = [
- ":AllPassesAndDialectsNoRegistration",
- ":ExecutionEngineUtils",
- ":GPUDialect",
- ":GPUToGPURuntimeTransforms",
- ":GPUToNVVMTransforms",
- ":GPUToROCDLTransforms",
- ":GPUTransforms",
- ":IR",
- ":LLVMDialect",
- ":MlirJitRunner",
- ":NVVMDialect",
- ":Pass",
- ":StandardToLLVM",
- ":TargetNVVMIR",
- ":Transforms",
- "//devtools/build/runtime:get_runfiles_dir",
- "//third_party/gpus/cuda:cuda_headers",
- "//third_party/gpus/cuda:cuda_runtime",
- "//third_party/gpus/cuda:libcuda",
- "@llvm-project//llvm:Support",
- ],
-)
-
-cc_binary(
- name = "mlir-vulkan-runner",
- srcs = ["tools/mlir-vulkan-runner/mlir-vulkan-runner.cpp"],
- data = [
- ":tools/libvulkan-runtime-wrappers.so",
- "@llvm-project//mlir/test/mlir-cpu-runner:libmlir_runner_utils.so",
- ],
- deps = [
- ":AllPassesAndDialectsNoRegistration",
- ":ExecutionEngineUtils",
- ":GPUToSPIRVTransforms",
- ":GPUToVulkanTransforms",
- ":GPUTransforms",
- ":MlirJitRunner",
- ":Pass",
- ":SPIRVDialect",
- ":StandardToLLVM",
- ":StandardToSPIRVTransforms",
- "@llvm-project//llvm:Support",
- ],
-)
-
-cc_library(
- name = "TableGen",
- srcs = glob(["lib/TableGen/*.cpp"]),
- hdrs = glob(["include/mlir/TableGen/*.h"]),
- includes = ["include"],
- deps = [
- ":Support",
- "@llvm-project//llvm:Support",
- "@llvm-project//llvm:TableGen",
- ],
-)
-
-cc_library(
- name = "MlirTableGenMain",
- srcs = [
- "tools/mlir-tblgen/mlir-tblgen.cpp",
- ],
- includes = ["include"],
- deps = [
- ":Support",
- ":TableGen",
- "@llvm-project//llvm:Support",
- "@llvm-project//llvm:TableGen",
- "@llvm-project//llvm:config",
- ],
-)
-
-cc_binary(
- name = "mlir-tblgen",
- srcs = glob([
- "tools/mlir-tblgen/*.h",
- "tools/mlir-tblgen/*.cpp",
- ]),
- linkopts = [
- "-lm",
- "-lpthread",
- ],
- deps = [
- ":MlirTableGenMain",
- ":Support",
- ":TableGen",
- "@llvm-project//llvm:Support",
- "@llvm-project//llvm:TableGen",
- "@llvm-project//llvm:config",
- ],
-)
-
-cc_binary(
- name = "mlir-linalg-ods-gen",
- srcs = glob([
- "tools/mlir-linalg-ods-gen/mlir-linalg-ods-gen.cpp",
- ]),
- linkopts = [
- "-lm",
- "-lpthread",
- ],
- deps = [
- ":IR",
- ":Support",
- "@llvm-project//llvm:Support",
- "@llvm-project//llvm:TableGen",
- "@llvm-project//llvm:config",
- ],
-)
-
-## OpenACC dialect
-
-gentbl(
- name = "OpenACCOpsIncGen",
- strip_include_prefix = "include",
- tbl_outs = [
- (
- "-gen-dialect-decls -dialect=acc",
- "include/mlir/Dialect/OpenACC/OpenACCOpsDialect.h.inc",
- ),
- (
- "-gen-op-decls",
- "include/mlir/Dialect/OpenACC/OpenACCOps.h.inc",
- ),
- (
- "-gen-op-defs",
- "include/mlir/Dialect/OpenACC/OpenACCOps.cpp.inc",
- ),
- (
- "-gen-enum-decls",
- "include/mlir/Dialect/OpenACC/OpenACCOpsEnums.h.inc",
- ),
- (
- "-gen-enum-defs",
- "include/mlir/Dialect/OpenACC/OpenACCOpsEnums.cpp.inc",
- ),
- (
- "-gen-op-doc",
- "g3doc/Dialects/OpenACC/OpenACCOps.md",
- ),
- ],
- tblgen = ":mlir-tblgen",
- td_file = "include/mlir/Dialect/OpenACC/OpenACCOps.td",
- td_srcs = [
- ":OpBaseTdFiles",
- ":OmpCommonTdGen",
- ],
-)
-
-cc_library(
- name = "OpenACCDialect",
- srcs = glob(
- [
- "lib/Dialect/OpenACC/IR/*.cpp",
- "lib/Dialect/OpenACC/IR/*.h",
- ],
- ),
- hdrs = glob([
- "include/mlir/Dialect/OpenACC/*.h",
- ]),
- includes = ["include"],
- deps = [
- ":IR",
- ":OpenACCOpsIncGen",
- ":StandardOps",
- "@llvm-project//llvm:Support",
- ],
-)
-
-## OpenMP dialect
-gentbl(
- name = "OmpCommonTdGen",
- strip_include_prefix = "include",
- tbl_outs = [
- (
- "-gen-directive-decl",
- "include/mlir/Dialect/OpenMP/OmpCommon.td",
- ),
- ],
- tblgen = ":mlir-tblgen",
- td_file = "@llvm-project//llvm:include/llvm/Frontend/OpenMP/OMP.td",
- td_includes = ["external/llvm-project/llvm/include"],
- td_srcs = [
- "@llvm-project//llvm:omp_td_files",
- ":OpBaseTdFiles",
- ],
-)
-
-gentbl(
- name = "OpenMPOpsIncGen",
- strip_include_prefix = "include",
- tbl_outs = [
- (
- "-gen-op-decls",
- "include/mlir/Dialect/OpenMP/OpenMPOps.h.inc",
- ),
- (
- "-gen-op-defs",
- "include/mlir/Dialect/OpenMP/OpenMPOps.cpp.inc",
- ),
- (
- "-gen-enum-decls",
- "include/mlir/Dialect/OpenMP/OpenMPOpsEnums.h.inc",
- ),
- (
- "-gen-enum-defs",
- "include/mlir/Dialect/OpenMP/OpenMPOpsEnums.cpp.inc",
- ),
- (
- "-gen-dialect-decls",
- "include/mlir/Dialect/OpenMP/OpenMPOpsDialect.h.inc",
- ),
- (
- "-gen-op-doc",
- "g3doc/Dialects/OpenMP/OpenMPOps.md",
- ),
- ],
- tblgen = ":mlir-tblgen",
- td_file = "include/mlir/Dialect/OpenMP/OpenMPOps.td",
- td_srcs = [
- ":OpBaseTdFiles",
- ":OmpCommonTdGen",
- "include/mlir/Dialect/OpenMP/OmpCommon.td",
- ],
-)
-
-cc_library(
- name = "OpenMPDialect",
- srcs = glob(
- [
- "lib/Dialect/OpenMP/IR/*.cpp",
- "lib/Dialect/OpenMP/IR/*.h",
- ],
- ),
- hdrs = glob([
- "include/mlir/Dialect/OpenMP/*.h",
- ]),
- includes = ["include"],
- deps = [
- ":IR",
- ":OpenMPOpsIncGen",
- ":StandardOps",
- "@llvm-project//llvm:Support",
- ],
-)
-
-cc_library(
- name = "OpenMPToLLVM",
- srcs = glob([
- "lib/Conversion/OpenMPToLLVM/*.cpp",
- "lib/Conversion/OpenMPToLLVM/*.h",
- ]) + ["lib/Conversion/PassDetail.h"],
- hdrs = glob([
- "include/mlir/Conversion/OpenMPToLLVM/*.h",
- ]),
- includes = ["include"],
- deps = [
- ":ConversionPassIncGen",
- ":IR",
- ":LLVMDialect",
- ":OpenMPDialect",
- ":Pass",
- ":StandardOps",
- ":StandardToLLVM",
- ":Transforms",
- "@llvm-project//llvm:Core",
- "@llvm-project//llvm:Support",
- ],
-)
-
-## QuantOps dialect
-filegroup(
- name = "QuantizationOpsTdFiles",
- srcs = [
- "include/mlir/Dialect/Quant/QuantOps.td",
- "include/mlir/Dialect/Quant/QuantOpsBase.td",
- "include/mlir/Interfaces/SideEffectInterfaces.td",
- ":OpBaseTdFiles",
- ],
-)
-
-gentbl(
- name = "QuantOpsIncGen",
- strip_include_prefix = "include",
- tbl_outs = [
- (
- "-gen-op-decls",
- "include/mlir/Dialect/Quant/QuantOps.h.inc",
- ),
- (
- "-gen-op-defs",
- "include/mlir/Dialect/Quant/QuantOps.cpp.inc",
- ),
- (
- "-gen-dialect-decls",
- "include/mlir/Dialect/Quant/QuantOpsDialect.h.inc",
- ),
- (
- "-gen-op-doc",
- "g3doc/Dialects/QuantOps/QuantOps.md",
- ),
- ],
- tblgen = ":mlir-tblgen",
- td_file = "include/mlir/Dialect/Quant/QuantOps.td",
- td_srcs = [
- ":QuantizationOpsTdFiles",
- ],
-)
-
-gentbl(
- name = "QuantPassIncGen",
- strip_include_prefix = "include",
- tbl_outs = [
- (
- "-gen-pass-decls -name Quant",
- "include/mlir/Dialect/Quant/Passes.h.inc",
- ),
- ],
- tblgen = ":mlir-tblgen",
- td_file = "include/mlir/Dialect/Quant/Passes.td",
- td_srcs = [
- ":PassBaseTdFiles",
- ],
-)
-
-cc_library(
- name = "QuantOps",
- srcs = [
- "lib/Dialect/Quant/IR/QuantOps.cpp",
- "lib/Dialect/Quant/IR/QuantTypes.cpp",
- "lib/Dialect/Quant/IR/TypeDetail.h",
- "lib/Dialect/Quant/IR/TypeParser.cpp",
- "lib/Dialect/Quant/Transforms/ConvertConst.cpp",
- "lib/Dialect/Quant/Transforms/ConvertSimQuant.cpp",
- "lib/Dialect/Quant/Transforms/PassDetail.h",
- "lib/Dialect/Quant/Utils/FakeQuantSupport.cpp",
- "lib/Dialect/Quant/Utils/QuantizeUtils.cpp",
- "lib/Dialect/Quant/Utils/UniformSupport.cpp",
- ],
- hdrs = [
- "include/mlir/Dialect/Quant/FakeQuantSupport.h",
- "include/mlir/Dialect/Quant/Passes.h",
- "include/mlir/Dialect/Quant/QuantOps.h",
- "include/mlir/Dialect/Quant/QuantTypes.h",
- "include/mlir/Dialect/Quant/QuantizeUtils.h",
- "include/mlir/Dialect/Quant/UniformSupport.h",
- ],
- includes = ["include"],
- deps = [
- ":IR",
- ":Pass",
- ":QuantOpsIncGen",
- ":QuantPassIncGen",
- ":SideEffectInterfaces",
- ":StandardOps",
- ":TransformUtils",
- "@llvm-project//llvm:Support",
- ],
-)
-
-filegroup(
- name = "LinalgOpsTdFiles",
- srcs = [
- "include/mlir/Dialect/Linalg/IR/LinalgBase.td",
- "include/mlir/Dialect/Linalg/IR/LinalgOps.td",
- "include/mlir/Interfaces/CopyOpInterface.td",
- "include/mlir/Interfaces/ViewLikeInterface.td",
- ":AffineOpsTdFiles",
- ":OpBaseTdFiles",
- ],
-)
-
-gentbl(
- name = "LinalgOpsIncGen",
- strip_include_prefix = "include",
- tbl_outs = [
- (
- "-gen-op-decls",
- "include/mlir/Dialect/Linalg/IR/LinalgOps.h.inc",
- ),
- (
- "-gen-op-defs",
- "include/mlir/Dialect/Linalg/IR/LinalgOps.cpp.inc",
- ),
- (
- "-gen-dialect-decls -dialect=linalg",
- "include/mlir/Dialect/Linalg/IR/LinalgOpsDialect.h.inc",
- ),
- ],
- tblgen = ":mlir-tblgen",
- td_file = "include/mlir/Dialect/Linalg/IR/LinalgOps.td",
- td_srcs = [
- ":LinalgOpsTdFiles",
- ],
-)
-
-genlinalg(
- name = "LinalgNamedStructuredOpsIncGen",
- src = "include/mlir/Dialect/Linalg/IR/LinalgNamedStructuredOpsSpec.tc",
- linalg_outs = [
- (
- "-gen-impl",
- "include/mlir/Dialect/Linalg/IR/LinalgNamedStructuredOps.cpp.inc",
- ),
- (
- "-gen-ods-decl",
- "include/mlir/Dialect/Linalg/IR/LinalgNamedStructuredOps.td",
- ),
- ],
- linalggen = ":mlir-linalg-ods-gen",
-)
-
-filegroup(
- name = "LinalgStructuredOpsTdFiles",
- srcs = [
- "include/mlir/Dialect/Linalg/IR/LinalgNamedStructuredOps.td",
- "include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td",
- "include/mlir/Dialect/Linalg/IR/LinalgStructuredOpsInterface.td",
- "include/mlir/Interfaces/CopyOpInterface.td",
- "include/mlir/Interfaces/ViewLikeInterface.td",
- ":AffineOpsTdFiles",
- ":LinalgOpsTdFiles",
- ":OpBaseTdFiles",
- ],
-)
-
-gentbl(
- name = "LinalgStructuredOpsIncGen",
- strip_include_prefix = "include",
- tbl_outs = [
- (
- "-gen-op-decls",
- "include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.h.inc",
- ),
- (
- "-gen-op-defs",
- "include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.cpp.inc",
- ),
- ],
- tblgen = ":mlir-tblgen",
- td_file = "include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td",
- td_srcs = [
- ":LinalgStructuredOpsTdFiles",
- "include/mlir/Dialect/Linalg/IR/LinalgNamedStructuredOps.td",
- ],
-)
-
-gentbl(
- name = "LinalgStructuredInterfacesIncGen",
- strip_include_prefix = "include",
- tbl_outs = [
- (
- "-gen-op-interface-decls",
- "include/mlir/Dialect/Linalg/IR/LinalgStructuredOpsInterfaces.h.inc",
- ),
- (
- "-gen-op-interface-defs",
- "include/mlir/Dialect/Linalg/IR/LinalgStructuredOpsInterfaces.cpp.inc",
- ),
- ],
- tblgen = ":mlir-tblgen",
- td_file = "include/mlir/Dialect/Linalg/IR/LinalgStructuredOpsInterface.td",
- td_srcs = [
- ":LinalgStructuredOpsTdFiles",
- ],
-)
-
-filegroup(
- name = "LinalgDocTdFiles",
- srcs = [
- "include/mlir/Dialect/Linalg/IR/LinalgDoc.td",
- ":LinalgOpsTdFiles",
- ":LinalgStructuredOpsTdFiles",
- ],
-)
-
-gentbl(
- name = "LinalgDocIncGen",
- strip_include_prefix = "include",
- tbl_outs = [
- (
- "-gen-op-doc",
- "g3doc/Dialects/Linalg/LinalgOps.md",
- ),
- ],
- tblgen = ":mlir-tblgen",
- td_file = "include/mlir/Dialect/Linalg/IR/LinalgDoc.td",
- td_srcs = [
- ":LinalgDocTdFiles",
- ],
-)
-
-cc_library(
- name = "LinalgToLLVM",
- srcs = glob([
- "lib/Conversion/LinalgToLLVM/*.cpp",
- "lib/Conversion/LinalgToLLVM/*.h",
- ]) + ["lib/Conversion/PassDetail.h"],
- hdrs = glob([
- "include/mlir/Conversion/LinalgToLLVM/*.h",
- ]),
- includes = ["include"],
- deps = [
- ":AffineToStandard",
- ":Analysis",
- ":ConversionPassIncGen",
- ":EDSC",
- ":IR",
- ":LLVMDialect",
- ":LinalgOps",
- ":LinalgTransforms",
- ":Pass",
- ":SCFDialect",
- ":SCFToStandard",
- ":StandardOps",
- ":StandardToLLVM",
- ":Support",
- ":Transforms",
- ":VectorToLLVM",
- ":VectorToSCF",
- "@llvm-project//llvm:Core",
- "@llvm-project//llvm:Support",
- ],
-)
-
-cc_library(
- name = "LinalgToStandard",
- srcs = glob([
- "lib/Conversion/LinalgToStandard/*.cpp",
- "lib/Conversion/LinalgToStandard/*.h",
- ]) + ["lib/Conversion/PassDetail.h"],
- hdrs = glob([
- "include/mlir/Conversion/LinalgToStandard/*.h",
- ]),
- includes = ["include"],
- deps = [
- ":Affine",
- ":ConversionPassIncGen",
- ":IR",
- ":LinalgOps",
- ":Pass",
- ":SCFDialect",
- ":StandardOps",
- ":Support",
- ":Transforms",
- "@llvm-project//llvm:Core",
- "@llvm-project//llvm:Support",
- ],
-)
-
-cc_library(
- name = "LinalgToSPIRV",
- srcs = glob([
- "lib/Conversion/LinalgToSPIRV/*.cpp",
- "lib/Conversion/LinalgToSPIRV/*.h",
- ]) + ["lib/Conversion/PassDetail.h"],
- hdrs = glob([
- "include/mlir/Conversion/LinalgToSPIRV/*.h",
- ]),
- includes = ["include"],
- deps = [
- ":ConversionPassIncGen",
- ":DialectUtils",
- ":IR",
- ":LinalgOps",
- ":LinalgTransforms",
- ":Pass",
- ":SPIRVDialect",
- ":SPIRVLowering",
- ":StandardOps",
- ],
-)
-
-cc_library(
- name = "LinalgOps",
- srcs = [
- "lib/Dialect/Linalg/IR/LinalgOps.cpp",
- "lib/Dialect/Linalg/IR/LinalgTypes.cpp",
- ],
- hdrs = [
- "include/mlir/Dialect/Linalg/EDSC/Intrinsics.h",
- "include/mlir/Dialect/Linalg/IR/LinalgOps.h",
- "include/mlir/Dialect/Linalg/IR/LinalgTraits.h",
- "include/mlir/Dialect/Linalg/IR/LinalgTypes.h",
- ],
- includes = ["include"],
- deps = [
- ":Affine",
- ":CopyOpInterface",
- ":DialectUtils",
- ":EDSC",
- ":IR",
- ":LinalgNamedStructuredOpsIncGen",
- ":LinalgOpsIncGen",
- ":LinalgStructuredInterfacesIncGen",
- ":LinalgStructuredOpsIncGen",
- ":Parser",
- ":SideEffectInterfaces",
- ":StandardOps",
- ":Support",
- ":ViewLikeInterface",
- "@llvm-project//llvm:Support",
- ],
-)
-
-gentbl(
- name = "LinalgPassIncGen",
- strip_include_prefix = "include",
- tbl_outs = [
- (
- "-gen-pass-decls -name Linalg",
- "include/mlir/Dialect/Linalg/Passes.h.inc",
- ),
- ],
- tblgen = ":mlir-tblgen",
- td_file = "include/mlir/Dialect/Linalg/Passes.td",
- td_srcs = [
- ":PassBaseTdFiles",
- ],
-)
-
-cc_library(
- name = "LinalgTransforms",
- srcs = glob([
- "lib/Dialect/Linalg/Transforms/*.cpp",
- "lib/Dialect/Linalg/Transforms/*.h",
- ]) + [
- "lib/Dialect/Linalg/Analysis/DependenceAnalysis.cpp",
- "lib/Dialect/Linalg/EDSC/Builders.cpp",
- "lib/Dialect/Linalg/Utils/Utils.cpp",
- ],
- hdrs = [
- "include/mlir/Dialect/Linalg/Analysis/DependenceAnalysis.h",
- "include/mlir/Dialect/Linalg/EDSC/Builders.h",
- "include/mlir/Dialect/Linalg/EDSC/FoldedIntrinsics.h",
- "include/mlir/Dialect/Linalg/Passes.h",
- "include/mlir/Dialect/Linalg/Transforms/Hoisting.h",
- "include/mlir/Dialect/Linalg/Transforms/Transforms.h",
- "include/mlir/Dialect/Linalg/Utils/Utils.h",
- ],
- includes = ["include"],
- deps = [
- ":Affine",
- ":AffineToStandard",
- ":Analysis",
- ":DialectUtils",
- ":EDSC",
- ":IR",
- ":LLVMDialect",
- ":LinalgOps",
- ":LinalgPassIncGen",
- ":LinalgStructuredOpsIncGen",
- ":Pass",
- ":SCFDialect",
- ":SCFToStandard",
- ":SCFTransforms",
- ":StandardOps",
- ":StandardToLLVM",
- ":Support",
- ":TransformUtils",
- ":Transforms",
- ":TransformsPassIncGen",
- ":VectorOps",
- "@llvm-project//llvm:Core",
- "@llvm-project//llvm:Support",
- ],
-)
-
-filegroup(
- name = "VectorOpsTdFiles",
- srcs = [
- "include/mlir/Dialect/Vector/VectorOps.td",
- "include/mlir/Interfaces/VectorInterfaces.td",
- ":AffineOpsTdFiles",
- ":OpBaseTdFiles",
- ],
-)
-
-gentbl(
- name = "VectorOpsIncGen",
- strip_include_prefix = "include",
- tbl_outs = [
- (
- "-gen-op-decls",
- "include/mlir/Dialect/Vector/VectorOps.h.inc",
- ),
- (
- "-gen-op-defs",
- "include/mlir/Dialect/Vector/VectorOps.cpp.inc",
- ),
- (
- "-gen-dialect-decls -dialect=vector",
- "include/mlir/Dialect/Vector/VectorOpsDialect.h.inc",
- ),
- (
- "-gen-op-doc",
- "g3doc/Dialects/Vector/VectorOps.md",
- ),
- ],
- tblgen = ":mlir-tblgen",
- td_file = "include/mlir/Dialect/Vector/VectorOps.td",
- td_srcs = [
- ":VectorOpsTdFiles",
- ],
-)
-
-cc_library(
- name = "VectorToLLVM",
- srcs = glob([
- "lib/Conversion/VectorToLLVM/*.cpp",
- "lib/Conversion/VectorToLLVM/*.h",
- ]) + ["lib/Conversion/PassDetail.h"],
- hdrs = glob([
- "include/mlir/Conversion/VectorToLLVM/*.h",
- ]),
- includes = ["include"],
- deps = [
- ":ConversionPassIncGen",
- ":DialectUtils",
- ":EDSC",
- ":IR",
- ":LLVMDialect",
- ":LLVMIRModuleTranslation",
- ":Pass",
- ":StandardOps",
- ":StandardToLLVM",
- ":Support",
- ":Transforms",
- ":VectorOps",
- "@llvm-project//llvm:Core",
- "@llvm-project//llvm:Support",
- ],
-)
-
-cc_library(
- name = "VectorToSCF",
- srcs = glob([
- "lib/Conversion/VectorToSCF/*.cpp",
- "lib/Conversion/VectorToSCF/*.h",
- ]) + ["lib/Conversion/PassDetail.h"],
- hdrs = glob([
- "include/mlir/Conversion/VectorToSCF/*.h",
- ]),
- includes = ["include"],
- deps = [
- ":Affine",
- ":ConversionPassIncGen",
- ":EDSC",
- ":IR",
- ":LLVMDialect",
- ":LinalgTransforms",
- ":Pass",
- ":SCFDialect",
- ":StandardOps",
- ":StandardToLLVM",
- ":Support",
- ":Transforms",
- ":VectorOps",
- "@llvm-project//llvm:Core",
- "@llvm-project//llvm:Support",
- ],
-)
-
-# To reference all tablegen files here when checking for updates to them.
-filegroup(
- name = "TdFiles",
- srcs = glob(["**/*.td"]),
-)
-
-exports_files(
- [
- "include/mlir/Interfaces/CallInterfaces.h",
- "include/mlir/Interfaces/CallInterfaces.td",
- "include/mlir/Interfaces/ControlFlowInterfaces.h",
- "include/mlir/Interfaces/ControlFlowInterfaces.td",
- "include/mlir/Interfaces/CopyOpInterface.td",
- "include/mlir/Interfaces/SideEffectInterfaces.td",
- "include/mlir/Interfaces/VectorInterfaces.td",
- "include/mlir/Interfaces/ViewLikeInterface.td",
- "include/mlir/Dialect/LLVMIR/LLVMOpBase.td",
- "include/mlir/Dialect/StandardOps/IR/Ops.td",
- "include/mlir/Dialect/Shape/IR/ShapeOps.td",
- "include/mlir/Dialect/Shape/IR/ShapeBase.td",
- "include/mlir/IR/OpAsmInterface.td",
- "include/mlir/IR/OpBase.td",
- "include/mlir/IR/RegionKindInterface.td",
- "include/mlir/IR/SymbolInterfaces.td",
- "include/mlir/Transforms/InliningUtils.h",
- "include/mlir/Interfaces/InferTypeOpInterface.td",
- "include/mlir/Interfaces/LoopLikeInterface.td",
- ],
- visibility = [":friends"],
-)
diff --git a/build_tools/bazel/third_party_import/llvm-project/overlay/mlir/test/BUILD.bazel b/build_tools/bazel/third_party_import/llvm-project/overlay/mlir/test/BUILD.bazel
deleted file mode 100644
index d88190c..0000000
--- a/build_tools/bazel/third_party_import/llvm-project/overlay/mlir/test/BUILD.bazel
+++ /dev/null
@@ -1,253 +0,0 @@
-load("@org_tensorflow//third_party/mlir:tblgen.bzl", "gentbl")
-
-package(
- default_visibility = [":test_friends"],
- licenses = ["notice"],
-)
-
-# Please only depend on this from MLIR tests.
-package_group(
- name = "test_friends",
- packages = ["//..."],
-)
-
-cc_library(
- name = "IRProducingAPITest",
- hdrs = ["APITest.h"],
- includes = ["."],
-)
-
-gentbl(
- name = "TestOpsIncGen",
- strip_include_prefix = "lib/Dialect/Test",
- tbl_outs = [
- (
- "-gen-op-decls",
- "lib/Dialect/Test/TestOps.h.inc",
- ),
- (
- "-gen-op-defs",
- "lib/Dialect/Test/TestOps.cpp.inc",
- ),
- (
- "-gen-dialect-decls",
- "lib/Dialect/Test/TestOpsDialect.h.inc",
- ),
- (
- "-gen-enum-decls",
- "lib/Dialect/Test/TestOpEnums.h.inc",
- ),
- (
- "-gen-enum-defs",
- "lib/Dialect/Test/TestOpEnums.cpp.inc",
- ),
- (
- "-gen-struct-attr-decls",
- "lib/Dialect/Test/TestOpStructs.h.inc",
- ),
- (
- "-gen-struct-attr-defs",
- "lib/Dialect/Test/TestOpStructs.cpp.inc",
- ),
- (
- "-gen-rewriters",
- "lib/Dialect/Test/TestPatterns.inc",
- ),
- ],
- tblgen = "@llvm-project//mlir:mlir-tblgen",
- td_file = "lib/Dialect/Test/TestOps.td",
- td_srcs = [
- "@llvm-project//mlir:OpBaseTdFiles",
- "@llvm-project//mlir:include/mlir/IR/OpAsmInterface.td",
- "@llvm-project//mlir:include/mlir/IR/RegionKindInterface.td",
- "@llvm-project//mlir:include/mlir/IR/SymbolInterfaces.td",
- "@llvm-project//mlir:include/mlir/Interfaces/CallInterfaces.td",
- "@llvm-project//mlir:include/mlir/Interfaces/ControlFlowInterfaces.td",
- "@llvm-project//mlir:include/mlir/Interfaces/InferTypeOpInterface.td",
- "@llvm-project//mlir:include/mlir/Interfaces/SideEffectInterfaces.td",
- ],
- test = True,
-)
-
-gentbl(
- name = "TestInterfacesIncGen",
- strip_include_prefix = "lib/Dialect/Test",
- tbl_outs = [
- (
- "-gen-type-interface-decls",
- "lib/Dialect/Test/TestTypeInterfaces.h.inc",
- ),
- (
- "-gen-type-interface-defs",
- "lib/Dialect/Test/TestTypeInterfaces.cpp.inc",
- ),
- ],
- tblgen = "@llvm-project//mlir:mlir-tblgen",
- td_file = "lib/Dialect/Test/TestInterfaces.td",
- td_srcs = [
- "@llvm-project//mlir:OpBaseTdFiles",
- ],
- test = True,
-)
-
-cc_library(
- name = "TestDialect",
- srcs = [
- "lib/Dialect/Test/TestDialect.cpp",
- "lib/Dialect/Test/TestPatterns.cpp",
- ],
- hdrs = [
- "lib/Dialect/Test/TestDialect.h",
- "lib/Dialect/Test/TestTypes.h",
- ],
- includes = [
- "lib/Dialect/Test",
- ],
- deps = [
- ":TestInterfacesIncGen",
- ":TestOpsIncGen",
- "@llvm-project//llvm:Support",
- "@llvm-project//mlir:ControlFlowInterfaces",
- "@llvm-project//mlir:DerivedAttributeOpInterface",
- "@llvm-project//mlir:Dialect",
- "@llvm-project//mlir:IR",
- "@llvm-project//mlir:InferTypeOpInterface",
- "@llvm-project//mlir:Pass",
- "@llvm-project//mlir:SideEffects",
- "@llvm-project//mlir:StandardOps",
- "@llvm-project//mlir:StandardOpsTransforms",
- "@llvm-project//mlir:TransformUtils",
- "@llvm-project//mlir:Transforms",
- ],
-)
-
-cc_library(
- name = "TestIR",
- srcs = [
- "lib/IR/TestFunc.cpp",
- "lib/IR/TestInterfaces.cpp",
- "lib/IR/TestMatchers.cpp",
- "lib/IR/TestPrintDefUse.cpp",
- "lib/IR/TestPrintNesting.cpp",
- "lib/IR/TestSideEffects.cpp",
- "lib/IR/TestSlicing.cpp",
- "lib/IR/TestSymbolUses.cpp",
- "lib/IR/TestTypes.cpp",
- ],
- deps = [
- ":TestDialect",
- "@llvm-project//llvm:Support",
- "@llvm-project//mlir:Analysis",
- "@llvm-project//mlir:IR",
- "@llvm-project//mlir:LinalgOps",
- "@llvm-project//mlir:Pass",
- "@llvm-project//mlir:StandardOps",
- "@llvm-project//mlir:Support",
- ],
-)
-
-cc_library(
- name = "TestPass",
- srcs = [
- "lib/Pass/TestPassManager.cpp",
- ],
- deps = [
- "@llvm-project//llvm:Support",
- "@llvm-project//mlir:IR",
- "@llvm-project//mlir:Pass",
- "@llvm-project//mlir:Support",
- ],
-)
-
-cc_library(
- name = "TestReducer",
- srcs = [
- "lib/Reducer/MLIRTestReducer.cpp",
- ],
- deps = [
- "@llvm-project//mlir:IR",
- "@llvm-project//mlir:Pass",
- "@llvm-project//mlir:Support",
- ],
-)
-
-cc_library(
- name = "TestTransforms",
- srcs = glob(["lib/Transforms/*.cpp"]),
- defines = ["MLIR_CUDA_CONVERSIONS_ENABLED"],
- includes = ["lib/Dialect/Test"],
- deps = [
- ":TestDialect",
- "@llvm-project//llvm:Support",
- "@llvm-project//mlir:Affine",
- "@llvm-project//mlir:AffineTransforms",
- "@llvm-project//mlir:Analysis",
- "@llvm-project//mlir:EDSC",
- "@llvm-project//mlir:GPUDialect",
- "@llvm-project//mlir:GPUToGPURuntimeTransforms",
- "@llvm-project//mlir:GPUTransforms",
- "@llvm-project//mlir:IR",
- "@llvm-project//mlir:LLVMDialect",
- "@llvm-project//mlir:LLVMTransforms",
- "@llvm-project//mlir:LinalgOps",
- "@llvm-project//mlir:LinalgTransforms",
- "@llvm-project//mlir:Pass",
- "@llvm-project//mlir:SCFDialect",
- "@llvm-project//mlir:SPIRVDialect",
- "@llvm-project//mlir:StandardOps",
- "@llvm-project//mlir:StandardOpsTransforms",
- "@llvm-project//mlir:Support",
- "@llvm-project//mlir:TargetNVVMIR",
- "@llvm-project//mlir:TargetROCDLIR",
- "@llvm-project//mlir:TransformUtils",
- "@llvm-project//mlir:Transforms",
- "@llvm-project//mlir:VectorOps",
- "@llvm-project//mlir:VectorToLLVM",
- "@llvm-project//mlir:VectorToSCF",
- ],
-)
-
-cc_library(
- name = "TestAffine",
- srcs = glob([
- "lib/Dialect/Affine/*.cpp",
- ]),
- deps = [
- "@llvm-project//llvm:Support",
- "@llvm-project//mlir:Affine",
- "@llvm-project//mlir:AffineTransforms",
- "@llvm-project//mlir:AffineUtils",
- "@llvm-project//mlir:Analysis",
- "@llvm-project//mlir:IR",
- "@llvm-project//mlir:Pass",
- "@llvm-project//mlir:Support",
- "@llvm-project//mlir:Transforms",
- "@llvm-project//mlir:VectorOps",
- ],
-)
-
-cc_library(
- name = "TestSPIRV",
- srcs = glob([
- "lib/Dialect/SPIRV/*.cpp",
- ]),
- deps = [
- "@llvm-project//mlir:GPUDialect",
- "@llvm-project//mlir:IR",
- "@llvm-project//mlir:Pass",
- "@llvm-project//mlir:SPIRVDialect",
- "@llvm-project//mlir:SPIRVLowering",
- ],
-)
-
-cc_library(
- name = "TestTypeDialect",
- srcs = glob([
- "lib/Dialect/LLVMIR/*.cpp",
- ]),
- deps = [
- ":TestDialect",
- "@llvm-project//mlir:IR",
- "@llvm-project//mlir:LLVMDialect",
- ],
-)
diff --git a/build_tools/cmake/external_cc_library.cmake b/build_tools/cmake/external_cc_library.cmake
index 94f56dc..dd9799b 100644
--- a/build_tools/cmake/external_cc_library.cmake
+++ b/build_tools/cmake/external_cc_library.cmake
@@ -120,7 +120,7 @@
${_RULE_SRCS}
${_RULE_HDRS}
)
- target_include_directories(${_NAME}
+ target_include_directories(${_NAME} SYSTEM
PUBLIC
"$<BUILD_INTERFACE:${IREE_COMMON_INCLUDE_DIRS}>"
"$<BUILD_INTERFACE:${_RULE_INCLUDES}>"
@@ -162,7 +162,7 @@
else()
# Generating header-only library
add_library(${_NAME} INTERFACE)
- target_include_directories(${_NAME}
+ target_include_directories(${_NAME} SYSTEM
INTERFACE
"$<BUILD_INTERFACE:${IREE_COMMON_INCLUDE_DIRS}>"
"$<BUILD_INTERFACE:${_RULE_INCLUDES}>"
diff --git a/build_tools/cmake/flatbuffer_c_library.cmake b/build_tools/cmake/flatbuffer_c_library.cmake
index eb63567..24ee470 100644
--- a/build_tools/cmake/flatbuffer_c_library.cmake
+++ b/build_tools/cmake/flatbuffer_c_library.cmake
@@ -130,7 +130,7 @@
add_library(${_NAME} INTERFACE)
add_dependencies(${_NAME} ${_GEN_TARGET})
- target_include_directories(${_NAME}
+ target_include_directories(${_NAME} SYSTEM
INTERFACE
"$<BUILD_INTERFACE:${IREE_COMMON_INCLUDE_DIRS}>"
${CMAKE_CURRENT_BINARY_DIR}
diff --git a/build_tools/cmake/flatbuffer_cc_library.cmake b/build_tools/cmake/flatbuffer_cc_library.cmake
index 86c38fc..52618de 100644
--- a/build_tools/cmake/flatbuffer_cc_library.cmake
+++ b/build_tools/cmake/flatbuffer_cc_library.cmake
@@ -113,7 +113,7 @@
add_library(${_NAME} INTERFACE)
add_dependencies(${_NAME} ${_GEN_TARGET})
- target_include_directories(${_NAME}
+ target_include_directories(${_NAME} SYSTEM
INTERFACE
"$<BUILD_INTERFACE:${IREE_COMMON_INCLUDE_DIRS}>"
${CMAKE_CURRENT_BINARY_DIR}
diff --git a/build_tools/cmake/iree_cc_binary.cmake b/build_tools/cmake/iree_cc_binary.cmake
index 2c76d2d..5e71014 100644
--- a/build_tools/cmake/iree_cc_binary.cmake
+++ b/build_tools/cmake/iree_cc_binary.cmake
@@ -110,7 +110,7 @@
else()
set_target_properties(${_NAME} PROPERTIES OUTPUT_NAME "${_RULE_NAME}")
endif()
- target_include_directories(${_NAME}
+ target_include_directories(${_NAME} SYSTEM
PUBLIC
${IREE_COMMON_INCLUDE_DIRS}
)
diff --git a/build_tools/cmake/iree_cc_library.cmake b/build_tools/cmake/iree_cc_library.cmake
index 6f5e51f..e4d5b67 100644
--- a/build_tools/cmake/iree_cc_library.cmake
+++ b/build_tools/cmake/iree_cc_library.cmake
@@ -120,9 +120,12 @@
${_RULE_TEXTUAL_HDRS}
${_RULE_HDRS}
)
- target_include_directories(${_NAME}
+ target_include_directories(${_NAME} SYSTEM
PUBLIC
"$<BUILD_INTERFACE:${IREE_COMMON_INCLUDE_DIRS}>"
+ )
+ target_include_directories(${_NAME}
+ PUBLIC
"$<BUILD_INTERFACE:${_RULE_INCLUDES}>"
)
target_compile_options(${_NAME}
@@ -167,7 +170,7 @@
else()
# Generating header-only library.
add_library(${_NAME} INTERFACE)
- target_include_directories(${_NAME}
+ target_include_directories(${_NAME} SYSTEM
INTERFACE
"$<BUILD_INTERFACE:${IREE_COMMON_INCLUDE_DIRS}>"
)
diff --git a/build_tools/cmake/iree_cc_test.cmake b/build_tools/cmake/iree_cc_test.cmake
index a8b346f..5040343 100644
--- a/build_tools/cmake/iree_cc_test.cmake
+++ b/build_tools/cmake/iree_cc_test.cmake
@@ -80,7 +80,7 @@
PRIVATE
${_RULE_SRCS}
)
- target_include_directories(${_NAME}
+ target_include_directories(${_NAME} SYSTEM
PUBLIC
${IREE_COMMON_INCLUDE_DIRS}
)
diff --git a/build_tools/cmake/iree_copts.cmake b/build_tools/cmake/iree_copts.cmake
index b96e041..9d99d9b 100644
--- a/build_tools/cmake/iree_copts.cmake
+++ b/build_tools/cmake/iree_copts.cmake
@@ -125,6 +125,12 @@
"/wd4141"
# 'WIN32_LEAN_AND_MEAN': macro redefinition
"/wd4005"
+ "/wd4267"
+ "/wd4141"
+ "/wd4244"
+ "/wd4146"
+ "/wd4018"
+ "/wd4065"
# TODO(benvanik): figure out if really required or accidentally enabled.
"/EHsc"
"/bigobj"
diff --git a/build_tools/cmake/rebuild.sh b/build_tools/cmake/rebuild.sh
index 2a8a7d4..7705f5d 100755
--- a/build_tools/cmake/rebuild.sh
+++ b/build_tools/cmake/rebuild.sh
@@ -35,7 +35,7 @@
mkdir build
fi
cd build
-"$CMAKE_BIN" -G Ninja -DCMAKE_BUILD_TYPE=FastBuild \
+"$CMAKE_BIN" -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DIREE_BUILD_COMPILER=ON \
-DIREE_BUILD_TESTS=ON \
-DIREE_BUILD_SAMPLES=OFF \
diff --git a/build_tools/docker/manage_images.py b/build_tools/docker/manage_images.py
index 468313d..7b8cb7e 100755
--- a/build_tools/docker/manage_images.py
+++ b/build_tools/docker/manage_images.py
@@ -19,12 +19,12 @@
Example usage:
-Rebuild the cmake image and all images that transitiviely on depend on it,
+Rebuild the cmake image and all images that transitively on depend on it,
tagging them with `latest`:
python3 build_tools/docker/manage_images.py --build --image cmake
Print out output for rebuilding the cmake image and all images that
-transitiviely on depend on it, but don't take side-effecting actions:
+transitively on depend on it, but don't take side-effecting actions:
python3 build_tools/docker/manage_images.py --build --image cmake --dry-run
Push all `prod` images to GCR:
diff --git a/docs/developing_iree/e2e_benchmarking.md b/docs/developing_iree/e2e_benchmarking.md
index 3bfb460..15e3f25 100644
--- a/docs/developing_iree/e2e_benchmarking.md
+++ b/docs/developing_iree/e2e_benchmarking.md
@@ -12,14 +12,17 @@
## 1. Run IREE's E2E TensorFlow tests to generate the benchmarking artifacts
-This command will compile and test all of our passing, non-manual targets.
+The `get_e2e_artifacts.py` script compiles and tests all of our integrated
+TensorFlow models, and gathers their compilation and benchmarking artifacts in
+`/tmp/iree/modules/`.
```shell
-bazel test //integrations/tensorflow/e2e/...
+# By default `get_e2e_artifacts.py` will run all of our test suites, including
+# those that take a long time to complete, so we specify
+# `--test_suites=e2e_tests` to only run the smaller tests.
+python3 ./scripts/get_e2e_artifacts.py --test_suites=e2e_tests
```
-Running the above command populates a directory `/tmp/iree/modules/` with the
-compilation artifacts needed to benchmark each TensorFlow model in our tests.
Each test/module has a folder with the following artifacts (filtered to only
include those relevant for benchmarking):
@@ -95,7 +98,7 @@
wildcard expansion. They can be run by invoking the following test suite:
```shell
-bazel test //integrations/tensorflow/e2e/keras:vision_external_tests
+python3 ./scripts/get_e2e_artifacts.py --test_suites=vision_external_tests
```
The previous command compiles `MobileNet`, `MobileNetV2` and `ResNet50` to run
@@ -104,6 +107,17 @@
organized by `/tmp/iree/modules/ModelName/Dataset/backends` instead of just by
`/tmp/iree/modules/ModelName/backends`.
+### Optional: Manually get the benchmarking artifacts for a specific test
+
+You can manually get the benchmarking artifacts for a specific test by using
+`bazel run` on the `_manual` binary target we create for each test. This will
+automatically store the benchmarking artifacts in `/tmp/iree/modules/`.
+
+```shell
+bazel run //integrations/tensorflow/e2e:matrix_ops_static_test_manual -- \
+ --target_backends=iree_vmla,tflite
+```
+
## 2. Benchmarking IREE on desktop
### 2.1 Optional: Build the `iree-benchmark-module`
diff --git a/docs/developing_iree/repository_management.md b/docs/developing_iree/repository_management.md
index df769f7..3ac31bf 100644
--- a/docs/developing_iree/repository_management.md
+++ b/docs/developing_iree/repository_management.md
@@ -56,14 +56,15 @@
Currently, the two most challenging projects to manage as dependencies are
TensorFlow and LLVM. Both are typically pinned to specific versions that are
integrated in the Google source repository at a cadence up to many times per
-day. Further, because LLVM does not ship with Bazel BUILD files, IREE "borrows"
-the BUILD files from TensorFlow (for building with Bazel). Just to make it more
-interesting, since TensorFlow does not ship with CMakeLists, IREE uses overlay
-CMakeLists.txt to build subsets of TensorFlow needed for the compiler (when
-built with CMake). While these externally managed build files are written to be
-moderately generic, they can and do break and require manual intervention at
-times (i.e. there is no guarantee that updating to a new commit of either will
-not require some manual work on the build files).
+day. Additionally, TensorFlow itself depends on LLVM. Further, since LLVM does
+not ship with Bazel BUILD files, we use BUILD files maintained in a separate
+[llvm-bazel repository](https://github.com/google/llvm-bazel). Just to make it
+more interesting, since TensorFlow does not ship with CMakeLists, IREE uses
+overlay CMakeLists.txt to build subsets of TensorFlow needed for the compiler
+(when built with CMake). While these externally managed build files are written
+to be moderately generic, they can and do break and require manual intervention
+at times (i.e. there is no guarantee that updating to a new commit of either
+will not require some manual work on the build files).
The only combination which is expected to work is the llvm-project commit noted
in the `LLVM_COMMIT` setting in
@@ -79,7 +80,7 @@
APIs, these updates are performed atomically as part of the integration. However
the changes performed here only guarantee that the internal build is not broken,
which means that such integrations may very well break the OSS build on the
-`google` branch (in particular, it does not update teh LLVM BUILD files). The
+`google` branch (in particular, it does not update the LLVM BUILD files). The
IREE build cop will fix the breakage on the `google` branch. We are continuing
to work on improving this situation.
diff --git a/docs/get_started/cmake_options_and_variables.md b/docs/get_started/cmake_options_and_variables.md
index 1a2237b..9886149 100644
--- a/docs/get_started/cmake_options_and_variables.md
+++ b/docs/get_started/cmake_options_and_variables.md
@@ -5,8 +5,7 @@
#### `CMAKE_BUILD_TYPE`:STRING
Sets the build type. Possible values are `Release`, `Debug`,
-`RelWithDebInfo`/`FastBuild` and `MinSizeRel`. If unset, build type is set to
-`Release`.
+`RelWithDebInfo` and `MinSizeRel`. If unset, build type is set to `Release`.
#### `CMAKE_<LANG>_COMPILER`:STRING
diff --git a/integrations/tensorflow/bindings/python/pyiree/tf/support/tf_test_utils.py b/integrations/tensorflow/bindings/python/pyiree/tf/support/tf_test_utils.py
index 4d432d8..00ea2c2 100644
--- a/integrations/tensorflow/bindings/python/pyiree/tf/support/tf_test_utils.py
+++ b/integrations/tensorflow/bindings/python/pyiree/tf/support/tf_test_utils.py
@@ -51,14 +51,27 @@
"Summarize the inputs and outputs of each module trace logged to disk.")
flags.DEFINE_bool("log_all_traces", False,
"Log all traces to logging.info, even if comparison passes.")
+flags.DEFINE_bool(
+ "get_saved_model", False,
+ "Creates and stores a SavedModel for the tf.Module class to be tested.")
FLAGS = flags.FLAGS
NUMPY_LINEWIDTH = 120
+def _get_from_environment_if_set(variable_name: str) -> Union[str, None]:
+ return os.environ[variable_name] if variable_name in os.environ else None
+
+
def _setup_artifacts_dir(module_name: str) -> str:
- parent_dir = FLAGS.artifacts_dir
- if parent_dir is None:
- parent_dir = os.path.join(tempfile.gettempdir(), "iree", "modules")
+ parent_dirs = [
+ FLAGS.artifacts_dir,
+ _get_from_environment_if_set('TEST_UNDECLARED_OUTPUTS_DIR'),
+ _get_from_environment_if_set('TEST_TMPDIR'),
+ os.path.join(tempfile.gettempdir(), "iree", "modules"),
+ ]
+ # Use the most preferred path in parent_dirs that isn't None.
+ parent_dir = next(parent for parent in parent_dirs if parent is not None)
+
artifacts_dir = os.path.join(parent_dir, module_name)
logging.info("Saving compilation artifacts and traces to '%s'", artifacts_dir)
os.makedirs(artifacts_dir, exist_ok=True)
@@ -572,6 +585,15 @@
Modules = collections.namedtuple("Modules",
["ref_module", "tar_modules", "artifacts_dir"])
+# We have to use a global variable to store the compiled modules so that we can
+# avoid recompilation. This is because the TestCase class resets it's entire
+# state and calls __init__ before each unittest. It also calls __init__ one
+# additional time before that for good measure, which means without storing the
+# modules somewhere else we would have to compile each of them at least twice.
+# We can't store the modules on the class itself via setUpClass because of #2900
+global _global_modules
+_global_modules = None
+
def compile_tf_module(
module_class: Type[tf.Module], exported_names: Sequence[str] = ()
@@ -588,6 +610,9 @@
A 'Modules' namedtuple containing the reference module, target modules and
artifacts directory.
"""
+ global _global_modules
+ if _global_modules is not None:
+ return _global_modules
# Setup the directory for saving compilation artifacts and traces.
artifacts_dir = _setup_artifacts_dir(module_class.__name__)
@@ -604,7 +629,8 @@
tar_modules = [
compile_backend(backend_info) for backend_info in tar_backend_infos
]
- return Modules(ref_module, tar_modules, artifacts_dir)
+ _global_modules = Modules(ref_module, tar_modules, artifacts_dir)
+ return _global_modules
def compile_tf_signature_def_saved_model(saved_model_dir: str,
@@ -628,6 +654,9 @@
A 'Modules' namedtuple containing the reference module, target modules and
artifacts directory.
"""
+ global _global_modules
+ if _global_modules is not None:
+ return _global_modules
# Setup the directory for saving compilation artifacts and traces.
artifacts_dir = _setup_artifacts_dir(module_name)
@@ -646,7 +675,8 @@
tar_modules = [
compile_backend(backend_info) for backend_info in tar_backend_infos
]
- return Modules(ref_module, tar_modules, artifacts_dir)
+ _global_modules = Modules(ref_module, tar_modules, artifacts_dir)
+ return _global_modules
class TracedModuleTestCase(tf.test.TestCase):
diff --git a/integrations/tensorflow/bindings/python/pyiree/tf/support/tf_utils.py b/integrations/tensorflow/bindings/python/pyiree/tf/support/tf_utils.py
index a4a731a..99573c5 100644
--- a/integrations/tensorflow/bindings/python/pyiree/tf/support/tf_utils.py
+++ b/integrations/tensorflow/bindings/python/pyiree/tf/support/tf_utils.py
@@ -23,15 +23,12 @@
import tempfile
from typing import Any, Callable, Dict, Sequence, Set, Tuple, Type, Union
-from absl import flags
from absl import logging
import numpy as np
from pyiree import rt
from pyiree.tf import compiler
import tensorflow.compat.v2 as tf
-FLAGS = flags.FLAGS
-
def set_random_seed(seed: int = 0) -> None:
"""Set random seed for tf, np and random."""
diff --git a/integrations/tensorflow/e2e/bool_test.py b/integrations/tensorflow/e2e/bool_test.py
index e086cff..dbc792a 100644
--- a/integrations/tensorflow/e2e/bool_test.py
+++ b/integrations/tensorflow/e2e/bool_test.py
@@ -20,7 +20,7 @@
import tensorflow.compat.v2 as tf
-class MathModule(tf.Module):
+class BooleanModule(tf.Module):
@tf.function(input_signature=[])
def constant(self):
@@ -42,7 +42,7 @@
def __init__(self, *args, **kwargs):
super(BooleanTest, self).__init__(*args, **kwargs)
- self._modules = tf_test_utils.compile_tf_module(MathModule)
+ self._modules = tf_test_utils.compile_tf_module(BooleanModule)
def test_constant(self):
diff --git a/iree/compiler/Conversion/HLOToLinalg/HLOToLinalgOnBuffers.cpp b/iree/compiler/Conversion/HLOToLinalg/HLOToLinalgOnBuffers.cpp
index 50c240c..5c382dd 100644
--- a/iree/compiler/Conversion/HLOToLinalg/HLOToLinalgOnBuffers.cpp
+++ b/iree/compiler/Conversion/HLOToLinalg/HLOToLinalgOnBuffers.cpp
@@ -637,7 +637,7 @@
Value startIndex = rewriter.create<ConstantIndexOp>(
loc, std::get<0>(it.value()).getZExtValue());
offsets.push_back(startIndex);
- Value size = rewriter.create<DimOp>(loc, resultBuffers[0], it.index());
+ Value size = rewriter.create<DimOp>(loc, inputBuffers[0], it.index());
sizes.push_back(size);
Value stride = rewriter.create<ConstantIndexOp>(
loc, std::get<1>(it.value()).getZExtValue() + 1);
diff --git a/iree/compiler/Conversion/HLOToLinalg/test/pad.mlir b/iree/compiler/Conversion/HLOToLinalg/test/pad.mlir
index fe3309d..a42a079 100644
--- a/iree/compiler/Conversion/HLOToLinalg/test/pad.mlir
+++ b/iree/compiler/Conversion/HLOToLinalg/test/pad.mlir
@@ -1,12 +1,9 @@
-// RUN: iree-opt -split-input-file -iree-codegen-hlo-to-linalg-on-buffers %s | IreeFileCheck %s
+// RUN: iree-opt -split-input-file -iree-codegen-hlo-to-linalg-on-buffers -canonicalize %s | IreeFileCheck %s
module {
- // CHECK_LABEL: @pad_cst
func @pad_cst() {
%c0 = constant 0 : index
%0 = hal.interface.load.tensor @legacy_io::@arg0, offset = %c0 : tensor<12x4xf32>
- // CHECK: linalg.fill
- // CHECK: linalg.copy
%1 = constant dense<0.0> : tensor<f32>
%2 = "mhlo.pad"(%0, %1) {
edge_padding_high = dense<[2, 3]> : tensor<2xi64>,
@@ -21,17 +18,21 @@
hal.interface.binding @ret0, set=0, binding=1, type="StorageBuffer", access="Write"
}
}
+// CHECK_LABEL: @pad_cst
+// CHECK-DAG: %[[CST:.+]] = constant 0.000000e+00 : f32
+// CHECK-DAG: %[[OUT:.+]] = iree.placeholder for "interface buffer" {binding = @legacy_io::@ret0} : memref<18x12xf32>
+// CHECK-DAG: %[[IN:.+]] = iree.placeholder for "interface buffer" {binding = @legacy_io::@arg0} : memref<12x4xf32>
+// CHECK: linalg.fill(%[[OUT]], %[[CST]])
+// CHECK: %[[SUBVIEW:.+]] = subview %[[OUT]][4, 5] [12, 4] [1, 1]
+// CHECK: linalg.copy(%[[IN]], %[[SUBVIEW]])
// -----
module {
- // CHECK_LABEL: @pad_memref
func @pad_memref() {
%c0 = constant 0 : index
%0 = hal.interface.load.tensor @legacy_io::@arg0, offset = %c0 : tensor<12x4xf32>
%1 = hal.interface.load.tensor @legacy_io::@arg1, offset = %c0 : tensor<f32>
- // CHECK: linalg.fill
- // CHECK: linalg.copy
%2 = "mhlo.pad"(%0, %1) {
edge_padding_high = dense<[2, 3]> : tensor<2xi64>,
edge_padding_low = dense<[4, 5]> : tensor<2xi64>,
@@ -46,16 +47,21 @@
hal.interface.binding @ret0, set=0, binding=2, type="StorageBuffer", access="Write"
}
}
+// CHECK_LABEL: @pad_memref
+// CHECK-DAG: %[[OUT:.+]] = iree.placeholder for "interface buffer" {binding = @legacy_io::@ret0} : memref<18x12xf32>
+// CHECK-DAG: %[[IN:.+]] = iree.placeholder for "interface buffer" {binding = @legacy_io::@arg0} : memref<12x4xf32>
+// CHECK-DAG: %[[PAD_BUF:.+]] = iree.placeholder for "interface buffer" {binding = @legacy_io::@arg1} : memref<f32>
+// CHECK: %[[PAD_VAL:.+]] = load %[[PAD_BUF]][] : memref<f32>
+// CHECK: linalg.fill(%[[OUT]], %[[PAD_VAL]])
+// CHECK: %[[SUBVIEW:.+]] = subview %[[OUT]][4, 5] [12, 4] [1, 1]
+// CHECK: linalg.copy(%[[IN]], %[[SUBVIEW]])
// -----
module {
- // CHECK_LABEL: @pad_no_op
func @pad_no_op() {
%c0 = constant 0 : index
%0 = hal.interface.load.tensor @legacy_io::@arg0, offset = %c0 : tensor<12x4xf32>
- // CHECK: linalg.fill
- // CHECK: linalg.copy
%1 = constant dense<0.0> : tensor<f32>
%2 = "mhlo.pad"(%0, %1) {
edge_padding_high = dense<0> : tensor<2xi64>,
@@ -70,17 +76,22 @@
hal.interface.binding @ret0, set=0, binding=1, type="StorageBuffer", access="Write"
}
}
+// TODO(hanchung): Make it just a copy op.
+// CHECK_LABEL: @pad_no_op
+// CHECK-DAG: %[[CST:.+]] = constant 0.000000e+00 : f32
+// CHECK-DAG: %[[OUT:.+]] = iree.placeholder for "interface buffer" {binding = @legacy_io::@ret0} : memref<12x4xf32>
+// CHECK-DAG: %[[IN:.+]] = iree.placeholder for "interface buffer" {binding = @legacy_io::@arg0} : memref<12x4xf32>
+// CHECK: linalg.fill(%[[OUT]], %[[CST]])
+// CHECK: %[[SUBVIEW:.+]] = subview %[[OUT]][0, 0] [12, 4] [1, 1]
+// CHECK: linalg.copy(%[[IN]], %[[SUBVIEW]])
// -----
module {
- // CHECK_LABEL: @cst_pad_cst
func @cst_pad_cst() {
%c0 = constant 0 : index
%0 = constant dense<1.0> : tensor<12x4xf32>
%1 = constant dense<0.0> : tensor<f32>
- // CHECK: linalg.fill
- // CHECK: linalg.fill
%2 = "mhlo.pad"(%0, %1) {
edge_padding_high = dense<[2, 3]> : tensor<2xi64>,
edge_padding_low = dense<[4, 5]> : tensor<2xi64>,
@@ -93,3 +104,10 @@
hal.interface.binding @ret0, set=0, binding=0, type="StorageBuffer", access="Write"
}
}
+// CHECK_LABEL: @cst_pad_cst
+// CHECK-DAG: %[[ZERO:.+]] = constant 0.000000e+00 : f32
+// CHECK-DAG: %[[ONE:.+]] = constant 1.000000e+00 : f32
+// CHECK-DAG: %[[OUT:.+]] = iree.placeholder for "interface buffer" {binding = @legacy_io::@ret0} : memref<18x12xf32>
+// CHECK: linalg.fill(%[[OUT]], %[[ZERO]])
+// CHECK: %[[SUBVIEW:.+]] = subview %[[OUT]][4, 5] [12, 4] [1, 1]
+// CHECK: linalg.fill(%[[SUBVIEW]], %[[ONE]])
diff --git a/iree/tools/iree-benchmark-module-main.cc b/iree/tools/iree-benchmark-module-main.cc
index d5a4293..2f17764 100644
--- a/iree/tools/iree-benchmark-module-main.cc
+++ b/iree/tools/iree-benchmark-module-main.cc
@@ -58,126 +58,99 @@
namespace iree {
namespace {
-StatusOr<std::string> GetModuleContentsFromFlags() {
- IREE_TRACE_SCOPE0("GetModuleContentsFromFlags");
+Status GetModuleContentsFromFlags(std::string& module_data) {
auto module_file = absl::GetFlag(FLAGS_module_file);
- if (module_file.empty()) {
- return InvalidArgumentErrorBuilder(IREE_LOC)
- << "module_file must be specified";
- }
- return file_io::GetFileContents(module_file);
+ IREE_ASSIGN_OR_RETURN(module_data, file_io::GetFileContents(module_file));
+ return iree::OkStatus();
}
-Status RunFunction(::benchmark::State& state,
- const std::string& function_name) {
- IREE_TRACE_SCOPE0("iree-benchmark-module");
-
- IREE_RETURN_IF_ERROR(iree_hal_module_register_types())
- << "registering HAL types";
- iree_vm_instance_t* instance = nullptr;
+// Creates VM function instance with its inputs.
+Status PrepareIREEVMFunction(
+ iree_vm_instance_t** instance, iree_hal_device_t** device,
+ iree_vm_module_t** hal_module, iree_vm_context_t** context,
+ iree_vm_module_t** input_module, iree_vm_function_t& function,
+ iree::vm::ref<iree_vm_list_t>& inputs,
+ std::vector<iree::RawSignatureParser::Description>& output_descs,
+ const std::string& function_name, const std::string& module_data) {
+ IREE_RETURN_IF_ERROR(iree_hal_module_register_types());
IREE_RETURN_IF_ERROR(
- iree_vm_instance_create(iree_allocator_system(), &instance))
- << "creating instance";
+ iree_vm_instance_create(iree_allocator_system(), instance));
- IREE_ASSIGN_OR_RETURN(auto module_data, GetModuleContentsFromFlags());
- iree_vm_module_t* input_module = nullptr;
- IREE_RETURN_IF_ERROR(LoadBytecodeModule(module_data, &input_module));
+ // Create IREE's device and module.
+ IREE_RETURN_IF_ERROR(iree::CreateDevice(absl::GetFlag(FLAGS_driver), device));
+ IREE_RETURN_IF_ERROR(CreateHalModule(*device, hal_module));
+ IREE_RETURN_IF_ERROR(LoadBytecodeModule(module_data, input_module));
- iree_hal_device_t* device = nullptr;
- IREE_RETURN_IF_ERROR(CreateDevice(absl::GetFlag(FLAGS_driver), &device));
- iree_vm_module_t* hal_module = nullptr;
- IREE_RETURN_IF_ERROR(CreateHalModule(device, &hal_module));
-
- iree_vm_context_t* context = nullptr;
- // Order matters. The input module will likely be dependent on the hal module.
- std::array<iree_vm_module_t*, 2> modules = {hal_module, input_module};
+ // Order matters. The input module will likely be dependent on the hal
+ // module.
+ std::array<iree_vm_module_t*, 2> modules = {*hal_module, *input_module};
IREE_RETURN_IF_ERROR(iree_vm_context_create_with_modules(
- instance, modules.data(), modules.size(), iree_allocator_system(),
- &context))
- << "creating context";
+ *instance, modules.data(), modules.size(), iree_allocator_system(),
+ context));
- iree_vm_function_t function;
- IREE_RETURN_IF_ERROR(input_module->lookup_function(
- input_module->self, IREE_VM_FUNCTION_LINKAGE_EXPORT,
- iree_string_view_t{function_name.data(), function_name.size()},
- &function))
- << "looking up function '" << function_name << "'";
-
+ IREE_RETURN_IF_ERROR(
+ (*input_module)
+ ->lookup_function(
+ (*input_module)->self, IREE_VM_FUNCTION_LINKAGE_EXPORT,
+ iree_string_view_t{function_name.data(), function_name.size()},
+ &function));
IREE_RETURN_IF_ERROR(ValidateFunctionAbi(function));
+
+ // Construct inputs.
IREE_ASSIGN_OR_RETURN(auto input_descs, ParseInputSignature(function));
- vm::ref<iree_vm_list_t> inputs;
if (!absl::GetFlag(FLAGS_function_inputs_file).empty()) {
- if (!absl::GetFlag(FLAGS_function_inputs).empty()) {
- return InvalidArgumentErrorBuilder(IREE_LOC)
- << "Expected only one of function_inputs and function_inputs_file "
- "to be set";
- }
IREE_ASSIGN_OR_RETURN(inputs,
ParseToVariantListFromFile(
- input_descs, iree_hal_device_allocator(device),
+ input_descs, iree_hal_device_allocator(*device),
absl::GetFlag(FLAGS_function_inputs_file)));
} else {
IREE_ASSIGN_OR_RETURN(
inputs,
- ParseToVariantList(input_descs, iree_hal_device_allocator(device),
+ ParseToVariantList(input_descs, iree_hal_device_allocator(*device),
absl::GetFlag(FLAGS_function_inputs)));
}
- IREE_ASSIGN_OR_RETURN(auto output_descs, ParseOutputSignature(function));
-
- // Execute once to make sure any first-iteration outliers are eliminated (e.g.
- // JITing the SPIR-V) and clearly separate out benchmark-related problems in
- // future debugging.
- {
- vm::ref<iree_vm_list_t> outputs;
- IREE_RETURN_IF_ERROR(
- iree_vm_list_create(/*element_type=*/nullptr, output_descs.size(),
- iree_allocator_system(), &outputs));
- IREE_RETURN_IF_ERROR(iree_vm_invoke(context, function, /*policy=*/nullptr,
- inputs.get(), outputs.get(),
- iree_allocator_system()));
- }
-
- for (auto _ : state) {
- // No status conversions and conditional returns in the benchmarked inner
- // loop.
- vm::ref<iree_vm_list_t> outputs;
- IREE_CHECK_OK(iree_vm_list_create(/*element_type=*/nullptr,
- output_descs.size(),
- iree_allocator_system(), &outputs));
- IREE_CHECK_OK(iree_vm_invoke(context, function, /*policy=*/nullptr,
- inputs.get(), outputs.get(),
- iree_allocator_system()));
- }
-
- inputs.reset();
- iree_vm_module_release(hal_module);
- iree_vm_module_release(input_module);
- iree_hal_device_release(device);
- iree_vm_context_release(context);
- iree_vm_instance_release(instance);
- return OkStatus();
+ // Creates output singnature.
+ IREE_ASSIGN_OR_RETURN(output_descs, ParseOutputSignature(function));
+ return iree::OkStatus();
}
-void BM_RunModule(benchmark::State& state, const std::string& function_name) {
- // Delegate to a status-returning function so we can use the status macros.
- IREE_CHECK_OK(RunFunction(state, function_name));
-}
-
-} // namespace
-
-Status RegisterModuleBenchmarks() {
- auto function_name = absl::GetFlag(FLAGS_entry_function);
- if (function_name.empty()) {
- return InvalidArgumentErrorBuilder(IREE_LOC)
- << "Must specify an entry_function";
- }
+void RegisterModuleBenchmarks(
+ Status module_data_status, Status prepare_vm_func_status,
+ std::string& function_name, iree_vm_context_t* context,
+ iree_vm_function_t function, iree_vm_list_t* inputs,
+ const std::vector<RawSignatureParser::Description>& output_descs) {
auto benchmark_name = "BM_" + function_name;
- benchmark::RegisterBenchmark(benchmark_name.c_str(),
- [function_name](benchmark::State& state) {
- BM_RunModule(state, function_name);
- })
+ benchmark::RegisterBenchmark(
+ benchmark_name.c_str(),
+ [module_data_status, prepare_vm_func_status, context, function, inputs,
+ output_descs](benchmark::State& state) -> void {
+ IREE_CHECK_OK(module_data_status);
+ IREE_CHECK_OK(prepare_vm_func_status);
+ // Warmup run step.
+ {
+ vm::ref<iree_vm_list_t> outputs;
+ IREE_CHECK_OK(iree_vm_list_create(/*element_type=*/nullptr,
+ output_descs.size(),
+ iree_allocator_system(), &outputs));
+ IREE_CHECK_OK(iree_vm_invoke(context, function, /*policy=*/nullptr,
+ inputs, outputs.get(),
+ iree_allocator_system()));
+ }
+ // Benchmarking loop.
+ for (auto _ : state) {
+ // No status conversions and conditional returns in the benchmarked
+ // inner loop.
+ vm::ref<iree_vm_list_t> outputs;
+ IREE_CHECK_OK(iree_vm_list_create(/*element_type=*/nullptr,
+ output_descs.size(),
+ iree_allocator_system(), &outputs));
+ IREE_CHECK_OK(iree_vm_invoke(context, function, /*policy=*/nullptr,
+ inputs, outputs.get(),
+ iree_allocator_system()));
+ }
+ })
// By default only the main thread is included in CPU time. Include all
// the threads instead.
->MeasureProcessCPUTime()
@@ -191,8 +164,8 @@
// significant digits. If we end up wanting precision beyond microseconds,
// we can make this setting configurable with a custom command line flag.
->Unit(benchmark::kMillisecond);
- return OkStatus();
}
+} // namespace
} // namespace iree
int main(int argc, char** argv) {
@@ -232,7 +205,46 @@
absl::flags_internal::OnUndefinedFlag::kIgnoreUndefined);
::benchmark::Initialize(&argc, argv);
iree::InitializeEnvironment(&argc, &argv);
- IREE_CHECK_OK(iree::RegisterModuleBenchmarks());
+
+ iree_vm_instance_t* instance = nullptr;
+ iree_hal_device_t* device = nullptr;
+ iree_vm_module_t* hal_module = nullptr;
+ iree_vm_context_t* context = nullptr;
+ iree_vm_module_t* input_module = nullptr;
+ iree_vm_function_t function;
+ iree::vm::ref<iree_vm_list_t> inputs;
+ std::vector<iree::RawSignatureParser::Description> output_descs;
+ std::string module_data;
+ auto function_name = absl::GetFlag(FLAGS_entry_function);
+
+ // Capture status checking will be delayed at benchmarking runtime.
+ auto module_data_status = iree::GetModuleContentsFromFlags(module_data);
+ auto prepare_vm_func_status = iree::PrepareIREEVMFunction(
+ &instance, &device, &hal_module, &context, &input_module, function,
+ inputs, output_descs, function_name, module_data);
+ if (prepare_vm_func_status.ok()) {
+ assert(instance);
+ assert(device);
+ assert(hal_module);
+ assert(context);
+ assert(input_module);
+ assert(inputs.get());
+ }
+
+ // Register function benchmarks...
+ iree::RegisterModuleBenchmarks(module_data_status, prepare_vm_func_status,
+ function_name, context, function, inputs.get(),
+ output_descs);
+
+ // Run benchmarks...
::benchmark::RunSpecifiedBenchmarks();
+
+ // Cleanup...
+ inputs.reset();
+ iree_vm_module_release(hal_module);
+ iree_vm_module_release(input_module);
+ iree_hal_device_release(device);
+ iree_vm_context_release(context);
+ iree_vm_instance_release(instance);
return 0;
}
diff --git a/scripts/__init__.py b/scripts/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/scripts/__init__.py
diff --git a/scripts/get_e2e_artifacts.py b/scripts/get_e2e_artifacts.py
new file mode 100755
index 0000000..5c6f6f6
--- /dev/null
+++ b/scripts/get_e2e_artifacts.py
@@ -0,0 +1,162 @@
+#!/usr/bin/env python3
+
+# Copyright 2020 Google LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+"""Runs all E2E TensorFlow tests and extracts their benchmarking artifacts.
+
+Example usage:
+ python3 get_e2e_artifacts.py
+"""
+
+import fileinput
+import os
+import re
+import subprocess
+import tempfile
+from typing import Dict, Set
+import zipfile
+
+import utils
+
+from absl import app
+from absl import flags
+
+SUITE_NAME_TO_TARGET = {
+ 'e2e_tests':
+ '//integrations/tensorflow/e2e:e2e_tests',
+ 'mobile_bert_squad_tests':
+ '//integrations/tensorflow/e2e:mobile_bert_squad_tests',
+ 'keras_tests':
+ '//integrations/tensorflow/e2e/keras:keras_tests',
+ 'vision_external_tests':
+ '//integrations/tensorflow/e2e/keras:vision_external_tests',
+}
+SUITES_HELP = [f'`{name}`' for name in SUITE_NAME_TO_TARGET]
+SUITES_HELP = f'{", ".join(SUITES_HELP[:-1])} and {SUITES_HELP[-1]}'
+
+FLAGS = flags.FLAGS
+
+flags.DEFINE_bool(
+ 'dry_run', False,
+ 'Run without extracting files. Useful for quickly checking for artifact '
+ 'collisions.')
+flags.DEFINE_string(
+ 'artifacts_dir', os.path.join(tempfile.gettempdir(), 'iree', 'modules'),
+ 'Directory to transfer the benchmarking artifacts to. Defaults to '
+ '/tmp/iree/modules/')
+flags.DEFINE_bool('run_test_suites', True, 'Run any specified test suites.')
+flags.DEFINE_list('test_suites', list(SUITE_NAME_TO_TARGET.keys()),
+ f'Any combination of {SUITES_HELP}.')
+
+EXPECTED_COLLISIONS = [
+ '/tf_ref/', 'tf_input.mlir', 'iree_input.mlir', '/saved_model/'
+]
+
+
+def _target_to_testlogs_path(target: str) -> str:
+ """Convert target into the path where Bazel stores the artifacts we want."""
+ return os.path.join('bazel-testlogs',
+ target.replace('//', '').replace(':', os.sep))
+
+
+def _target_to_test_name(target: str, test_suite_path: str) -> str:
+ """Get test_name from `suite_name_test_name__tf__backend_name`."""
+ return target.split('__')[0].replace(f'{test_suite_path}_', '')
+
+
+def get_test_paths_and_names(test_suite_path: str):
+ """Get the paths Bazel stores test outputs in and the matching test names."""
+ targets = utils.get_test_targets(test_suite_path)
+ test_paths = [_target_to_testlogs_path(target) for target in targets]
+ test_names = [
+ _target_to_test_name(target, test_suite_path) for target in targets
+ ]
+ return test_paths, test_names
+
+
+def check_collision(filename: str, test_name: str, written_paths: Set[str],
+ paths_to_tests: Dict[str, str]):
+ """Check that we aren't overwriting files unless we expect to."""
+ # Note: We can't use a check that the files have identical contents because
+ # tf_input.mlir can have random numbers appended to its function names.
+ # See https://github.com/google/iree/issues/3375
+
+ expected_collision = any([name in filename for name in EXPECTED_COLLISIONS])
+ if filename in written_paths and not expected_collision:
+ raise ValueError(f'Collision found on {filename} between {test_name}.py '
+ f'and {paths_to_tests[filename]}.py')
+ else:
+ written_paths.add(filename)
+ paths_to_tests[filename] = test_name
+
+
+def update_path(archive_path: str):
+ """Update the --input_file flag with the new location of the compiled.vmfb"""
+ backend_path = archive_path.split('traces')[0] # 'ModuleName/backend_name'.
+ compiled_path = os.path.join(FLAGS.artifacts_dir, backend_path,
+ 'compiled.vmfb')
+ flagfile_path = os.path.join(FLAGS.artifacts_dir, archive_path)
+ for line in fileinput.input(files=[flagfile_path], inplace=True):
+ if line.strip().startswith('--input_file'):
+ print(f'--input_file={compiled_path}\n', end='')
+ else:
+ print(line, end='')
+
+
+def extract_artifacts(test_path: str, test_name: str, written_paths: Set[str],
+ paths_to_tests: Dict[str, str]):
+ """Unzips all of the benchmarking artifacts for a given test and backend."""
+ outputs = os.path.join(test_path, 'test.outputs', 'outputs.zip')
+ archive = zipfile.ZipFile(outputs)
+ # Filter out directory names.
+ filenames = [name for name in archive.namelist() if name[-1] != os.sep]
+
+ for filename in filenames:
+ # Check for collisions.
+ check_collision(filename, test_name, written_paths, paths_to_tests)
+
+ # Extract and update flagfile path.
+ if not FLAGS.dry_run:
+ archive.extract(filename, FLAGS.artifacts_dir)
+ if filename.endswith('flagfile'):
+ update_path(filename)
+
+
+def main(argv):
+ del argv # Unused.
+
+ # Convert test suite shorthands to full test suite targets.
+ test_suites = [SUITE_NAME_TO_TARGET[suite] for suite in FLAGS.test_suites]
+
+ written_paths = set()
+ paths_to_tests = dict()
+
+ for test_suite in test_suites:
+ if FLAGS.run_test_suites and not FLAGS.dry_run:
+ subprocess.check_call([
+ 'bazel', 'test', test_suite, '--color=yes',
+ '--test_arg=--get_saved_model'
+ ])
+ print()
+
+ # Extract all of the artifacts for this test suite.
+ test_paths, test_names = get_test_paths_and_names(test_suite)
+ for i, (test_path, test_name) in enumerate(zip(test_paths, test_names)):
+ print(f'\rTransfering {test_suite} {i + 1}/{len(test_paths)}', end='')
+ extract_artifacts(test_path, test_name, written_paths, paths_to_tests)
+ print('\n')
+
+
+if __name__ == '__main__':
+ app.run(main)
diff --git a/scripts/git/update_tf_submodule.sh b/scripts/git/update_llvm_dependent_submodules.sh
similarity index 72%
rename from scripts/git/update_tf_submodule.sh
rename to scripts/git/update_llvm_dependent_submodules.sh
index 28799d1..1890412 100755
--- a/scripts/git/update_tf_submodule.sh
+++ b/scripts/git/update_llvm_dependent_submodules.sh
@@ -15,47 +15,46 @@
# limitations under the License.
# Creates a PR based on the specified BASE_BRANCH (default "google") to update
-# the TF submodule to the configured TENSORFLOW_COMMIT (default REMOTE for
-# current HEAD).
+# the LLVM-dependent submodules to the configured commits.
+#
+# Positional args will be passed through to update_to_llvm_syncpoint.py
#
# - Requries the gh CLI (https://github.com/cli/cli) to create a PR.
-# - Will force push to the configured PR_BRANCH (default "tf-submodule-update")
-# on the configured FORK_REMOTE (default "origin")
+# - Will force push to the configured PR_BRANCH (default
+# "llvm-dependent-submodule-update") on the configured FORK_REMOTE (default
+# "origin")
# - Requires that local BASE_BRANCH branch is a pristine (potentially stale)
# copy of the same branch on the configured UPSTREAM_REMOTE
# (default "upstream").
# - Requires that the working directory be clean. Will abort otherwise.
-# - An optional TF_COMMIT_NICKNAME nickname can be given to the commit for the
-# PR description. Otherwise, it will default to "current HEAD" if
-# TENSORFLOW_COMMIT is REMOTE and the trimmed commit sha otherwise.
set -e
set -o pipefail
export UPSTREAM_REMOTE="${UPSTREAM_REMOTE:-upstream}"
-TENSORFLOW_COMMIT="${1:-LATEST_MATCH}"
-PR_BRANCH="tf-submodule-update"
+PR_BRANCH="llvm-dependent-submodule-update"
BASE_BRANCH="${BASE_BRANCH:-google}"
FORK_REMOTE="${FORK_REMOTE:-origin}"
./scripts/git/git_update.sh "${BASE_BRANCH?}"
git checkout -B "${PR_BRANCH?}"
-CMD="./scripts/git/update_to_llvm_syncpoint.py --tensorflow_commit=${TENSORFLOW_COMMIT?}"
+CMD="./scripts/git/update_to_llvm_syncpoint.py $@"
bash -c "${CMD?}"
+LLVM_SHA="$(git submodule status third_party/llvm-project | awk '{print $1}' | cut -c -12)"
+LLVM_BAZEL_SHA="$(git submodule status third_party/llvm-bazel | awk '{print $1}' | cut -c -12)"
TF_SHA="$(git submodule status third_party/tensorflow | awk '{print $1}' | cut -c -12)"
-LLVM_SHA="$(git submodule status third_party/llvm-project | awk '{print $1}' | cut -c -12)"
-
-TITLE="Integrate TF at tensorflow/tensorflow@${TF_SHA?}"
+TITLE="Synchronize submodules with LLVM at llvm/llvm-project@${LLVM_SHA?}"
BODY="$(cat <<-EOF
-Updates TF to
-[${TF_SHA?}](https://github.com/tensorflow/tensorflow/commit/${TF_SHA?})
-matching
-[${LLVM_SHA?}](https://github.com/llvm/llvm-project/commit/${LLVM_SHA?})
-and copies over the LLVM BUILD files.
+Updates LLVM dependencies to match
+[${LLVM_SHA?}](https://github.com/llvm/llvm-project/commit/${LLVM_SHA?}).
+- llvm-bazel to
+ [${LLVM_BAZEL_SHA?}](https://github.com/google/llvm-bazel/commit/${LLVM_BAZEL_SHA?})
+- TensorFlow to
+ [${TF_SHA?}](https://github.com/tensorflow/tensorflow/commit/${TF_SHA?})
\`${CMD?}\`
EOF
diff --git a/scripts/git/update_to_llvm_syncpoint.py b/scripts/git/update_to_llvm_syncpoint.py
index efb7def..502d690 100755
--- a/scripts/git/update_to_llvm_syncpoint.py
+++ b/scripts/git/update_to_llvm_syncpoint.py
@@ -16,20 +16,18 @@
# pylint: disable=missing-docstring
"""Updates LLVM-dependent submodules based on the current LLVM commit.
-Updates the third_party/tensorflow submodule to a new commit based on the commit
-in the third_party/llvm-project submodule. We have special conditions around
-these submodules since they are synced as part of the integration of LLVM into
-Google's source repository. See
+Updates the third_party/llvm-bazel and third_party/tensorflow submodules to
+commits that match the LLVM commit in third_party/llvm-project submodule. We
+have special conditions around these submodules since they are synced as part of
+the integration of LLVM into Google's source repository. See
https://google.github.io/iree/developing-iree/repository-management#the-special-relationship-with-llvm-and-tensorflow.
-In addition we currently copy LLVM Bazel BUILD files from TensorFlow.
-
Typical usage:
Syntax: ./scripts/git/update_to_llvm_syncpoint.py
- By default, this will update the TensorFlow submodule to the most recent
- commit with an LLVM version that matches IREE's and copy over the LLVM
- BUILD file changes as needed.
+ By default, this will update llvm-bazel to the tag corresponding to the
+ current LLVM commit and update TensorFlow to the most recent commit that has a
+ matching LLVM commit.
"""
import argparse
@@ -61,20 +59,30 @@
def parse_arguments():
parser = argparse.ArgumentParser()
parser.add_argument("--repo", help="Repository root directory")
+ parser.add_argument("--llvm",
+ help="Path to the LLVM sources "
+ "(defaults to third_party/llvm-project)",
+ default=None)
+ parser.add_argument("--llvm_bazel",
+ help="Path to the LLVM Bazel BUILD files"
+ "(defaults to third_party/llvm-bazel)",
+ default=None)
parser.add_argument(
- "--tensorflow",
- help="Path to the tensorflow sources "
- "(default to third_party/tensorflow)",
- default=None)
- parser.add_argument(
- "--llvm",
- help="Path to the LLVM sources "
- "(defaults to third_party/llvm-project)",
- default=None)
+ "--llvm_bazel_commit",
+ help=("Update llvm-bazel to this commit, or a named option:"
+ f" {COMMIT_OPTIONS}."
+ f" {LATEST_MATCHING_COMMIT} and {INTEGRATE_COMMIT} are equivalent"
+ " for this repository."),
+ default=LATEST_MATCHING_COMMIT)
+ parser.add_argument("--tensorflow",
+ help="Path to the tensorflow sources "
+ "(default to third_party/tensorflow)",
+ default=None)
parser.add_argument(
"--tensorflow_commit",
"--tf_commit",
- help=f"Update TensorFlow to this commit, or a named option: {COMMIT_OPTIONS}",
+ help=("Update TensorFlow to this commit, or a named option:"
+ f" {COMMIT_OPTIONS}"),
default=LATEST_MATCHING_COMMIT)
parser.add_argument(
"--validate",
@@ -84,12 +92,6 @@
default=True,
)
- parser.add_argument(
- "--update_build_files",
- help="Updates the IREE LLVM build files from TensorFlow.",
- type=utils.str2bool,
- nargs="?",
- default=True)
args = parser.parse_args()
# Default repo path.
@@ -101,6 +103,8 @@
args.tensorflow = os.path.join(args.repo, "third_party", "tensorflow")
if not args.llvm:
args.llvm = os.path.join(args.repo, "third_party", "llvm-project")
+ if not args.llvm_bazel:
+ args.llvm_bazel = os.path.join(args.repo, "third_party", "llvm-bazel")
return args
@@ -110,7 +114,7 @@
print(" IREE Path :", args.repo)
print(" LLVM Path :", args.llvm)
print(" TensorFlow Path :", args.tensorflow)
- print(" Update Build files:", args.update_build_files)
+ print(" LLVM Bazel Path :", args.llvm_bazel)
current_llvm_commit = get_commit(args.llvm)
current_tensorflow_commit = get_commit(args.tensorflow)
@@ -124,12 +128,20 @@
utils.execute(["git", "checkout", new_tf_commit], cwd=args.tensorflow)
stage_path(args.repo, args.tensorflow)
- validate_tf_commit(
- current_llvm_commit, args.tensorflow, exit_on_failure=args.validate)
+ validate_tf_commit(current_llvm_commit,
+ args.tensorflow,
+ exit_on_failure=args.validate)
- if args.update_build_files:
- print("\n*** Updating BUILD.bazel files ***")
- update_build_files_from_tensorflow(args.repo, args.tensorflow)
+ new_llvm_bazel_commit = find_new_llvm_bazel_commit(args.llvm_bazel,
+ current_llvm_commit,
+ args.llvm_bazel_commit)
+ print("\n*** Updating LLVM Bazel to", new_llvm_bazel_commit, "***")
+ utils.execute(["git", "checkout", new_llvm_bazel_commit], cwd=args.llvm_bazel)
+ stage_path(args.repo, args.llvm_bazel)
+
+ validate_llvm_bazel_commit(current_llvm_commit,
+ args.llvm_bazel,
+ exit_on_failure=args.validate)
# Export SUBMODULE_VERSIONS.
print() # Add line break.
@@ -144,6 +156,44 @@
universal_newlines=True).strip()
+def find_new_llvm_bazel_commit(llvm_bazel_path, llvm_commit, llvm_bazel_commit):
+ utils.execute(["git", "fetch"], cwd=llvm_bazel_path)
+
+ if llvm_bazel_commit not in COMMIT_OPTIONS:
+ return get_commit(llvm_bazel_path, rev=llvm_bazel_commit)
+
+ if llvm_bazel_commit == KEEP_COMMIT:
+ return get_commit(llvm_bazel_path)
+
+ if llvm_bazel_commit == REMOTE_HEAD_COMMIT:
+ return get_commit(llvm_bazel_path, "origin/main")
+
+ if (llvm_bazel_commit == INTEGRATE_COMMIT or
+ llvm_bazel_commit == LATEST_MATCHING_COMMIT):
+ return get_commit(llvm_bazel_path, f"llvm-project-{llvm_commit}")
+
+
+def validate_llvm_bazel_commit(llvm_commit,
+ llvm_bazel_path,
+ exit_on_failure=True):
+ llvm_bazel_llvm_commit = find_llvm_bazel_llvm_commit(llvm_bazel_path)
+
+ matches = llvm_bazel_llvm_commit == llvm_commit
+ if not matches:
+ print("WARNING: LLVM commit in llvm-bazel does not match that in IREE"
+ f" ({llvm_bazel_llvm_commit} vs {llvm_commit})")
+ if exit_on_failure:
+ sys.exit(1)
+
+
+def find_llvm_bazel_llvm_commit(llvm_bazel_path):
+ return utils.execute(
+ ["git", "submodule", "status", "third_party/llvm-project"],
+ capture_output=True,
+ universal_newlines=True,
+ cwd=llvm_bazel_path).split()[0].lstrip("+-")
+
+
def find_new_tf_commit(tensorflow_path, llvm_commit, tf_commit):
utils.execute(["git", "fetch"], cwd=tensorflow_path)
@@ -234,35 +284,6 @@
sys.exit(1)
-def update_build_files_from_tensorflow(repo_path, tensorflow_path):
- src_llvm_build = os.path.join(tensorflow_path, "third_party", "llvm",
- "llvm.autogenerated.BUILD")
- # NOTE(laurenzo): These will probably move upstream.
- src_mlir_build = os.path.join(tensorflow_path, "third_party", "mlir", "BUILD")
- src_mlir_test_build = os.path.join(tensorflow_path, "third_party", "mlir",
- "test.BUILD")
- overlay_path = os.path.join(repo_path, "build_tools", "bazel",
- "third_party_import", "llvm-project", "overlay")
- copy_text_file(repo_path, src_llvm_build,
- os.path.join(overlay_path, "llvm", "BUILD.bazel"))
- copy_text_file(repo_path, src_mlir_build,
- os.path.join(overlay_path, "mlir", "BUILD.bazel"))
- copy_text_file(repo_path, src_mlir_test_build,
- os.path.join(overlay_path, "mlir", "test", "BUILD.bazel"))
-
-
-def copy_text_file(repo_path, src_file, dst_file):
- print(f"+ cp {src_file} {dst_file}")
- with open(src_file, "r", encoding="UTF-8") as f:
- src_contents = f.read()
-
- if not os.path.exists(dst_file):
- print("WARNING: Destination file does not exist:", dst_file)
- with open(dst_file, "w", encoding="UTF-8") as f:
- f.write(src_contents)
- stage_path(repo_path, dst_file)
-
-
def stage_path(repo_path, to_stage):
# TODO(laurenzo): Move to utils.py.
utils.execute(["git", "add", to_stage], cwd=repo_path)
diff --git a/scripts/update_e2e_coverage.py b/scripts/update_e2e_coverage.py
index b048baa..baa8d41 100755
--- a/scripts/update_e2e_coverage.py
+++ b/scripts/update_e2e_coverage.py
@@ -24,6 +24,8 @@
import re
import subprocess
+import utils
+
REFERENCE_BACKEND = 'tf'
# Assumes that tests are expanded for the tf, iree_vmla, iree_llvmjit and
# iree_vulkan backends.
@@ -87,8 +89,10 @@
"""Parses command-line options."""
parser = argparse.ArgumentParser(
description='Generates Markdown files for op coverage table')
- parser.add_argument(
- 'build_dir', metavar='BUILD_PATH', type=str, help='Base build directory.')
+ parser.add_argument('build_dir',
+ metavar='BUILD_PATH',
+ type=str,
+ help='Base build directory.')
parsed_args = parser.parse_args()
if not os.path.isdir(parsed_args.build_dir):
@@ -97,38 +101,22 @@
return parsed_args
-def create_markdown_table(rows):
- """Converts a 2D array to a Markdown table."""
- return '\n'.join([' | '.join(row) for row in rows])
-
-
def get_name_and_backend(test_string):
"""Splits a pathless test target into its name and comparison backend."""
name, backend = test_string.split(f'__{REFERENCE_BACKEND}__')
return name, backend
-def get_test_targets(test_suite_path):
- """Returns a list of test targets stripped of paths and suite names."""
- # Check if the suite exists (which may not be true for failing suites)
- target_dir = test_suite.split(':')[0]
- query = ['bazel', 'query', f'{target_dir}/...']
- targets = subprocess.check_output(query)
- if test_suite_path not in targets.decode('ascii'):
- return []
-
- query = ['bazel', 'query', f'tests({test_suite_path})']
- tests = subprocess.check_output(query)
- tests = tests.decode('ascii').split(os.linesep)
- tests = list(filter(lambda s: s.startswith(f'{test_suite_path}_'), tests))
- tests = [test.replace(f'{test_suite_path}_', '') for test in tests]
- return tests
-
-
def get_suite_metadata(test_suite):
"""Gets all test names, and passing and failing test-backend pairs."""
- passing = get_test_targets(test_suite)
- failing = get_test_targets(f'{test_suite}_failing')
+ passing = utils.get_test_targets(test_suite)
+ failing = utils.get_test_targets(f'{test_suite}_failing')
+
+ # Remove bazel path.
+ passing = [test.replace(f'{test_suite}_', '') for test in passing]
+ failing = [test.replace(f'{test_suite}_failing_', '') for test in failing]
+
+ # Split into (test_name, target_backend).
passing = [get_name_and_backend(test) for test in passing]
failing = [get_name_and_backend(test) for test in failing]
passing_names = [test[0] for test in passing]
@@ -178,7 +166,7 @@
SUCCESS_ELEMENT if backend else FAILURE_ELEMENT for backend in backends
])
rows.append(row)
- return create_markdown_table(rows)
+ return utils.create_markdown_table(rows)
if __name__ == '__main__':
diff --git a/scripts/update_op_coverage.py b/scripts/update_op_coverage.py
index c2c6dd9..575a390 100755
--- a/scripts/update_op_coverage.py
+++ b/scripts/update_op_coverage.py
@@ -23,6 +23,8 @@
import os
import subprocess
+import utils
+
# The symbols to show in the table if the operation is supported or not.
SUCCESS_ELEMENT = '<span class="success-table-element">✓</span>'
FAILURE_ELEMENT = '<span class="failure-table-element">✗</span>'
@@ -47,8 +49,10 @@
"""Parses command-line options."""
parser = argparse.ArgumentParser(
description='Generates Markdown files for op coverage table')
- parser.add_argument(
- 'build_dir', metavar='BUILD_PATH', type=str, help='Base build directory.')
+ parser.add_argument('build_dir',
+ metavar='BUILD_PATH',
+ type=str,
+ help='Base build directory.')
parsed_args = parser.parse_args()
if not os.path.isdir(parsed_args.build_dir):
@@ -87,11 +91,6 @@
return res
-def create_markdown_table(rows):
- """Converts a 2D array to a Markdown table."""
- return '\n'.join([' | '.join(row) for row in rows])
-
-
def generate_table(build_dir):
"""Generates an op coverage Markdown table for each backend."""
backend_ops = get_tested_ops_for_backends(build_dir)
@@ -109,10 +108,10 @@
for op in all_ops:
row = [op]
for backend in backends:
- row.append(
- SUCCESS_ELEMENT if (op in backend_ops[backend]) else FAILURE_ELEMENT)
+ row.append(SUCCESS_ELEMENT if (
+ op in backend_ops[backend]) else FAILURE_ELEMENT)
rows.append(row)
- return create_markdown_table(rows)
+ return utils.create_markdown_table(rows)
if __name__ == '__main__':
diff --git a/scripts/utils.py b/scripts/utils.py
new file mode 100644
index 0000000..3b6f547
--- /dev/null
+++ b/scripts/utils.py
@@ -0,0 +1,75 @@
+# Lint as: python3
+# Copyright 2020 Google LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# pylint: disable=missing-docstring
+
+import argparse
+import os
+import re
+import subprocess
+from typing import Sequence
+
+BAZEL_FILTERS = [
+ r'Loading: [0-9]+ packages loaded',
+ r'.*Using python binary from PYTHON_BIN = .*'
+]
+
+
+def create_markdown_table(rows: Sequence[Sequence[str]]):
+ """Converts a 2D array to a Markdown table."""
+ return '\n'.join([' | '.join(row) for row in rows])
+
+
+def check_and_get_output(command: Sequence[str],
+ dry_run: bool = False,
+ log_stderr: bool = True,
+ stderr_filters: Sequence[str] = ()):
+ print(f'Running: `{" ".join(command)}`')
+ if dry_run:
+ return None, None
+ process = subprocess.Popen(command,
+ bufsize=1,
+ stderr=subprocess.PIPE,
+ stdout=subprocess.PIPE,
+ universal_newlines=True)
+ process.wait()
+ stdout = [line.strip(os.linesep) for line in process.stdout]
+ stderr = [line.strip(os.linesep) for line in process.stderr]
+
+ if log_stderr:
+ for line in stderr:
+ if not any(re.match(pattern, line) for pattern in stderr_filters):
+ print(line)
+
+ if process.returncode != 0:
+ raise subprocess.CalledProcessError(process.returncode, ' '.join(command))
+
+ return stdout, stderr
+
+
+def get_test_targets(test_suite_path: str):
+ """Returns a list of test targets for the given test suite."""
+ # Check if the suite exists (which may not be true for failing suites).
+ # We use two queries here because the return code for a failed query is
+ # unfortunately the same as the return code for a bazel configuration error.
+ target_dir = test_suite_path.split(':')[0]
+ query = ['bazel', 'query', f'{target_dir}/...']
+ targets, _ = check_and_get_output(query, stderr_filters=BAZEL_FILTERS)
+ if test_suite_path not in targets:
+ return []
+
+ query = ['bazel', 'query', f'tests({test_suite_path})']
+ tests, _ = check_and_get_output(query, stderr_filters=BAZEL_FILTERS)
+ return tests
diff --git a/third_party/llvm-bazel b/third_party/llvm-bazel
new file mode 160000
index 0000000..f0d4260
--- /dev/null
+++ b/third_party/llvm-bazel
@@ -0,0 +1 @@
+Subproject commit f0d426064ff1ed45438424d5c53f753c6d4c809b