[llvm] Fix Bazel build (PR #81064)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 7 16:40:09 PST 2024
https://github.com/quanwanandy created https://github.com/llvm/llvm-project/pull/81064
None
>From c3caad3eed88bb22a321bab4d5c2797e467687c2 Mon Sep 17 00:00:00 2001
From: Andy Wan <quanwanandy at google.com>
Date: Wed, 7 Feb 2024 15:57:40 -0800
Subject: [PATCH] fix bazel build
---
.../llvm-project-overlay/mlir/BUILD.bazel | 107 ++++++++++++++++++
.../mlir/test/BUILD.bazel | 19 ++++
2 files changed, 126 insertions(+)
diff --git a/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel b/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
index 9f2c1f1120066b..e9e7fe3b35b7e5 100644
--- a/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
@@ -4644,6 +4644,7 @@ cc_library(
":TransformLoopExtension",
":TransformPDLExtension",
":UBToLLVM",
+ ":VCIXToLLVMIRTranslation",
":VectorTransformOps",
],
)
@@ -5098,6 +5099,8 @@ cc_library(
"lib/Dialect/LLVMIR/IR/ROCDL*.cpp",
"lib/Dialect/LLVMIR/IR/BasicPtxBuilderInterface.cpp",
"lib/Dialect/LLVMIR/IR/ROCDL*.h",
+ "lib/Dialect/LLVMIR/IR/VCIX*.cpp",
+ "lib/Dialect/LLVMIR/IR/VCIX*.h",
"lib/Dialect/LLVMIR/IR/*X86Vector*.cpp",
"lib/Dialect/LLVMIR/IR/*X86Vector*.h",
],
@@ -5110,6 +5113,7 @@ cc_library(
"include/mlir/Dialect/LLVMIR/NVVM*.h",
"include/mlir/Dialect/LLVMIR/BasicPtxBuilderInterface.h",
"include/mlir/Dialect/LLVMIR/ROCDL*.h",
+ "include/mlir/Dialect/LLVMIR/VCIX*.h",
"include/mlir/Dialect/LLVMIR/*X86Vector*.h",
],
) + [
@@ -5449,6 +5453,7 @@ cc_library(
":Support",
":ToLLVMIRTranslation",
":Transforms",
+ ":VCIXToLLVMIRTranslation",
":VectorDialect",
"//llvm:Core",
"//llvm:MC",
@@ -8751,6 +8756,7 @@ cc_library(
":ROCDLTarget",
":ROCDLToLLVMIRTranslation",
":SPIRVToLLVMIRTranslation",
+ ":VCIXToLLVMIRTranslation",
":X86VectorToLLVMIRTranslation",
],
)
@@ -9169,6 +9175,7 @@ cc_binary(
"//mlir/test:TestTypeDialect",
"//mlir/test:TestVector",
"//mlir/test:TestVectorToSPIRV",
+ "//mlir/test:TestMathToVCIX",
],
)
@@ -13643,3 +13650,103 @@ cc_library(
"//llvm:Core",
],
)
+
+cc_library(
+ name = "VCIXDialect",
+ srcs = ["lib/Dialect/LLVMIR/IR/VCIXDialect.cpp"],
+ hdrs = ["include/mlir/Dialect/LLVMIR/VCIXDialect.h"],
+ includes = ["include"],
+ deps = [
+ ":GPUDialect",
+ ":IR",
+ ":LLVMDialect",
+ ":VCIXOpsIncGen",
+ ":SideEffectInterfaces",
+ "//llvm:AsmParser",
+ "//llvm:Core",
+ "//llvm:Support",
+ ],
+)
+
+td_library(
+ name = "VCIXTdFiles",
+ srcs = ["include/mlir/Dialect/LLVMIR/VCIXOps.td"],
+ includes = ["include"],
+ deps = [
+ ":LLVMOpsTdFiles",
+ ":OpBaseTdFiles",
+ ],
+)
+
+gentbl_cc_library(
+ name = "VCIXOpsIncGen",
+ tbl_outs = [
+ (
+ ["-gen-op-decls"],
+ "include/mlir/Dialect/LLVMIR/VCIXOps.h.inc",
+ ),
+ (
+ ["-gen-op-defs"],
+ "include/mlir/Dialect/LLVMIR/VCIXOps.cpp.inc",
+ ),
+ (
+ [
+ "-gen-dialect-decls",
+ "-dialect=vcix",
+ ],
+ "include/mlir/Dialect/LLVMIR/VCIXOpsDialect.h.inc",
+ ),
+ (
+ [
+ "-gen-dialect-defs",
+ "-dialect=vcix",
+ ],
+ "include/mlir/Dialect/LLVMIR/VCIXOpsDialect.cpp.inc",
+ ),
+ (
+ [
+ "-gen-attrdef-decls",
+ "-attrdefs-dialect=vcix",
+ ],
+ "include/mlir/Dialect/LLVMIR/VCIXOpsAttributes.h.inc",
+ ),
+ (
+ [
+ "-gen-attrdef-defs",
+ "-attrdefs-dialect=vcix",
+ ],
+ "include/mlir/Dialect/LLVMIR/VCIXOpsAttributes.cpp.inc",
+ ),
+ ],
+ tblgen = ":mlir-tblgen",
+ td_file = "include/mlir/Dialect/LLVMIR/VCIXOps.td",
+ deps = [":VCIXTdFiles"],
+)
+
+cc_library(
+ name = "VCIXToLLVMIRTranslation",
+ srcs = glob(["lib/Target/LLVMIR/Dialect/VCIX/*.cpp"]),
+ hdrs = glob(["include/mlir/Target/LLVMIR/Dialect/VCIX/*.h"]),
+ includes = ["include"],
+ deps = [
+ ":IR",
+ ":VCIXConversionIncGen",
+ ":VCIXDialect",
+ ":ToLLVMIRTranslation",
+ "//llvm:Core",
+ "//llvm:Support",
+ ],
+)
+
+gentbl_cc_library(
+ name = "VCIXConversionIncGen",
+ tbl_outs = [
+ (
+ ["-gen-llvmir-conversions"],
+ "include/mlir/Dialect/LLVMIR/VCIXConversions.inc",
+ ),
+ ],
+ tblgen = ":mlir-tblgen",
+ td_file = "include/mlir/Dialect/LLVMIR/VCIXOps.td",
+ deps = [":VCIXTdFiles"],
+)
diff --git a/utils/bazel/llvm-project-overlay/mlir/test/BUILD.bazel b/utils/bazel/llvm-project-overlay/mlir/test/BUILD.bazel
index 43f88939a51584..c650e3e368d6e4 100644
--- a/utils/bazel/llvm-project-overlay/mlir/test/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/mlir/test/BUILD.bazel
@@ -787,6 +787,25 @@ cc_library(
],
)
+cc_library(
+ name = "TestMathToVCIX",
+ srcs = glob(["lib/Conversion/MathToVCIX/*.cpp"]),
+ defines = ["MLIR_CUDA_CONVERSIONS_ENABLED"],
+ includes = ["lib/Dialect/Test"],
+ deps = [
+ "//mlir:ArithDialect",
+ "//mlir:FuncDialect",
+ "//mlir:IR",
+ "//mlir:MathDialect",
+ "//mlir:Pass",
+ "//mlir:TransformUtils",
+ "//mlir:VCIXDialect",
+ "//mlir:VectorDialect",
+ ],
+)
+
+
+
cc_library(
name = "TestMemRef",
srcs = glob(["lib/Dialect/MemRef/*.cpp"]),
More information about the llvm-commits
mailing list