2021-08-12 02:56:25 +08:00
|
|
|
load("@llvm-project//mlir:tblgen.bzl", "gentbl_cc_library", "td_library")
|
|
|
|
|
|
|
|
package(
|
|
|
|
default_visibility = ["//visibility:public"],
|
2021-08-31 03:09:50 +08:00
|
|
|
features = ["layering_check"],
|
2021-08-12 02:56:25 +08:00
|
|
|
licenses = ["notice"],
|
|
|
|
)
|
|
|
|
|
|
|
|
exports_files(glob(["include/iree-dialects/Dialect/IREE/*.td"]))
|
|
|
|
|
|
|
|
filegroup(
|
|
|
|
name = "TdFilegroup",
|
|
|
|
srcs = glob(["include/iree-dialects/Dialect/IREE/*.td"]),
|
|
|
|
)
|
|
|
|
|
|
|
|
td_library(
|
|
|
|
name = "TdFiles",
|
|
|
|
srcs = glob(["include/iree-dialects/Dialect/IREE/*.td"]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
"@llvm-project//mlir:OpBaseTdFiles",
|
|
|
|
"@llvm-project//mlir:SideEffectTdFiles",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
gentbl_cc_library(
|
|
|
|
name = "IREEOpsIncGen",
|
|
|
|
strip_include_prefix = "include",
|
|
|
|
tbl_outs = [
|
|
|
|
(
|
|
|
|
["-gen-dialect-decls"],
|
|
|
|
"include/iree-dialects/Dialect/IREE/IREEOpsDialect.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-dialect-defs"],
|
|
|
|
"include/iree-dialects/Dialect/IREE/IREEOpsDialect.cpp.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-decls"],
|
|
|
|
"include/iree-dialects/Dialect/IREE/IREEOps.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-op-defs"],
|
|
|
|
"include/iree-dialects/Dialect/IREE/IREEOps.cpp.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-typedef-decls"],
|
|
|
|
"include/iree-dialects/Dialect/IREE/IREEOpsTypes.h.inc",
|
|
|
|
),
|
|
|
|
(
|
|
|
|
["-gen-typedef-defs"],
|
|
|
|
"include/iree-dialects/Dialect/IREE/IREEOpsTypes.cpp.inc",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
tblgen = "@llvm-project//mlir:mlir-tblgen",
|
|
|
|
td_file = "include/iree-dialects/Dialect/IREE/IREEOps.td",
|
|
|
|
deps = [":TdFiles"],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "IREEDialect",
|
|
|
|
srcs = glob([
|
|
|
|
"lib/Dialect/IREE/*.cpp",
|
|
|
|
]),
|
|
|
|
hdrs = glob(["include/iree-dialects/Dialect/IREE/*.h"]),
|
|
|
|
includes = ["include"],
|
|
|
|
deps = [
|
|
|
|
":IREEOpsIncGen",
|
2021-08-31 03:09:50 +08:00
|
|
|
"@llvm-project//llvm:Support",
|
2021-08-12 02:56:25 +08:00
|
|
|
"@llvm-project//mlir:IR",
|
2021-08-31 03:09:50 +08:00
|
|
|
"@llvm-project//mlir:Support",
|
2021-08-12 02:56:25 +08:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "CAPI",
|
|
|
|
srcs = [
|
|
|
|
"lib/CAPI/Dialects.cpp",
|
|
|
|
],
|
|
|
|
hdrs = [
|
|
|
|
"include/iree-dialects-c/Dialects.h",
|
|
|
|
],
|
|
|
|
deps = [
|
|
|
|
":IREEDialect",
|
|
|
|
"@llvm-project//mlir:CAPIIR",
|
|
|
|
],
|
|
|
|
)
|