[bazel] Add missing dependencies necessary for the recent MLIR changes
[llvm-project.git] / utils / bazel / llvm-project-overlay / mlir / BUILD.bazel
blobbee3e97bb56bccac8f1fb3136efa86f158ec09a8
1 # This file is licensed under the Apache License v2.0 with LLVM Exceptions.
2 # See https://llvm.org/LICENSE.txt for license information.
3 # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
5 # Description:
6 #   The MLIR "Multi-Level Intermediate Representation" Compiler Infrastructure
8 load("@bazel_skylib//rules:expand_template.bzl", "expand_template")
9 load("@bazel_skylib//rules:write_file.bzl", "write_file")
10 load(
11     ":build_defs.bzl",
12     "cc_headers_only",
13     "if_cuda_available",
14     "mlir_c_api_cc_library",
16 load(":linalggen.bzl", "genlinalg")
17 load(":tblgen.bzl", "gentbl_cc_library", "td_library")
19 package(
20     default_visibility = ["//visibility:public"],
21     features = ["layering_check"],
24 licenses(["notice"])
26 exports_files([
27     "LICENSE.TXT",
28     "run_lit.sh",
29     "utils/textmate/mlir.json",
32 expand_template(
33     name = "mlir_config_h_gen",
34     out = "include/mlir/Config/mlir-config.h",
35     substitutions = {
36         "#cmakedefine01 MLIR_ENABLE_EXPENSIVE_PATTERN_API_CHECKS": "#define MLIR_ENABLE_EXPENSIVE_PATTERN_API_CHECKS 0",
37         "#cmakedefine MLIR_GREEDY_REWRITE_RANDOMIZER_SEED ${MLIR_GREEDY_REWRITE_RANDOMIZER_SEED}": "/* #undef MLIR_GREEDY_REWRITE_RANDOMIZER_SEED */",
38     },
39     template = "include/mlir/Config/mlir-config.h.cmake",
42 cc_library(
43     name = "config",
44     hdrs = [
45         "include/mlir/Config/mlir-config.h",
46     ],
49 filegroup(
50     name = "c_headers",
51     srcs = glob(["include/mlir-c/**/*"]),  # <== i.e. match the entire tree
54 exports_files(glob(["include/**/*.td"]))
57     gentbl_cc_library(
58         name = name + "IncGen",
59         tbl_outs = [
60             (
61                 ["-gen-op-interface-decls"],
62                 "include/mlir/IR/" + name + ".h.inc",
63             ),
64             (
65                 ["-gen-op-interface-defs"],
66                 "include/mlir/IR/" + name + ".cpp.inc",
67             ),
68         ],
69         tblgen = ":mlir-tblgen",
70         td_file = "include/mlir/IR/" + name + ".td",
71         deps = [":OpBaseTdFiles"],
72     )
73     for name in [
74         "OpAsmInterface",
75         "RegionKindInterface",
76         "SymbolInterfaces",
77     ]
80 gentbl_cc_library(
81     name = "TensorEncodingIncGen",
82     tbl_outs = [
83         (
84             ["-gen-attr-interface-decls"],
85             "include/mlir/IR/TensorEncInterfaces.h.inc",
86         ),
87         (
88             ["-gen-attr-interface-defs"],
89             "include/mlir/IR/TensorEncInterfaces.cpp.inc",
90         ),
91     ],
92     tblgen = ":mlir-tblgen",
93     td_file = "include/mlir/IR/TensorEncoding.td",
94     deps = [":TensorOpsTdFiles"],
97 td_library(
98     name = "BuiltinDialectTdFiles",
99     srcs = [
100         "include/mlir/IR/BuiltinAttributeInterfaces.td",
101         "include/mlir/IR/BuiltinAttributes.td",
102         "include/mlir/IR/BuiltinDialect.td",
103         "include/mlir/IR/BuiltinLocationAttributes.td",
104         "include/mlir/IR/BuiltinOps.td",
105         "include/mlir/IR/BuiltinTypeInterfaces.td",
106         "include/mlir/IR/BuiltinTypes.td",
107     ],
108     includes = ["include"],
109     deps = [
110         ":BytecodeTdFiles",
111         ":CallInterfacesTdFiles",
112         ":CastInterfacesTdFiles",
113         ":DataLayoutInterfacesTdFiles",
114         ":OpBaseTdFiles",
115         ":SideEffectInterfacesTdFiles",
116     ],
119 td_library(
120     name = "BuiltinDialectBytecodeTdFiles",
121     srcs = ["include/mlir/IR/BuiltinDialectBytecode.td"],
122     includes = ["include"],
123     deps = [
124         ":BytecodeTdFiles",
125     ],
128 gentbl_cc_library(
129     name = "BuiltinDialectIncGen",
130     tbl_outs = [
131         (
132             ["-gen-dialect-decls"],
133             "include/mlir/IR/BuiltinDialect.h.inc",
134         ),
135         (
136             ["-gen-dialect-defs"],
137             "include/mlir/IR/BuiltinDialect.cpp.inc",
138         ),
139     ],
140     tblgen = ":mlir-tblgen",
141     td_file = "include/mlir/IR/BuiltinDialect.td",
142     deps = [":BuiltinDialectTdFiles"],
145 gentbl_cc_library(
146     name = "BuiltinDialectBytecodeGen",
147     tbl_outs = [
148         (
149             [
150                 "-gen-bytecode",
151                 "-bytecode-dialect=Builtin",
152             ],
153             "include/mlir/IR/BuiltinDialectBytecode.cpp.inc",
154         ),
155     ],
156     tblgen = ":mlir-tblgen",
157     td_file = "include/mlir/IR/BuiltinDialectBytecode.td",
158     deps = [":BuiltinDialectTdFiles"],
161 gentbl_cc_library(
162     name = "BuiltinAttributesIncGen",
163     tbl_outs = [
164         (
165             ["--gen-attrdef-decls"],
166             "include/mlir/IR/BuiltinAttributes.h.inc",
167         ),
168         (
169             ["--gen-attrdef-defs"],
170             "include/mlir/IR/BuiltinAttributes.cpp.inc",
171         ),
172     ],
173     tblgen = ":mlir-tblgen",
174     td_file = "include/mlir/IR/BuiltinAttributes.td",
175     deps = [":BuiltinDialectTdFiles"],
178 gentbl_cc_library(
179     name = "BuiltinAttributeInterfacesIncGen",
180     tbl_outs = [
181         (
182             ["--gen-attr-interface-decls"],
183             "include/mlir/IR/BuiltinAttributeInterfaces.h.inc",
184         ),
185         (
186             ["--gen-attr-interface-defs"],
187             "include/mlir/IR/BuiltinAttributeInterfaces.cpp.inc",
188         ),
189     ],
190     tblgen = ":mlir-tblgen",
191     td_file = "include/mlir/IR/BuiltinAttributeInterfaces.td",
192     deps = [":BuiltinDialectTdFiles"],
195 gentbl_cc_library(
196     name = "BuiltinLocationAttributesIncGen",
197     tbl_outs = [
198         (
199             ["--gen-attrdef-decls"],
200             "include/mlir/IR/BuiltinLocationAttributes.h.inc",
201         ),
202         (
203             ["--gen-attrdef-defs"],
204             "include/mlir/IR/BuiltinLocationAttributes.cpp.inc",
205         ),
206     ],
207     tblgen = ":mlir-tblgen",
208     td_file = "include/mlir/IR/BuiltinLocationAttributes.td",
209     deps = [":BuiltinDialectTdFiles"],
212 gentbl_cc_library(
213     name = "BuiltinOpsIncGen",
214     tbl_outs = [
215         (
216             ["-gen-op-decls"],
217             "include/mlir/IR/BuiltinOps.h.inc",
218         ),
219         (
220             ["-gen-op-defs"],
221             "include/mlir/IR/BuiltinOps.cpp.inc",
222         ),
223     ],
224     tblgen = ":mlir-tblgen",
225     td_file = "include/mlir/IR/BuiltinOps.td",
226     deps = [
227         ":BuiltinDialectTdFiles",
228         ":OpBaseTdFiles",
229     ],
232 gentbl_cc_library(
233     name = "BuiltinTypesIncGen",
234     tbl_outs = [
235         (
236             ["--gen-typedef-decls"],
237             "include/mlir/IR/BuiltinTypes.h.inc",
238         ),
239         (
240             ["--gen-typedef-defs"],
241             "include/mlir/IR/BuiltinTypes.cpp.inc",
242         ),
243     ],
244     tblgen = ":mlir-tblgen",
245     td_file = "include/mlir/IR/BuiltinTypes.td",
246     deps = [":BuiltinDialectTdFiles"],
249 gentbl_cc_library(
250     name = "BuiltinTypeInterfacesIncGen",
251     tbl_outs = [
252         (
253             ["--gen-type-interface-decls"],
254             "include/mlir/IR/BuiltinTypeInterfaces.h.inc",
255         ),
256         (
257             ["--gen-type-interface-defs"],
258             "include/mlir/IR/BuiltinTypeInterfaces.cpp.inc",
259         ),
260     ],
261     tblgen = ":mlir-tblgen",
262     td_file = "include/mlir/IR/BuiltinTypeInterfaces.td",
263     deps = [
264         ":BuiltinDialectTdFiles",
265     ],
268 td_library(
269     name = "FunctionInterfacesTdFiles",
270     srcs = ["include/mlir/Interfaces/FunctionInterfaces.td"],
271     includes = ["include"],
272     deps = [
273         ":CallInterfacesTdFiles",
274         ":OpBaseTdFiles",
275     ],
278 gentbl_cc_library(
279     name = "FunctionInterfacesIncGen",
280     tbl_outs = [
281         (
282             ["-gen-op-interface-decls"],
283             "include/mlir/Interfaces/FunctionInterfaces.h.inc",
284         ),
285         (
286             ["-gen-op-interface-defs"],
287             "include/mlir/Interfaces/FunctionInterfaces.cpp.inc",
288         ),
289     ],
290     tblgen = ":mlir-tblgen",
291     td_file = "include/mlir/Interfaces/FunctionInterfaces.td",
292     deps = [
293         ":FunctionInterfacesTdFiles",
294     ],
297 cc_library(
298     name = "FunctionInterfaces",
299     srcs = [
300         "lib/Interfaces/FunctionImplementation.cpp",
301         "lib/Interfaces/FunctionInterfaces.cpp",
302     ],
303     hdrs = [
304         "include/mlir/Interfaces/FunctionImplementation.h",
305         "include/mlir/Interfaces/FunctionInterfaces.h",
306     ],
307     includes = ["include"],
308     deps = [
309         ":CallOpInterfaces",
310         ":FunctionInterfacesIncGen",
311         ":IR",
312         "//llvm:Support",
313     ],
316 cc_library(
317     name = "IR",
318     srcs = glob([
319         "lib/IR/*.cpp",
320         "lib/IR/*.h",
321         "lib/Bytecode/Reader/*.h",
322         "lib/Bytecode/Writer/*.h",
323         "lib/Bytecode/*.h",
324     ]) + [
325         "lib/Bytecode/BytecodeOpInterface.cpp",
326     ],
327     hdrs = glob([
328         "include/mlir/IR/*.h",
329         "include/mlir/Bytecode/*.h",
330     ]) + [
331         "include/mlir/Interfaces/CallInterfaces.h",
332         "include/mlir/Interfaces/DataLayoutInterfaces.h",
333         "include/mlir/Interfaces/FoldInterfaces.h",
334         "include/mlir/Interfaces/SideEffectInterfaces.h",
335     ],
336     includes = ["include"],
337     deps = [
338         ":BuiltinAttributeInterfacesIncGen",
339         ":BuiltinAttributesIncGen",
340         ":BuiltinDialectBytecodeGen",
341         ":BuiltinDialectIncGen",
342         ":BuiltinLocationAttributesIncGen",
343         ":BuiltinOpsIncGen",
344         ":BuiltinTypeInterfacesIncGen",
345         ":BuiltinTypesIncGen",
346         ":BytecodeOpInterfaceIncGen",
347         ":CallOpInterfacesIncGen",
348         ":DataLayoutInterfacesIncGen",
349         ":InferTypeOpInterfaceIncGen",
350         ":OpAsmInterfaceIncGen",
351         ":RegionKindInterfaceIncGen",
352         ":SideEffectInterfacesIncGen",
353         ":Support",
354         ":SymbolInterfacesIncGen",
355         ":TensorEncodingIncGen",
356         "//llvm:Support",
357     ],
360 cc_library(
361     name = "Pass",
362     srcs = glob([
363         "lib/Pass/*.cpp",
364         "lib/Pass/*.h",
365     ]),
366     hdrs = glob([
367         "include/mlir/Pass/*.h",
368     ]),
369     includes = ["include"],
370     deps = [
371         ":IR",
372         ":Parser",
373         ":Support",
374         "//llvm:Support",
375     ],
378 mlir_c_api_cc_library(
379     name = "CAPIIR",
380     srcs = [
381         "lib/CAPI/Dialect/Func.cpp",
382         "lib/CAPI/IR/AffineExpr.cpp",
383         "lib/CAPI/IR/AffineMap.cpp",
384         "lib/CAPI/IR/BuiltinAttributes.cpp",
385         "lib/CAPI/IR/BuiltinTypes.cpp",
386         "lib/CAPI/IR/Diagnostics.cpp",
387         "lib/CAPI/IR/DialectHandle.cpp",
388         "lib/CAPI/IR/IR.cpp",
389         "lib/CAPI/IR/IntegerSet.cpp",
390         "lib/CAPI/IR/Pass.cpp",
391         "lib/CAPI/IR/Support.cpp",
392     ],
393     hdrs = [
394         "include/mlir-c/AffineExpr.h",
395         "include/mlir-c/AffineMap.h",
396         "include/mlir-c/BuiltinAttributes.h",
397         "include/mlir-c/BuiltinTypes.h",
398         "include/mlir-c/Diagnostics.h",
399         "include/mlir-c/Dialect/Func.h",
400         "include/mlir-c/ExecutionEngine.h",
401         "include/mlir-c/IR.h",
402         "include/mlir-c/IntegerSet.h",
403         "include/mlir-c/Interfaces.h",
404         "include/mlir-c/Pass.h",
405         "include/mlir-c/RegisterEverything.h",
406         "include/mlir-c/Support.h",
407         "include/mlir/CAPI/AffineExpr.h",
408         "include/mlir/CAPI/AffineMap.h",
409         "include/mlir/CAPI/Diagnostics.h",
410         "include/mlir/CAPI/IR.h",
411         "include/mlir/CAPI/IntegerSet.h",
412         "include/mlir/CAPI/Interfaces.h",
413         "include/mlir/CAPI/Pass.h",
414         "include/mlir/CAPI/Registration.h",
415         "include/mlir/CAPI/Support.h",
416         "include/mlir/CAPI/Utils.h",
417         "include/mlir/CAPI/Wrap.h",
418     ],
419     header_deps = [
420         ":BytecodeWriter",
421         ":IR",
422         ":Pass",
423         ":Support",
424         "//llvm:Support",
425     ],
426     includes = ["include"],
427     deps = [
428         ":AsmParser",
429         ":ConversionPassIncGen",
430         ":FuncDialect",
431         ":InferTypeOpInterface",
432         ":Parser",
433     ],
436 mlir_c_api_cc_library(
437     name = "CAPIInterfaces",
438     srcs = [
439         "lib/CAPI/Interfaces/Interfaces.cpp",
440     ],
441     capi_deps = [
442         ":CAPIIR",
443     ],
444     includes = ["include"],
445     deps = [
446         ":IR",
447         ":InferTypeOpInterface",
448         "//llvm:Support",
449     ],
452 mlir_c_api_cc_library(
453     name = "CAPIAMDGPU",
454     srcs = ["lib/CAPI/Dialect/AMDGPU.cpp"],
455     hdrs = ["include/mlir-c/Dialect/AMDGPU.h"],
456     capi_deps = [
457         ":CAPIIR",
458     ],
459     includes = ["include"],
460     deps = [
461         ":AMDGPUDialect",
462     ],
465 mlir_c_api_cc_library(
466     name = "CAPIArith",
467     srcs = ["lib/CAPI/Dialect/Arith.cpp"],
468     hdrs = ["include/mlir-c/Dialect/Arith.h"],
469     capi_deps = [
470         ":CAPIIR",
471     ],
472     includes = ["include"],
473     deps = [
474         ":ArithDialect",
475     ],
478 mlir_c_api_cc_library(
479     name = "CAPIAsync",
480     srcs = [
481         "lib/CAPI/Dialect/Async.cpp",
482         "lib/CAPI/Dialect/AsyncPasses.cpp",
483     ],
484     hdrs = ["include/mlir-c/Dialect/Async.h"],
485     capi_deps = [
486         ":CAPIIR",
487     ],
488     header_deps = [
489         ":AsyncPassIncGen",
490     ],
491     includes = ["include"],
492     deps = [
493         ":AsyncDialect",
494         ":AsyncTransforms",
495         ":Pass",
496     ],
499 mlir_c_api_cc_library(
500     name = "CAPILinalg",
501     srcs = [
502         "lib/CAPI/Dialect/Linalg.cpp",
503         "lib/CAPI/Dialect/LinalgPasses.cpp",
504     ],
505     hdrs = [
506         "include/mlir-c/Dialect/Linalg.h",
507     ],
508     capi_deps = [
509         ":CAPIIR",
510     ],
511     header_deps = [
512         ":LinalgPassIncGen",
513     ],
514     includes = ["include"],
515     deps = [
516         ":LinalgDialect",
517         ":LinalgTransforms",
518         ":Pass",
519     ],
522 mlir_c_api_cc_library(
523     name = "CAPILLVM",
524     srcs = [
525         "lib/CAPI/Dialect/LLVM.cpp",
526     ],
527     hdrs = [
528         "include/mlir-c/Dialect/LLVM.h",
529     ],
530     capi_deps = [
531         ":CAPIIR",
532     ],
533     includes = ["include"],
534     deps = [
535         ":LLVMDialect",
536     ],
539 mlir_c_api_cc_library(
540     name = "CAPIMath",
541     srcs = ["lib/CAPI/Dialect/Math.cpp"],
542     hdrs = ["include/mlir-c/Dialect/Math.h"],
543     capi_deps = [
544         ":CAPIIR",
545     ],
546     includes = ["include"],
547     deps = [
548         ":MathDialect",
549     ],
552 mlir_c_api_cc_library(
553     name = "CAPIMemRef",
554     srcs = ["lib/CAPI/Dialect/MemRef.cpp"],
555     hdrs = ["include/mlir-c/Dialect/MemRef.h"],
556     capi_deps = [
557         ":CAPIIR",
558     ],
559     includes = ["include"],
560     deps = [
561         ":MemRefDialect",
562     ],
565 mlir_c_api_cc_library(
566     name = "CAPINVGPU",
567     srcs = ["lib/CAPI/Dialect/NVGPU.cpp"],
568     hdrs = ["include/mlir-c/Dialect/NVGPU.h"],
569     capi_deps = [
570         ":CAPIIR",
571     ],
572     includes = ["include"],
573     deps = [
574         ":NVGPUDialect",
575     ],
578 mlir_c_api_cc_library(
579     name = "CAPINVVM",
580     srcs = ["lib/CAPI/Dialect/NVVM.cpp"],
581     hdrs = ["include/mlir-c/Dialect/NVVM.h"],
582     capi_deps = [
583         ":CAPIIR",
584     ],
585     includes = ["include"],
586     deps = [
587         ":NVVMDialect",
588     ],
591 mlir_c_api_cc_library(
592     name = "CAPIGPU",
593     srcs = [
594         "lib/CAPI/Dialect/GPU.cpp",
595         "lib/CAPI/Dialect/GPUPasses.cpp",
596     ],
597     hdrs = [
598         "include/mlir-c/Dialect/GPU.h",
599     ],
600     capi_deps = [
601         ":CAPIIR",
602     ],
603     header_deps = [
604         ":GPUPassIncGen",
605     ],
606     includes = ["include"],
607     deps = [
608         ":GPUDialect",
609         ":GPUTransforms",
610         ":Pass",
611     ],
614 mlir_c_api_cc_library(
615     name = "CAPIROCDL",
616     srcs = ["lib/CAPI/Dialect/ROCDL.cpp"],
617     hdrs = ["include/mlir-c/Dialect/ROCDL.h"],
618     capi_deps = [
619         ":CAPIIR",
620     ],
621     includes = ["include"],
622     deps = [
623         ":ROCDLDialect",
624     ],
627 mlir_c_api_cc_library(
628     name = "CAPISCF",
629     srcs = ["lib/CAPI/Dialect/SCF.cpp"],
630     hdrs = ["include/mlir-c/Dialect/SCF.h"],
631     capi_deps = [
632         ":CAPIIR",
633     ],
634     includes = ["include"],
635     deps = [
636         ":SCFDialect",
637     ],
640 mlir_c_api_cc_library(
641     name = "CAPISparseTensor",
642     srcs = [
643         "lib/CAPI/Dialect/SparseTensor.cpp",
644         "lib/CAPI/Dialect/SparseTensorPasses.cpp",
645     ],
646     hdrs = [
647         "include/mlir-c/Dialect/SparseTensor.h",
648     ],
649     capi_deps = [
650         ":CAPIIR",
651     ],
652     header_deps = [
653         ":SparseTensorPassIncGen",
654     ],
655     includes = ["include"],
656     deps = [
657         ":Pass",
658         ":SparseTensorDialect",
659         ":SparseTensorTransforms",
660         ":Support",
661     ],
664 mlir_c_api_cc_library(
665     name = "CAPIQuant",
666     srcs = [
667         "lib/CAPI/Dialect/Quant.cpp",
668     ],
669     hdrs = [
670         "include/mlir-c/Dialect/Quant.h",
671     ],
672     capi_deps = [
673         ":CAPIIR",
674     ],
675     includes = ["include"],
676     deps = [
677         ":QuantOps",
678     ],
681 mlir_c_api_cc_library(
682     name = "CAPIPDL",
683     srcs = [
684         "lib/CAPI/Dialect/PDL.cpp",
685     ],
686     hdrs = [
687         "include/mlir-c/Dialect/PDL.h",
688     ],
689     header_deps = [
690         ":CAPIIRHeaders",
691     ],
692     includes = ["include"],
693     deps = [
694         ":CAPIIR",
695         ":PDLDialect",
696         ":PDLOpsIncGen",
697         ":PDLTypesIncGen",
698     ],
701 mlir_c_api_cc_library(
702     name = "CAPITransformDialect",
703     srcs = [
704         "lib/CAPI/Dialect/Transform.cpp",
705     ],
706     hdrs = [
707         "include/mlir-c/Dialect/Transform.h",
708     ],
709     capi_deps = [
710         ":CAPIIR",
711     ],
712     includes = ["include"],
713     deps = [
714         ":TransformDialect",
715     ],
718 mlir_c_api_cc_library(
719     name = "CAPIMLProgram",
720     srcs = [
721         "lib/CAPI/Dialect/MLProgram.cpp",
722     ],
723     hdrs = [
724         "include/mlir-c/Dialect/MLProgram.h",
725     ],
726     header_deps = [
727         ":CAPIIRHeaders",
728     ],
729     includes = ["include"],
730     deps = [
731         ":CAPIIR",
732         ":MLProgramDialect",
733         ":MLProgramOpsIncGen",
734         ":MLProgramTypesIncGen",
735     ],
738 mlir_c_api_cc_library(
739     name = "CAPIVector",
740     srcs = ["lib/CAPI/Dialect/Vector.cpp"],
741     hdrs = ["include/mlir-c/Dialect/Vector.h"],
742     capi_deps = [
743         ":CAPIIR",
744     ],
745     includes = ["include"],
746     deps = [
747         ":VectorDialect",
748     ],
751 mlir_c_api_cc_library(
752     name = "CAPIConversion",
753     srcs = ["lib/CAPI/Conversion/Passes.cpp"],
754     hdrs = ["include/mlir-c/Conversion.h"],
755     capi_deps = [
756         ":CAPIIR",
757     ],
758     header_deps = [
759         ":ConversionPassIncGen",
760     ],
761     includes = ["include"],
762     deps = [
763         ":ConversionPasses",
764         ":Pass",
765     ],
768 mlir_c_api_cc_library(
769     name = "CAPIDebug",
770     srcs = ["lib/CAPI/Debug/Debug.cpp"],
771     hdrs = ["include/mlir-c/Debug.h"],
772     capi_deps = [
773         ":CAPIIR",
774     ],
775     includes = ["include"],
776     deps = [
777         ":Support",
778         "//llvm:Support",
779     ],
782 mlir_c_api_cc_library(
783     name = "CAPIExecutionEngine",
784     srcs = ["lib/CAPI/ExecutionEngine/ExecutionEngine.cpp"],
785     hdrs = [
786         "include/mlir-c/ExecutionEngine.h",
787         "include/mlir/CAPI/ExecutionEngine.h",
788     ],
789     capi_deps = [
790         ":CAPIIR",
791     ],
792     header_deps = [
793         ":ExecutionEngine",
794     ],
795     includes = ["include"],
796     deps = [
797         ":BuiltinToLLVMIRTranslation",
798         ":ExecutionEngineUtils",
799         ":LLVMToLLVMIRTranslation",
800         ":OpenMPToLLVMIRTranslation",
801         "//llvm:OrcJIT",
802         "//llvm:Support",
803     ],
806 mlir_c_api_cc_library(
807     name = "CAPITransforms",
808     srcs = ["lib/CAPI/Transforms/Passes.cpp"],
809     hdrs = ["include/mlir-c/Transforms.h"],
810     capi_deps = [
811         ":CAPIIR",
812     ],
813     header_deps = [
814         ":TransformsPassIncGen",
815     ],
816     includes = ["include"],
817     deps = [
818         ":Pass",
819         ":Transforms",
820     ],
823 mlir_c_api_cc_library(
824     name = "CAPIRegisterEverything",
825     srcs = ["lib/CAPI/RegisterEverything/RegisterEverything.cpp"],
826     hdrs = ["include/mlir-c/RegisterEverything.h"],
827     capi_deps = [
828         ":CAPIIR",
829     ],
830     includes = ["include"],
831     deps = [
832         ":AllExtensions",
833         ":AllPassesAndDialects",
834         ":AllToLLVMIRTranslations",
835         ":BuiltinToLLVMIRTranslation",
836         ":IR",
837         ":LLVMToLLVMIRTranslation",
838     ],
841 ##---------------------------------------------------------------------------##
842 # Sources of Python bindings.
843 #----------------------------------------------------------------------------##
845 exports_files(
846     glob(["lib/Bindings/Python/**/*.cpp"]),
849 MLIR_BINDINGS_PYTHON_HEADERS = [
850     "lib/Bindings/Python/*.h",
851     "include/mlir-c/Bindings/Python/*.h",
852     "include/mlir/Bindings/Python/*.h",
855 cc_library(
856     name = "MLIRBindingsPythonHeaders",
857     includes = [
858         "include",
859         "lib/Bindings/Python",
860     ],
861     tags = [
862         "manual",  # External dependency
863         "nobuildkite",  # TODO(gcmn): Add support for this target
864     ],
865     textual_hdrs = glob(MLIR_BINDINGS_PYTHON_HEADERS),
866     deps = [
867         ":CAPIIRHeaders",
868         "@pybind11",
869         "@python_runtime//:headers",
870     ],
873 cc_library(
874     name = "MLIRBindingsPythonHeadersAndDeps",
875     includes = [
876         "include",
877         "lib/Bindings/Python",
878     ],
879     tags = [
880         "manual",  # External dependency
881         "nobuildkite",  # TODO(gcmn): Add support for this target
882     ],
883     textual_hdrs = glob(MLIR_BINDINGS_PYTHON_HEADERS),
884     deps = [
885         ":CAPIIR",
886         "@pybind11",
887         "@python_runtime//:headers",
888     ],
891 # These flags are needed for pybind11 to work.
892 PYBIND11_COPTS = [
893     "-fexceptions",
894     "-frtti",
897 PYBIND11_FEATURES = [
898     # Cannot use header_modules (parse_headers feature fails).
899     "-use_header_modules",
902 MLIR_PYTHON_BINDINGS_SOURCES = [
903     "lib/Bindings/Python/IRAffine.cpp",
904     "lib/Bindings/Python/IRAttributes.cpp",
905     "lib/Bindings/Python/IRCore.cpp",
906     "lib/Bindings/Python/IRInterfaces.cpp",
907     "lib/Bindings/Python/IRModule.cpp",
908     "lib/Bindings/Python/IRTypes.cpp",
909     "lib/Bindings/Python/Pass.cpp",
912 cc_library(
913     name = "MLIRBindingsPythonCore",
914     srcs = MLIR_PYTHON_BINDINGS_SOURCES,
915     copts = PYBIND11_COPTS,
916     features = PYBIND11_FEATURES,
917     tags = [
918         "manual",  # External dependency
919         "nobuildkite",  # TODO(gcmn): Add support for this target
920     ],
921     deps = [
922         ":CAPIAsync",
923         ":CAPIDebug",
924         ":CAPIGPU",
925         ":CAPIIR",
926         ":CAPIInterfaces",
927         ":MLIRBindingsPythonHeadersAndDeps",
928         "//llvm:Support",
929         "@pybind11",
930         "@python_runtime//:headers",
931     ],
934 cc_library(
935     name = "MLIRBindingsPythonCoreNoCAPI",
936     srcs = MLIR_PYTHON_BINDINGS_SOURCES,
937     copts = PYBIND11_COPTS,
938     features = PYBIND11_FEATURES,
939     tags = [
940         "manual",  # External dependency
941         "nobuildkite",  # TODO(gcmn): Add support for this target
942     ],
943     deps = [
944         ":CAPIAsyncHeaders",
945         ":CAPIDebugHeaders",
946         ":CAPIGPUHeaders",
947         ":CAPIIRHeaders",
948         ":MLIRBindingsPythonHeaders",
949         "//llvm:Support",
950         "@pybind11",
951         "@python_runtime//:headers",
952     ],
955 # Target that bundles together the CAPI objects needed for
956 # MLIRBindingsPythonCoreNoCAPI.
957 cc_library(
958     name = "MLIRBindingsPythonCAPIObjects",
959     tags = [
960         "manual",  # External dependency
961         "nobuildkite",  # TODO(gcmn): Add support for this target
962     ],
963     deps = [
964         ":CAPIAsyncObjects",
965         ":CAPIDebugObjects",
966         ":CAPIGPUObjects",
967         ":CAPIIRObjects",
968         ":CAPIInterfacesObjects",
969     ],
972 # Dynamic library with the MLIR Python extension.
973 cc_binary(
974     name = "_mlir.so",
975     srcs = ["lib/Bindings/Python/MainModule.cpp"],
976     # These flags are needed for pybind11 to work.
977     copts = PYBIND11_COPTS,
978     features = PYBIND11_FEATURES,
979     linkshared = 1,
980     linkstatic = 0,
981     tags = [
982         "manual",  # External dependency
983         "nobuildkite",  # TODO(gcmn): Add support for this target
984     ],
985     deps = [
986         ":MLIRBindingsPythonCore",
987         ":MLIRBindingsPythonHeadersAndDeps",
988     ],
991 cc_binary(
992     name = "_mlirDialectsLinalg.so",
993     srcs = ["lib/Bindings/Python/DialectLinalg.cpp"],
994     copts = PYBIND11_COPTS,
995     features = PYBIND11_FEATURES,
996     linkshared = 1,
997     linkstatic = 0,
998     tags = [
999         "manual",  # External dependency
1000         "nobuildkite",  # TODO(gcmn): Add support for this target
1001     ],
1002     deps = [
1003         ":CAPIIR",
1004         ":CAPILinalg",
1005         ":MLIRBindingsPythonHeadersAndDeps",
1006     ],
1009 cc_binary(
1010     name = "_mlirDialectsQuant.so",
1011     srcs = ["lib/Bindings/Python/DialectQuant.cpp"],
1012     copts = PYBIND11_COPTS,
1013     features = PYBIND11_FEATURES,
1014     linkshared = 1,
1015     linkstatic = 0,
1016     tags = [
1017         "manual",  # External dependency
1018         "nobuildkite",  # TODO(gcmn): Add support for this target
1019     ],
1020     deps = [
1021         ":CAPIIR",
1022         ":CAPIQuant",
1023         ":MLIRBindingsPythonHeadersAndDeps",
1024     ],
1027 cc_binary(
1028     name = "_mlirDialectsSparseTensor.so",
1029     srcs = ["lib/Bindings/Python/DialectSparseTensor.cpp"],
1030     copts = PYBIND11_COPTS,
1031     features = PYBIND11_FEATURES,
1032     linkshared = 1,
1033     linkstatic = 0,
1034     tags = [
1035         "manual",  # External dependency
1036         "nobuildkite",  # TODO(gcmn): Add support for this target
1037     ],
1038     deps = [
1039         ":CAPIIR",
1040         ":CAPISparseTensor",
1041         ":MLIRBindingsPythonHeadersAndDeps",
1042     ],
1045 # Dynamic library with the MLIR Conversions Python extension.
1046 cc_binary(
1047     name = "_mlirExecutionEngine.so",
1048     srcs = ["lib/Bindings/Python/ExecutionEngineModule.cpp"],
1049     copts = PYBIND11_COPTS,
1050     features = PYBIND11_FEATURES,
1051     linkshared = 1,
1052     linkstatic = 0,
1053     tags = [
1054         "manual",  # External dependency
1055         "nobuildkite",  # TODO(gcmn): Add support for this target
1056     ],
1057     deps = [
1058         ":CAPIExecutionEngine",
1059         ":MLIRBindingsPythonHeadersAndDeps",
1060         "@pybind11",
1061         "@python_runtime//:headers",
1062     ],
1065 # Dynamic library with the MLIR Linalg dialect+passes Python extension.
1066 cc_binary(
1067     name = "_mlirLinalgPasses.so",
1068     srcs = ["lib/Bindings/Python/LinalgPasses.cpp"],
1069     copts = PYBIND11_COPTS,
1070     features = PYBIND11_FEATURES,
1071     linkshared = 1,
1072     linkstatic = 0,
1073     tags = [
1074         "manual",  # External dependency
1075         "nobuildkite",  # TODO(gcmn): Add support for this target
1076     ],
1077     deps = [
1078         ":CAPILinalg",
1079         ":MLIRBindingsPythonHeadersAndDeps",
1080         "@pybind11",
1081         "@python_runtime//:headers",
1082     ],
1085 ##---------------------------------------------------------------------------##
1087 td_library(
1088     name = "AttrTdFiles",
1089     srcs = [
1090         "include/mlir/IR/AttrTypeBase.td",
1091         "include/mlir/IR/EnumAttr.td",
1092     ],
1093     includes = ["include"],
1096 td_library(
1097     name = "OpBaseTdFiles",
1098     srcs = [
1099         "include/mlir/IR/CommonAttrConstraints.td",
1100         "include/mlir/IR/CommonTypeConstraints.td",
1101         "include/mlir/IR/Constraints.td",
1102         "include/mlir/IR/DialectBase.td",
1103         "include/mlir/IR/Interfaces.td",
1104         "include/mlir/IR/OpAsmInterface.td",
1105         "include/mlir/IR/OpBase.td",
1106         "include/mlir/IR/PatternBase.td",
1107         "include/mlir/IR/Properties.td",
1108         "include/mlir/IR/RegionKindInterface.td",
1109         "include/mlir/IR/SymbolInterfaces.td",
1110         "include/mlir/IR/TensorEncoding.td",
1111         "include/mlir/IR/Traits.td",
1112         "include/mlir/IR/Utils.td",
1113     ],
1114     includes = ["include"],
1115     deps = [
1116         ":AttrTdFiles",
1117     ],
1120 td_library(
1121     name = "BytecodeTdFiles",
1122     srcs = ["include/mlir/IR/BytecodeBase.td"],
1123     includes = ["include"],
1126 td_library(
1127     name = "CallInterfacesTdFiles",
1128     srcs = ["include/mlir/Interfaces/CallInterfaces.td"],
1129     includes = ["include"],
1130     deps = [":OpBaseTdFiles"],
1133 td_library(
1134     name = "CastInterfacesTdFiles",
1135     srcs = ["include/mlir/Interfaces/CastInterfaces.td"],
1136     includes = ["include"],
1137     deps = [":OpBaseTdFiles"],
1140 td_library(
1141     name = "ControlFlowInterfacesTdFiles",
1142     srcs = ["include/mlir/Interfaces/ControlFlowInterfaces.td"],
1143     includes = ["include"],
1144     deps = [":OpBaseTdFiles"],
1147 td_library(
1148     name = "BytecodeOpInterfaceTdFiles",
1149     srcs = ["include/mlir/Bytecode/BytecodeOpInterface.td"],
1150     includes = ["include"],
1151     deps = [":OpBaseTdFiles"],
1154 td_library(
1155     name = "CopyOpInterfaceTdFiles",
1156     srcs = ["include/mlir/Interfaces/CopyOpInterface.td"],
1157     includes = ["include"],
1158     deps = [":OpBaseTdFiles"],
1161 td_library(
1162     name = "DerivedAttributeOpInterfaceTdFiles",
1163     srcs = ["include/mlir/Interfaces/DerivedAttributeOpInterface.td"],
1164     includes = ["include"],
1165     deps = [":OpBaseTdFiles"],
1168 td_library(
1169     name = "DestinationStyleOpInterfaceTdFiles",
1170     srcs = ["include/mlir/Interfaces/DestinationStyleOpInterface.td"],
1171     includes = ["include"],
1172     deps = [":OpBaseTdFiles"],
1175 td_library(
1176     name = "InferIntRangeInterfaceTdFiles",
1177     srcs = ["include/mlir/Interfaces/InferIntRangeInterface.td"],
1178     includes = ["include"],
1179     deps = [":OpBaseTdFiles"],
1182 td_library(
1183     name = "InferTypeOpInterfaceTdFiles",
1184     srcs = ["include/mlir/Interfaces/InferTypeOpInterface.td"],
1185     includes = ["include"],
1186     deps = [":OpBaseTdFiles"],
1189 td_library(
1190     name = "LoopLikeInterfaceTdFiles",
1191     srcs = ["include/mlir/Interfaces/LoopLikeInterface.td"],
1192     includes = ["include"],
1193     deps = [":OpBaseTdFiles"],
1196 td_library(
1197     name = "MemorySlotInterfacesTdFiles",
1198     srcs = ["include/mlir/Interfaces/MemorySlotInterfaces.td"],
1199     includes = ["include"],
1200     deps = [":OpBaseTdFiles"],
1203 td_library(
1204     name = "ShapedOpInterfacesTdFiles",
1205     srcs = ["include/mlir/Interfaces/ShapedOpInterfaces.td"],
1206     includes = ["include"],
1207     deps = [":OpBaseTdFiles"],
1210 td_library(
1211     name = "ParallelCombiningOpInterfaceTdFiles",
1212     srcs = ["include/mlir/Interfaces/ParallelCombiningOpInterface.td"],
1213     includes = ["include"],
1214     deps = [":OpBaseTdFiles"],
1217 td_library(
1218     name = "RuntimeVerifiableOpInterfaceTdFiles",
1219     srcs = ["include/mlir/Interfaces/RuntimeVerifiableOpInterface.td"],
1220     includes = ["include"],
1221     deps = [":OpBaseTdFiles"],
1224 td_library(
1225     name = "SideEffectInterfacesTdFiles",
1226     srcs = [
1227         "include/mlir/Interfaces/SideEffectInterfaceBase.td",
1228         "include/mlir/Interfaces/SideEffectInterfaces.td",
1229     ],
1230     includes = ["include"],
1231     deps = [":OpBaseTdFiles"],
1234 td_library(
1235     name = "TilingInterfaceTdFiles",
1236     srcs = ["include/mlir/Interfaces/TilingInterface.td"],
1237     includes = ["include"],
1238     deps = [":OpBaseTdFiles"],
1241 td_library(
1242     name = "VectorInterfacesTdFiles",
1243     srcs = ["include/mlir/Interfaces/VectorInterfaces.td"],
1244     includes = ["include"],
1245     deps = [":OpBaseTdFiles"],
1248 td_library(
1249     name = "ViewLikeInterfaceTdFiles",
1250     srcs = ["include/mlir/Interfaces/ViewLikeInterface.td"],
1251     includes = ["include"],
1252     deps = [":OpBaseTdFiles"],
1255 td_library(
1256     name = "ReducerTdFiles",
1257     srcs = ["include/mlir/Reducer/Passes.td"],
1258     includes = ["include"],
1259     deps = [":OpBaseTdFiles"],
1262 ##---------------------------------------------------------------------------##
1263 # Affine dialect.
1264 ##---------------------------------------------------------------------------##
1266 td_library(
1267     name = "PassBaseTdFiles",
1268     srcs = ["include/mlir/Pass/PassBase.td"],
1269     includes = ["include"],
1272 td_library(
1273     name = "RewritePassBaseTdFiles",
1274     srcs = ["include/mlir/Rewrite/PassUtil.td"],
1275     includes = ["include"],
1278 td_library(
1279     name = "AffineOpsTdFiles",
1280     srcs = [
1281         "include/mlir/Dialect/Affine/IR/AffineMemoryOpInterfaces.td",
1282         "include/mlir/Dialect/Affine/IR/AffineOps.td",
1283     ],
1284     includes = ["include"],
1285     deps = [
1286         ":ArithOpsTdFiles",
1287         ":FuncTdFiles",
1288         ":LoopLikeInterfaceTdFiles",
1289         ":OpBaseTdFiles",
1290         ":SideEffectInterfacesTdFiles",
1291     ],
1294 gentbl_cc_library(
1295     name = "AffineOpsIncGen",
1296     tbl_outs = [
1297         (
1298             ["-gen-op-decls"],
1299             "include/mlir/Dialect/Affine/IR/AffineOps.h.inc",
1300         ),
1301         (
1302             ["-gen-op-defs"],
1303             "include/mlir/Dialect/Affine/IR/AffineOps.cpp.inc",
1304         ),
1305         (
1306             [
1307                 "-gen-dialect-decls",
1308                 "-dialect=affine",
1309             ],
1310             "include/mlir/Dialect/Affine/IR/AffineOpsDialect.h.inc",
1311         ),
1312         (
1313             [
1314                 "-gen-dialect-defs",
1315                 "-dialect=affine",
1316             ],
1317             "include/mlir/Dialect/Affine/IR/AffineOpsDialect.cpp.inc",
1318         ),
1319     ],
1320     tblgen = ":mlir-tblgen",
1321     td_file = "include/mlir/Dialect/Affine/IR/AffineOps.td",
1322     deps = [":AffineOpsTdFiles"],
1325 gentbl_cc_library(
1326     name = "AffineMemoryOpInterfacesIncGen",
1327     tbl_outs = [
1328         (
1329             ["-gen-op-interface-decls"],
1330             "include/mlir/Dialect/Affine/IR/AffineMemoryOpInterfaces.h.inc",
1331         ),
1332         (
1333             ["-gen-op-interface-defs"],
1334             "include/mlir/Dialect/Affine/IR/AffineMemoryOpInterfaces.cpp.inc",
1335         ),
1336     ],
1337     tblgen = ":mlir-tblgen",
1338     td_file = "include/mlir/Dialect/Affine/IR/AffineMemoryOpInterfaces.td",
1339     deps = [":AffineOpsTdFiles"],
1342 td_library(
1343     name = "AffineTransformOpsTdFiles",
1344     srcs = [
1345         "include/mlir/Dialect/Affine/TransformOps/AffineTransformOps.td",
1346     ],
1347     includes = ["include"],
1348     deps = [
1349         ":TransformDialectTdFiles",
1350     ],
1353 gentbl_cc_library(
1354     name = "AffineTransformOpsIncGen",
1355     tbl_outs = [
1356         (
1357             ["-gen-op-decls"],
1358             "include/mlir/Dialect/Affine/TransformOps/AffineTransformOps.h.inc",
1359         ),
1360         (
1361             ["-gen-op-defs"],
1362             "include/mlir/Dialect/Affine/TransformOps/AffineTransformOps.cpp.inc",
1363         ),
1364     ],
1365     tblgen = ":mlir-tblgen",
1366     td_file = "include/mlir/Dialect/Affine/TransformOps/AffineTransformOps.td",
1367     deps = [
1368         ":AffineTransformOpsTdFiles",
1369     ],
1372 cc_library(
1373     name = "AffineTransformOps",
1374     srcs = glob(["lib/Dialect/Affine/TransformOps/*.cpp"]),
1375     hdrs = glob(["include/mlir/Dialect/Affine/TransformOps/*.h"]),
1376     includes = ["include"],
1377     deps = [
1378         ":AffineAnalysis",
1379         ":AffineDialect",
1380         ":AffineTransformOpsIncGen",
1381         ":AffineTransforms",
1382         ":AffineUtils",
1383         ":FuncDialect",
1384         ":IR",
1385         ":TransformDialect",
1386         ":Transforms",
1387         ":VectorDialect",
1388     ],
1391 ##---------------------------------------------------------------------------##
1392 # AMDGPU dialect.
1393 ##---------------------------------------------------------------------------##
1395 td_library(
1396     name = "AMDGPUTdFiles",
1397     srcs = ["include/mlir/Dialect/AMDGPU/IR/AMDGPU.td"],
1398     includes = ["include"],
1399     deps = [
1400         ":SideEffectInterfacesTdFiles",
1401     ],
1404 gentbl_cc_library(
1405     name = "AMDGPUIncGen",
1406     tbl_outs = [
1407         (
1408             [
1409                 "-gen-attrdef-decls",
1410                 "-dialect=amdgpu",
1411             ],
1412             "include/mlir/Dialect/AMDGPU/IR/AMDGPUAttributes.h.inc",
1413         ),
1414         (
1415             [
1416                 "-gen-attrdef-defs",
1417                 "-dialect=amdgpu",
1418             ],
1419             "include/mlir/Dialect/AMDGPU/IR/AMDGPUAttributes.cpp.inc",
1420         ),
1421         (
1422             [
1423                 "-gen-dialect-decls",
1424                 "-dialect=amdgpu",
1425             ],
1426             "include/mlir/Dialect/AMDGPU/IR/AMDGPUDialect.h.inc",
1427         ),
1428         (
1429             [
1430                 "-gen-dialect-defs",
1431                 "-dialect=amdgpu",
1432             ],
1433             "include/mlir/Dialect/AMDGPU/IR/AMDGPUDialect.cpp.inc",
1434         ),
1435         (
1436             ["-gen-enum-decls"],
1437             "include/mlir/Dialect/AMDGPU/IR/AMDGPUEnums.h.inc",
1438         ),
1439         (
1440             ["-gen-enum-defs"],
1441             "include/mlir/Dialect/AMDGPU/IR/AMDGPUEnums.cpp.inc",
1442         ),
1443         (
1444             ["-gen-op-decls"],
1445             "include/mlir/Dialect/AMDGPU/IR/AMDGPU.h.inc",
1446         ),
1447         (
1448             ["-gen-op-defs"],
1449             "include/mlir/Dialect/AMDGPU/IR/AMDGPU.cpp.inc",
1450         ),
1451         (
1452             ["-gen-op-doc"],
1453             "g3doc/Dialects/AMDGPU/IR/AMDGPU.md",
1454         ),
1455     ],
1456     tblgen = ":mlir-tblgen",
1457     td_file = "include/mlir/Dialect/AMDGPU/IR/AMDGPU.td",
1458     deps = [":AMDGPUTdFiles"],
1461 cc_library(
1462     name = "AMDGPUDialect",
1463     srcs = ["lib/Dialect/AMDGPU/IR/AMDGPUDialect.cpp"],
1464     hdrs = ["include/mlir/Dialect/AMDGPU/IR/AMDGPUDialect.h"],
1465     includes = ["include"],
1466     deps = [
1467         ":AMDGPUIncGen",
1468         ":ArithDialect",
1469         ":GPUDialect",
1470         ":IR",
1471         ":SideEffectInterfaces",
1472         "//llvm:Core",
1473         "//llvm:Support",
1474     ],
1477 gentbl_cc_library(
1478     name = "AMDGPUPassIncGen",
1479     tbl_outs = [
1480         (
1481             [
1482                 "-gen-pass-decls",
1483                 "-name=AMDGPU",
1484             ],
1485             "include/mlir/Dialect/AMDGPU/Transforms/Passes.h.inc",
1486         ),
1487     ],
1488     tblgen = ":mlir-tblgen",
1489     td_file = "include/mlir/Dialect/AMDGPU/Transforms/Passes.td",
1490     deps = [":PassBaseTdFiles"],
1493 cc_library(
1494     name = "AMDGPUTransforms",
1495     srcs = glob(
1496         [
1497             "lib/Dialect/AMDGPU/Transforms/*.cpp",
1498             "lib/Dialect/AMDGPU/Transforms/*.h",
1499         ],
1500     ),
1501     hdrs = glob(["include/mlir/Dialect/AMDGPU/Transforms/*.h"]),
1502     includes = ["include"],
1503     deps = [
1504         ":AMDGPUDialect",
1505         ":AMDGPUPassIncGen",
1506         ":AMDGPUUtils",
1507         ":ArithDialect",
1508         ":ControlFlowDialect",
1509         ":IR",
1510         ":Pass",
1511         ":TransformUtils",
1512         ":Transforms",
1513     ],
1516 cc_library(
1517     name = "AMDGPUUtils",
1518     srcs = glob(["lib/Dialect/AMDGPU/Utils/*.cpp"]),
1519     hdrs = glob(["include/mlir/Dialect/AMDGPU/Utils/*.h"]),
1520     includes = ["include"],
1521     deps = [
1522         ":AMDGPUDialect",
1523         ":Support",
1524         "//llvm:Support",
1525     ],
1528 ##---------------------------------------------------------------------------##
1529 # EmitC dialect.
1530 ##---------------------------------------------------------------------------##
1532 td_library(
1533     name = "EmitCTdFiles",
1534     srcs = [
1535         "include/mlir/Dialect/EmitC/IR/EmitC.td",
1536         "include/mlir/Dialect/EmitC/IR/EmitCAttributes.td",
1537         "include/mlir/Dialect/EmitC/IR/EmitCBase.td",
1538         "include/mlir/Dialect/EmitC/IR/EmitCTypes.td",
1539     ],
1540     includes = ["include"],
1541     deps = [
1542         ":BuiltinDialectTdFiles",
1543         ":CastInterfacesTdFiles",
1544         ":OpBaseTdFiles",
1545         ":SideEffectInterfacesTdFiles",
1546     ],
1549 gentbl_cc_library(
1550     name = "EmitCAttributesIncGen",
1551     tbl_outs = [
1552         (
1553             ["--gen-attrdef-decls"],
1554             "include/mlir/Dialect/EmitC/IR/EmitCAttributes.h.inc",
1555         ),
1556         (
1557             ["--gen-attrdef-defs"],
1558             "include/mlir/Dialect/EmitC/IR/EmitCAttributes.cpp.inc",
1559         ),
1560     ],
1561     tblgen = ":mlir-tblgen",
1562     td_file = "include/mlir/Dialect/EmitC/IR/EmitCAttributes.td",
1563     deps = [":EmitCTdFiles"],
1566 gentbl_cc_library(
1567     name = "EmitCOpsIncGen",
1568     tbl_outs = [
1569         (
1570             ["-gen-dialect-decls"],
1571             "include/mlir/Dialect/EmitC/IR/EmitCDialect.h.inc",
1572         ),
1573         (
1574             ["-gen-dialect-defs"],
1575             "include/mlir/Dialect/EmitC/IR/EmitCDialect.cpp.inc",
1576         ),
1577         (
1578             ["-gen-enum-decls"],
1579             "include/mlir/Dialect/EmitC/IR/EmitCEnums.h.inc",
1580         ),
1581         (
1582             ["-gen-enum-defs"],
1583             "include/mlir/Dialect/EmitC/IR/EmitCEnums.cpp.inc",
1584         ),
1585         (
1586             ["-gen-op-decls"],
1587             "include/mlir/Dialect/EmitC/IR/EmitC.h.inc",
1588         ),
1589         (
1590             ["-gen-op-defs"],
1591             "include/mlir/Dialect/EmitC/IR/EmitC.cpp.inc",
1592         ),
1593         (
1594             ["-gen-typedef-decls"],
1595             "include/mlir/Dialect/EmitC/IR/EmitCTypes.h.inc",
1596         ),
1597         (
1598             ["-gen-typedef-defs"],
1599             "include/mlir/Dialect/EmitC/IR/EmitCTypes.cpp.inc",
1600         ),
1601     ],
1602     tblgen = ":mlir-tblgen",
1603     td_file = "include/mlir/Dialect/EmitC/IR/EmitC.td",
1604     deps = [":EmitCTdFiles"],
1607 cc_library(
1608     name = "TargetCpp",
1609     srcs = glob([
1610         "lib/Target/Cpp/*.cpp",
1611         "lib/Target/Cpp/*.h",
1612     ]),
1613     hdrs = glob(["include/mlir/Target/Cpp/*.h"]),
1614     deps = [
1615         ":ArithDialect",
1616         ":ControlFlowDialect",
1617         ":EmitCDialect",
1618         ":FuncDialect",
1619         ":IR",
1620         ":MathDialect",
1621         ":SCFDialect",
1622         ":Support",
1623         ":TranslateLib",
1624         "//llvm:Support",
1625     ],
1628 ##---------------------------------------------------------------------------##
1629 # Async dialect.
1630 ##---------------------------------------------------------------------------##
1632 td_library(
1633     name = "AsyncOpsTdFiles",
1634     srcs = [
1635         "include/mlir/Dialect/Async/IR/AsyncDialect.td",
1636         "include/mlir/Dialect/Async/IR/AsyncOps.td",
1637         "include/mlir/Dialect/Async/IR/AsyncTypes.td",
1638     ],
1639     includes = ["include"],
1640     deps = [
1641         ":CallInterfacesTdFiles",
1642         ":ControlFlowInterfacesTdFiles",
1643         ":FunctionInterfacesTdFiles",
1644         ":InferTypeOpInterfaceTdFiles",
1645         ":OpBaseTdFiles",
1646         ":SideEffectInterfacesTdFiles",
1647     ],
1650 gentbl_cc_library(
1651     name = "AsyncOpsIncGen",
1652     tbl_outs = [
1653         (
1654             ["-gen-op-decls"],
1655             "include/mlir/Dialect/Async/IR/AsyncOps.h.inc",
1656         ),
1657         (
1658             ["-gen-op-defs"],
1659             "include/mlir/Dialect/Async/IR/AsyncOps.cpp.inc",
1660         ),
1661         (
1662             ["-gen-dialect-decls"],
1663             "include/mlir/Dialect/Async/IR/AsyncOpsDialect.h.inc",
1664         ),
1665         (
1666             ["-gen-dialect-defs"],
1667             "include/mlir/Dialect/Async/IR/AsyncOpsDialect.cpp.inc",
1668         ),
1669         (
1670             ["-gen-typedef-decls"],
1671             "include/mlir/Dialect/Async/IR/AsyncOpsTypes.h.inc",
1672         ),
1673         (
1674             ["-gen-typedef-defs"],
1675             "include/mlir/Dialect/Async/IR/AsyncOpsTypes.cpp.inc",
1676         ),
1677     ],
1678     tblgen = ":mlir-tblgen",
1679     td_file = "include/mlir/Dialect/Async/IR/AsyncOps.td",
1680     deps = [":AsyncOpsTdFiles"],
1683 gentbl_cc_library(
1684     name = "AsyncPassIncGen",
1685     tbl_outs = [
1686         (
1687             [
1688                 "-gen-pass-decls",
1689                 "-name=Async",
1690             ],
1691             "include/mlir/Dialect/Async/Passes.h.inc",
1692         ),
1693         (
1694             [
1695                 "-gen-pass-capi-header",
1696                 "--prefix=Async",
1697             ],
1698             "include/mlir/Dialect/Async/Passes.capi.h.inc",
1699         ),
1700         (
1701             [
1702                 "-gen-pass-capi-impl",
1703                 "--prefix=Async",
1704             ],
1705             "include/mlir/Dialect/Async/Passes.capi.cpp.inc",
1706         ),
1707     ],
1708     tblgen = ":mlir-tblgen",
1709     td_file = "include/mlir/Dialect/Async/Passes.td",
1710     deps = [":PassBaseTdFiles"],
1713 ##---------------------------------------------------------------------------##
1714 # ArmNeon dialect.
1715 ##---------------------------------------------------------------------------##
1717 td_library(
1718     name = "ArmNeonTdFiles",
1719     srcs = ["include/mlir/Dialect/ArmNeon/ArmNeon.td"],
1720     includes = ["include"],
1721     deps = [
1722         ":LLVMOpsTdFiles",
1723         ":OpBaseTdFiles",
1724         ":SideEffectInterfacesTdFiles",
1725     ],
1728 gentbl_cc_library(
1729     name = "ArmNeonIncGen",
1730     tbl_outs = [
1731         (
1732             [
1733                 "-gen-dialect-decls",
1734                 "-dialect=arm_neon",
1735             ],
1736             "include/mlir/Dialect/ArmNeon/ArmNeonDialect.h.inc",
1737         ),
1738         (
1739             [
1740                 "-gen-dialect-defs",
1741                 "-dialect=arm_neon",
1742             ],
1743             "include/mlir/Dialect/ArmNeon/ArmNeonDialect.cpp.inc",
1744         ),
1745         (
1746             ["-gen-op-decls"],
1747             "include/mlir/Dialect/ArmNeon/ArmNeon.h.inc",
1748         ),
1749         (
1750             ["-gen-op-defs"],
1751             "include/mlir/Dialect/ArmNeon/ArmNeon.cpp.inc",
1752         ),
1753         (
1754             ["-gen-op-doc"],
1755             "g3doc/Dialects/ArmNeon/ArmNeon.md",
1756         ),
1757     ],
1758     tblgen = ":mlir-tblgen",
1759     td_file = "include/mlir/Dialect/ArmNeon/ArmNeon.td",
1760     deps = [":ArmNeonTdFiles"],
1763 cc_library(
1764     name = "ArmNeonDialect",
1765     srcs = ["lib/Dialect/ArmNeon/IR/ArmNeonDialect.cpp"],
1766     hdrs = ["include/mlir/Dialect/ArmNeon/ArmNeonDialect.h"],
1767     includes = ["include"],
1768     deps = [
1769         ":ArmNeonIncGen",
1770         ":IR",
1771         ":SideEffectInterfaces",
1772         ":VectorDialect",
1773         "//llvm:Core",
1774         "//llvm:Support",
1775     ],
1778 gentbl_cc_library(
1779     name = "ArmNeonConversionIncGen",
1780     tbl_outs = [
1781         (
1782             ["-gen-llvmir-conversions"],
1783             "include/mlir/Dialect/ArmNeon/ArmNeonConversions.inc",
1784         ),
1785     ],
1786     tblgen = ":mlir-tblgen",
1787     td_file = "include/mlir/Dialect/ArmNeon/ArmNeon.td",
1788     deps = [":ArmNeonTdFiles"],
1791 cc_library(
1792     name = "ArmNeon2dToIntr",
1793     srcs = glob([
1794         "lib/Conversion/ArmNeon2dToIntr/*.cpp",
1795         "lib/Conversion/ArmNeon2dToIntr/*.h",
1796     ]),
1797     hdrs = glob([
1798         "include/mlir/Conversion/ArmNeon2dToIntr/*.h",
1799     ]),
1800     includes = ["include"],
1801     deps = [
1802         ":ArmNeonDialect",
1803         ":ConversionPassIncGen",
1804         ":FuncDialect",
1805         ":IR",
1806         ":MemRefDialect",
1807         ":OpenACCDialect",
1808         ":Pass",
1809         ":SCFDialect",
1810         ":Support",
1811         ":Transforms",
1812         ":VectorDialect",
1813     ],
1816 ##---------------------------------------------------------------------------##
1817 # ArmSME dialect.
1818 ##---------------------------------------------------------------------------##
1820 td_library(
1821     name = "ArmSMETdFiles",
1822     srcs = [
1823         "include/mlir/Dialect/ArmSME/IR/ArmSME.td",
1824     ],
1825     includes = ["include"],
1826     deps = [
1827         ":ArithOpsTdFiles",
1828         ":FuncTdFiles",
1829         ":LLVMOpsTdFiles",
1830         ":OpBaseTdFiles",
1831         ":SideEffectInterfacesTdFiles",
1832     ],
1835 gentbl_cc_library(
1836     name = "ArmSMETransformsPassIncGen",
1837     tbl_outs = [(
1838         [
1839             "-gen-pass-decls",
1840             "-name=ArmSME",
1841         ],
1842         "include/mlir/Dialect/ArmSME/Transforms/Passes.h.inc",
1843     )],
1844     tblgen = ":mlir-tblgen",
1845     td_file = "include/mlir/Dialect/ArmSME/Transforms/Passes.td",
1846     deps = [":PassBaseTdFiles"],
1849 gentbl_cc_library(
1850     name = "ArmSMEIncGen",
1851     tbl_outs = [
1852         (
1853             ["-gen-op-decls"],
1854             "include/mlir/Dialect/ArmSME/IR/ArmSME.h.inc",
1855         ),
1856         (
1857             ["-gen-op-defs"],
1858             "include/mlir/Dialect/ArmSME/IR/ArmSME.cpp.inc",
1859         ),
1860         (
1861             ["-gen-typedef-decls"],
1862             "include/mlir/Dialect/ArmSME/IR/ArmSMETypes.h.inc",
1863         ),
1864         (
1865             ["-gen-typedef-defs"],
1866             "include/mlir/Dialect/ArmSME/IR/ArmSMETypes.cpp.inc",
1867         ),
1868         (
1869             [
1870                 "-gen-dialect-decls",
1871                 "-dialect=arm_sme",
1872             ],
1873             "include/mlir/Dialect/ArmSME/IR/ArmSMEDialect.h.inc",
1874         ),
1875         (
1876             [
1877                 "-gen-dialect-defs",
1878                 "-dialect=arm_sme",
1879             ],
1880             "include/mlir/Dialect/ArmSME/IR/ArmSMEDialect.cpp.inc",
1881         ),
1882     ],
1883     tblgen = ":mlir-tblgen",
1884     td_file = "include/mlir/Dialect/ArmSME/IR/ArmSME.td",
1885     deps = [":ArmSMETdFiles"],
1888 gentbl_cc_library(
1889     name = "ArmSMEConversionIncGen",
1890     tbl_outs = [
1891         (
1892             ["-gen-llvmir-conversions"],
1893             "include/mlir/Dialect/ArmSME/IR/ArmSMEConversions.inc",
1894         ),
1895     ],
1896     tblgen = ":mlir-tblgen",
1897     td_file = "include/mlir/Dialect/ArmSME/IR/ArmSME.td",
1898     deps = [":ArmSMETdFiles"],
1901 cc_library(
1902     name = "ArmSMEDialect",
1903     srcs = ["lib/Dialect/ArmSME/IR/ArmSME.cpp"],
1904     hdrs = ["include/mlir/Dialect/ArmSME/IR/ArmSME.h"],
1905     includes = ["include"],
1906     deps = [
1907         ":ArmSMEIncGen",
1908         ":IR",
1909         ":LLVMDialect",
1910         ":SCFDialect",
1911         ":SideEffectInterfaces",
1912         ":VectorDialect",
1913         "//llvm:Core",
1914         "//llvm:Support",
1915     ],
1918 cc_library(
1919     name = "ArmSMEUtils",
1920     srcs = glob(["lib/Dialect/ArmSME/Utils/*.cpp"]),
1921     hdrs = glob(["include/mlir/Dialect/ArmSME/Utils/*.h"]),
1922     includes = ["include"],
1923     deps = [
1924         ":ArmSMEDialect",
1925         ":Dialect",
1926         ":IR",
1927     ],
1930 cc_library(
1931     name = "ArmSMETransforms",
1932     srcs = glob(["lib/Dialect/ArmSME/Transforms/*.cpp"]),
1933     hdrs = glob(["include/mlir/Dialect/ArmSME/Transforms/*.h"]),
1934     includes = ["include"],
1935     deps = [
1936         ":ArithDialect",
1937         ":ArmSMEDialect",
1938         ":ArmSMETransformsPassIncGen",
1939         ":ArmSMEUtils",
1940         ":FuncDialect",
1941         ":IR",
1942         ":LLVMCommonConversion",
1943         ":LLVMDialect",
1944         ":Pass",
1945         ":SCFDialect",
1946         ":Transforms",
1947         ":VectorDialect",
1948     ],
1951 cc_library(
1952     name = "ArmSMEToSCF",
1953     srcs = glob(["lib/Conversion/ArmSMEToSCF/*.cpp"]),
1954     hdrs = glob(["include/mlir/Conversion/ArmSMEToSCF/*.h"]),
1955     includes = ["include"],
1956     deps = [
1957         ":ArithDialect",
1958         ":ArmSMEDialect",
1959         ":ArmSMEUtils",
1960         ":ConversionPassIncGen",
1961         ":Pass",
1962         ":SCFDialect",
1963         ":Transforms",
1964     ],
1967 ##---------------------------------------------------------------------------##
1968 # ArmSVE dialect.
1969 ##---------------------------------------------------------------------------##
1971 td_library(
1972     name = "ArmSVETdFiles",
1973     srcs = [
1974         "include/mlir/Dialect/ArmSVE/ArmSVE.td",
1975     ],
1976     includes = ["include"],
1977     deps = [
1978         ":ArithOpsTdFiles",
1979         ":FuncTdFiles",
1980         ":LLVMOpsTdFiles",
1981         ":OpBaseTdFiles",
1982         ":SideEffectInterfacesTdFiles",
1983     ],
1986 gentbl_cc_library(
1987     name = "ArmSVEIncGen",
1988     tbl_outs = [
1989         (
1990             ["-gen-op-decls"],
1991             "include/mlir/Dialect/ArmSVE/ArmSVE.h.inc",
1992         ),
1993         (
1994             ["-gen-op-defs"],
1995             "include/mlir/Dialect/ArmSVE/ArmSVE.cpp.inc",
1996         ),
1997         (
1998             ["-gen-typedef-decls"],
1999             "include/mlir/Dialect/ArmSVE/ArmSVETypes.h.inc",
2000         ),
2001         (
2002             ["-gen-typedef-defs"],
2003             "include/mlir/Dialect/ArmSVE/ArmSVETypes.cpp.inc",
2004         ),
2005         (
2006             [
2007                 "-gen-dialect-decls",
2008                 "-dialect=arm_sve",
2009             ],
2010             "include/mlir/Dialect/ArmSVE/ArmSVEDialect.h.inc",
2011         ),
2012         (
2013             [
2014                 "-gen-dialect-defs",
2015                 "-dialect=arm_sve",
2016             ],
2017             "include/mlir/Dialect/ArmSVE/ArmSVEDialect.cpp.inc",
2018         ),
2019     ],
2020     tblgen = ":mlir-tblgen",
2021     td_file = "include/mlir/Dialect/ArmSVE/ArmSVE.td",
2022     deps = [":ArmSVETdFiles"],
2025 cc_library(
2026     name = "ArmSVEDialect",
2027     srcs = ["lib/Dialect/ArmSVE/IR/ArmSVEDialect.cpp"],
2028     hdrs = ["include/mlir/Dialect/ArmSVE/ArmSVEDialect.h"],
2029     includes = ["include"],
2030     deps = [
2031         ":ArmSVEIncGen",
2032         ":IR",
2033         ":LLVMDialect",
2034         ":SideEffectInterfaces",
2035         "//llvm:Core",
2036         "//llvm:Support",
2037     ],
2040 cc_library(
2041     name = "ArmSVETransforms",
2042     srcs = glob(["lib/Dialect/ArmSVE/Transforms/*.cpp"]),
2043     hdrs = ["include/mlir/Dialect/ArmSVE/Transforms.h"],
2044     includes = ["include"],
2045     deps = [
2046         ":ArmSVEDialect",
2047         ":FuncDialect",
2048         ":IR",
2049         ":LLVMCommonConversion",
2050         ":LLVMDialect",
2051         ":TransformUtils",
2052         "//llvm:Core",
2053         "//llvm:Support",
2054     ],
2057 gentbl_cc_library(
2058     name = "ArmSVEConversionIncGen",
2059     tbl_outs = [
2060         (
2061             ["-gen-llvmir-conversions"],
2062             "include/mlir/Dialect/ArmSVE/ArmSVEConversions.inc",
2063         ),
2064     ],
2065     tblgen = ":mlir-tblgen",
2066     td_file = "include/mlir/Dialect/ArmSVE/ArmSVE.td",
2067     deps = [":ArmSVETdFiles"],
2070 ##---------------------------------------------------------------------------##
2071 # AMX dialect.
2072 ##---------------------------------------------------------------------------##
2074 td_library(
2075     name = "AMXTdFiles",
2076     srcs = ["include/mlir/Dialect/AMX/AMX.td"],
2077     includes = ["include"],
2078     deps = [
2079         ":LLVMOpsTdFiles",
2080         ":SideEffectInterfacesTdFiles",
2081     ],
2084 gentbl_cc_library(
2085     name = "AMXIncGen",
2086     tbl_outs = [
2087         (
2088             [
2089                 "-gen-dialect-decls",
2090                 "-dialect=amx",
2091             ],
2092             "include/mlir/Dialect/AMX/AMXDialect.h.inc",
2093         ),
2094         (
2095             [
2096                 "-gen-dialect-defs",
2097                 "-dialect=amx",
2098             ],
2099             "include/mlir/Dialect/AMX/AMXDialect.cpp.inc",
2100         ),
2101         (
2102             ["-gen-op-decls"],
2103             "include/mlir/Dialect/AMX/AMX.h.inc",
2104         ),
2105         (
2106             ["-gen-op-defs"],
2107             "include/mlir/Dialect/AMX/AMX.cpp.inc",
2108         ),
2109         (
2110             ["-gen-op-doc"],
2111             "g3doc/Dialects/AMX/AMX.md",
2112         ),
2113     ],
2114     tblgen = ":mlir-tblgen",
2115     td_file = "include/mlir/Dialect/AMX/AMX.td",
2116     deps = [":AMXTdFiles"],
2119 cc_library(
2120     name = "AMXDialect",
2121     srcs = ["lib/Dialect/AMX/IR/AMXDialect.cpp"],
2122     hdrs = ["include/mlir/Dialect/AMX/AMXDialect.h"],
2123     includes = ["include"],
2124     deps = [
2125         ":AMXIncGen",
2126         ":IR",
2127         ":LLVMDialect",
2128         ":SideEffectInterfaces",
2129         "//llvm:Core",
2130         "//llvm:Support",
2131     ],
2134 cc_library(
2135     name = "AMXTransforms",
2136     srcs = glob(["lib/Dialect/AMX/Transforms/*.cpp"]),
2137     hdrs = ["include/mlir/Dialect/AMX/Transforms.h"],
2138     includes = ["include"],
2139     deps = [
2140         ":AMXDialect",
2141         ":FuncDialect",
2142         ":IR",
2143         ":LLVMCommonConversion",
2144         ":LLVMDialect",
2145         "//llvm:Core",
2146         "//llvm:Support",
2147     ],
2150 gentbl_cc_library(
2151     name = "AMXConversionIncGen",
2152     tbl_outs = [
2153         (
2154             ["-gen-llvmir-conversions"],
2155             "include/mlir/Dialect/AMX/AMXConversions.inc",
2156         ),
2157     ],
2158     tblgen = ":mlir-tblgen",
2159     td_file = "include/mlir/Dialect/AMX/AMX.td",
2160     deps = [":AMXTdFiles"],
2163 ##---------------------------------------------------------------------------##
2164 # X86Vector dialect.
2165 ##---------------------------------------------------------------------------##
2167 td_library(
2168     name = "X86VectorTdFiles",
2169     srcs = ["include/mlir/Dialect/X86Vector/X86Vector.td"],
2170     includes = ["include"],
2171     deps = [
2172         ":InferTypeOpInterfaceTdFiles",
2173         ":LLVMOpsTdFiles",
2174         ":SideEffectInterfacesTdFiles",
2175     ],
2178 gentbl_cc_library(
2179     name = "X86VectorIncGen",
2180     tbl_outs = [
2181         (
2182             [
2183                 "-gen-dialect-decls",
2184                 "-dialect=x86vector",
2185             ],
2186             "include/mlir/Dialect/X86Vector/X86VectorDialect.h.inc",
2187         ),
2188         (
2189             [
2190                 "-gen-dialect-defs",
2191                 "-dialect=x86vector",
2192             ],
2193             "include/mlir/Dialect/X86Vector/X86VectorDialect.cpp.inc",
2194         ),
2195         (
2196             ["-gen-op-decls"],
2197             "include/mlir/Dialect/X86Vector/X86Vector.h.inc",
2198         ),
2199         (
2200             ["-gen-op-defs"],
2201             "include/mlir/Dialect/X86Vector/X86Vector.cpp.inc",
2202         ),
2203         (
2204             ["-gen-op-doc"],
2205             "g3doc/Dialects/X86Vector/X86Vector.md",
2206         ),
2207     ],
2208     tblgen = ":mlir-tblgen",
2209     td_file = "include/mlir/Dialect/X86Vector/X86Vector.td",
2210     deps = [":X86VectorTdFiles"],
2213 cc_library(
2214     name = "X86VectorDialect",
2215     srcs = ["lib/Dialect/X86Vector/IR/X86VectorDialect.cpp"],
2216     hdrs = ["include/mlir/Dialect/X86Vector/X86VectorDialect.h"],
2217     includes = ["include"],
2218     deps = [
2219         ":IR",
2220         ":InferTypeOpInterface",
2221         ":LLVMDialect",
2222         ":SideEffectInterfaces",
2223         ":X86VectorIncGen",
2224         "//llvm:Core",
2225         "//llvm:Support",
2226     ],
2229 cc_library(
2230     name = "X86VectorTransforms",
2231     srcs = glob(["lib/Dialect/X86Vector/Transforms/*.cpp"]),
2232     hdrs = ["include/mlir/Dialect/X86Vector/Transforms.h"],
2233     includes = ["include"],
2234     deps = [
2235         ":ArithDialect",
2236         ":FuncDialect",
2237         ":IR",
2238         ":LLVMCommonConversion",
2239         ":LLVMDialect",
2240         ":VectorDialect",
2241         ":VectorUtils",
2242         ":X86VectorDialect",
2243         "//llvm:Core",
2244         "//llvm:Support",
2245     ],
2248 gentbl_cc_library(
2249     name = "X86VectorConversionIncGen",
2250     tbl_outs = [
2251         (
2252             ["-gen-llvmir-conversions"],
2253             "include/mlir/Dialect/X86Vector/X86VectorConversions.inc",
2254         ),
2255     ],
2256     tblgen = ":mlir-tblgen",
2257     td_file = "include/mlir/Dialect/X86Vector/X86Vector.td",
2258     deps = [":X86VectorTdFiles"],
2261 ##---------------------------------------------------------------------------##
2262 # IRDL dialect.
2263 ##---------------------------------------------------------------------------##
2265 td_library(
2266     name = "IRDLTdFiles",
2267     srcs = [
2268         "include/mlir/Dialect/IRDL/IR/IRDL.td",
2269         "include/mlir/Dialect/IRDL/IR/IRDLAttributes.td",
2270         "include/mlir/Dialect/IRDL/IR/IRDLInterfaces.td",
2271         "include/mlir/Dialect/IRDL/IR/IRDLOps.td",
2272         "include/mlir/Dialect/IRDL/IR/IRDLTypes.td",
2273     ],
2274     includes = ["include"],
2275     deps = [
2276         ":InferTypeOpInterfaceTdFiles",
2277         ":OpBaseTdFiles",
2278         ":SideEffectInterfacesTdFiles",
2279     ],
2282 gentbl_cc_library(
2283     name = "IRDLIncGen",
2284     tbl_outs = [
2285         (
2286             ["-gen-dialect-decls"],
2287             "include/mlir/Dialect/IRDL/IR/IRDLDialect.h.inc",
2288         ),
2289         (
2290             ["-gen-dialect-defs"],
2291             "include/mlir/Dialect/IRDL/IR/IRDLDialect.cpp.inc",
2292         ),
2293         (
2294             ["-gen-op-decls"],
2295             "include/mlir/Dialect/IRDL/IR/IRDL.h.inc",
2296         ),
2297         (
2298             ["-gen-op-defs"],
2299             "include/mlir/Dialect/IRDL/IR/IRDL.cpp.inc",
2300         ),
2301         (
2302             ["-gen-typedef-decls"],
2303             "include/mlir/Dialect/IRDL/IR/IRDLTypes.h.inc",
2304         ),
2305         (
2306             ["-gen-typedef-defs"],
2307             "include/mlir/Dialect/IRDL/IR/IRDLTypes.cpp.inc",
2308         ),
2309     ],
2310     tblgen = ":mlir-tblgen",
2311     td_file = "include/mlir/Dialect/IRDL/IR/IRDLOps.td",
2312     deps = [":IRDLTdFiles"],
2315 gentbl_cc_library(
2316     name = "IRDLInterfacesIncGen",
2317     tbl_outs = [
2318         (
2319             ["-gen-op-interface-decls"],
2320             "include/mlir/Dialect/IRDL/IR/IRDLInterfaces.h.inc",
2321         ),
2322         (
2323             ["-gen-op-interface-defs"],
2324             "include/mlir/Dialect/IRDL/IR/IRDLInterfaces.cpp.inc",
2325         ),
2326     ],
2327     tblgen = ":mlir-tblgen",
2328     td_file = "include/mlir/Dialect/IRDL/IR/IRDLInterfaces.td",
2329     deps = [":IRDLTdFiles"],
2332 gentbl_cc_library(
2333     name = "IRDLAttributesIncGen",
2334     tbl_outs = [
2335         (
2336             ["-gen-attrdef-decls"],
2337             "include/mlir/Dialect/IRDL/IR/IRDLAttributes.h.inc",
2338         ),
2339         (
2340             ["-gen-attrdef-defs"],
2341             "include/mlir/Dialect/IRDL/IR/IRDLAttributes.cpp.inc",
2342         ),
2343     ],
2344     tblgen = ":mlir-tblgen",
2345     td_file = "include/mlir/Dialect/IRDL/IR/IRDLAttributes.td",
2346     deps = [":IRDLTdFiles"],
2349 gentbl_cc_library(
2350     name = "IRDLEnumsIncGen",
2351     tbl_outs = [
2352         (
2353             ["-gen-enum-decls"],
2354             "include/mlir/Dialect/IRDL/IR/IRDLEnums.h.inc",
2355         ),
2356         (
2357             ["-gen-enum-defs"],
2358             "include/mlir/Dialect/IRDL/IR/IRDLEnums.cpp.inc",
2359         ),
2360     ],
2361     tblgen = ":mlir-tblgen",
2362     td_file = "include/mlir/Dialect/IRDL/IR/IRDLAttributes.td",
2363     deps = [":IRDLTdFiles"],
2366 gentbl_cc_library(
2367     name = "IRDLOpsIncGen",
2368     tbl_outs = [
2369         (
2370             ["-gen-op-decls"],
2371             "include/mlir/Dialect/IRDL/IR/IRDLOps.h.inc",
2372         ),
2373         (
2374             ["-gen-op-defs"],
2375             "include/mlir/Dialect/IRDL/IR/IRDLOps.cpp.inc",
2376         ),
2377     ],
2378     tblgen = ":mlir-tblgen",
2379     td_file = "include/mlir/Dialect/IRDL/IR/IRDLOps.td",
2380     deps = [":IRDLTdFiles"],
2383 gentbl_cc_library(
2384     name = "IRDLTypesIncGen",
2385     tbl_outs = [
2386         (
2387             ["-gen-typedef-decls"],
2388             "include/mlir/Dialect/IRDL/IR/IRDLTypesGen.h.inc",
2389         ),
2390         (
2391             ["-gen-typedef-defs"],
2392             "include/mlir/Dialect/IRDL/IR/IRDLTypesGen.cpp.inc",
2393         ),
2394     ],
2395     tblgen = ":mlir-tblgen",
2396     td_file = "include/mlir/Dialect/IRDL/IR/IRDLTypes.td",
2397     deps = [":IRDLTdFiles"],
2400 cc_library(
2401     name = "IRDLDialect",
2402     srcs = [
2403         "lib/Dialect/IRDL/IR/IRDL.cpp",
2404         "lib/Dialect/IRDL/IR/IRDLOps.cpp",
2405         "lib/Dialect/IRDL/IRDLLoading.cpp",
2406         "lib/Dialect/IRDL/IRDLVerifiers.cpp",
2407     ],
2408     hdrs = [
2409         "include/mlir/Dialect/IRDL/IR/IRDL.h",
2410         "include/mlir/Dialect/IRDL/IR/IRDLInterfaces.h",
2411         "include/mlir/Dialect/IRDL/IR/IRDLTraits.h",
2412         "include/mlir/Dialect/IRDL/IRDLLoading.h",
2413         "include/mlir/Dialect/IRDL/IRDLVerifiers.h",
2414     ],
2415     includes = ["include"],
2416     deps = [
2417         ":Dialect",
2418         ":IR",
2419         ":IRDLAttributesIncGen",
2420         ":IRDLEnumsIncGen",
2421         ":IRDLIncGen",
2422         ":IRDLInterfacesIncGen",
2423         ":IRDLOpsIncGen",
2424         ":IRDLTypesIncGen",
2425         ":InferTypeOpInterface",
2426         ":Support",
2427         "//llvm:Core",
2428         "//llvm:Support",
2429     ],
2432 ##---------------------------------------------------------------------------##
2433 # SCF dialect.
2434 ##---------------------------------------------------------------------------##
2436 td_library(
2437     name = "SCFTdFiles",
2438     srcs = [
2439         "include/mlir/Dialect/SCF/IR/DeviceMappingInterface.td",
2440         "include/mlir/Dialect/SCF/IR/SCFOps.td",
2441     ],
2442     includes = ["include"],
2443     deps = [
2444         ":ControlFlowInterfacesTdFiles",
2445         ":InferTypeOpInterfaceTdFiles",
2446         ":LoopLikeInterfaceTdFiles",
2447         ":ParallelCombiningOpInterfaceTdFiles",
2448         ":SideEffectInterfacesTdFiles",
2449         ":ViewLikeInterfaceTdFiles",
2450     ],
2453 gentbl_cc_library(
2454     name = "SCFIncGen",
2455     tbl_outs = [
2456         (
2457             ["-gen-op-decls"],
2458             "include/mlir/Dialect/SCF/IR/SCFOps.h.inc",
2459         ),
2460         (
2461             ["-gen-op-defs"],
2462             "include/mlir/Dialect/SCF/IR/SCFOps.cpp.inc",
2463         ),
2464         (
2465             ["-gen-dialect-decls"],
2466             "include/mlir/Dialect/SCF/IR/SCFOpsDialect.h.inc",
2467         ),
2468         (
2469             ["-gen-dialect-defs"],
2470             "include/mlir/Dialect/SCF/IR/SCFOpsDialect.cpp.inc",
2471         ),
2472     ],
2473     tblgen = ":mlir-tblgen",
2474     td_file = "include/mlir/Dialect/SCF/IR/SCFOps.td",
2475     deps = [":SCFTdFiles"],
2478 gentbl_cc_library(
2479     name = "SCFDeviceMappingInterfacesIncGen",
2480     tbl_outs = [
2481         (
2482             ["-gen-attr-interface-decls"],
2483             "include/mlir/Dialect/SCF/IR/DeviceMappingAttrInterface.h.inc",
2484         ),
2485         (
2486             ["-gen-attr-interface-defs"],
2487             "include/mlir/Dialect/SCF/IR/DeviceMappingAttrInterface.cpp.inc",
2488         ),
2489         (
2490             ["-gen-attrdef-decls"],
2491             "include/mlir/Dialect/SCF/IR/DeviceMappingAttributes.h.inc",
2492         ),
2493         (
2494             ["-gen-attrdef-defs"],
2495             "include/mlir/Dialect/SCF/IR/DeviceMappingAttributes.cpp.inc",
2496         ),
2497     ],
2498     tblgen = ":mlir-tblgen",
2499     td_file = "include/mlir/Dialect/SCF/IR/DeviceMappingInterface.td",
2500     deps = [":SCFTdFiles"],
2503 gentbl_cc_library(
2504     name = "SCFPassIncGen",
2505     tbl_outs = [
2506         (
2507             [
2508                 "-gen-pass-decls",
2509                 "-name=SCF",
2510             ],
2511             "include/mlir/Dialect/SCF/Transforms/Passes.h.inc",
2512         ),
2513     ],
2514     tblgen = ":mlir-tblgen",
2515     td_file = "include/mlir/Dialect/SCF/Transforms/Passes.td",
2516     deps = [":PassBaseTdFiles"],
2519 cc_library(
2520     name = "SCFTransforms",
2521     srcs = glob([
2522         "lib/Dialect/SCF/Transforms/*.cpp",
2523         "lib/Dialect/SCF/Transforms/*.h",
2524     ]),
2525     hdrs = glob([
2526         "include/mlir/Dialect/SCF/Transforms/*.h",
2527     ]),
2528     includes = ["include"],
2529     deps = [
2530         ":AffineAnalysis",
2531         ":AffineDialect",
2532         ":ArithDialect",
2533         ":ArithUtils",
2534         ":BufferizationDialect",
2535         ":BufferizationTransforms",
2536         ":DestinationStyleOpInterface",
2537         ":DialectUtils",
2538         ":FuncDialect",
2539         ":IR",
2540         ":MemRefDialect",
2541         ":Pass",
2542         ":SCFDialect",
2543         ":SCFPassIncGen",
2544         ":SCFUtils",
2545         ":SideEffectInterfaces",
2546         ":Support",
2547         ":TensorDialect",
2548         ":TensorTransforms",
2549         ":TilingInterface",
2550         ":Transforms",
2551         "//llvm:Support",
2552     ],
2555 td_library(
2556     name = "SCFTransformOpsTdFiles",
2557     srcs = [
2558         "include/mlir/Dialect/SCF/TransformOps/SCFTransformOps.td",
2559     ],
2560     includes = ["include"],
2561     deps = [
2562         ":PDLDialect",
2563         ":TransformDialectTdFiles",
2564     ],
2567 gentbl_cc_library(
2568     name = "SCFTransformOpsIncGen",
2569     tbl_outs = [
2570         (
2571             ["-gen-op-decls"],
2572             "include/mlir/Dialect/SCF/TransformOps/SCFTransformOps.h.inc",
2573         ),
2574         (
2575             ["-gen-op-defs"],
2576             "include/mlir/Dialect/SCF/TransformOps/SCFTransformOps.cpp.inc",
2577         ),
2578     ],
2579     tblgen = ":mlir-tblgen",
2580     td_file = "include/mlir/Dialect/SCF/TransformOps/SCFTransformOps.td",
2581     deps = [
2582         ":SCFTransformOpsTdFiles",
2583     ],
2586 cc_library(
2587     name = "SCFTransformOps",
2588     srcs = glob(["lib/Dialect/SCF/TransformOps/*.cpp"]),
2589     hdrs = glob(["include/mlir/Dialect/SCF/TransformOps/*.h"]),
2590     includes = ["include"],
2591     deps = [
2592         ":AffineDialect",
2593         ":AffineUtils",
2594         ":FuncDialect",
2595         ":IR",
2596         ":LoopLikeInterface",
2597         ":SCFDialect",
2598         ":SCFTransformOpsIncGen",
2599         ":SCFTransforms",
2600         ":SCFUtils",
2601         ":SideEffectInterfaces",
2602         ":TransformDialect",
2603         ":VectorDialect",
2604         "//llvm:Support",
2605     ],
2608 ##---------------------------------------------------------------------------##
2609 # SparseTensor dialect.
2610 ##---------------------------------------------------------------------------##
2612 td_library(
2613     name = "SparseTensorTdFiles",
2614     srcs = [
2615         "include/mlir/Dialect/SparseTensor/IR/SparseTensorAttrDefs.td",
2616         "include/mlir/Dialect/SparseTensor/IR/SparseTensorBase.td",
2617         "include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td",
2618         "include/mlir/Dialect/SparseTensor/IR/SparseTensorTypes.td",
2619     ],
2620     includes = ["include"],
2621     deps = [
2622         ":InferTypeOpInterfaceTdFiles",
2623         ":OpBaseTdFiles",
2624         ":SideEffectInterfacesTdFiles",
2625     ],
2628 gentbl_cc_library(
2629     name = "SparseTensorAttrDefsIncGen",
2630     tbl_outs = [
2631         (
2632             ["--gen-attrdef-decls"],
2633             "include/mlir/Dialect/SparseTensor/IR/SparseTensorAttrDefs.h.inc",
2634         ),
2635         (
2636             ["--gen-attrdef-defs"],
2637             "include/mlir/Dialect/SparseTensor/IR/SparseTensorAttrDefs.cpp.inc",
2638         ),
2639         (
2640             ["--gen-enum-decls"],
2641             "include/mlir/Dialect/SparseTensor/IR/SparseTensorAttrEnums.h.inc",
2642         ),
2643         (
2644             ["--gen-enum-defs"],
2645             "include/mlir/Dialect/SparseTensor/IR/SparseTensorAttrEnums.cpp.inc",
2646         ),
2647     ],
2648     tblgen = ":mlir-tblgen",
2649     td_file = "include/mlir/Dialect/SparseTensor/IR/SparseTensorAttrDefs.td",
2650     deps = [":SparseTensorTdFiles"],
2653 gentbl_cc_library(
2654     name = "SparseTensorOpsIncGen",
2655     tbl_outs = [
2656         (
2657             [
2658                 "-gen-dialect-decls",
2659                 "-dialect=sparse_tensor",
2660             ],
2661             "include/mlir/Dialect/SparseTensor/IR/SparseTensorOpsDialect.h.inc",
2662         ),
2663         (
2664             [
2665                 "-gen-dialect-defs",
2666                 "-dialect=sparse_tensor",
2667             ],
2668             "include/mlir/Dialect/SparseTensor/IR/SparseTensorOpsDialect.cpp.inc",
2669         ),
2670         (
2671             ["-gen-op-decls"],
2672             "include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.h.inc",
2673         ),
2674         (
2675             ["-gen-op-defs"],
2676             "include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.cpp.inc",
2677         ),
2678         (
2679             ["-gen-op-doc"],
2680             "g3doc/Dialects/SparseTensor/SparseTensor.md",
2681         ),
2682     ],
2683     tblgen = ":mlir-tblgen",
2684     td_file = "include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td",
2685     deps = [":SparseTensorTdFiles"],
2688 gentbl_cc_library(
2689     name = "SparseTensorTypesIncGen",
2690     tbl_outs = [
2691         (
2692             ["--gen-typedef-decls"],
2693             "include/mlir/Dialect/SparseTensor/IR/SparseTensorTypes.h.inc",
2694         ),
2695         (
2696             ["--gen-typedef-defs"],
2697             "include/mlir/Dialect/SparseTensor/IR/SparseTensorTypes.cpp.inc",
2698         ),
2699     ],
2700     tblgen = ":mlir-tblgen",
2701     td_file = "include/mlir/Dialect/SparseTensor/IR/SparseTensorTypes.td",
2702     deps = [":SparseTensorTdFiles"],
2705 gentbl_cc_library(
2706     name = "SparseTensorPassIncGen",
2707     tbl_outs = [
2708         (
2709             [
2710                 "-gen-pass-decls",
2711                 "-name=SparseTensor",
2712             ],
2713             "include/mlir/Dialect/SparseTensor/Transforms/Passes.h.inc",
2714         ),
2715         (
2716             [
2717                 "-gen-pass-capi-header",
2718                 "--prefix=SparseTensor",
2719             ],
2720             "include/mlir/Dialect/SparseTensor/Transforms/Passes.capi.h.inc",
2721         ),
2722         (
2723             [
2724                 "-gen-pass-capi-impl",
2725                 "--prefix=SparseTensor",
2726             ],
2727             "include/mlir/Dialect/SparseTensor/Transforms/Passes.capi.cpp.inc",
2728         ),
2729     ],
2730     tblgen = ":mlir-tblgen",
2731     td_file = "include/mlir/Dialect/SparseTensor/Transforms/Passes.td",
2732     deps = [":PassBaseTdFiles"],
2735 # This library is shared by both SparseTensorDialect and
2736 # SparseTensorRuntime, so it must not depend on any of the MLIR/LLVM
2737 # internals or else mlir_c_runner_utils will inherit that dependency.
2738 cc_library(
2739     name = "SparseTensorEnums",
2740     hdrs = ["include/mlir/Dialect/SparseTensor/IR/Enums.h"],
2741     includes = ["include"],
2744 cc_library(
2745     name = "SparseTensorDialect",
2746     srcs = [
2747         "lib/Dialect/SparseTensor/IR/Detail/DimLvlMap.cpp",
2748         "lib/Dialect/SparseTensor/IR/Detail/DimLvlMap.h",
2749         "lib/Dialect/SparseTensor/IR/Detail/DimLvlMapParser.cpp",
2750         "lib/Dialect/SparseTensor/IR/Detail/DimLvlMapParser.h",
2751         "lib/Dialect/SparseTensor/IR/Detail/LvlTypeParser.cpp",
2752         "lib/Dialect/SparseTensor/IR/Detail/LvlTypeParser.h",
2753         "lib/Dialect/SparseTensor/IR/Detail/TemplateExtras.h",
2754         "lib/Dialect/SparseTensor/IR/Detail/Var.cpp",
2755         "lib/Dialect/SparseTensor/IR/Detail/Var.h",
2756         "lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp",
2757     ],
2758     hdrs = [
2759         "include/mlir/Dialect/SparseTensor/IR/SparseTensor.h",
2760         "include/mlir/Dialect/SparseTensor/IR/SparseTensorStorageLayout.h",
2761         "include/mlir/Dialect/SparseTensor/IR/SparseTensorType.h",
2762     ],
2763     includes = ["include"],
2764     deps = [
2765         ":ArithDialect",
2766         ":DialectUtils",
2767         ":IR",
2768         ":InferTypeOpInterface",
2769         ":SparseTensorAttrDefsIncGen",
2770         ":SparseTensorEnums",
2771         ":SparseTensorOpsIncGen",
2772         ":SparseTensorTypesIncGen",
2773         "//llvm:Support",
2774     ],
2777 cc_library(
2778     name = "SparseTensorTransformOps",
2779     srcs = glob([
2780         "lib/Dialect/SparseTensor/TransformOps/*.cpp",
2781     ]),
2782     hdrs = glob([
2783         "include/mlir/Dialect/SparseTensor/TransformOps/*.h",
2784     ]),
2785     includes = ["include"],
2786     deps = [
2787         ":IR",
2788         ":LinalgDialect",
2789         ":LinalgTransformOps",
2790         ":SparseTensorDialect",
2791         ":SparseTensorTransformOpsIncGen",
2792         ":Support",
2793         ":TransformDialect",
2794         "//llvm:Support",
2795     ],
2798 td_library(
2799     name = "SparseTensorTransformOpsTdFiles",
2800     srcs = glob([
2801         "include/mlir/Dialect/SparseTensor/TransformOps/*.td",
2802     ]),
2803     includes = ["include"],
2804     deps = [
2805         ":TransformDialectTdFiles",
2806     ],
2809 gentbl_cc_library(
2810     name = "SparseTensorTransformOpsIncGen",
2811     tbl_outs = [
2812         (
2813             ["-gen-op-decls"],
2814             "include/mlir/Dialect/SparseTensor/TransformOps/SparseTensorTransformOps.h.inc",
2815         ),
2816         (
2817             ["-gen-op-defs"],
2818             "include/mlir/Dialect/SparseTensor/TransformOps/SparseTensorTransformOps.cpp.inc",
2819         ),
2820     ],
2821     tblgen = ":mlir-tblgen",
2822     td_file = "include/mlir/Dialect/SparseTensor/TransformOps/SparseTensorTransformOps.td",
2823     deps = [
2824         ":SparseTensorTransformOpsTdFiles",
2825     ],
2828 cc_library(
2829     name = "SparseTensorUtils",
2830     srcs = glob(["lib/Dialect/SparseTensor/Utils/*.cpp"]),
2831     hdrs = glob(["include/mlir/Dialect/SparseTensor/Utils/*.h"]),
2832     includes = ["include"],
2833     deps = [
2834         ":ArithDialect",
2835         ":ComplexDialect",
2836         ":IR",
2837         ":LinalgDialect",
2838         ":MathDialect",
2839         ":SparseTensorDialect",
2840         ":SparseTensorEnums",
2841         "//llvm:Support",
2842     ],
2845 cc_library(
2846     name = "SparseTensorTransforms",
2847     srcs = glob([
2848         "lib/Dialect/SparseTensor/Transforms/*.cpp",
2849         "lib/Dialect/SparseTensor/Transforms/*.h",
2850     ]),
2851     hdrs = [
2852         "include/mlir/Dialect/SparseTensor/Transforms/BufferizableOpInterfaceImpl.h",
2853         "include/mlir/Dialect/SparseTensor/Transforms/Passes.h",
2854     ],
2855     includes = ["include"],
2856     deps = [
2857         ":AffineDialect",
2858         ":ArithDialect",
2859         ":ArithUtils",
2860         ":BufferizationDialect",
2861         ":BufferizationTransforms",
2862         ":ComplexDialect",
2863         ":DialectUtils",
2864         ":FuncDialect",
2865         ":FuncTransforms",
2866         ":GPUDialect",
2867         ":IR",
2868         ":LLVMCommonConversion",
2869         ":LLVMDialect",
2870         ":LinalgDialect",
2871         ":LinalgTransforms",
2872         ":LinalgUtils",
2873         ":MathDialect",
2874         ":MemRefDialect",
2875         ":Pass",
2876         ":SCFDialect",
2877         ":SCFTransforms",
2878         ":SparseTensorDialect",
2879         ":SparseTensorEnums",
2880         ":SparseTensorPassIncGen",
2881         ":SparseTensorUtils",
2882         ":Support",
2883         ":TensorDialect",
2884         ":Transforms",
2885         ":VectorDialect",
2886         "//llvm:Support",
2887     ],
2890 cc_library(
2891     name = "SparseTensorPipelines",
2892     srcs = glob(["lib/Dialect/SparseTensor/Pipelines/*.cpp"]),
2893     hdrs = ["include/mlir/Dialect/SparseTensor/Pipelines/Passes.h"],
2894     includes = ["include"],
2895     local_defines = if_cuda_available(["MLIR_GPU_TO_CUBIN_PASS_ENABLE"]),
2896     deps = [
2897         ":ArithTransforms",
2898         ":BufferizationTransforms",
2899         ":ConversionPasses",
2900         ":FuncDialect",
2901         ":FuncTransforms",
2902         ":GPUDialect",
2903         ":GPUToNVVMTransforms",
2904         ":GPUTransforms",
2905         ":LinalgTransforms",
2906         ":MemRefTransforms",
2907         ":NVVMDialect",
2908         ":Pass",
2909         ":SparseTensorDialect",
2910         ":SparseTensorTransforms",
2911         ":TensorTransforms",
2912         ":Transforms",
2913         ":VectorToLLVM",
2914         ":VectorTransforms",
2915     ] + if_cuda_available([
2916         ":SerializeToCubin",
2917     ]),
2920 ##---------------------------------------------------------------------------##
2921 # NVGPU dialect.
2922 ##---------------------------------------------------------------------------##
2924 td_library(
2925     name = "NVGPUTdFiles",
2926     srcs = ["include/mlir/Dialect/NVGPU/IR/NVGPU.td"],
2927     includes = ["include"],
2928     deps = [
2929         ":SideEffectInterfacesTdFiles",
2930     ],
2933 gentbl_cc_library(
2934     name = "NVGPUIncGen",
2935     tbl_outs = [
2936         (
2937             [
2938                 "-gen-dialect-decls",
2939                 "-dialect=nvgpu",
2940             ],
2941             "include/mlir/Dialect/NVGPU/IR/NVGPUDialect.h.inc",
2942         ),
2943         (
2944             [
2945                 "-gen-dialect-defs",
2946                 "-dialect=nvgpu",
2947             ],
2948             "include/mlir/Dialect/NVGPU/IR/NVGPUDialect.cpp.inc",
2949         ),
2950         (
2951             ["-gen-op-decls"],
2952             "include/mlir/Dialect/NVGPU/IR/NVGPU.h.inc",
2953         ),
2954         (
2955             ["-gen-op-defs"],
2956             "include/mlir/Dialect/NVGPU/IR/NVGPU.cpp.inc",
2957         ),
2958         (
2959             ["-gen-op-doc"],
2960             "g3doc/Dialects/NVGPU/NVGPU.md",
2961         ),
2962         (
2963             ["-gen-typedef-decls"],
2964             "include/mlir/Dialect/NVGPU/IR/NVGPUTypes.h.inc",
2965         ),
2966         (
2967             ["-gen-typedef-defs"],
2968             "include/mlir/Dialect/NVGPU/IR/NVGPUTypes.cpp.inc",
2969         ),
2970         (
2971             ["-gen-enum-decls"],
2972             "include/mlir/Dialect/NVGPU/IR/NVGPUEnums.h.inc",
2973         ),
2974         (
2975             ["-gen-enum-defs"],
2976             "include/mlir/Dialect/NVGPU/IR/NVGPUEnums.cpp.inc",
2977         ),
2978         (
2979             ["-gen-attrdef-decls"],
2980             "include/mlir/Dialect/NVGPU/IR/NVGPUAttrDefs.h.inc",
2981         ),
2982         (
2983             ["-gen-attrdef-defs"],
2984             "include/mlir/Dialect/NVGPU/IR/NVGPUAttrDefs.cpp.inc",
2985         ),
2986     ],
2987     tblgen = ":mlir-tblgen",
2988     td_file = "include/mlir/Dialect/NVGPU/IR/NVGPU.td",
2989     deps = [":NVGPUTdFiles"],
2992 gentbl_cc_library(
2993     name = "NVGPUPassIncGen",
2994     tbl_outs = [
2995         (
2996             [
2997                 "-gen-pass-decls",
2998                 "-name=NVGPU",
2999             ],
3000             "include/mlir/Dialect/NVGPU/Transforms/Passes.h.inc",
3001         ),
3002     ],
3003     tblgen = ":mlir-tblgen",
3004     td_file = "include/mlir/Dialect/NVGPU/Transforms/Passes.td",
3005     deps = [":PassBaseTdFiles"],
3008 cc_library(
3009     name = "NVGPUDialect",
3010     srcs = ["lib/Dialect/NVGPU/IR/NVGPUDialect.cpp"],
3011     hdrs = ["include/mlir/Dialect/NVGPU/IR/NVGPUDialect.h"],
3012     includes = ["include"],
3013     deps = [
3014         ":GPUDialect",
3015         ":IR",
3016         ":NVGPUIncGen",
3017         ":SideEffectInterfaces",
3018         "//llvm:Core",
3019         "//llvm:Support",
3020     ],
3023 cc_library(
3024     name = "NVGPUTransformOps",
3025     srcs = glob([
3026         "lib/Dialect/NVGPU/TransformOps/*.cpp",
3027     ]),
3028     hdrs = glob([
3029         "include/mlir/Dialect/NVGPU/TransformOps/*.h",
3030     ]),
3031     includes = ["include"],
3032     deps = [
3033         ":AffineDialect",
3034         ":Analysis",
3035         ":ArithDialect",
3036         ":ArithUtils",
3037         ":DialectUtils",
3038         ":GPUCompilationAttrInterfacesIncGen",
3039         ":GPUDialect",
3040         ":IR",
3041         ":LLVMCommonConversion",
3042         ":LinalgDialect",
3043         ":MemRefDialect",
3044         ":NVGPUDialect",
3045         ":NVGPUToNVVM",
3046         ":NVGPUTransformOpsIncGen",
3047         ":NVGPUTransforms",
3048         ":NVVMDialect",
3049         ":SCFDialect",
3050         ":SCFTransforms",
3051         ":Support",
3052         ":TransformDialect",
3053         ":VectorDialect",
3054         "//llvm:Support",
3055     ],
3058 td_library(
3059     name = "NVGPUTransformOpsTdFiles",
3060     srcs = glob([
3061         "include/mlir/Dialect/NVGPU/TransformOps/*.td",
3062     ]),
3063     includes = ["include"],
3064     deps = [
3065         ":TransformDialectTdFiles",
3066     ],
3069 gentbl_cc_library(
3070     name = "NVGPUTransformOpsIncGen",
3071     tbl_outs = [
3072         (
3073             ["-gen-op-decls"],
3074             "include/mlir/Dialect/NVGPU/TransformOps/NVGPUTransformOps.h.inc",
3075         ),
3076         (
3077             ["-gen-op-defs"],
3078             "include/mlir/Dialect/NVGPU/TransformOps/NVGPUTransformOps.cpp.inc",
3079         ),
3080     ],
3081     tblgen = ":mlir-tblgen",
3082     td_file = "include/mlir/Dialect/NVGPU/TransformOps/NVGPUTransformOps.td",
3083     deps = [
3084         ":NVGPUTransformOpsTdFiles",
3085     ],
3088 cc_library(
3089     name = "NVGPUUtils",
3090     srcs = ["lib/Dialect/NVGPU/Utils/MMAUtils.cpp"],
3091     hdrs = ["include/mlir/Dialect/NVGPU/Utils/MMAUtils.h"],
3092     includes = ["include"],
3093     deps = [
3094         ":AffineDialect",
3095         ":ArithDialect",
3096         ":IR",
3097         ":NVGPUDialect",
3098         ":NVVMDialect",
3099         ":VectorDialect",
3100     ],
3103 cc_library(
3104     name = "NVGPUTransforms",
3105     srcs = glob([
3106         "lib/Dialect/NVGPU/Transforms/*.cpp",
3107     ]),
3108     hdrs = glob([
3109         "include/mlir/Dialect/NVGPU/Transforms/*.h",
3110     ]),
3111     includes = ["include"],
3112     deps = [
3113         ":AffineDialect",
3114         ":ArithDialect",
3115         ":FuncDialect",
3116         ":GPUDialect",
3117         ":IR",
3118         ":MemRefDialect",
3119         ":NVGPUDialect",
3120         ":NVGPUPassIncGen",
3121         ":Pass",
3122         ":SideEffectInterfaces",
3123         ":Support",
3124         ":Transforms",
3125         ":VectorDialect",
3126         "//llvm:Core",
3127         "//llvm:Support",
3128     ],
3131 td_library(
3132     name = "FuncTdFiles",
3133     srcs = [
3134         "include/mlir/Dialect/Func/IR/FuncOps.td",
3135     ],
3136     includes = ["include"],
3137     deps = [
3138         ":AttrTdFiles",
3139         ":CallInterfacesTdFiles",
3140         ":CastInterfacesTdFiles",
3141         ":ControlFlowInterfacesTdFiles",
3142         ":FunctionInterfacesTdFiles",
3143         ":InferTypeOpInterfaceTdFiles",
3144         ":OpBaseTdFiles",
3145         ":SideEffectInterfacesTdFiles",
3146         ":VectorInterfacesTdFiles",
3147     ],
3150 gentbl_cc_library(
3151     name = "FuncIncGen",
3152     tbl_outs = [
3153         (
3154             ["-gen-op-decls"],
3155             "include/mlir/Dialect/Func/IR/FuncOps.h.inc",
3156         ),
3157         (
3158             ["-gen-op-defs"],
3159             "include/mlir/Dialect/Func/IR/FuncOps.cpp.inc",
3160         ),
3161         (
3162             ["-gen-dialect-decls"],
3163             "include/mlir/Dialect/Func/IR/FuncOpsDialect.h.inc",
3164         ),
3165         (
3166             ["-gen-dialect-defs"],
3167             "include/mlir/Dialect/Func/IR/FuncOpsDialect.cpp.inc",
3168         ),
3169         (
3170             ["-gen-enum-decls"],
3171             "include/mlir/Dialect/Func/IR/FuncOpsEnums.h.inc",
3172         ),
3173         (
3174             ["-gen-enum-defs"],
3175             "include/mlir/Dialect/Func/IR/FuncOpsEnums.cpp.inc",
3176         ),
3177     ],
3178     tblgen = ":mlir-tblgen",
3179     td_file = "include/mlir/Dialect/Func/IR/FuncOps.td",
3180     deps = [":FuncTdFiles"],
3183 cc_library(
3184     name = "Dialect",
3185     srcs = glob([
3186         "lib/Dialect/*.cpp",
3187         "lib/Dialect/*.h",
3188     ]),
3189     hdrs = glob([
3190         "include/mlir/Dialect/*.h",
3191     ]),
3192     includes = ["include"],
3193     deps = [
3194         ":IR",
3195         "//llvm:Support",
3196     ],
3199 td_library(
3200     name = "DialectUtilsTdFiles",
3201     srcs = [
3202         "include/mlir/Dialect/Utils/StructuredOpsUtils.td",
3203     ],
3204     includes = ["include"],
3205     deps = [":OpBaseTdFiles"],
3208 gentbl_cc_library(
3209     name = "DialectUtilsIncGen",
3210     tbl_outs = [
3211         (
3212             ["-gen-enum-decls"],
3213             "include/mlir/Dialect/Utils/DialectUtilsEnums.h.inc",
3214         ),
3215         (
3216             ["-gen-enum-defs"],
3217             "include/mlir/Dialect/Utils/DialectUtilsEnums.cpp.inc",
3218         ),
3219     ],
3220     tblgen = ":mlir-tblgen",
3221     td_file = "include/mlir/Dialect/Utils/StructuredOpsUtils.td",
3222     deps = [":DialectUtilsTdFiles"],
3225 cc_library(
3226     name = "DialectUtils",
3227     srcs = glob([
3228         "lib/Dialect/Utils/*.cpp",
3229         "lib/Dialect/Utils/*.h",
3230     ]),
3231     hdrs = glob([
3232         "include/mlir/Dialect/Utils/*.h",
3233     ]),
3234     includes = ["include"],
3235     deps = [
3236         ":ArithUtils",
3237         ":DialectUtilsIncGen",
3238         ":IR",
3239         ":Support",
3240         "//llvm:Support",
3241     ],
3244 cc_library(
3245     name = "AffineDialect",
3246     srcs = glob([
3247         "lib/Dialect/Affine/IR/*.cpp",
3248         "lib/Dialect/Affine/IR/*.h",
3249     ]),
3250     hdrs = glob([
3251         "include/mlir/Dialect/Affine/IR/*.h",
3252     ]),
3253     includes = ["include"],
3254     deps = [
3255         ":AffineMemoryOpInterfacesIncGen",
3256         ":AffineOpsIncGen",
3257         ":ArithDialect",
3258         ":ControlFlowInterfaces",
3259         ":DialectUtils",
3260         ":IR",
3261         ":LoopLikeInterface",
3262         ":MemRefDialect",
3263         ":ShapedOpInterfaces",
3264         ":SideEffectInterfaces",
3265         ":Support",
3266         ":ValueBoundsOpInterface",
3267         "//llvm:Support",
3268     ],
3271 cc_library(
3272     name = "EmitCDialect",
3273     srcs = glob([
3274         "lib/Dialect/EmitC/IR/*.cpp",
3275     ]),
3276     hdrs = glob([
3277         "include/mlir/Dialect/EmitC/IR/*.h",
3278     ]),
3279     includes = ["include"],
3280     deps = [
3281         ":CastInterfaces",
3282         ":EmitCAttributesIncGen",
3283         ":EmitCOpsIncGen",
3284         ":IR",
3285         ":SideEffectInterfaces",
3286         "//llvm:Support",
3287     ],
3290 cc_library(
3291     name = "AsyncDialect",
3292     srcs = glob([
3293         "lib/Dialect/Async/IR/*.cpp",
3294     ]),
3295     hdrs = glob([
3296         "include/mlir/Dialect/Async/IR/*.h",
3297     ]),
3298     includes = ["include"],
3299     deps = [
3300         ":AsyncOpsIncGen",
3301         ":ControlFlowInterfaces",
3302         ":FunctionInterfaces",
3303         ":IR",
3304         ":InferTypeOpInterface",
3305         ":SideEffectInterfaces",
3306         "//llvm:Support",
3307     ],
3310 cc_library(
3311     name = "AsyncTransforms",
3312     srcs = glob([
3313         "lib/Dialect/Async/Transforms/*.cpp",
3314         "lib/Dialect/Async/Transforms/*.h",
3315     ]),
3316     hdrs = [
3317         "include/mlir/Dialect/Async/Passes.h",
3318         "include/mlir/Dialect/Async/Transforms.h",
3319     ],
3320     includes = ["include"],
3321     deps = [
3322         ":Analysis",
3323         ":ArithDialect",
3324         ":AsyncDialect",
3325         ":AsyncPassIncGen",
3326         ":ControlFlowDialect",
3327         ":FuncDialect",
3328         ":IR",
3329         ":Pass",
3330         ":SCFDialect",
3331         ":SCFToControlFlow",
3332         ":Support",
3333         ":TransformUtils",
3334         ":Transforms",
3335         ":TransformsPassIncGen",
3336         "//llvm:Core",
3337         "//llvm:Support",
3338     ],
3341 cc_library(
3342     name = "AffineAnalysis",
3343     srcs = glob([
3344         "lib/Dialect/Affine/Analysis/*.cpp",
3345         "lib/Dialect/Affine/Analysis/*.h",
3346     ]),
3347     hdrs = glob(["include/mlir/Dialect/Affine/Analysis/*.h"]),
3348     includes = ["include"],
3349     deps = [
3350         ":AffineDialect",
3351         ":Analysis",
3352         ":ArithDialect",
3353         ":DialectUtils",
3354         ":FuncDialect",
3355         ":IR",
3356         ":SideEffectInterfaces",
3357         ":Support",
3358         ":ViewLikeInterface",
3359         "//llvm:Support",
3360     ],
3363 cc_library(
3364     name = "AffineUtils",
3365     srcs = glob(
3366         [
3367             "lib/Dialect/Affine/Utils/*.cpp",
3368             "lib/Dialect/Affine/Utils/*.h",
3369         ],
3370     ),
3371     hdrs = [
3372         "include/mlir/Dialect/Affine/LoopFusionUtils.h",
3373         "include/mlir/Dialect/Affine/LoopUtils.h",
3374         "include/mlir/Dialect/Affine/Utils.h",
3375         "include/mlir/Dialect/Affine/ViewLikeInterfaceUtils.h",
3376     ],
3377     includes = ["include"],
3378     deps = [
3379         ":AffineAnalysis",
3380         ":AffineDialect",
3381         ":Analysis",
3382         ":ArithUtils",
3383         ":DialectUtils",
3384         ":FuncDialect",
3385         ":IR",
3386         ":MemRefDialect",
3387         ":SCFDialect",
3388         ":Support",
3389         ":TransformUtils",
3390         ":ViewLikeInterface",
3391         "//llvm:Support",
3392     ],
3395 gentbl_cc_library(
3396     name = "AffinePassIncGen",
3397     tbl_outs = [
3398         (
3399             [
3400                 "-gen-pass-decls",
3401                 "-name=Affine",
3402             ],
3403             "include/mlir/Dialect/Affine/Passes.h.inc",
3404         ),
3405     ],
3406     tblgen = ":mlir-tblgen",
3407     td_file = "include/mlir/Dialect/Affine/Passes.td",
3408     deps = [":PassBaseTdFiles"],
3411 cc_library(
3412     name = "AffineTransforms",
3413     srcs = glob([
3414         "lib/Dialect/Affine/Transforms/*.cpp",
3415         "lib/Dialect/Affine/Transforms/*.h",
3416     ]),
3417     hdrs = [
3418         "include/mlir/Dialect/Affine/Passes.h",
3419         "include/mlir/Dialect/Affine/Transforms/Transforms.h",
3420     ],
3421     includes = ["include"],
3422     deps = [
3423         ":AffineAnalysis",
3424         ":AffineDialect",
3425         ":AffinePassIncGen",
3426         ":AffineUtils",
3427         ":Analysis",
3428         ":ArithDialect",
3429         ":ArithUtils",
3430         ":FuncDialect",
3431         ":IR",
3432         ":MemRefDialect",
3433         ":Pass",
3434         ":SCFDialect",
3435         ":SCFUtils",
3436         ":Support",
3437         ":TensorDialect",
3438         ":Transforms",
3439         ":ValueBoundsOpInterface",
3440         ":VectorDialect",
3441         ":VectorUtils",
3442         "//llvm:Support",
3443     ],
3446 gentbl_cc_library(
3447     name = "ConversionPassIncGen",
3448     tbl_outs = [
3449         (
3450             [
3451                 "-gen-pass-decls",
3452                 "-name=Conversion",
3453             ],
3454             "include/mlir/Conversion/Passes.h.inc",
3455         ),
3456         (
3457             [
3458                 "-gen-pass-capi-header",
3459                 "--prefix=Conversion",
3460             ],
3461             "include/mlir/Conversion/Passes.capi.h.inc",
3462         ),
3463         (
3464             [
3465                 "-gen-pass-capi-impl",
3466                 "--prefix=Conversion",
3467             ],
3468             "include/mlir/Conversion/Passes.capi.cpp.inc",
3469         ),
3470     ],
3471     tblgen = ":mlir-tblgen",
3472     td_file = "include/mlir/Conversion/Passes.td",
3473     deps = [":PassBaseTdFiles"],
3476 cc_library(
3477     name = "ConversionPasses",
3478     hdrs = ["include/mlir/Conversion/Passes.h"],
3479     includes = ["include"],
3480     deps = [
3481         ":AMDGPUToROCDL",
3482         ":AffineToStandard",
3483         ":ArithToLLVM",
3484         ":ArithToSPIRV",
3485         ":ArmNeon2dToIntr",
3486         ":ArmSMEToSCF",
3487         ":AsyncToLLVM",
3488         ":BufferizationToMemRef",
3489         ":ComplexToLLVM",
3490         ":ComplexToLibm",
3491         ":ComplexToSPIRV",
3492         ":ComplexToStandard",
3493         ":ControlFlowToLLVM",
3494         ":ControlFlowToSCF",
3495         ":ControlFlowToSPIRV",
3496         ":ConversionPassIncGen",
3497         ":ConvertToLLVM",
3498         ":FuncToLLVM",
3499         ":FuncToSPIRV",
3500         ":GPUToGPURuntimeTransforms",
3501         ":GPUToNVVMTransforms",
3502         ":GPUToROCDLTransforms",
3503         ":GPUToSPIRV",
3504         ":GPUToVulkanTransforms",
3505         ":IndexToLLVM",
3506         ":LinalgToStandard",
3507         ":MathToFuncs",
3508         ":MathToLLVM",
3509         ":MathToLibm",
3510         ":MathToSPIRV",
3511         ":MemRefToLLVM",
3512         ":MemRefToSPIRV",
3513         ":NVGPUToNVVM",
3514         ":NVVMToLLVM",
3515         ":OpenACCToLLVM",
3516         ":OpenACCToSCF",
3517         ":OpenMPToLLVM",
3518         ":PDLToPDLInterp",
3519         ":ReconcileUnrealizedCasts",
3520         ":SCFToControlFlow",
3521         ":SCFToGPU",
3522         ":SCFToOpenMP",
3523         ":SCFToSPIRV",
3524         ":SPIRVToLLVM",
3525         ":ShapeToStandard",
3526         ":TensorToLinalg",
3527         ":TensorToSPIRV",
3528         ":TosaToArith",
3529         ":TosaToLinalg",
3530         ":TosaToSCF",
3531         ":TosaToTensor",
3532         ":UBToLLVM",
3533         ":UBToSPIRV",
3534         ":VectorToArmSME",
3535         ":VectorToGPU",
3536         ":VectorToLLVM",
3537         ":VectorToSCF",
3538         ":VectorToSPIRV",
3539     ],
3542 cc_library(
3543     name = "AsyncToLLVM",
3544     srcs = glob([
3545         "lib/Conversion/AsyncToLLVM/*.cpp",
3546         "lib/Conversion/AsyncToLLVM/*.h",
3547     ]),
3548     hdrs = glob(["include/mlir/Conversion/AsyncToLLVM/*.h"]),
3549     includes = ["include"],
3550     deps = [
3551         ":ArithDialect",
3552         ":AsyncDialect",
3553         ":ConversionPassIncGen",
3554         ":ConvertToLLVM",
3555         ":FuncDialect",
3556         ":FuncToLLVM",
3557         ":FuncTransforms",
3558         ":IR",
3559         ":LLVMCommonConversion",
3560         ":LLVMDialect",
3561         ":Pass",
3562         ":Support",
3563         ":Transforms",
3564         "//llvm:Support",
3565     ],
3568 cc_library(
3569     name = "AffineToStandard",
3570     srcs = glob([
3571         "lib/Conversion/AffineToStandard/*.cpp",
3572         "lib/Conversion/AffineToStandard/*.h",
3573     ]),
3574     hdrs = glob(["include/mlir/Conversion/AffineToStandard/*.h"]),
3575     includes = ["include"],
3576     deps = [
3577         ":AffineDialect",
3578         ":AffineUtils",
3579         ":ArithDialect",
3580         ":ConversionPassIncGen",
3581         ":FuncDialect",
3582         ":IR",
3583         ":MemRefDialect",
3584         ":Pass",
3585         ":SCFDialect",
3586         ":Support",
3587         ":Transforms",
3588         ":VectorDialect",
3589     ],
3592 # SDBM dialect only contains attribute components that can be constructed given
3593 # a dialect object, so whenever it is used it must also be registered. Therefore
3594 # we don't split out the registration library for it.
3595 cc_library(
3596     name = "SDBM",
3597     srcs = glob([
3598         "lib/Dialect/SDBM/*.cpp",
3599         "lib/Dialect/SDBM/*.h",
3600     ]),
3601     hdrs = glob([
3602         "include/mlir/Dialect/SDBM/*.h",
3603     ]),
3604     includes = ["include"],
3605     deps = [
3606         ":IR",
3607         ":Support",
3608         "//llvm:Support",
3609     ],
3612 cc_library(
3613     name = "SCFDialect",
3614     srcs = glob(
3615         [
3616             "lib/Dialect/SCF/IR/*.cpp",
3617             "lib/Dialect/SCF/IR/*.h",
3618         ],
3619     ),
3620     hdrs = glob(
3621         [
3622             "include/mlir/Dialect/SCF/IR/*.h",
3623         ],
3624     ),
3625     includes = ["include"],
3626     deps = [
3627         ":ArithDialect",
3628         ":ArithUtils",
3629         ":BufferizationDialect",
3630         ":ControlFlowDialect",
3631         ":ControlFlowInterfaces",
3632         ":FuncDialect",
3633         ":FunctionInterfaces",
3634         ":IR",
3635         ":InferTypeOpInterface",
3636         ":LoopLikeInterface",
3637         ":MemRefDialect",
3638         ":ParallelCombiningOpInterface",
3639         ":Pass",
3640         ":SCFDeviceMappingInterfacesIncGen",
3641         ":SCFIncGen",
3642         ":SCFPassIncGen",
3643         ":Support",
3644         ":TensorDialect",
3645         ":ValueBoundsOpInterface",
3646         ":ViewLikeInterface",
3647         "//llvm:Support",
3648     ],
3651 cc_library(
3652     name = "SCFUtils",
3653     srcs = glob(
3654         [
3655             "lib/Dialect/SCF/Utils/*.cpp",
3656         ],
3657     ),
3658     hdrs = glob(
3659         [
3660             "include/mlir/Dialect/SCF/Utils/*.h",
3661         ],
3662     ),
3663     includes = ["include"],
3664     deps = [
3665         ":AffineAnalysis",
3666         ":AffineDialect",
3667         ":Analysis",
3668         ":ArithDialect",
3669         ":DialectUtils",
3670         ":FuncDialect",
3671         ":IR",
3672         ":SCFDialect",
3673         ":SideEffectInterfaces",
3674         ":Support",
3675         ":Transforms",
3676         "//llvm:Support",
3677     ],
3680 cc_library(
3681     name = "InferIntRangeCommon",
3682     srcs = [
3683         "lib/Interfaces/Utils/InferIntRangeCommon.cpp",
3684     ],
3685     hdrs = ["include/mlir/Interfaces/Utils/InferIntRangeCommon.h"],
3686     includes = ["include"],
3687     deps = [
3688         ":IR",
3689         ":InferIntRangeInterface",
3690         "//llvm:Support",
3691     ],
3694 cc_library(
3695     name = "DataLayoutInterfaces",
3696     srcs = ["lib/Interfaces/DataLayoutInterfaces.cpp"],
3697     hdrs = ["include/mlir/Interfaces/DataLayoutInterfaces.h"],
3698     includes = ["include"],
3699     deps = [
3700         ":DataLayoutInterfacesIncGen",
3701         ":IR",
3702         "//llvm:Support",
3703     ],
3706 cc_library(
3707     name = "LoopLikeInterface",
3708     srcs = ["lib/Interfaces/LoopLikeInterface.cpp"],
3709     hdrs = ["include/mlir/Interfaces/LoopLikeInterface.h"],
3710     includes = ["include"],
3711     deps = [
3712         ":FunctionInterfaces",
3713         ":IR",
3714         ":LoopLikeInterfaceIncGen",
3715         "//llvm:Support",
3716     ],
3719 cc_library(
3720     name = "MemorySlotInterfaces",
3721     srcs = ["lib/Interfaces/MemorySlotInterfaces.cpp"],
3722     hdrs = ["include/mlir/Interfaces/MemorySlotInterfaces.h"],
3723     includes = ["include"],
3724     deps = [
3725         ":IR",
3726         ":MemorySlotInterfacesIncGen",
3727         "//llvm:Support",
3728     ],
3731 cc_library(
3732     name = "ShapedOpInterfaces",
3733     srcs = ["lib/Interfaces/ShapedOpInterfaces.cpp"],
3734     hdrs = ["include/mlir/Interfaces/ShapedOpInterfaces.h"],
3735     includes = ["include"],
3736     deps = [
3737         ":IR",
3738         ":ShapedOpInterfacesIncGen",
3739         "//llvm:Support",
3740     ],
3743 cc_library(
3744     name = "ParallelCombiningOpInterface",
3745     srcs = ["lib/Interfaces/ParallelCombiningOpInterface.cpp"],
3746     hdrs = ["include/mlir/Interfaces/ParallelCombiningOpInterface.h"],
3747     includes = ["include"],
3748     deps = [
3749         ":IR",
3750         ":ParallelCombiningOpInterfaceIncGen",
3751         "//llvm:Support",
3752     ],
3755 cc_library(
3756     name = "RuntimeVerifiableOpInterface",
3757     srcs = ["lib/Interfaces/RuntimeVerifiableOpInterface.cpp"],
3758     hdrs = ["include/mlir/Interfaces/RuntimeVerifiableOpInterface.h"],
3759     includes = ["include"],
3760     deps = [
3761         ":IR",
3762         ":RuntimeVerifiableOpInterfaceIncGen",
3763         "//llvm:Support",
3764     ],
3767 cc_library(
3768     name = "VectorInterfaces",
3769     srcs = ["lib/Interfaces/VectorInterfaces.cpp"],
3770     hdrs = ["include/mlir/Interfaces/VectorInterfaces.h"],
3771     includes = ["include"],
3772     deps = [
3773         ":IR",
3774         ":VectorInterfacesIncGen",
3775     ],
3778 cc_library(
3779     name = "ViewLikeInterface",
3780     srcs = ["lib/Interfaces/ViewLikeInterface.cpp"],
3781     hdrs = ["include/mlir/Interfaces/ViewLikeInterface.h"],
3782     includes = ["include"],
3783     deps = [
3784         ":DialectUtils",
3785         ":IR",
3786         ":ViewLikeInterfaceIncGen",
3787     ],
3790 cc_library(
3791     name = "CopyOpInterface",
3792     srcs = ["lib/Interfaces/CopyOpInterface.cpp"],
3793     hdrs = ["include/mlir/Interfaces/CopyOpInterface.h"],
3794     includes = ["include"],
3795     deps = [
3796         ":CopyOpInterfaceIncGen",
3797         ":IR",
3798     ],
3801 td_library(
3802     name = "ShapeOpsTdFiles",
3803     srcs = [
3804         "include/mlir/Dialect/Shape/IR/ShapeBase.td",
3805         "include/mlir/Dialect/Shape/IR/ShapeOps.td",
3806     ],
3807     includes = ["include"],
3808     deps = [
3809         ":CallInterfacesTdFiles",
3810         ":CastInterfacesTdFiles",
3811         ":ControlFlowInterfacesTdFiles",
3812         ":FunctionInterfacesTdFiles",
3813         ":InferTypeOpInterfaceTdFiles",
3814         ":SideEffectInterfacesTdFiles",
3815     ],
3818 gentbl_cc_library(
3819     name = "ShapeOpsIncGen",
3820     tbl_outs = [
3821         (
3822             ["-gen-op-decls"],
3823             "include/mlir/Dialect/Shape/IR/ShapeOps.h.inc",
3824         ),
3825         (
3826             ["-gen-op-defs"],
3827             "include/mlir/Dialect/Shape/IR/ShapeOps.cpp.inc",
3828         ),
3829         (
3830             ["-gen-dialect-decls"],
3831             "include/mlir/Dialect/Shape/IR/ShapeOpsDialect.h.inc",
3832         ),
3833         (
3834             ["-gen-dialect-defs"],
3835             "include/mlir/Dialect/Shape/IR/ShapeOpsDialect.cpp.inc",
3836         ),
3837         (
3838             ["-gen-typedef-decls"],
3839             "include/mlir/Dialect/Shape/IR/ShapeOpsTypes.h.inc",
3840         ),
3841         (
3842             ["-gen-typedef-defs"],
3843             "include/mlir/Dialect/Shape/IR/ShapeOpsTypes.cpp.inc",
3844         ),
3845     ],
3846     tblgen = ":mlir-tblgen",
3847     td_file = "include/mlir/Dialect/Shape/IR/ShapeOps.td",
3848     deps = [":ShapeOpsTdFiles"],
3851 gentbl_cc_library(
3852     name = "MLIRShapeCanonicalizationIncGen",
3853     strip_include_prefix = "include/mlir/Dialect/Shape/IR",
3854     tbl_outs = [
3855         (
3856             ["-gen-rewriters"],
3857             "include/mlir/Dialect/Shape/IR/ShapeCanonicalization.inc",
3858         ),
3859     ],
3860     tblgen = ":mlir-tblgen",
3861     td_file = "lib/Dialect/Shape/IR/ShapeCanonicalization.td",
3862     deps = [
3863         ":FuncTdFiles",
3864         ":ShapeOpsTdFiles",
3865         ":TensorOpsTdFiles",
3866     ],
3869 cc_library(
3870     name = "ShapeDialect",
3871     srcs = glob(["lib/Dialect/Shape/IR/*.cpp"]),
3872     hdrs = ["include/mlir/Dialect/Shape/IR/Shape.h"],
3873     includes = ["include"],
3874     deps = [
3875         ":ArithDialect",
3876         ":CastInterfaces",
3877         ":ControlFlowInterfaces",
3878         ":Dialect",
3879         ":FuncDialect",
3880         ":FunctionInterfaces",
3881         ":IR",
3882         ":InferTypeOpInterface",
3883         ":MLIRShapeCanonicalizationIncGen",
3884         ":ShapeOpsIncGen",
3885         ":SideEffectInterfaces",
3886         ":TensorDialect",
3887         ":UBDialect",
3888         "//llvm:Support",
3889     ],
3892 gentbl_cc_library(
3893     name = "ShapeToStandardGen",
3894     strip_include_prefix = "lib/Conversion/ShapeToStandard",
3895     tbl_outs = [
3896         (
3897             ["-gen-rewriters"],
3898             "lib/Conversion/ShapeToStandard/ShapeToStandard.cpp.inc",
3899         ),
3900     ],
3901     tblgen = ":mlir-tblgen",
3902     td_file = "lib/Conversion/ShapeToStandard/ShapeToStandard.td",
3903     deps = [":ShapeOpsTdFiles"],
3906 cc_library(
3907     name = "ShapeToStandard",
3908     srcs = glob([
3909         "lib/Conversion/ShapeToStandard/*.cpp",
3910         "lib/Conversion/ShapeToStandard/*.h",
3911     ]),
3912     hdrs = ["include/mlir/Conversion/ShapeToStandard/ShapeToStandard.h"],
3913     includes = ["include"],
3914     deps = [
3915         ":ArithDialect",
3916         ":ControlFlowDialect",
3917         ":ConversionPassIncGen",
3918         ":FuncDialect",
3919         ":IR",
3920         ":MemRefDialect",
3921         ":Pass",
3922         ":SCFDialect",
3923         ":ShapeDialect",
3924         ":ShapeToStandardGen",
3925         ":Support",
3926         ":TensorDialect",
3927         ":Transforms",
3928         "//llvm:Support",
3929     ],
3932 gentbl_cc_library(
3933     name = "ShapeTransformsPassIncGen",
3934     tbl_outs = [(
3935         [
3936             "-gen-pass-decls",
3937             "-name=Shape",
3938         ],
3939         "include/mlir/Dialect/Shape/Transforms/Passes.h.inc",
3940     )],
3941     tblgen = ":mlir-tblgen",
3942     td_file = "include/mlir/Dialect/Shape/Transforms/Passes.td",
3943     deps = [":PassBaseTdFiles"],
3946 cc_library(
3947     name = "ShapeTransforms",
3948     srcs = glob([
3949         "lib/Dialect/Shape/Transforms/*.cpp",
3950         "lib/Dialect/Shape/Transforms/*.h",
3951     ]),
3952     hdrs = [
3953         "include/mlir/Dialect/Shape/Analysis/ShapeMappingAnalysis.h",
3954         "include/mlir/Dialect/Shape/Transforms/BufferizableOpInterfaceImpl.h",
3955         "include/mlir/Dialect/Shape/Transforms/Passes.h",
3956     ],
3957     includes = ["include"],
3958     deps = [
3959         ":ArithDialect",
3960         ":BufferizationDialect",
3961         ":BufferizationTransforms",
3962         ":FuncDialect",
3963         ":IR",
3964         ":MemRefDialect",
3965         ":Pass",
3966         ":ShapeDialect",
3967         ":ShapeTransformsPassIncGen",
3968         ":TensorDialect",
3969         ":Transforms",
3970         "//llvm:Support",
3971     ],
3974 td_library(
3975     name = "ControlFlowOpsTdFiles",
3976     srcs = [
3977         "include/mlir/Dialect/ControlFlow/IR/ControlFlowOps.td",
3978     ],
3979     includes = ["include"],
3980     deps = [
3981         ":AttrTdFiles",
3982         ":CallInterfacesTdFiles",
3983         ":CastInterfacesTdFiles",
3984         ":ControlFlowInterfacesTdFiles",
3985         ":InferTypeOpInterfaceTdFiles",
3986         ":OpBaseTdFiles",
3987         ":SideEffectInterfacesTdFiles",
3988     ],
3991 gentbl_cc_library(
3992     name = "ControlFlowOpsIncGen",
3993     tbl_outs = [
3994         (
3995             ["-gen-op-decls"],
3996             "include/mlir/Dialect/ControlFlow/IR/ControlFlowOps.h.inc",
3997         ),
3998         (
3999             ["-gen-op-defs"],
4000             "include/mlir/Dialect/ControlFlow/IR/ControlFlowOps.cpp.inc",
4001         ),
4002         (
4003             ["-gen-dialect-decls"],
4004             "include/mlir/Dialect/ControlFlow/IR/ControlFlowOpsDialect.h.inc",
4005         ),
4006         (
4007             ["-gen-dialect-defs"],
4008             "include/mlir/Dialect/ControlFlow/IR/ControlFlowOpsDialect.cpp.inc",
4009         ),
4010         (
4011             ["-gen-enum-decls"],
4012             "include/mlir/Dialect/ControlFlow/IR/ControlFlowOpsEnums.h.inc",
4013         ),
4014         (
4015             ["-gen-enum-defs"],
4016             "include/mlir/Dialect/ControlFlow/IR/ControlFlowOpsEnums.cpp.inc",
4017         ),
4018     ],
4019     tblgen = ":mlir-tblgen",
4020     td_file = "include/mlir/Dialect/ControlFlow/IR/ControlFlowOps.td",
4021     deps = [
4022         ":AttrTdFiles",
4023         ":ControlFlowOpsTdFiles",
4024     ],
4027 cc_library(
4028     name = "ControlFlowDialect",
4029     srcs = glob(
4030         [
4031             "lib/Dialect/ControlFlow/IR/*.cpp",
4032             "lib/Dialect/ControlFlow/IR/*.h",
4033         ],
4034     ),
4035     hdrs = glob([
4036         "include/mlir/Dialect/ControlFlow/IR/*.h",
4037     ]),
4038     includes = ["include"],
4039     deps = [
4040         ":ArithDialect",
4041         ":CommonFolders",
4042         ":ControlFlowInterfaces",
4043         ":ControlFlowOpsIncGen",
4044         ":IR",
4045         ":SideEffectInterfaces",
4046         ":Support",
4047         "//llvm:Support",
4048     ],
4051 cc_library(
4052     name = "ControlFlowTransforms",
4053     srcs = glob([
4054         "lib/Dialect/ControlFlow/Transforms/*.cpp",
4055     ]),
4056     hdrs = glob([
4057         "include/mlir/Dialect/ControlFlow/Transforms/*.h",
4058     ]),
4059     includes = ["include"],
4060     deps = [
4061         ":BufferizationDialect",
4062         ":BufferizationTransforms",
4063         ":ControlFlowDialect",
4064         ":IR",
4065         ":MemRefDialect",
4066     ],
4069 cc_library(
4070     name = "FuncDialect",
4071     srcs = glob(
4072         [
4073             "lib/Dialect/Func/IR/*.cpp",
4074             "lib/Dialect/Func/IR/*.h",
4075             "lib/Dialect/Func/Utils/*.cpp",
4076         ],
4077     ),
4078     hdrs = glob([
4079         "include/mlir/Dialect/Func/IR/*.h",
4080         "include/mlir/Dialect/Func/Utils/*.h",
4081     ]) + ["include/mlir/Transforms/InliningUtils.h"],
4082     includes = ["include"],
4083     deps = [
4084         ":ArithDialect",
4085         ":CallOpInterfaces",
4086         ":CastInterfaces",
4087         ":CommonFolders",
4088         ":ControlFlowDialect",
4089         ":ControlFlowInterfaces",
4090         ":FuncIncGen",
4091         ":FunctionInterfaces",
4092         ":IR",
4093         ":InferTypeOpInterface",
4094         ":SideEffectInterfaces",
4095         ":Support",
4096         "//llvm:Support",
4097     ],
4100 cc_library(
4101     name = "FuncExtensions",
4102     srcs = glob(["lib/Dialect/Func/Extensions/*.cpp"]),
4103     hdrs = glob(["include/mlir/Dialect/Func/Extensions/*.h"]),
4104     includes = ["include"],
4105     deps = [
4106         ":ControlFlowDialect",
4107         ":FuncDialect",
4108         ":IR",
4109         ":InferTypeOpInterface",
4110     ],
4113 td_library(
4114     name = "FuncTransformOpsTdFiles",
4115     srcs = [
4116         "include/mlir/Dialect/Func/TransformOps/FuncTransformOps.td",
4117     ],
4118     includes = ["include"],
4119     deps = [
4120         ":TransformDialectTdFiles",
4121     ],
4124 gentbl_cc_library(
4125     name = "FuncTransformOpsIncGen",
4126     strip_include_prefix = "include",
4127     tbl_outs = [
4128         (
4129             ["-gen-op-decls"],
4130             "include/mlir/Dialect/Func/TransformOps/FuncTransformOps.h.inc",
4131         ),
4132         (
4133             ["-gen-op-defs"],
4134             "include/mlir/Dialect/Func/TransformOps/FuncTransformOps.cpp.inc",
4135         ),
4136     ],
4137     tblgen = ":mlir-tblgen",
4138     td_file = "include/mlir/Dialect/Func/TransformOps/FuncTransformOps.td",
4139     deps = [
4140         ":FuncTransformOpsTdFiles",
4141     ],
4144 cc_library(
4145     name = "FuncTransformOps",
4146     srcs = [
4147         "lib/Dialect/Func/TransformOps/FuncTransformOps.cpp",
4148     ],
4149     hdrs = [
4150         "include/mlir/Dialect/Func/TransformOps/FuncTransformOps.h",
4151     ],
4152     includes = ["include"],
4153     deps = [
4154         ":FuncDialect",
4155         ":FuncToLLVM",
4156         ":FuncTransformOpsIncGen",
4157         ":IR",
4158         ":LLVMCommonConversion",
4159         ":LLVMDialect",
4160         ":TransformDialect",
4161     ],
4164 cc_library(
4165     name = "AllExtensions",
4166     hdrs = ["include/mlir/InitAllExtensions.h"],
4167     deps = [
4168         ":AffineTransformOps",
4169         ":ArithToLLVM",
4170         ":BufferizationTransformOps",
4171         ":BuiltinToLLVMIRTranslation",
4172         ":ComplexToLLVM",
4173         ":ControlFlowToLLVM",
4174         ":FuncExtensions",
4175         ":FuncToLLVM",
4176         ":FuncTransformOps",
4177         ":GPUToLLVMIRTranslation",
4178         ":GPUTransformOps",
4179         ":IndexToLLVM",
4180         ":LLVMToLLVMIRTranslation",
4181         ":LinalgTransformOps",
4182         ":MathToLLVM",
4183         ":MemRefToLLVM",
4184         ":MemRefTransformOps",
4185         ":NVGPUTransformOps",
4186         ":NVVMTarget",
4187         ":NVVMToLLVM",
4188         ":ROCDLTarget",
4189         ":ROCDLToLLVMIRTranslation",
4190         ":SCFTransformOps",
4191         ":SparseTensorTransformOps",
4192         ":TensorTransformOps",
4193         ":TransformPDLExtension",
4194         ":UBToLLVM",
4195         ":VectorTransformOps",
4196     ],
4199 # TODO(zinenko): remove this after updating users.
4201 gentbl_cc_library(
4202     name = "FuncTransformsPassIncGen",
4203     tbl_outs = [(
4204         [
4205             "-gen-pass-decls",
4206             "-name=Func",
4207         ],
4208         "include/mlir/Dialect/Func/Transforms/Passes.h.inc",
4209     )],
4210     tblgen = ":mlir-tblgen",
4211     td_file = "include/mlir/Dialect/Func/Transforms/Passes.td",
4212     deps = [":PassBaseTdFiles"],
4215 cc_library(
4216     name = "FuncTransforms",
4217     srcs = glob([
4218         "lib/Dialect/Func/Transforms/*.cpp",
4219         "lib/Dialect/Func/Transforms/*.h",
4220     ]),
4221     hdrs = glob(["include/mlir/Dialect/Func/Transforms/*.h"]),
4222     includes = ["include"],
4223     deps = [
4224         ":BufferizationDialect",
4225         ":BufferizationTransforms",
4226         ":FuncDialect",
4227         ":FuncTransformsPassIncGen",
4228         ":IR",
4229         ":MemRefDialect",
4230         ":Pass",
4231         ":SCFDialect",
4232         ":Support",
4233         ":Transforms",
4234         "//llvm:Support",
4235     ],
4238 cc_library(
4239     name = "VectorDialect",
4240     srcs = glob(
4241         [
4242             "lib/Dialect/Vector/IR/*.cpp",
4243         ],
4244     ),
4245     hdrs = glob([
4246         "include/mlir/Dialect/Vector/IR/*.h",
4247     ]),
4248     includes = ["include"],
4249     deps = [
4250         ":ArithDialect",
4251         ":ArithUtils",
4252         ":ControlFlowInterfaces",
4253         ":DataLayoutInterfaces",
4254         ":DestinationStyleOpInterface",
4255         ":DialectUtils",
4256         ":IR",
4257         ":InferTypeOpInterface",
4258         ":MaskableOpInterface",
4259         ":MaskingOpInterface",
4260         ":MemRefDialect",
4261         ":SideEffectInterfaces",
4262         ":Support",
4263         ":TensorDialect",
4264         ":VectorInterfaces",
4265         ":VectorOpsIncGen",
4266         ":ViewLikeInterface",
4267         "//llvm:Support",
4268     ],
4271 cc_library(
4272     name = "VectorTransformOps",
4273     srcs = [
4274         "lib/Dialect/Vector/TransformOps/VectorTransformOps.cpp",
4275     ],
4276     hdrs = [
4277         "include/mlir/Dialect/Vector/TransformOps/VectorTransformOps.h",
4278     ],
4279     includes = ["include"],
4280     deps = [
4281         ":AffineDialect",
4282         ":ArithDialect",
4283         ":AsmParser",
4284         ":IR",
4285         ":LLVMCommonConversion",
4286         ":LLVMDialect",
4287         ":SideEffectInterfaces",
4288         ":TransformDialect",
4289         ":TransformUtils",
4290         ":VectorDialect",
4291         ":VectorEnumsIncGen",
4292         ":VectorToLLVM",
4293         ":VectorToSCF",
4294         ":VectorTransformOpsIncGen",
4295         ":VectorTransforms",
4296         ":X86VectorTransforms",
4297         "//llvm:Support",
4298     ],
4301 td_library(
4302     name = "VectorTransformsTdFiles",
4303     srcs = ["include/mlir/Dialect/Vector/Transforms/VectorTransformsBase.td"],
4304     includes = ["include"],
4305     deps = [":OpBaseTdFiles"],
4308 gentbl_cc_library(
4309     name = "VectorEnumsIncGen",
4310     tbl_outs = [
4311         (
4312             ["-gen-enum-decls"],
4313             "include/mlir/Dialect/Vector/Transforms/VectorTransformsEnums.h.inc",
4314         ),
4315         (
4316             ["-gen-enum-defs"],
4317             "include/mlir/Dialect/Vector/Transforms/VectorTransformsEnums.cpp.inc",
4318         ),
4319     ],
4320     tblgen = ":mlir-tblgen",
4321     td_file = "include/mlir/Dialect/Vector/Transforms/VectorTransformsBase.td",
4322     deps = [
4323         ":OpBaseTdFiles",
4324     ],
4327 gentbl_cc_library(
4328     name = "VectorPassIncGen",
4329     tbl_outs = [
4330         (
4331             [
4332                 "-gen-pass-decls",
4333                 "-name=Vector",
4334             ],
4335             "include/mlir/Dialect/Vector/Transforms/Passes.h.inc",
4336         ),
4337     ],
4338     tblgen = ":mlir-tblgen",
4339     td_file = "include/mlir/Dialect/Vector/Transforms/Passes.td",
4340     deps = [":PassBaseTdFiles"],
4343 cc_library(
4344     name = "VectorTransforms",
4345     srcs = glob(
4346         [
4347             "lib/Dialect/Vector/Transforms/*.cpp",
4348             "lib/Dialect/Vector/Transforms/*.h",
4349         ],
4350     ),
4351     hdrs = glob([
4352         "include/mlir/Dialect/Vector/Transforms/*.h",
4353     ]),
4354     includes = ["include"],
4355     deps = [
4356         ":AffineDialect",
4357         ":ArithDialect",
4358         ":ArithTransforms",
4359         ":ArithUtils",
4360         ":BufferizationDialect",
4361         ":BufferizationTransforms",
4362         ":DialectUtils",
4363         ":FuncDialect",
4364         ":IR",
4365         ":LinalgDialect",
4366         ":MemRefDialect",
4367         ":MemRefUtils",
4368         ":Pass",
4369         ":SCFDialect",
4370         ":SideEffectInterfaces",
4371         ":Support",
4372         ":TensorDialect",
4373         ":Transforms",
4374         ":VectorDialect",
4375         ":VectorEnumsIncGen",
4376         ":VectorInterfaces",
4377         ":VectorPassIncGen",
4378         ":VectorUtils",
4379         "//llvm:Support",
4380     ],
4383 cc_library(
4384     name = "VectorUtils",
4385     srcs = glob(
4386         [
4387             "lib/Dialect/Vector/Utils/*.cpp",
4388         ],
4389     ),
4390     hdrs = glob([
4391         "include/mlir/Dialect/Vector/Utils/*.h",
4392     ]),
4393     includes = ["include"],
4394     deps = [
4395         ":AffineAnalysis",
4396         ":AffineDialect",
4397         ":ArithDialect",
4398         ":DialectUtils",
4399         ":FuncDialect",
4400         ":IR",
4401         ":MemRefDialect",
4402         ":Support",
4403         ":TensorDialect",
4404         ":VectorDialect",
4405         "//llvm:Support",
4406     ],
4409 cc_library(
4410     name = "Support",
4411     srcs = glob([
4412         "lib/Support/*.cpp",
4413         "lib/Support/*.h",
4414     ]),
4415     hdrs = glob(["include/mlir/Support/*.h"]),
4416     includes = ["include"],
4417     deps = [
4418         "//llvm:Support",
4419         "//llvm:TargetParser",
4420     ],
4423 cc_library(
4424     name = "Debug",
4425     srcs = glob([
4426         "lib/Debug/*.cpp",
4427         "lib/Debug/*.h",
4428         "lib/Debug/BreakpointManagers/*.cpp",
4429         "lib/Debug/BreakpointManagers/*.h",
4430         "lib/Debug/Observers/*.cpp",
4431         "lib/Debug/Observers/*.h",
4432     ]),
4433     hdrs = glob([
4434         "include/mlir/Debug/*.h",
4435         "include/mlir/Debug/BreakpointManagers/*.h",
4436         "include/mlir/Debug/Observers/*.h",
4437     ]),
4438     includes = ["include"],
4439     deps = [
4440         ":CAPIIR",
4441         ":IR",
4442         ":Support",
4443         "//llvm:Support",
4444     ],
4447 cc_library(
4448     name = "MlirLspServerSupportLib",
4449     srcs = glob(
4450         [
4451             "lib/Tools/lsp-server-support/*.cpp",
4452         ],
4453     ),
4454     hdrs = glob(
4455         [
4456             "include/mlir/Tools/lsp-server-support/*.h",
4457         ],
4458     ),
4459     deps = [
4460         ":Support",
4461         "//llvm:Support",
4462         "//llvm:TargetParser",
4463     ],
4466 cc_library(
4467     name = "MlirLspServerLib",
4468     srcs = glob(
4469         [
4470             "lib/Tools/mlir-lsp-server/*.cpp",
4471             "lib/Tools/mlir-lsp-server/*.h",
4472             "lib/Tools/mlir-lsp-server/lsp/*.cpp",
4473             "lib/Tools/mlir-lsp-server/lsp/*.h",
4474         ],
4475     ),
4476     hdrs = glob(
4477         ["include/mlir/Tools/mlir-lsp-server/*.h"],
4478     ),
4479     includes = ["include"],
4480     deps = [
4481         ":AsmParser",
4482         ":BytecodeWriter",
4483         ":FunctionInterfaces",
4484         ":IR",
4485         ":MlirLspServerSupportLib",
4486         ":Parser",
4487         ":Support",
4488         "//llvm:Support",
4489     ],
4492 cc_library(
4493     name = "MlirPdllLspServerLib",
4494     srcs = glob(
4495         [
4496             "lib/Tools/mlir-pdll-lsp-server/*.cpp",
4497             "lib/Tools/mlir-pdll-lsp-server/*.h",
4498         ],
4499     ),
4500     hdrs = glob(
4501         ["include/mlir/Tools/mlir-pdll-lsp-server/*.h"],
4502     ),
4503     includes = ["include"],
4504     deps = [
4505         ":IR",
4506         ":MlirLspServerSupportLib",
4507         ":PDLLAST",
4508         ":PDLLCodeGen",
4509         ":PDLLODS",
4510         ":PDLLParser",
4511         ":Support",
4512         "//llvm:Support",
4513     ],
4516 cc_library(
4517     name = "AsmParserTokenKinds",
4518     # strip_include_prefix does not apply to textual_hdrs.
4519     hdrs = ["lib/AsmParser/TokenKinds.def"],
4520     strip_include_prefix = "lib/AsmParser",
4521     textual_hdrs = ["lib/AsmParser/TokenKinds.def"],
4524 cc_library(
4525     name = "AsmParser",
4526     srcs = glob([
4527         "lib/AsmParser/*.cpp",
4528         "lib/AsmParser/*.h",
4529     ]),
4530     hdrs = glob([
4531         "include/mlir/AsmParser/*.h",
4532     ]),
4533     includes = ["include"],
4534     deps = [
4535         ":AsmParserTokenKinds",
4536         ":IR",
4537         ":Support",
4538         "//llvm:Support",
4539         "//llvm:TargetParser",
4540     ],
4543 cc_library(
4544     name = "BytecodeReader",
4545     srcs = glob([
4546         "lib/Bytecode/Reader/*.cpp",
4547         "lib/Bytecode/Reader/*.h",
4548         "lib/Bytecode/*.h",
4549     ]),
4550     hdrs = glob([
4551         "include/mlir/Bytecode/*.h",
4552     ]),
4553     includes = ["include"],
4554     deps = [
4555         ":AsmParser",
4556         ":BytecodeOpInterfaceIncGen",
4557         ":IR",
4558         ":Support",
4559         "//llvm:Support",
4560     ],
4563 cc_library(
4564     name = "BytecodeWriter",
4565     srcs = glob([
4566         "lib/Bytecode/Writer/*.cpp",
4567         "lib/Bytecode/Writer/*.h",
4568         "lib/Bytecode/*.h",
4569     ]),
4570     hdrs = glob([
4571         "include/mlir/Bytecode/*.h",
4572     ]),
4573     includes = ["include"],
4574     deps = [
4575         ":BytecodeOpInterfaceIncGen",
4576         ":IR",
4577         ":Support",
4578         "//llvm:Support",
4579     ],
4582 cc_library(
4583     name = "Parser",
4584     srcs = glob([
4585         "lib/Parser/*.cpp",
4586         "lib/Parser/*.h",
4587     ]),
4588     hdrs = glob([
4589         "include/mlir/Parser/*.h",
4590     ]),
4591     includes = ["include"],
4592     deps = [
4593         ":AsmParser",
4594         ":BytecodeReader",
4595         ":IR",
4596         ":Support",
4597         "//llvm:Support",
4598     ],
4601 gentbl_cc_library(
4602     name = "LLVMDialectInterfaceIncGen",
4603     tbl_outs = [
4604         (
4605             ["-gen-op-interface-decls"],
4606             "include/mlir/Dialect/LLVMIR/LLVMInterfaces.h.inc",
4607         ),
4608         (
4609             ["-gen-op-interface-defs"],
4610             "include/mlir/Dialect/LLVMIR/LLVMInterfaces.cpp.inc",
4611         ),
4612         (
4613             ["-gen-type-interface-decls"],
4614             "include/mlir/Dialect/LLVMIR/LLVMTypeInterfaces.h.inc",
4615         ),
4616         (
4617             ["-gen-type-interface-defs"],
4618             "include/mlir/Dialect/LLVMIR/LLVMTypeInterfaces.cpp.inc",
4619         ),
4620     ],
4621     tblgen = ":mlir-tblgen",
4622     td_file = "include/mlir/Dialect/LLVMIR/LLVMInterfaces.td",
4623     deps = [":LLVMOpsTdFiles"],
4626 cc_library(
4627     name = "LLVMDialect",
4628     srcs = glob(
4629         [
4630             "lib/Dialect/LLVMIR/IR/*.cpp",
4631             "lib/Dialect/LLVMIR/IR/*.h",
4632         ],
4633         exclude = [
4634             "lib/Dialect/LLVMIR/IR/*AMX*.cpp",
4635             "lib/Dialect/LLVMIR/IR/*AMX*.h",
4636             "lib/Dialect/LLVMIR/IR/*ArmSVE*.cpp",
4637             "lib/Dialect/LLVMIR/IR/*ArmSVE*.h",
4638             "lib/Dialect/LLVMIR/IR/NVVM*.cpp",
4639             "lib/Dialect/LLVMIR/IR/NVVM*.h",
4640             "lib/Dialect/LLVMIR/IR/ROCDL*.cpp",
4641             "lib/Dialect/LLVMIR/IR/ROCDL*.h",
4642             "lib/Dialect/LLVMIR/IR/*X86Vector*.cpp",
4643             "lib/Dialect/LLVMIR/IR/*X86Vector*.h",
4644         ],
4645     ),
4646     hdrs = glob(
4647         ["include/mlir/Dialect/LLVMIR/*.h"],
4648         exclude = [
4649             "include/mlir/Dialect/LLVMIR/*AMX*.h",
4650             "include/mlir/Dialect/LLVMIR/*ArmSVE*.h",
4651             "include/mlir/Dialect/LLVMIR/NVVM*.h",
4652             "include/mlir/Dialect/LLVMIR/ROCDL*.h",
4653             "include/mlir/Dialect/LLVMIR/*X86Vector*.h",
4654         ],
4655     ) + [
4656         "include/mlir/Transforms/InliningUtils.h",
4657         "include/mlir/Transforms/Mem2Reg.h",
4658     ],
4659     includes = ["include"],
4660     deps = [
4661         ":CallOpInterfaces",
4662         ":ControlFlowInterfaces",
4663         ":DataLayoutInterfaces",
4664         ":FunctionInterfaces",
4665         ":IR",
4666         ":InferTypeOpInterface",
4667         ":LLVMDialectInterfaceIncGen",
4668         ":LLVMIntrinsicOpsIncGen",
4669         ":LLVMOpsIncGen",
4670         ":LLVMTypesIncGen",
4671         ":MemorySlotInterfaces",
4672         ":MemorySlotInterfacesIncGen",
4673         ":SideEffectInterfaces",
4674         ":Support",
4675         "//llvm:AsmParser",
4676         "//llvm:BinaryFormat",
4677         "//llvm:BitReader",
4678         "//llvm:BitWriter",
4679         "//llvm:Core",
4680         "//llvm:Support",
4681     ],
4684 gentbl_cc_library(
4685     name = "LLVMPassIncGen",
4686     tbl_outs = [
4687         (
4688             [
4689                 "-gen-pass-decls",
4690                 "-name=LLVM",
4691             ],
4692             "include/mlir/Dialect/LLVMIR/Transforms/Passes.h.inc",
4693         ),
4694     ],
4695     tblgen = ":mlir-tblgen",
4696     td_file = "include/mlir/Dialect/LLVMIR/Transforms/Passes.td",
4697     deps = [":PassBaseTdFiles"],
4700 cc_library(
4701     name = "LLVMIRTransforms",
4702     srcs = glob([
4703         "lib/Dialect/LLVMIR/Transforms/*.cpp",
4704         "lib/Dialect/LLVMIR/Transforms/*.h",
4705     ]),
4706     hdrs = glob(["include/mlir/Dialect/LLVMIR/Transforms/*.h"]),
4707     includes = ["include"],
4708     deps = [
4709         ":FuncDialect",
4710         ":GPUDialect",
4711         ":IR",
4712         ":LLVMDialect",
4713         ":LLVMPassIncGen",
4714         ":NVVMDialect",
4715         ":Pass",
4716         ":Transforms",
4717         "//llvm:BinaryFormat",
4718         "//llvm:Support",
4719     ],
4722 td_library(
4723     name = "GPUOpsTdFiles",
4724     srcs = [
4725         "include/mlir/Dialect/GPU/IR/CompilationAttrInterfaces.td",
4726         "include/mlir/Dialect/GPU/IR/CompilationAttrs.td",
4727         "include/mlir/Dialect/GPU/IR/GPUBase.td",
4728         "include/mlir/Dialect/GPU/IR/GPUOps.td",
4729         "include/mlir/Dialect/GPU/IR/ParallelLoopMapperAttr.td",
4730         "include/mlir/Dialect/GPU/TransformOps/GPUDeviceMappingAttr.td",
4731     ],
4732     includes = ["include"],
4733     deps = [
4734         ":DLTIDialectTdFiles",
4735         ":DataLayoutInterfacesTdFiles",
4736         ":FunctionInterfacesTdFiles",
4737         ":InferIntRangeInterfaceTdFiles",
4738         ":LLVMOpsTdFiles",
4739         ":OpBaseTdFiles",
4740         ":SCFTdFiles",
4741         ":SideEffectInterfacesTdFiles",
4742     ],
4745 gentbl_cc_library(
4746     name = "GPUDeviceMapperEnumsGen",
4747     tbl_outs = [
4748         (
4749             ["-gen-enum-decls"],
4750             "include/mlir/Dialect/GPU/TransformOps/GPUDeviceMapperEnums.h.inc",
4751         ),
4752         (
4753             ["-gen-enum-defs"],
4754             "include/mlir/Dialect/GPU/TransformOps/GPUDeviceMapperEnums.cpp.inc",
4755         ),
4756     ],
4757     tblgen = ":mlir-tblgen",
4758     td_file = "include/mlir/Dialect/GPU/TransformOps/GPUDeviceMappingAttr.td",
4759     deps = [
4760         ":GPUOpsTdFiles",
4761         ":OpBaseTdFiles",
4762     ],
4765 gentbl_cc_library(
4766     name = "GPUCompilationAttrInterfacesIncGen",
4767     tbl_outs = [
4768         (
4769             ["-gen-attr-interface-decls"],
4770             "include/mlir/Dialect/GPU/IR/CompilationAttrInterfaces.h.inc",
4771         ),
4772         (
4773             ["-gen-attr-interface-defs"],
4774             "include/mlir/Dialect/GPU/IR/CompilationAttrInterfaces.cpp.inc",
4775         ),
4776     ],
4777     tblgen = ":mlir-tblgen",
4778     td_file = "include/mlir/Dialect/GPU/IR/CompilationAttrInterfaces.td",
4779     deps = [
4780         ":AttrTdFiles",
4781         ":OpBaseTdFiles",
4782     ],
4785 gentbl_cc_library(
4786     name = "GPUBaseIncGen",
4787     tbl_outs = [
4788         (
4789             ["-gen-op-interface-decls"],
4790             "include/mlir/Dialect/GPU/IR/GPUOpInterfaces.h.inc",
4791         ),
4792         (
4793             ["-gen-op-interface-defs"],
4794             "include/mlir/Dialect/GPU/IR/GPUOpInterfaces.cpp.inc",
4795         ),
4796     ],
4797     tblgen = ":mlir-tblgen",
4798     td_file = "include/mlir/Dialect/GPU/IR/GPUBase.td",
4799     deps = [":OpBaseTdFiles"],
4802 gentbl_cc_library(
4803     name = "GPUOpsIncGen",
4804     tbl_outs = [
4805         (
4806             [
4807                 "-gen-dialect-decls",
4808                 "-dialect=gpu",
4809             ],
4810             "include/mlir/Dialect/GPU/IR/GPUOpsDialect.h.inc",
4811         ),
4812         (
4813             [
4814                 "-gen-dialect-defs",
4815                 "-dialect=gpu",
4816             ],
4817             "include/mlir/Dialect/GPU/IR/GPUOpsDialect.cpp.inc",
4818         ),
4819         (
4820             ["-gen-op-decls"],
4821             "include/mlir/Dialect/GPU/IR/GPUOps.h.inc",
4822         ),
4823         (
4824             ["-gen-op-defs"],
4825             "include/mlir/Dialect/GPU/IR/GPUOps.cpp.inc",
4826         ),
4827         (
4828             ["-gen-enum-decls"],
4829             "include/mlir/Dialect/GPU/IR/GPUOpsEnums.h.inc",
4830         ),
4831         (
4832             ["-gen-enum-defs"],
4833             "include/mlir/Dialect/GPU/IR/GPUOpsEnums.cpp.inc",
4834         ),
4835         (
4836             ["-gen-attrdef-decls"],
4837             "include/mlir/Dialect/GPU/IR/GPUOpsAttributes.h.inc",
4838         ),
4839         (
4840             ["-gen-attrdef-defs"],
4841             "include/mlir/Dialect/GPU/IR/GPUOpsAttributes.cpp.inc",
4842         ),
4843     ],
4844     tblgen = ":mlir-tblgen",
4845     td_file = "include/mlir/Dialect/GPU/IR/GPUOps.td",
4846     deps = [
4847         ":DLTIDialectTdFiles",
4848         ":GPUOpsTdFiles",
4849     ],
4852 cc_library(
4853     name = "GPUDialect",
4854     srcs = glob(
4855         [
4856             "lib/Dialect/GPU/IR/*.cpp",
4857             "lib/Dialect/GPU/IR/*.h",
4858         ],
4859     ),
4860     hdrs = glob(["include/mlir/Dialect/GPU/IR/*.h"]),
4861     includes = ["include"],
4862     deps = [
4863         ":ArithDialect",
4864         ":DLTIDialect",
4865         ":FunctionInterfaces",
4866         ":GPUBaseIncGen",
4867         ":GPUCompilationAttrInterfacesIncGen",
4868         ":GPUOpsIncGen",
4869         ":IR",
4870         ":InferIntRangeInterface",
4871         ":InferTypeOpInterface",
4872         ":LLVMDialect",
4873         ":MemRefDialect",
4874         ":SCFDialect",
4875         ":SideEffectInterfaces",
4876         "//llvm:Support",
4877     ],
4880 gentbl_cc_library(
4881     name = "GPUPassIncGen",
4882     tbl_outs = [
4883         (
4884             [
4885                 "-gen-pass-decls",
4886                 "-name=GPU",
4887             ],
4888             "include/mlir/Dialect/GPU/Transforms/Passes.h.inc",
4889         ),
4890         (
4891             [
4892                 "-gen-pass-capi-header",
4893                 "--prefix=GPU",
4894             ],
4895             "include/mlir/Dialect/GPU/Transforms/Passes.capi.h.inc",
4896         ),
4897         (
4898             [
4899                 "-gen-pass-capi-impl",
4900                 "--prefix=GPU",
4901             ],
4902             "include/mlir/Dialect/GPU/Transforms/Passes.capi.cpp.inc",
4903         ),
4904     ],
4905     tblgen = ":mlir-tblgen",
4906     td_file = "include/mlir/Dialect/GPU/Transforms/Passes.td",
4907     deps = [":PassBaseTdFiles"],
4910 cc_library(
4911     name = "GPUTransforms",
4912     srcs = glob(
4913         [
4914             "lib/Dialect/GPU/Transforms/*.cpp",
4915             "lib/Dialect/GPU/Transforms/*.h",
4916         ],
4917         exclude = [
4918             "lib/Dialect/GPU/Transforms/SerializeToCubin.cpp",
4919         ],
4920     ),
4921     hdrs = glob(["include/mlir/Dialect/GPU/Transforms/*.h"]),
4922     includes = ["include"],
4923     local_defines = if_cuda_available(["MLIR_GPU_TO_CUBIN_PASS_ENABLE"]),
4924     deps = [
4925         ":AffineDialect",
4926         ":AffineUtils",
4927         ":ArithDialect",
4928         ":AsmParser",
4929         ":AsyncDialect",
4930         ":ControlFlowDialect",
4931         ":DLTIDialect",
4932         ":DialectUtils",
4933         ":ExecutionEngineUtils",
4934         ":FuncDialect",
4935         ":GPUDialect",
4936         ":GPUPassIncGen",
4937         ":GPUToLLVMIRTranslation",
4938         ":IR",
4939         ":IndexDialect",
4940         ":LLVMDialect",
4941         ":LLVMToLLVMIRTranslation",
4942         ":MemRefDialect",
4943         ":NVVMDialect",
4944         ":NVVMTarget",
4945         ":Pass",
4946         ":ROCDLDialect",
4947         ":ROCDLTarget",
4948         ":ROCDLToLLVMIRTranslation",
4949         ":SCFDialect",
4950         ":SerializeToCubin_stub",
4951         ":SideEffectInterfaces",
4952         ":Support",
4953         ":ToLLVMIRTranslation",
4954         ":Transforms",
4955         "//llvm:Core",
4956         "//llvm:MC",
4957         "//llvm:Support",
4958         "//llvm:Target",
4959     ] + if_cuda_available([
4960         ":NVVMToLLVMIRTranslation",
4961         "//llvm:NVPTXCodeGen",
4962     ]),
4965 cc_library(
4966     name = "SerializeToCubin",
4967     srcs = [
4968         "lib/Dialect/GPU/Transforms/SerializeToCubin.cpp",
4969     ],
4970     local_defines = if_cuda_available(["MLIR_GPU_TO_CUBIN_PASS_ENABLE"]),
4971     deps = [
4972         ":GPUDialect",
4973         ":GPUPassIncGen",
4974         ":GPUTransforms",
4975         ":NVVMDialect",
4976         ":NVVMToLLVMIRTranslation",
4977         ":Pass",
4978         ":Support",
4979         ":ToLLVMIRTranslation",
4980         "//llvm:Support",
4981     ] + if_cuda_available([
4982         "@cuda//:cuda_headers",
4983         "@cuda//:libcuda",
4984     ]),
4987 write_file(
4988     name = "SerializeToCubin_stub_cc",
4989     out = "SerializeToCubin_stub.cc",
4990     content = [
4991         """
4992 #include "mlir/Dialect/GPU/Transforms/Passes.h"
4994 // Provide a weak registration stub in case the real SerializeToCubin is not
4995 // linked in.
4997 #if defined(_MSC_VER)
4998 // This might not work correctly, but it avoids a compilation error because
4999 // MSVC does not support __attribute__((weak)).
5000 void mlir::registerGpuSerializeToCubinPass() {}
5001 #else
5002 __attribute__((weak)) void mlir::registerGpuSerializeToCubinPass() {}
5003 #endif
5004 """,
5005     ],
5008 cc_library(
5009     name = "SerializeToCubin_stub",
5010     srcs = [":SerializeToCubin_stub_cc"],
5011     hdrs = glob(["include/mlir/Dialect/GPU/Transforms/*.h"]),
5012     includes = ["include"],
5013     deps = [
5014         ":GPUDialect",
5015         ":GPUPassIncGen",
5016         ":Pass",
5017         ":Support",
5018         "//llvm:Support",
5019     ],
5022 td_library(
5023     name = "GPUTransformOpsTdFiles",
5024     srcs = [
5025         "include/mlir/Dialect/GPU/TransformOps/GPUTransformOps.td",
5026     ],
5027     includes = ["include"],
5028     deps = [
5029         ":TransformDialectTdFiles",
5030     ],
5033 gentbl_cc_library(
5034     name = "GPUTransformOpsIncGen",
5035     tbl_outs = [
5036         (
5037             ["-gen-op-decls"],
5038             "include/mlir/Dialect/GPU/TransformOps/GPUTransformOps.h.inc",
5039         ),
5040         (
5041             ["-gen-op-defs"],
5042             "include/mlir/Dialect/GPU/TransformOps/GPUTransformOps.cpp.inc",
5043         ),
5044     ],
5045     tblgen = ":mlir-tblgen",
5046     td_file = "include/mlir/Dialect/GPU/TransformOps/GPUTransformOps.td",
5047     deps = [
5048         ":GPUTransformOpsTdFiles",
5049     ],
5052 cc_library(
5053     name = "GPUTransformOps",
5054     srcs = glob([
5055         "lib/Dialect/GPU/TransformOps/*.cpp",
5056     ]),
5057     hdrs = glob([
5058         "include/mlir/Dialect/GPU/TransformOps/*.h",
5059     ]),
5060     includes = ["include"],
5061     deps = [
5062         ":AffineDialect",
5063         ":ArithDialect",
5064         ":AsmParser",
5065         ":ControlFlowDialect",
5066         ":DialectUtils",
5067         ":FuncDialect",
5068         ":GPUCommonTransforms",
5069         ":GPUDialect",
5070         ":GPUToNVVMTransforms",
5071         ":GPUTransformOpsIncGen",
5072         ":GPUTransforms",
5073         ":IR",
5074         ":LLVMCommonConversion",
5075         ":MemRefDialect",
5076         ":NVVMDialect",
5077         ":Parser",
5078         ":SCFDialect",
5079         ":SideEffectInterfaces",
5080         ":Support",
5081         ":TransformDialect",
5082         ":TransformUtils",
5083         ":VectorDialect",
5084         ":VectorTransforms",
5085         "//llvm:Support",
5086     ],
5089 td_library(
5090     name = "LLVMOpsTdFiles",
5091     srcs = [
5092         "include/mlir/Dialect/LLVMIR/LLVMAttrDefs.td",
5093         "include/mlir/Dialect/LLVMIR/LLVMDialect.td",
5094         "include/mlir/Dialect/LLVMIR/LLVMEnums.td",
5095         "include/mlir/Dialect/LLVMIR/LLVMInterfaces.td",
5096         "include/mlir/Dialect/LLVMIR/LLVMIntrinsicOps.td",
5097         "include/mlir/Dialect/LLVMIR/LLVMOpBase.td",
5098         "include/mlir/Dialect/LLVMIR/LLVMOps.td",
5099         "include/mlir/Dialect/LLVMIR/LLVMTypes.td",
5100     ],
5101     includes = ["include"],
5102     deps = [
5103         ":CallInterfacesTdFiles",
5104         ":ControlFlowInterfacesTdFiles",
5105         ":DataLayoutInterfacesTdFiles",
5106         ":FunctionInterfacesTdFiles",
5107         ":InferTypeOpInterfaceTdFiles",
5108         ":MemorySlotInterfacesTdFiles",
5109         ":OpBaseTdFiles",
5110         ":SideEffectInterfacesTdFiles",
5111     ],
5114 cc_library(
5115     name = "GPUCommonTransforms",
5116     srcs = [
5117         "lib/Conversion/GPUCommon/GPUOpsLowering.cpp",
5118     ],
5119     hdrs = [
5120         "include/mlir/Conversion/GPUCommon/GPUCommonPass.h",
5121         "lib/Conversion/GPUCommon/GPUOpsLowering.h",
5122         "lib/Conversion/GPUCommon/IndexIntrinsicsOpLowering.h",
5123         "lib/Conversion/GPUCommon/OpToFuncCallLowering.h",
5124     ],
5125     deps = [
5126         ":ConversionPassIncGen",
5127         ":FuncDialect",
5128         ":GPUDialect",
5129         ":GPUTransforms",
5130         ":IR",
5131         ":LLVMCommonConversion",
5132         ":LLVMDialect",
5133         ":Support",
5134         "//llvm:Support",
5135     ],
5138 gentbl_cc_library(
5139     name = "GPUToNVVMGen",
5140     strip_include_prefix = "lib/Conversion/GPUToNVVM",
5141     tbl_outs = [
5142         (
5143             ["-gen-rewriters"],
5144             "lib/Conversion/GPUToNVVM/GPUToNVVM.cpp.inc",
5145         ),
5146     ],
5147     tblgen = ":mlir-tblgen",
5148     td_file = "lib/Conversion/GPUToNVVM/GPUToNVVM.td",
5149     deps = [
5150         ":GPUOpsTdFiles",
5151         ":NVVMOpsTdFiles",
5152     ],
5155 cc_library(
5156     name = "GPUToNVVMTransforms",
5157     srcs = glob([
5158         "lib/Conversion/GPUToNVVM/*.cpp",
5159         "lib/Conversion/GPUToNVVM/*.h",
5160     ]),
5161     hdrs = glob([
5162         "include/mlir/Conversion/GPUToNVVM/*.h",
5163     ]),
5164     includes = ["include"],
5165     deps = [
5166         ":ArithDialect",
5167         ":ArithToLLVM",
5168         ":ControlFlowDialect",
5169         ":ControlFlowToLLVM",
5170         ":ConversionPassIncGen",
5171         ":FuncDialect",
5172         ":FuncToLLVM",
5173         ":GPUCommonTransforms",
5174         ":GPUDialect",
5175         ":GPUToNVVMGen",
5176         ":GPUTransforms",
5177         ":IR",
5178         ":LLVMCommonConversion",
5179         ":LLVMDialect",
5180         ":MathDialect",
5181         ":MemRefDialect",
5182         ":MemRefToLLVM",
5183         ":NVVMDialect",
5184         ":Pass",
5185         ":Transforms",
5186         "//llvm:Support",
5187     ],
5190 cc_library(
5191     name = "AMDGPUToROCDL",
5192     srcs = glob([
5193         "lib/Conversion/AMDGPUToROCDL/*.cpp",
5194         "lib/Conversion/AMDGPUToROCDL/*.h",
5195     ]) + ["include/mlir/Conversion/GPUToROCDL/Runtimes.h"],
5196     hdrs = glob([
5197         "include/mlir/Conversion/AMDGPUToROCDL/*.h",
5198     ]),
5199     includes = ["include"],
5200     deps = [
5201         ":AMDGPUDialect",
5202         ":AMDGPUUtils",
5203         ":ConversionPassIncGen",
5204         ":IR",
5205         ":LLVMCommonConversion",
5206         ":LLVMDialect",
5207         ":Pass",
5208         ":ROCDLDialect",
5209         ":Support",
5210         ":Transforms",
5211         "//llvm:Support",
5212     ],
5215 cc_library(
5216     name = "NVGPUToNVVM",
5217     srcs = glob([
5218         "lib/Conversion/NVGPUToNVVM/*.cpp",
5219         "lib/Conversion/NVGPUToNVVM/*.h",
5220     ]),
5221     hdrs = glob([
5222         "include/mlir/Conversion/NVGPUToNVVM/*.h",
5223     ]),
5224     includes = ["include"],
5225     deps = [
5226         ":ConversionPassIncGen",
5227         ":GPUCommonTransforms",
5228         ":GPUDialect",
5229         ":GPUToGPURuntimeTransforms",
5230         ":IR",
5231         ":LLVMCommonConversion",
5232         ":LLVMDialect",
5233         ":MemRefDialect",
5234         ":NVGPUDialect",
5235         ":NVVMDialect",
5236         ":Pass",
5237         "//llvm:Support",
5238     ],
5241 cc_library(
5242     name = "VectorToSPIRV",
5243     srcs = glob([
5244         "lib/Conversion/VectorToSPIRV/*.cpp",
5245         "lib/Conversion/VectorToSPIRV/*.h",
5246     ]),
5247     hdrs = glob([
5248         "include/mlir/Conversion/VectorToSPIRV/*.h",
5249     ]),
5250     includes = ["include"],
5251     deps = [
5252         ":ArithDialect",
5253         ":ConversionPassIncGen",
5254         ":IR",
5255         ":Pass",
5256         ":SPIRVConversion",
5257         ":SPIRVDialect",
5258         ":Support",
5259         ":Transforms",
5260         ":VectorDialect",
5261         "//llvm:Support",
5262     ],
5265 gentbl_cc_library(
5266     name = "GPUToROCDLTGen",
5267     strip_include_prefix = "lib/Conversion/GPUToROCDL",
5268     tbl_outs = [
5269         (
5270             ["-gen-rewriters"],
5271             "lib/Conversion/GPUToROCDL/GPUToROCDL.cpp.inc",
5272         ),
5273     ],
5274     tblgen = ":mlir-tblgen",
5275     td_file = "lib/Conversion/GPUToROCDL/GPUToROCDL.td",
5276     deps = [
5277         ":GPUOpsTdFiles",
5278         ":ROCDLOpsTdFiles",
5279     ],
5282 cc_library(
5283     name = "GPUToROCDLTransforms",
5284     srcs = [
5285         "include/mlir/Conversion/GPUToROCDL/Runtimes.h",
5286         "lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp",
5287     ],
5288     hdrs = ["include/mlir/Conversion/GPUToROCDL/GPUToROCDLPass.h"],
5289     includes = ["include"],
5290     deps = [
5291         ":AMDGPUToROCDL",
5292         ":ArithToLLVM",
5293         ":ArithTransforms",
5294         ":ControlFlowDialect",
5295         ":ControlFlowToLLVM",
5296         ":ConversionPassIncGen",
5297         ":FuncDialect",
5298         ":FuncToLLVM",
5299         ":GPUCommonTransforms",
5300         ":GPUDialect",
5301         ":GPUToROCDLTGen",
5302         ":GPUTransforms",
5303         ":IR",
5304         ":LLVMCommonConversion",
5305         ":LLVMDialect",
5306         ":MathDialect",
5307         ":MemRefDialect",
5308         ":MemRefToLLVM",
5309         ":Pass",
5310         ":ROCDLDialect",
5311         ":Transforms",
5312         ":VectorDialect",
5313         ":VectorToLLVM",
5314         ":VectorToSCF",
5315         "//llvm:Support",
5316     ],
5319 cc_library(
5320     name = "GPUToVulkanTransforms",
5321     srcs = [
5322         "lib/Conversion/GPUToVulkan/ConvertGPULaunchFuncToVulkanLaunchFunc.cpp",
5323         "lib/Conversion/GPUToVulkan/ConvertLaunchFuncToVulkanCalls.cpp",
5324     ],
5325     hdrs = ["include/mlir/Conversion/GPUToVulkan/ConvertGPUToVulkanPass.h"],
5326     includes = ["include"],
5327     deps = [
5328         ":ConversionPassIncGen",
5329         ":FuncDialect",
5330         ":GPUDialect",
5331         ":IR",
5332         ":LLVMDialect",
5333         ":Pass",
5334         ":SPIRVDialect",
5335         ":SPIRVSerialization",
5336         ":Support",
5337         "//llvm:Support",
5338     ],
5341 cc_library(
5342     name = "GPUToGPURuntimeTransforms",
5343     srcs = [
5344         "lib/Conversion/GPUCommon/GPUToLLVMConversion.cpp",
5345     ],
5346     hdrs = ["include/mlir/Conversion/GPUCommon/GPUCommonPass.h"],
5347     includes = ["include"],
5348     deps = [
5349         ":ArithToLLVM",
5350         ":AsyncDialect",
5351         ":AsyncToLLVM",
5352         ":ControlFlowToLLVM",
5353         ":ConversionPassIncGen",
5354         ":FuncToLLVM",
5355         ":GPUDialect",
5356         ":GPUTransforms",
5357         ":IR",
5358         ":LLVMCommonConversion",
5359         ":LLVMDialect",
5360         ":MemRefDialect",
5361         ":MemRefToLLVM",
5362         ":Support",
5363         ":VectorToLLVM",
5364         "//llvm:Support",
5365     ],
5368 cc_library(
5369     name = "GPUToSPIRV",
5370     srcs = glob([
5371         "lib/Conversion/GPUToSPIRV/*.cpp",
5372         "lib/Conversion/GPUToSPIRV/*.h",
5373     ]),
5374     hdrs = glob([
5375         "include/mlir/Conversion/GPUToSPIRV/*.h",
5376     ]),
5377     includes = [
5378         "include",
5379         "lib/Conversions/GPUToSPIRV",
5380     ],
5381     deps = [
5382         ":ArithToSPIRV",
5383         ":ConversionPassIncGen",
5384         ":FuncToSPIRV",
5385         ":GPUDialect",
5386         ":IR",
5387         ":MemRefToSPIRV",
5388         ":Pass",
5389         ":SCFDialect",
5390         ":SCFToSPIRV",
5391         ":SPIRVConversion",
5392         ":SPIRVDialect",
5393         ":Support",
5394         ":Transforms",
5395         ":VectorToSPIRV",
5396         "//llvm:Support",
5397     ],
5400 cc_library(
5401     name = "PDLToPDLInterp",
5402     srcs = glob([
5403         "lib/Conversion/PDLToPDLInterp/*.cpp",
5404         "lib/Conversion/PDLToPDLInterp/*.h",
5405     ]),
5406     hdrs = [
5407         "include/mlir/Conversion/PDLToPDLInterp/PDLToPDLInterp.h",
5408         "lib/Conversion/PDLToPDLInterp/RootOrdering.h",
5409     ],
5410     includes = ["include"],
5411     deps = [
5412         ":ConversionPassIncGen",
5413         ":IR",
5414         ":InferTypeOpInterface",
5415         ":PDLDialect",
5416         ":PDLInterpDialect",
5417         ":Pass",
5418         ":Support",
5419         "//llvm:Support",
5420     ],
5423 cc_library(
5424     name = "SPIRVToLLVM",
5425     srcs = glob([
5426         "lib/Conversion/SPIRVToLLVM/*.cpp",
5427     ]),
5428     hdrs = glob([
5429         "include/mlir/Conversion/SPIRVToLLVM/*.h",
5430     ]),
5431     includes = ["include"],
5432     deps = [
5433         ":ArithToLLVM",
5434         ":ConversionPassIncGen",
5435         ":FuncDialect",
5436         ":FuncToLLVM",
5437         ":GPUDialect",
5438         ":IR",
5439         ":LLVMCommonConversion",
5440         ":LLVMDialect",
5441         ":MemRefToLLVM",
5442         ":Pass",
5443         ":SPIRVDialect",
5444         ":SPIRVUtils",
5445         ":Support",
5446         ":Transforms",
5447         "//llvm:Support",
5448     ],
5451 gentbl_cc_library(
5452     name = "LLVMOpsIncGen",
5453     tbl_outs = [
5454         (
5455             ["-gen-op-decls"],
5456             "include/mlir/Dialect/LLVMIR/LLVMOps.h.inc",
5457         ),
5458         (
5459             ["-gen-op-defs"],
5460             "include/mlir/Dialect/LLVMIR/LLVMOps.cpp.inc",
5461         ),
5462         (
5463             ["-gen-dialect-decls"],
5464             "include/mlir/Dialect/LLVMIR/LLVMOpsDialect.h.inc",
5465         ),
5466         (
5467             ["-gen-dialect-defs"],
5468             "include/mlir/Dialect/LLVMIR/LLVMOpsDialect.cpp.inc",
5469         ),
5470         (
5471             ["-gen-enum-decls"],
5472             "include/mlir/Dialect/LLVMIR/LLVMOpsEnums.h.inc",
5473         ),
5474         (
5475             ["-gen-enum-defs"],
5476             "include/mlir/Dialect/LLVMIR/LLVMOpsEnums.cpp.inc",
5477         ),
5478         (
5479             [
5480                 "--gen-attrdef-decls",
5481                 "-attrdefs-dialect=llvm",
5482             ],
5483             "include/mlir/Dialect/LLVMIR/LLVMOpsAttrDefs.h.inc",
5484         ),
5485         (
5486             [
5487                 "--gen-attrdef-defs",
5488                 "-attrdefs-dialect=llvm",
5489             ],
5490             "include/mlir/Dialect/LLVMIR/LLVMOpsAttrDefs.cpp.inc",
5491         ),
5492     ],
5493     tblgen = ":mlir-tblgen",
5494     td_file = "include/mlir/Dialect/LLVMIR/LLVMOps.td",
5495     deps = [":LLVMOpsTdFiles"],
5498 gentbl_cc_library(
5499     name = "LLVMTypesIncGen",
5500     tbl_outs = [
5501         (
5502             [
5503                 "-gen-typedef-decls",
5504                 "-typedefs-dialect=llvm",
5505             ],
5506             "include/mlir/Dialect/LLVMIR/LLVMTypes.h.inc",
5507         ),
5508         (
5509             [
5510                 "-gen-typedef-defs",
5511                 "-typedefs-dialect=llvm",
5512             ],
5513             "include/mlir/Dialect/LLVMIR/LLVMTypes.cpp.inc",
5514         ),
5515     ],
5516     tblgen = ":mlir-tblgen",
5517     td_file = "include/mlir/Dialect/LLVMIR/LLVMTypes.td",
5518     deps = [":LLVMOpsTdFiles"],
5521 gentbl_cc_library(
5522     name = "LLVMIntrinsicOpsIncGen",
5523     tbl_outs = [
5524         (
5525             ["-gen-op-decls"],
5526             "include/mlir/Dialect/LLVMIR/LLVMIntrinsicOps.h.inc",
5527         ),
5528         (
5529             ["-gen-op-defs"],
5530             "include/mlir/Dialect/LLVMIR/LLVMIntrinsicOps.cpp.inc",
5531         ),
5532     ],
5533     tblgen = ":mlir-tblgen",
5534     td_file = "include/mlir/Dialect/LLVMIR/LLVMIntrinsicOps.td",
5535     deps = [":LLVMOpsTdFiles"],
5538 gentbl_cc_library(
5539     name = "LLVMConversionIncGen",
5540     tbl_outs = [
5541         (
5542             ["-gen-llvmir-conversions"],
5543             "include/mlir/Dialect/LLVMIR/LLVMConversions.inc",
5544         ),
5545         (
5546             ["-gen-enum-to-llvmir-conversions"],
5547             "include/mlir/Dialect/LLVMIR/LLVMConversionEnumsToLLVM.inc",
5548         ),
5549         (
5550             ["-gen-enum-from-llvmir-conversions"],
5551             "include/mlir/Dialect/LLVMIR/LLVMConversionEnumsFromLLVM.inc",
5552         ),
5553         (
5554             ["-gen-op-from-llvmir-conversions"],
5555             "include/mlir/Dialect/LLVMIR/LLVMOpFromLLVMIRConversions.inc",
5556         ),
5557     ],
5558     tblgen = ":mlir-tblgen",
5559     td_file = "include/mlir/Dialect/LLVMIR/LLVMOps.td",
5560     deps = [":LLVMOpsTdFiles"],
5563 gentbl_cc_library(
5564     name = "LLVMIntrinsicConversionIncGen",
5565     tbl_outs = [
5566         (
5567             ["-gen-llvmir-conversions"],
5568             "include/mlir/Dialect/LLVMIR/LLVMIntrinsicConversions.inc",
5569         ),
5570         (
5571             ["-gen-intr-from-llvmir-conversions"],
5572             "include/mlir/Dialect/LLVMIR/LLVMIntrinsicFromLLVMIRConversions.inc",
5573         ),
5574         (
5575             ["-gen-convertible-llvmir-intrinsics"],
5576             "include/mlir/Dialect/LLVMIR/LLVMConvertibleLLVMIRIntrinsics.inc",
5577         ),
5578     ],
5579     tblgen = ":mlir-tblgen",
5580     td_file = "include/mlir/Dialect/LLVMIR/LLVMIntrinsicOps.td",
5581     deps = [":LLVMOpsTdFiles"],
5584 cc_library(
5585     name = "NVVMDialect",
5586     srcs = ["lib/Dialect/LLVMIR/IR/NVVMDialect.cpp"],
5587     hdrs = ["include/mlir/Dialect/LLVMIR/NVVMDialect.h"],
5588     includes = ["include"],
5589     deps = [
5590         ":ConvertToLLVM",
5591         ":DialectUtils",
5592         ":GPUDialect",
5593         ":IR",
5594         ":LLVMDialect",
5595         ":NVVMOpsIncGen",
5596         ":SideEffectInterfaces",
5597         ":Support",
5598         "//llvm:AsmParser",
5599         "//llvm:Core",
5600         "//llvm:Support",
5601     ],
5604 cc_library(
5605     name = "TargetLLVM",
5606     srcs = ["lib/Target/LLVM/ModuleToObject.cpp"],
5607     hdrs = glob(["include/mlir/Target/LLVM/*.h"]),
5608     includes = ["include"],
5609     deps = [
5610         ":ExecutionEngineUtils",
5611         ":IR",
5612         ":LLVMToLLVMIRTranslation",
5613         ":ToLLVMIRTranslation",
5614         "//llvm:BitWriter",
5615         "//llvm:Core",
5616         "//llvm:IPO",
5617         "//llvm:IRReader",
5618         "//llvm:Linker",
5619         "//llvm:MC",
5620         "//llvm:Passes",
5621         "//llvm:Support",
5622         "//llvm:Target",
5623         "//llvm:TargetParser",
5624     ],
5627 cc_library(
5628     name = "NVVMTarget",
5629     srcs = ["lib/Target/LLVM/NVVM/Target.cpp"],
5630     hdrs = glob(["include/mlir/Target/LLVM/NVVM/*.h"]),
5631     includes = ["include"],
5632     deps = [
5633         ":GPUDialect",
5634         ":GPUToLLVMIRTranslation",
5635         ":LLVMToLLVMIRTranslation",
5636         ":NVVMDialect",
5637         ":NVVMToLLVMIRTranslation",
5638         ":TargetLLVM",
5639         ":ToLLVMIRTranslation",
5640         "//llvm:Support",
5641     ],
5644 td_library(
5645     name = "NVVMOpsTdFiles",
5646     srcs = ["include/mlir/Dialect/LLVMIR/NVVMOps.td"],
5647     includes = ["include"],
5648     deps = [
5649         ":GPUOpsTdFiles",
5650         ":LLVMOpsTdFiles",
5651         ":OpBaseTdFiles",
5652         ":SideEffectInterfacesTdFiles",
5653     ],
5656 gentbl_cc_library(
5657     name = "NVVMOpsIncGen",
5658     tbl_outs = [
5659         (
5660             ["-gen-op-decls"],
5661             "include/mlir/Dialect/LLVMIR/NVVMOps.h.inc",
5662         ),
5663         (
5664             ["-gen-op-defs"],
5665             "include/mlir/Dialect/LLVMIR/NVVMOps.cpp.inc",
5666         ),
5667         (
5668             [
5669                 "-gen-dialect-decls",
5670                 "-dialect=nvvm",
5671             ],
5672             "include/mlir/Dialect/LLVMIR/NVVMOpsDialect.h.inc",
5673         ),
5674         (
5675             [
5676                 "-gen-dialect-defs",
5677                 "-dialect=nvvm",
5678             ],
5679             "include/mlir/Dialect/LLVMIR/NVVMOpsDialect.cpp.inc",
5680         ),
5681         (
5682             ["-gen-enum-decls"],
5683             "include/mlir/Dialect/LLVMIR/NVVMOpsEnums.h.inc",
5684         ),
5685         (
5686             ["-gen-enum-defs"],
5687             "include/mlir/Dialect/LLVMIR/NVVMOpsEnums.cpp.inc",
5688         ),
5689         (
5690             [
5691                 "-gen-attrdef-decls",
5692                 "-attrdefs-dialect=nvvm",
5693             ],
5694             "include/mlir/Dialect/LLVMIR/NVVMOpsAttributes.h.inc",
5695         ),
5696         (
5697             [
5698                 "-gen-attrdef-defs",
5699                 "-attrdefs-dialect=nvvm",
5700             ],
5701             "include/mlir/Dialect/LLVMIR/NVVMOpsAttributes.cpp.inc",
5702         ),
5703         (
5704             [
5705                 "-gen-op-interface-decls",
5706                 "-attrdefs-dialect=nvvm",
5707             ],
5708             "include/mlir/Dialect/LLVMIR/NVVMOpsInterface.h.inc",
5709         ),
5710         (
5711             [
5712                 "-gen-op-interface-defs",
5713                 "-attrdefs-dialect=nvvm",
5714             ],
5715             "include/mlir/Dialect/LLVMIR/NVVMOpsInterface.cpp.inc",
5716         ),
5717     ],
5718     tblgen = ":mlir-tblgen",
5719     td_file = "include/mlir/Dialect/LLVMIR/NVVMOps.td",
5720     deps = [":NVVMOpsTdFiles"],
5723 gentbl_cc_library(
5724     name = "NVVMConversionIncGen",
5725     tbl_outs = [
5726         (
5727             ["-gen-llvmir-conversions"],
5728             "include/mlir/Dialect/LLVMIR/NVVMConversions.inc",
5729         ),
5730     ],
5731     tblgen = ":mlir-tblgen",
5732     td_file = "include/mlir/Dialect/LLVMIR/NVVMOps.td",
5733     deps = [":NVVMOpsTdFiles"],
5736 cc_library(
5737     name = "NVVMToLLVM",
5738     srcs = glob(["lib/Conversion/NVVMToLLVM/NVVMToLLVM.cpp"]),
5739     hdrs = glob(["include/mlir/Conversion/NVVMToLLVM/*.h"]),
5740     includes = ["include"],
5741     deps = [
5742         ":ConversionPassIncGen",
5743         ":ConvertToLLVM",
5744         ":FuncDialect",
5745         ":GPUDialect",
5746         ":IR",
5747         ":LLVMCommonConversion",
5748         ":LLVMDialect",
5749         ":MemRefDialect",
5750         ":NVVMDialect",
5751         ":NVVMOpsIncGen",
5752         ":Pass",
5753         ":Support",
5754         "//llvm:Support",
5755     ],
5758 cc_library(
5759     name = "ROCDLDialect",
5760     srcs = ["lib/Dialect/LLVMIR/IR/ROCDLDialect.cpp"],
5761     hdrs = ["include/mlir/Dialect/LLVMIR/ROCDLDialect.h"],
5762     includes = ["include"],
5763     deps = [
5764         ":GPUDialect",
5765         ":IR",
5766         ":LLVMDialect",
5767         ":ROCDLOpsIncGen",
5768         ":SideEffectInterfaces",
5769         "//llvm:AsmParser",
5770         "//llvm:Core",
5771         "//llvm:Support",
5772     ],
5775 cc_library(
5776     name = "ROCDLTarget",
5777     srcs = ["lib/Target/LLVM/ROCDL/Target.cpp"],
5778     hdrs = glob(["include/mlir/Target/LLVM/ROCDL/*.h"]),
5779     includes = ["include"],
5780     deps = [
5781         ":GPUDialect",
5782         ":GPUToLLVMIRTranslation",
5783         ":LLVMToLLVMIRTranslation",
5784         ":ROCDLDialect",
5785         ":ROCDLToLLVMIRTranslation",
5786         ":Support",
5787         ":TargetLLVM",
5788         ":ToLLVMIRTranslation",
5789         "//llvm:Core",
5790         "//llvm:MC",
5791         "//llvm:MCParser",
5792         "//llvm:Support",
5793         "//llvm:TargetParser",
5794     ],
5797 td_library(
5798     name = "ROCDLOpsTdFiles",
5799     srcs = ["include/mlir/Dialect/LLVMIR/ROCDLOps.td"],
5800     includes = ["include"],
5801     deps = [
5802         ":GPUOpsTdFiles",
5803         ":LLVMOpsTdFiles",
5804         ":OpBaseTdFiles",
5805         ":SideEffectInterfacesTdFiles",
5806     ],
5809 gentbl_cc_library(
5810     name = "ROCDLOpsIncGen",
5811     tbl_outs = [
5812         (
5813             ["-gen-op-decls"],
5814             "include/mlir/Dialect/LLVMIR/ROCDLOps.h.inc",
5815         ),
5816         (
5817             ["-gen-op-defs"],
5818             "include/mlir/Dialect/LLVMIR/ROCDLOps.cpp.inc",
5819         ),
5820         (
5821             [
5822                 "-gen-dialect-decls",
5823                 "-dialect=rocdl",
5824             ],
5825             "include/mlir/Dialect/LLVMIR/ROCDLOpsDialect.h.inc",
5826         ),
5827         (
5828             [
5829                 "-gen-dialect-defs",
5830                 "-dialect=rocdl",
5831             ],
5832             "include/mlir/Dialect/LLVMIR/ROCDLOpsDialect.cpp.inc",
5833         ),
5834         (
5835             [
5836                 "-gen-attrdef-decls",
5837                 "-attrdefs-dialect=rocdl",
5838             ],
5839             "include/mlir/Dialect/LLVMIR/ROCDLOpsAttributes.h.inc",
5840         ),
5841         (
5842             [
5843                 "-gen-attrdef-defs",
5844                 "-attrdefs-dialect=rocdl",
5845             ],
5846             "include/mlir/Dialect/LLVMIR/ROCDLOpsAttributes.cpp.inc",
5847         ),
5848     ],
5849     tblgen = ":mlir-tblgen",
5850     td_file = "include/mlir/Dialect/LLVMIR/ROCDLOps.td",
5851     deps = [":ROCDLOpsTdFiles"],
5854 gentbl_cc_library(
5855     name = "ROCDLConversionIncGen",
5856     tbl_outs = [
5857         (
5858             ["-gen-llvmir-conversions"],
5859             "include/mlir/Dialect/LLVMIR/ROCDLConversions.inc",
5860         ),
5861     ],
5862     tblgen = ":mlir-tblgen",
5863     td_file = "include/mlir/Dialect/LLVMIR/ROCDLOps.td",
5864     deps = [":ROCDLOpsTdFiles"],
5867 cc_library(
5868     name = "PDLDialect",
5869     srcs = glob([
5870         "lib/Dialect/PDL/IR/*.cpp",
5871         "lib/Dialect/PDL/IR/*.h",
5872     ]),
5873     hdrs = glob([
5874         "include/mlir/Dialect/PDL/IR/*.h",
5875     ]),
5876     includes = ["include"],
5877     deps = [
5878         ":IR",
5879         ":InferTypeOpInterface",
5880         ":PDLOpsIncGen",
5881         ":PDLTypesIncGen",
5882         ":SideEffectInterfaces",
5883         "//llvm:Support",
5884     ],
5887 td_library(
5888     name = "PDLDialectTdFiles",
5889     srcs = [
5890         "include/mlir/Dialect/PDL/IR/PDLDialect.td",
5891         "include/mlir/Dialect/PDL/IR/PDLOps.td",
5892         "include/mlir/Dialect/PDL/IR/PDLTypes.td",
5893     ],
5894     deps = [
5895         ":OpBaseTdFiles",
5896         ":SideEffectInterfacesTdFiles",
5897     ],
5900 gentbl_cc_library(
5901     name = "PDLOpsIncGen",
5902     tbl_outs = [
5903         (
5904             ["-gen-op-decls"],
5905             "include/mlir/Dialect/PDL/IR/PDLOps.h.inc",
5906         ),
5907         (
5908             ["-gen-op-defs"],
5909             "include/mlir/Dialect/PDL/IR/PDLOps.cpp.inc",
5910         ),
5911         (
5912             ["-gen-dialect-decls"],
5913             "include/mlir/Dialect/PDL/IR/PDLOpsDialect.h.inc",
5914         ),
5915         (
5916             ["-gen-dialect-defs"],
5917             "include/mlir/Dialect/PDL/IR/PDLOpsDialect.cpp.inc",
5918         ),
5919     ],
5920     tblgen = ":mlir-tblgen",
5921     td_file = "include/mlir/Dialect/PDL/IR/PDLOps.td",
5922     deps = [":PDLDialectTdFiles"],
5925 gentbl_cc_library(
5926     name = "PDLTypesIncGen",
5927     tbl_outs = [
5928         (
5929             ["-gen-typedef-decls"],
5930             "include/mlir/Dialect/PDL/IR/PDLOpsTypes.h.inc",
5931         ),
5932         (
5933             ["-gen-typedef-defs"],
5934             "include/mlir/Dialect/PDL/IR/PDLOpsTypes.cpp.inc",
5935         ),
5936     ],
5937     tblgen = ":mlir-tblgen",
5938     td_file = "include/mlir/Dialect/PDL/IR/PDLTypes.td",
5939     deps = [":PDLDialectTdFiles"],
5942 cc_library(
5943     name = "PDLInterpDialect",
5944     srcs = glob([
5945         "lib/Dialect/PDLInterp/IR/*.cpp",
5946         "lib/Dialect/PDLInterp/IR/*.h",
5947     ]),
5948     hdrs = glob([
5949         "include/mlir/Dialect/PDLInterp/IR/*.h",
5950     ]),
5951     includes = ["include"],
5952     deps = [
5953         ":FunctionInterfaces",
5954         ":IR",
5955         ":InferTypeOpInterface",
5956         ":PDLDialect",
5957         ":PDLInterpOpsIncGen",
5958         ":SideEffectInterfaces",
5959         "//llvm:Support",
5960     ],
5963 td_library(
5964     name = "PDLInterpOpsTdFiles",
5965     srcs = ["include/mlir/Dialect/PDLInterp/IR/PDLInterpOps.td"],
5966     includes = ["include"],
5967     deps = [
5968         ":FunctionInterfacesTdFiles",
5969         ":OpBaseTdFiles",
5970         ":PDLDialectTdFiles",
5971         ":SideEffectInterfacesTdFiles",
5972     ],
5975 gentbl_cc_library(
5976     name = "PDLInterpOpsIncGen",
5977     tbl_outs = [
5978         (
5979             ["-gen-op-decls"],
5980             "include/mlir/Dialect/PDLInterp/IR/PDLInterpOps.h.inc",
5981         ),
5982         (
5983             ["-gen-op-defs"],
5984             "include/mlir/Dialect/PDLInterp/IR/PDLInterpOps.cpp.inc",
5985         ),
5986         (
5987             [
5988                 "-gen-dialect-decls",
5989                 "-dialect=pdl_interp",
5990             ],
5991             "include/mlir/Dialect/PDLInterp/IR/PDLInterpOpsDialect.h.inc",
5992         ),
5993         (
5994             [
5995                 "-gen-dialect-defs",
5996                 "-dialect=pdl_interp",
5997             ],
5998             "include/mlir/Dialect/PDLInterp/IR/PDLInterpOpsDialect.cpp.inc",
5999         ),
6000     ],
6001     tblgen = ":mlir-tblgen",
6002     td_file = "include/mlir/Dialect/PDLInterp/IR/PDLInterpOps.td",
6003     deps = [":PDLInterpOpsTdFiles"],
6006 td_library(
6007     name = "SPIRVOpsTdFiles",
6008     srcs = glob(["include/mlir/Dialect/SPIRV/IR/*.td"]),
6009     includes = ["include"],
6010     deps = [
6011         ":BuiltinDialectTdFiles",
6012         ":CallInterfacesTdFiles",
6013         ":ControlFlowInterfacesTdFiles",
6014         ":FunctionInterfacesTdFiles",
6015         ":InferTypeOpInterfaceTdFiles",
6016         ":OpBaseTdFiles",
6017         ":SideEffectInterfacesTdFiles",
6018     ],
6021 gentbl_cc_library(
6022     name = "SPIRVOpsIncGen",
6023     tbl_outs = [
6024         (
6025             ["-gen-op-decls"],
6026             "include/mlir/Dialect/SPIRV/IR/SPIRVOps.h.inc",
6027         ),
6028         (
6029             ["-gen-op-defs"],
6030             "include/mlir/Dialect/SPIRV/IR/SPIRVOps.cpp.inc",
6031         ),
6032         (
6033             ["-gen-dialect-decls"],
6034             "include/mlir/Dialect/SPIRV/IR/SPIRVOpsDialect.h.inc",
6035         ),
6036         (
6037             ["-gen-dialect-defs"],
6038             "include/mlir/Dialect/SPIRV/IR/SPIRVOpsDialect.cpp.inc",
6039         ),
6040         (
6041             ["-gen-op-doc"],
6042             "g3doc/Dialects/SPIRV/SPIRVOps.md",
6043         ),
6044         (
6045             ["-gen-enum-decls"],
6046             "include/mlir/Dialect/SPIRV/IR/SPIRVEnums.h.inc",
6047         ),
6048         (
6049             ["-gen-enum-defs"],
6050             "include/mlir/Dialect/SPIRV/IR/SPIRVEnums.cpp.inc",
6051         ),
6052         (
6053             ["-gen-spirv-enum-avail-decls"],
6054             "include/mlir/Dialect/SPIRV/IR/SPIRVEnumAvailability.h.inc",
6055         ),
6056         (
6057             ["-gen-spirv-enum-avail-defs"],
6058             "include/mlir/Dialect/SPIRV/IR/SPIRVEnumAvailability.cpp.inc",
6059         ),
6060         (
6061             ["-gen-spirv-capability-implication"],
6062             "include/mlir/Dialect/SPIRV/IR/SPIRVCapabilityImplication.inc",
6063         ),
6064     ],
6065     tblgen = ":mlir-tblgen",
6066     td_file = "include/mlir/Dialect/SPIRV/IR/SPIRVOps.td",
6067     deps = [":SPIRVOpsTdFiles"],
6070 gentbl_cc_library(
6071     name = "SPIRVAttributesIncGen",
6072     tbl_outs = [
6073         (
6074             ["-gen-attrdef-decls"],
6075             "include/mlir/Dialect/SPIRV/IR/SPIRVAttributes.h.inc",
6076         ),
6077         (
6078             ["-gen-attrdef-defs"],
6079             "include/mlir/Dialect/SPIRV/IR/SPIRVAttributes.cpp.inc",
6080         ),
6081     ],
6082     tblgen = ":mlir-tblgen",
6083     td_file = "include/mlir/Dialect/SPIRV/IR/SPIRVAttributes.td",
6084     deps = [":SPIRVOpsTdFiles"],
6087 gentbl_cc_library(
6088     name = "SPIRVCanonicalizationIncGen",
6089     strip_include_prefix = "lib/Dialect/SPIRV/IR",
6090     tbl_outs = [
6091         (
6092             ["-gen-rewriters"],
6093             "lib/Dialect/SPIRV/IR/SPIRVCanonicalization.inc",
6094         ),
6095     ],
6096     tblgen = ":mlir-tblgen",
6097     td_file = "lib/Dialect/SPIRV/IR/SPIRVCanonicalization.td",
6098     deps = [":SPIRVOpsTdFiles"],
6101 gentbl_cc_library(
6102     name = "SPIRVAvailabilityIncGen",
6103     tbl_outs = [
6104         (
6105             ["-gen-avail-interface-decls"],
6106             "include/mlir/Dialect/SPIRV/IR/SPIRVAvailability.h.inc",
6107         ),
6108         (
6109             ["-gen-avail-interface-defs"],
6110             "include/mlir/Dialect/SPIRV/IR/SPIRVAvailability.cpp.inc",
6111         ),
6112         (
6113             ["-gen-spirv-avail-impls"],
6114             "include/mlir/Dialect/SPIRV/IR/SPIRVOpAvailabilityImpl.inc",
6115         ),
6116     ],
6117     tblgen = ":mlir-tblgen",
6118     td_file = "include/mlir/Dialect/SPIRV/IR/SPIRVOps.td",
6119     deps = [":SPIRVOpsTdFiles"],
6122 gentbl_cc_library(
6123     name = "SPIRVAttrUtilsGen",
6124     tbl_outs = [
6125         (
6126             ["-gen-spirv-attr-utils"],
6127             "include/mlir/Dialect/SPIRV/IR/SPIRVAttrUtils.inc",
6128         ),
6129     ],
6130     tblgen = ":mlir-tblgen",
6131     td_file = "include/mlir/Dialect/SPIRV/IR/SPIRVBase.td",
6132     deps = [":SPIRVOpsTdFiles"],
6135 gentbl_cc_library(
6136     name = "SPIRVSerializationGen",
6137     tbl_outs = [
6138         (
6139             ["-gen-spirv-serialization"],
6140             "include/mlir/Dialect/SPIRV/IR/SPIRVSerialization.inc",
6141         ),
6142     ],
6143     tblgen = ":mlir-tblgen",
6144     td_file = "include/mlir/Dialect/SPIRV/IR/SPIRVOps.td",
6145     deps = [":SPIRVOpsTdFiles"],
6148 cc_library(
6149     name = "SPIRVDialect",
6150     srcs = glob([
6151         "lib/Dialect/SPIRV/IR/*.cpp",
6152         "lib/Dialect/SPIRV/IR/*.h",
6153     ]) + ["include/mlir/Transforms/InliningUtils.h"],
6154     hdrs = glob([
6155         "include/mlir/Dialect/SPIRV/IR/*.h",
6156     ]),
6157     includes = ["include"],
6158     deps = [
6159         ":CommonFolders",
6160         ":ControlFlowInterfaces",
6161         ":FunctionInterfaces",
6162         ":IR",
6163         ":InferTypeOpInterface",
6164         ":Parser",
6165         ":SPIRVAttrUtilsGen",
6166         ":SPIRVAttributesIncGen",
6167         ":SPIRVAvailabilityIncGen",
6168         ":SPIRVCanonicalizationIncGen",
6169         ":SPIRVOpsIncGen",
6170         ":SPIRVSerializationGen",
6171         ":SideEffectInterfaces",
6172         ":Support",
6173         ":Transforms",
6174         ":UBDialect",
6175         "//llvm:Support",
6176     ],
6179 gentbl_cc_library(
6180     name = "SPIRVPassIncGen",
6181     tbl_outs = [
6182         (
6183             [
6184                 "-gen-pass-decls",
6185                 "-name=SPIRV",
6186             ],
6187             "include/mlir/Dialect/SPIRV/Transforms/Passes.h.inc",
6188         ),
6189     ],
6190     tblgen = ":mlir-tblgen",
6191     td_file = "include/mlir/Dialect/SPIRV/Transforms/Passes.td",
6192     deps = [":PassBaseTdFiles"],
6195 cc_library(
6196     name = "SPIRVUtils",
6197     srcs = glob([
6198         "lib/Dialect/SPIRV/Utils/*.cpp",
6199     ]),
6200     hdrs = glob([
6201         "include/mlir/Dialect/SPIRV/Utils/*.h",
6202     ]),
6203     includes = ["include"],
6204     deps = [
6205         ":SPIRVDialect",
6206         "//llvm:Support",
6207     ],
6210 cc_library(
6211     name = "SPIRVConversion",
6212     srcs = ["lib/Dialect/SPIRV/Transforms/SPIRVConversion.cpp"],
6213     hdrs = ["include/mlir/Dialect/SPIRV/Transforms/SPIRVConversion.h"],
6214     includes = ["include"],
6215     deps = [
6216         ":FuncDialect",
6217         ":IR",
6218         ":SPIRVDialect",
6219         ":TransformUtils",
6220         "//llvm:Support",
6221     ],
6224 cc_library(
6225     name = "SPIRVTransforms",
6226     srcs = glob(
6227         [
6228             "lib/Dialect/SPIRV/Transforms/*.cpp",
6229             "lib/Dialect/SPIRV/Transforms/*.h",
6230         ],
6231         exclude = ["lib/Dialect/SPIRV/Transforms/SPIRVConversion.cpp"],
6232     ),
6233     hdrs = glob(
6234         ["include/mlir/Dialect/SPIRV/Transforms/*.h"],
6235         exclude = ["include/mlir/Dialect/SPIRV/Transforms/SPIRVConversion.h"],
6236     ),
6237     includes = ["include"],
6238     deps = [
6239         ":FuncDialect",
6240         ":IR",
6241         ":Pass",
6242         ":SPIRVConversion",
6243         ":SPIRVDialect",
6244         ":SPIRVPassIncGen",
6245         ":SPIRVUtils",
6246         ":Support",
6247         ":Transforms",
6248         "//llvm:Support",
6249     ],
6252 cc_library(
6253     name = "SPIRVCommonConversion",
6254     hdrs = ["lib/Conversion/SPIRVCommon/Pattern.h"],
6255     includes = ["include"],
6256     deps = [
6257         ":IR",
6258         ":SPIRVDialect",
6259         ":Transforms",
6260         "//llvm:Support",
6261     ],
6264 cc_library(
6265     name = "MathToSPIRV",
6266     srcs = glob([
6267         "lib/Conversion/MathToSPIRV/*.cpp",
6268         "lib/Conversion/MathToSPIRV/*.h",
6269     ]),
6270     hdrs = glob([
6271         "include/mlir/Conversion/MathToSPIRV/*.h",
6272     ]),
6273     includes = [
6274         "include",
6275         "lib/Conversion/MathToSPIRV",
6276     ],
6277     deps = [
6278         ":ConversionPassIncGen",
6279         ":IR",
6280         ":MathDialect",
6281         ":Pass",
6282         ":SPIRVCommonConversion",
6283         ":SPIRVConversion",
6284         ":SPIRVDialect",
6285         ":Support",
6286         ":Transforms",
6287         "//llvm:Support",
6288     ],
6291 cc_library(
6292     name = "FuncToSPIRV",
6293     srcs = glob([
6294         "lib/Conversion/FuncToSPIRV/*.cpp",
6295         "lib/Conversion/FuncToSPIRV/*.h",
6296     ]),
6297     hdrs = glob([
6298         "include/mlir/Conversion/FuncToSPIRV/*.h",
6299     ]),
6300     includes = [
6301         "include",
6302         "lib/Conversion/FuncToSPIRV",
6303     ],
6304     deps = [
6305         ":ControlFlowToSPIRV",
6306         ":ConversionPassIncGen",
6307         ":FuncDialect",
6308         ":IR",
6309         ":MathToSPIRV",
6310         ":Pass",
6311         ":SPIRVCommonConversion",
6312         ":SPIRVConversion",
6313         ":SPIRVDialect",
6314         ":SPIRVUtils",
6315         ":Support",
6316         ":TensorDialect",
6317         ":Transforms",
6318         ":VectorDialect",
6319         "//llvm:Support",
6320     ],
6323 cc_library(
6324     name = "TensorToLinalg",
6325     srcs = glob([
6326         "lib/Conversion/TensorToLinalg/*.cpp",
6327         "lib/Conversion/TensorToLinalg/*.h",
6328     ]),
6329     hdrs = glob([
6330         "include/mlir/Conversion/TensorToLinalg/*.h",
6331     ]),
6332     includes = [
6333         "include",
6334         "lib/Conversion/TensorToLinalg",
6335     ],
6336     deps = [
6337         ":ArithDialect",
6338         ":ConversionPassIncGen",
6339         ":FuncDialect",
6340         ":IR",
6341         ":LinalgDialect",
6342         ":LinalgTransforms",
6343         ":Pass",
6344         ":Support",
6345         ":TensorDialect",
6346         ":Transforms",
6347         ":VectorDialect",
6348         "//llvm:Support",
6349     ],
6352 cc_library(
6353     name = "TensorToSPIRV",
6354     srcs = glob([
6355         "lib/Conversion/TensorToSPIRV/*.cpp",
6356         "lib/Conversion/TensorToSPIRV/*.h",
6357     ]),
6358     hdrs = glob([
6359         "include/mlir/Conversion/TensorToSPIRV/*.h",
6360     ]),
6361     includes = [
6362         "include",
6363         "lib/Conversion/TensorToSPIRV",
6364     ],
6365     deps = [
6366         ":ArithToSPIRV",
6367         ":ControlFlowToSPIRV",
6368         ":ConversionPassIncGen",
6369         ":FuncDialect",
6370         ":FuncToSPIRV",
6371         ":IR",
6372         ":MathToSPIRV",
6373         ":Pass",
6374         ":SPIRVCommonConversion",
6375         ":SPIRVConversion",
6376         ":SPIRVDialect",
6377         ":SPIRVUtils",
6378         ":Support",
6379         ":TensorDialect",
6380         ":Transforms",
6381         ":VectorDialect",
6382         "//llvm:Support",
6383     ],
6386 cc_library(
6387     name = "SPIRVBinaryUtils",
6388     srcs = ["lib/Target/SPIRV/SPIRVBinaryUtils.cpp"],
6389     hdrs = ["include/mlir/Target/SPIRV/SPIRVBinaryUtils.h"],
6390     includes = ["include"],
6391     deps = [
6392         ":SPIRVAttrUtilsGen",
6393         ":SPIRVDialect",
6394         ":SPIRVOpsIncGen",
6395         ":Support",
6396         "//llvm:Support",
6397     ],
6400 cc_library(
6401     name = "SPIRVSerialization",
6402     srcs = [
6403         "lib/Target/SPIRV/Serialization/Serialization.cpp",
6404         "lib/Target/SPIRV/Serialization/SerializeOps.cpp",
6405         "lib/Target/SPIRV/Serialization/Serializer.cpp",
6406         "lib/Target/SPIRV/Serialization/Serializer.h",
6407     ],
6408     hdrs = ["include/mlir/Target/SPIRV/Serialization.h"],
6409     includes = ["include"],
6410     deps = [
6411         ":IR",
6412         ":SPIRVAttrUtilsGen",
6413         ":SPIRVBinaryUtils",
6414         ":SPIRVDialect",
6415         ":SPIRVOpsIncGen",
6416         ":SPIRVSerializationGen",
6417         ":Support",
6418         ":Transforms",
6419         "//llvm:Support",
6420     ],
6423 cc_library(
6424     name = "SPIRVDeserialization",
6425     srcs = glob([
6426         "lib/Target/SPIRV/Deserialization/*.cpp",
6427         "lib/Target/SPIRV/Deserialization/*.h",
6428     ]),
6429     hdrs = ["include/mlir/Target/SPIRV/Deserialization.h"],
6430     includes = ["include"],
6431     deps = [
6432         ":IR",
6433         ":SPIRVAttrUtilsGen",
6434         ":SPIRVBinaryUtils",
6435         ":SPIRVDialect",
6436         ":SPIRVOpsIncGen",
6437         ":SPIRVSerializationGen",
6438         ":Support",
6439         ":Transforms",
6440         "//llvm:Support",
6441     ],
6444 cc_library(
6445     name = "SPIRVModuleCombiner",
6446     srcs = glob(
6447         ["lib/Dialect/SPIRV/Linking/ModuleCombiner/*.cpp"],
6448     ),
6449     hdrs = ["include/mlir/Dialect/SPIRV/Linking/ModuleCombiner.h"],
6450     includes = ["include"],
6451     deps = [
6452         ":IR",
6453         ":SPIRVDialect",
6454         ":Support",
6455         "//llvm:Support",
6456     ],
6459 cc_library(
6460     name = "SPIRVTranslateRegistration",
6461     srcs = ["lib/Target/SPIRV/TranslateRegistration.cpp"],
6462     includes = ["include"],
6463     deps = [
6464         ":IR",
6465         ":Parser",
6466         ":SPIRVDeserialization",
6467         ":SPIRVDialect",
6468         ":SPIRVSerialization",
6469         ":Support",
6470         ":TranslateLib",
6471         "//llvm:Support",
6472     ],
6475 td_library(
6476     name = "TensorOpsTdFiles",
6477     srcs = [
6478         "include/mlir/Dialect/Tensor/IR/TensorBase.td",
6479         "include/mlir/Dialect/Tensor/IR/TensorOps.td",
6480     ],
6481     includes = ["include"],
6482     deps = [
6483         ":CastInterfacesTdFiles",
6484         ":ControlFlowInterfacesTdFiles",
6485         ":DestinationStyleOpInterfaceTdFiles",
6486         ":InferTypeOpInterfaceTdFiles",
6487         ":OpBaseTdFiles",
6488         ":ParallelCombiningOpInterfaceTdFiles",
6489         ":ShapedOpInterfacesTdFiles",
6490         ":SideEffectInterfacesTdFiles",
6491         ":TilingInterfaceTdFiles",
6492         ":ViewLikeInterfaceTdFiles",
6493     ],
6496 gentbl_cc_library(
6497     name = "TensorOpsIncGen",
6498     tbl_outs = [
6499         (
6500             [
6501                 "-gen-dialect-decls",
6502                 "-dialect=tensor",
6503             ],
6504             "include/mlir/Dialect/Tensor/IR/TensorOpsDialect.h.inc",
6505         ),
6506         (
6507             [
6508                 "-gen-dialect-defs",
6509                 "-dialect=tensor",
6510             ],
6511             "include/mlir/Dialect/Tensor/IR/TensorOpsDialect.cpp.inc",
6512         ),
6513         (
6514             ["-gen-op-decls"],
6515             "include/mlir/Dialect/Tensor/IR/TensorOps.h.inc",
6516         ),
6517         (
6518             ["-gen-op-defs"],
6519             "include/mlir/Dialect/Tensor/IR/TensorOps.cpp.inc",
6520         ),
6521     ],
6522     tblgen = ":mlir-tblgen",
6523     td_file = "include/mlir/Dialect/Tensor/IR/TensorOps.td",
6524     deps = [":TensorOpsTdFiles"],
6527 cc_library(
6528     name = "TensorDialect",
6529     srcs = [
6530         "include/mlir/Transforms/InliningUtils.h",
6531         "lib/Dialect/Tensor/IR/TensorDialect.cpp",
6532         "lib/Dialect/Tensor/IR/TensorOps.cpp",
6533         "lib/Dialect/Tensor/IR/ValueBoundsOpInterfaceImpl.cpp",
6534     ],
6535     hdrs = [
6536         "include/mlir/Dialect/Tensor/IR/Tensor.h",
6537         "include/mlir/Dialect/Tensor/IR/ValueBoundsOpInterfaceImpl.h",
6538     ],
6539     includes = ["include"],
6540     deps = [
6541         ":AffineDialect",
6542         ":ArithDialect",
6543         ":ArithUtils",
6544         ":CastInterfaces",
6545         ":ComplexDialect",
6546         ":ControlFlowInterfaces",
6547         ":DestinationStyleOpInterface",
6548         ":DialectUtils",
6549         ":IR",
6550         ":InferTypeOpInterface",
6551         ":ParallelCombiningOpInterface",
6552         ":ShapedOpInterfaces",
6553         ":SideEffectInterfaces",
6554         ":Support",
6555         ":TensorOpsIncGen",
6556         ":TilingInterface",
6557         ":ValueBoundsOpInterface",
6558         ":ViewLikeInterface",
6559         "//llvm:Support",
6560     ],
6563 cc_library(
6564     name = "TensorInferTypeOpInterfaceImpl",
6565     srcs = ["lib/Dialect/Tensor/IR/TensorInferTypeOpInterfaceImpl.cpp"],
6566     hdrs = ["include/mlir/Dialect/Tensor/IR/TensorInferTypeOpInterfaceImpl.h"],
6567     includes = ["include"],
6568     deps = [
6569         ":AffineDialect",
6570         ":ArithUtils",
6571         ":DialectUtils",
6572         ":IR",
6573         ":InferTypeOpInterface",
6574         ":TensorDialect",
6575         "//llvm:Support",
6576     ],
6579 cc_library(
6580     name = "TensorTilingInterfaceImpl",
6581     srcs = ["lib/Dialect/Tensor/IR/TensorTilingInterfaceImpl.cpp"],
6582     hdrs = ["include/mlir/Dialect/Tensor/IR/TensorTilingInterfaceImpl.h"],
6583     includes = ["include"],
6584     deps = [
6585         ":AffineDialect",
6586         ":AffineUtils",
6587         ":ArithUtils",
6588         ":DialectUtils",
6589         ":IR",
6590         ":LinalgDialect",
6591         ":LinalgUtils",
6592         ":SCFDialect",
6593         ":TensorDialect",
6594         ":TensorUtils",
6595         ":TilingInterface",
6596         ":ValueBoundsOpInterface",
6597         "//llvm:Support",
6598     ],
6601 cc_library(
6602     name = "TensorUtils",
6603     srcs = ["lib/Dialect/Tensor/Utils/Utils.cpp"],
6604     hdrs = ["include/mlir/Dialect/Tensor/Utils/Utils.h"],
6605     includes = ["include"],
6606     deps = [
6607         ":AffineDialect",
6608         ":ArithDialect",
6609         ":ArithUtils",
6610         ":DialectUtils",
6611         ":TensorDialect",
6612         ":ValueBoundsOpInterface",
6613         "//llvm:Support",
6614     ],
6617 gentbl_cc_library(
6618     name = "TensorPassIncGen",
6619     tbl_outs = [
6620         (
6621             [
6622                 "-gen-pass-decls",
6623                 "-name=Tensor",
6624             ],
6625             "include/mlir/Dialect/Tensor/Transforms/Passes.h.inc",
6626         ),
6627     ],
6628     tblgen = ":mlir-tblgen",
6629     td_file = "include/mlir/Dialect/Tensor/Transforms/Passes.td",
6630     deps = [":PassBaseTdFiles"],
6633 cc_library(
6634     name = "TensorTransforms",
6635     srcs = glob(
6636         [
6637             "lib/Dialect/Tensor/Transforms/*.cpp",
6638             "lib/Dialect/Tensor/Transforms/*.h",
6639         ],
6640     ),
6641     hdrs = [
6642         "include/mlir/Dialect/Tensor/Transforms/BufferizableOpInterfaceImpl.h",
6643         "include/mlir/Dialect/Tensor/Transforms/Passes.h",
6644         "include/mlir/Dialect/Tensor/Transforms/TransformUtils.h",
6645         "include/mlir/Dialect/Tensor/Transforms/Transforms.h",
6646     ],
6647     includes = ["include"],
6648     deps = [
6649         ":AffineDialect",
6650         ":AffineTransforms",
6651         ":AffineUtils",
6652         ":ArithDialect",
6653         ":ArithUtils",
6654         ":BufferizationDialect",
6655         ":BufferizationTransforms",
6656         ":DialectUtils",
6657         ":FuncDialect",
6658         ":IR",
6659         ":LinalgDialect",
6660         ":MemRefDialect",
6661         ":Pass",
6662         ":SCFDialect",
6663         ":TensorDialect",
6664         ":TensorPassIncGen",
6665         ":TensorUtils",
6666         ":TilingInterface",
6667         ":Transforms",
6668         ":ValueBoundsOpInterface",
6669         ":VectorDialect",
6670         "//llvm:Support",
6671     ],
6674 td_library(
6675     name = "TensorTransformOpsTdFiles",
6676     srcs = [
6677         "include/mlir/Dialect/Tensor/TransformOps/TensorTransformOps.td",
6678     ],
6679     includes = ["include"],
6680     deps = [
6681         ":TransformDialectTdFiles",
6682     ],
6685 gentbl_cc_library(
6686     name = "TensorTransformOpsIncGen",
6687     tbl_outs = [
6688         (
6689             ["-gen-op-decls"],
6690             "include/mlir/Dialect/Tensor/TransformOps/TensorTransformOps.h.inc",
6691         ),
6692         (
6693             ["-gen-op-defs"],
6694             "include/mlir/Dialect/Tensor/TransformOps/TensorTransformOps.cpp.inc",
6695         ),
6696     ],
6697     tblgen = ":mlir-tblgen",
6698     td_file = "include/mlir/Dialect/Tensor/TransformOps/TensorTransformOps.td",
6699     deps = [
6700         ":TensorTransformOpsTdFiles",
6701     ],
6704 cc_library(
6705     name = "TensorTransformOps",
6706     srcs = glob(["lib/Dialect/Tensor/TransformOps/*.cpp"]),
6707     hdrs = glob(["include/mlir/Dialect/Tensor/TransformOps/*.h"]),
6708     includes = ["include"],
6709     deps = [
6710         ":AffineDialect",
6711         ":IR",
6712         ":SCFDialect",
6713         ":TensorDialect",
6714         ":TensorTransformOpsIncGen",
6715         ":TensorTransforms",
6716         ":TensorUtils",
6717         ":TransformDialect",
6718         ":ValueBoundsOpInterface",
6719         "//llvm:Support",
6720     ],
6723 cc_library(
6724     name = "Rewrite",
6725     srcs = glob([
6726         "lib/Rewrite/*.cpp",
6727         "lib/Rewrite/*.h",
6728     ]),
6729     hdrs = glob(["include/mlir/Rewrite/*.h"]),
6730     includes = ["include"],
6731     deps = [
6732         ":Analysis",
6733         ":IR",
6734         ":PDLDialect",
6735         ":PDLInterpDialect",
6736         ":PDLToPDLInterp",
6737         ":Pass",
6738         ":SideEffectInterfaces",
6739         "//llvm:Support",
6740     ],
6743 cc_library(
6744     name = "TransformUtils",
6745     srcs = glob([
6746         "lib/Transforms/Utils/*.cpp",
6747         "lib/Transforms/Utils/*.h",
6748     ]),
6749     hdrs = glob(
6750         [
6751             "include/mlir/Transforms/*.h",
6752         ],
6753         exclude = ["include/mlir/Transforms/Passes.h"],
6754     ),
6755     includes = ["include"],
6756     deps = [
6757         ":ControlFlowInterfaces",
6758         ":FunctionInterfaces",
6759         ":IR",
6760         ":LoopLikeInterface",
6761         ":MemorySlotInterfaces",
6762         ":Rewrite",
6763         ":SideEffectInterfaces",
6764         ":Support",
6765         ":TransformsPassIncGen",
6766         ":config",
6767         "//llvm:Support",
6768     ],
6771 gentbl_cc_library(
6772     name = "DerivedAttributeOpInterfaceIncGen",
6773     tbl_outs = [
6774         (
6775             ["-gen-op-interface-decls"],
6776             "include/mlir/Interfaces/DerivedAttributeOpInterface.h.inc",
6777         ),
6778         (
6779             ["-gen-op-interface-defs"],
6780             "include/mlir/Interfaces/DerivedAttributeOpInterface.cpp.inc",
6781         ),
6782     ],
6783     tblgen = ":mlir-tblgen",
6784     td_file = "include/mlir/Interfaces/DerivedAttributeOpInterface.td",
6785     deps = [":DerivedAttributeOpInterfaceTdFiles"],
6788 cc_library(
6789     name = "DerivedAttributeOpInterface",
6790     srcs = ["lib/Interfaces/DerivedAttributeOpInterface.cpp"],
6791     hdrs = ["include/mlir/Interfaces/DerivedAttributeOpInterface.h"],
6792     includes = ["include"],
6793     deps = [
6794         ":DerivedAttributeOpInterfaceIncGen",
6795         ":IR",
6796         "//llvm:Support",
6797     ],
6800 gentbl_cc_library(
6801     name = "DestinationStyleOpInterfaceIncGen",
6802     tbl_outs = [
6803         (
6804             ["-gen-op-interface-decls"],
6805             "include/mlir/Interfaces/DestinationStyleOpInterface.h.inc",
6806         ),
6807         (
6808             ["-gen-op-interface-defs"],
6809             "include/mlir/Interfaces/DestinationStyleOpInterface.cpp.inc",
6810         ),
6811     ],
6812     tblgen = ":mlir-tblgen",
6813     td_file = "include/mlir/Interfaces/DestinationStyleOpInterface.td",
6814     deps = [":DestinationStyleOpInterfaceTdFiles"],
6817 cc_library(
6818     name = "DestinationStyleOpInterface",
6819     srcs = ["lib/Interfaces/DestinationStyleOpInterface.cpp"],
6820     hdrs = ["include/mlir/Interfaces/DestinationStyleOpInterface.h"],
6821     includes = ["include"],
6822     deps = [
6823         ":DestinationStyleOpInterfaceIncGen",
6824         ":IR",
6825         "//llvm:Support",
6826     ],
6829 gentbl_cc_library(
6830     name = "InferIntRangeInterfaceIncGen",
6831     tbl_outs = [
6832         (
6833             ["-gen-op-interface-decls"],
6834             "include/mlir/Interfaces/InferIntRangeInterface.h.inc",
6835         ),
6836         (
6837             ["-gen-op-interface-defs"],
6838             "include/mlir/Interfaces/InferIntRangeInterface.cpp.inc",
6839         ),
6840     ],
6841     tblgen = ":mlir-tblgen",
6842     td_file = "include/mlir/Interfaces/InferIntRangeInterface.td",
6843     deps = [":InferIntRangeInterfaceTdFiles"],
6846 cc_library(
6847     name = "InferIntRangeInterface",
6848     srcs = ["lib/Interfaces/InferIntRangeInterface.cpp"],
6849     hdrs = ["include/mlir/Interfaces/InferIntRangeInterface.h"],
6850     includes = ["include"],
6851     deps = [
6852         ":IR",
6853         ":InferIntRangeInterfaceIncGen",
6854         "//llvm:Support",
6855     ],
6858 td_library(
6859     name = "DataLayoutInterfacesTdFiles",
6860     srcs = ["include/mlir/Interfaces/DataLayoutInterfaces.td"],
6861     includes = ["include"],
6864 gentbl_cc_library(
6865     name = "DataLayoutInterfacesIncGen",
6866     tbl_outs = [
6867         (
6868             ["-gen-attr-interface-decls"],
6869             "include/mlir/Interfaces/DataLayoutAttrInterface.h.inc",
6870         ),
6871         (
6872             ["-gen-attr-interface-defs"],
6873             "include/mlir/Interfaces/DataLayoutAttrInterface.cpp.inc",
6874         ),
6875         (
6876             ["-gen-op-interface-decls"],
6877             "include/mlir/Interfaces/DataLayoutOpInterface.h.inc",
6878         ),
6879         (
6880             ["-gen-op-interface-defs"],
6881             "include/mlir/Interfaces/DataLayoutOpInterface.cpp.inc",
6882         ),
6883         (
6884             ["-gen-type-interface-decls"],
6885             "include/mlir/Interfaces/DataLayoutTypeInterface.h.inc",
6886         ),
6887         (
6888             ["-gen-type-interface-defs"],
6889             "include/mlir/Interfaces/DataLayoutTypeInterface.cpp.inc",
6890         ),
6891     ],
6892     tblgen = ":mlir-tblgen",
6893     td_file = "include/mlir/Interfaces/DataLayoutInterfaces.td",
6894     deps = [":OpBaseTdFiles"],
6897 gentbl_cc_library(
6898     name = "LoopLikeInterfaceIncGen",
6899     tbl_outs = [
6900         (
6901             ["-gen-op-interface-decls"],
6902             "include/mlir/Interfaces/LoopLikeInterface.h.inc",
6903         ),
6904         (
6905             ["-gen-op-interface-defs"],
6906             "include/mlir/Interfaces/LoopLikeInterface.cpp.inc",
6907         ),
6908     ],
6909     tblgen = ":mlir-tblgen",
6910     td_file = "include/mlir/Interfaces/LoopLikeInterface.td",
6911     deps = [":LoopLikeInterfaceTdFiles"],
6914 gentbl_cc_library(
6915     name = "MemorySlotInterfacesIncGen",
6916     tbl_outs = [
6917         (
6918             ["-gen-op-interface-decls"],
6919             "include/mlir/Interfaces/MemorySlotOpInterfaces.h.inc",
6920         ),
6921         (
6922             ["-gen-op-interface-defs"],
6923             "include/mlir/Interfaces/MemorySlotOpInterfaces.cpp.inc",
6924         ),
6925         (
6926             ["-gen-type-interface-decls"],
6927             "include/mlir/Interfaces/MemorySlotTypeInterfaces.h.inc",
6928         ),
6929         (
6930             ["-gen-type-interface-defs"],
6931             "include/mlir/Interfaces/MemorySlotTypeInterfaces.cpp.inc",
6932         ),
6933     ],
6934     tblgen = ":mlir-tblgen",
6935     td_file = "include/mlir/Interfaces/MemorySlotInterfaces.td",
6936     deps = [":MemorySlotInterfacesTdFiles"],
6939 gentbl_cc_library(
6940     name = "ShapedOpInterfacesIncGen",
6941     tbl_outs = [
6942         (
6943             ["-gen-op-interface-decls"],
6944             "include/mlir/Interfaces/ShapedOpInterfaces.h.inc",
6945         ),
6946         (
6947             ["-gen-op-interface-defs"],
6948             "include/mlir/Interfaces/ShapedOpInterfaces.cpp.inc",
6949         ),
6950     ],
6951     tblgen = ":mlir-tblgen",
6952     td_file = "include/mlir/Interfaces/ShapedOpInterfaces.td",
6953     deps = [":ShapedOpInterfacesTdFiles"],
6956 gentbl_cc_library(
6957     name = "ParallelCombiningOpInterfaceIncGen",
6958     tbl_outs = [
6959         (
6960             ["-gen-op-interface-decls"],
6961             "include/mlir/Interfaces/ParallelCombiningOpInterface.h.inc",
6962         ),
6963         (
6964             ["-gen-op-interface-defs"],
6965             "include/mlir/Interfaces/ParallelCombiningOpInterface.cpp.inc",
6966         ),
6967     ],
6968     tblgen = ":mlir-tblgen",
6969     td_file = "include/mlir/Interfaces/ParallelCombiningOpInterface.td",
6970     deps = [":ParallelCombiningOpInterfaceTdFiles"],
6973 gentbl_cc_library(
6974     name = "RuntimeVerifiableOpInterfaceIncGen",
6975     tbl_outs = [
6976         (
6977             ["-gen-op-interface-decls"],
6978             "include/mlir/Interfaces/RuntimeVerifiableOpInterface.h.inc",
6979         ),
6980         (
6981             ["-gen-op-interface-defs"],
6982             "include/mlir/Interfaces/RuntimeVerifiableOpInterface.cpp.inc",
6983         ),
6984     ],
6985     tblgen = ":mlir-tblgen",
6986     td_file = "include/mlir/Interfaces/RuntimeVerifiableOpInterface.td",
6987     deps = [":RuntimeVerifiableOpInterfaceTdFiles"],
6990 gentbl_cc_library(
6991     name = "VectorInterfacesIncGen",
6992     tbl_outs = [
6993         (
6994             ["-gen-op-interface-decls"],
6995             "include/mlir/Interfaces/VectorInterfaces.h.inc",
6996         ),
6997         (
6998             ["-gen-op-interface-defs"],
6999             "include/mlir/Interfaces/VectorInterfaces.cpp.inc",
7000         ),
7001     ],
7002     tblgen = ":mlir-tblgen",
7003     td_file = "include/mlir/Interfaces/VectorInterfaces.td",
7004     deps = [":VectorInterfacesTdFiles"],
7007 gentbl_cc_library(
7008     name = "ViewLikeInterfaceIncGen",
7009     tbl_outs = [
7010         (
7011             ["-gen-op-interface-decls"],
7012             "include/mlir/Interfaces/ViewLikeInterface.h.inc",
7013         ),
7014         (
7015             ["-gen-op-interface-defs"],
7016             "include/mlir/Interfaces/ViewLikeInterface.cpp.inc",
7017         ),
7018     ],
7019     tblgen = ":mlir-tblgen",
7020     td_file = "include/mlir/Interfaces/ViewLikeInterface.td",
7021     deps = [":ViewLikeInterfaceTdFiles"],
7024 gentbl_cc_library(
7025     name = "CopyOpInterfaceIncGen",
7026     tbl_outs = [
7027         (
7028             ["-gen-op-interface-decls"],
7029             "include/mlir/Interfaces/CopyOpInterface.h.inc",
7030         ),
7031         (
7032             ["-gen-op-interface-defs"],
7033             "include/mlir/Interfaces/CopyOpInterface.cpp.inc",
7034         ),
7035     ],
7036     tblgen = ":mlir-tblgen",
7037     td_file = "include/mlir/Interfaces/CopyOpInterface.td",
7038     deps = [":CopyOpInterfaceTdFiles"],
7041 gentbl_cc_library(
7042     name = "TransformsPassIncGen",
7043     tbl_outs = [
7044         (
7045             [
7046                 "-gen-pass-decls",
7047                 "-name=Transforms",
7048             ],
7049             "include/mlir/Transforms/Passes.h.inc",
7050         ),
7051         (
7052             [
7053                 "-gen-pass-capi-header",
7054                 "--prefix=Transforms",
7055             ],
7056             "include/mlir/Transforms/Transforms.capi.h.inc",
7057         ),
7058         (
7059             [
7060                 "-gen-pass-capi-impl",
7061                 "--prefix=Transforms",
7062             ],
7063             "include/mlir/Transforms/Transforms.capi.cpp.inc",
7064         ),
7065     ],
7066     tblgen = ":mlir-tblgen",
7067     td_file = "include/mlir/Transforms/Passes.td",
7068     deps = [
7069         ":PassBaseTdFiles",
7070         ":RewritePassBaseTdFiles",
7071     ],
7074 cc_library(
7075     name = "Transforms",
7076     srcs = glob([
7077         "lib/Transforms/*.cpp",
7078         "lib/Transforms/*.h",
7079     ]),
7080     hdrs = glob(["include/mlir/Transforms/*.h"]),
7081     includes = ["include"],
7082     deps = [
7083         ":Analysis",
7084         ":ControlFlowInterfaces",
7085         ":FunctionInterfaces",
7086         ":IR",
7087         ":LoopLikeInterface",
7088         ":MemorySlotInterfaces",
7089         ":Pass",
7090         ":Rewrite",
7091         ":RuntimeVerifiableOpInterface",
7092         ":SideEffectInterfaces",
7093         ":Support",
7094         ":TransformUtils",
7095         ":TransformsPassIncGen",
7096         "//llvm:Support",
7097     ],
7100 cc_library(
7101     name = "CommonFolders",
7102     srcs = [
7103     ],
7104     hdrs = ["include/mlir/Dialect/CommonFolders.h"],
7105     includes = ["include"],
7106     deps = [
7107         ":IR",
7108         "//llvm:Support",
7109     ],
7112 cc_library(
7113     name = "SCFToGPU",
7114     srcs = glob(["lib/Conversion/SCFToGPU/*.cpp"]),
7115     hdrs = glob(["include/mlir/Conversion/SCFToGPU/*.h"]),
7116     includes = ["include"],
7117     deps = [
7118         ":AffineDialect",
7119         ":AffineToStandard",
7120         ":ArithDialect",
7121         ":ComplexDialect",
7122         ":ConversionPassIncGen",
7123         ":FuncDialect",
7124         ":FunctionInterfaces",
7125         ":GPUDialect",
7126         ":GPUTransforms",
7127         ":IR",
7128         ":MemRefDialect",
7129         ":Pass",
7130         ":SCFDialect",
7131         ":SideEffectInterfaces",
7132         ":Support",
7133         ":TransformUtils",
7134         ":Transforms",
7135         "//llvm:Support",
7136     ],
7139 cc_library(
7140     name = "SCFToSPIRV",
7141     srcs = glob([
7142         "lib/Conversion/SCFToSPIRV/*.cpp",
7143         "lib/Conversion/SCFToSPIRV/*.h",
7144     ]),
7145     hdrs = glob([
7146         "include/mlir/Conversion/SCFToSPIRV/*.h",
7147     ]),
7148     includes = ["include"],
7149     deps = [
7150         ":AffineDialect",
7151         ":ArithToSPIRV",
7152         ":ConversionPassIncGen",
7153         ":FuncDialect",
7154         ":FuncToSPIRV",
7155         ":IR",
7156         ":MemRefToSPIRV",
7157         ":Pass",
7158         ":SCFDialect",
7159         ":SPIRVConversion",
7160         ":SPIRVDialect",
7161         ":Support",
7162         ":TransformUtils",
7163         ":Transforms",
7164         "//llvm:Support",
7165     ],
7168 cc_library(
7169     name = "SCFToOpenMP",
7170     srcs = [
7171         "lib/Conversion/SCFToOpenMP/SCFToOpenMP.cpp",
7172     ],
7173     hdrs = ["include/mlir/Conversion/SCFToOpenMP/SCFToOpenMP.h"],
7174     includes = ["include"],
7175     deps = [
7176         ":AffineAnalysis",
7177         ":Analysis",
7178         ":ArithDialect",
7179         ":ConversionPassIncGen",
7180         ":FuncDialect",
7181         ":IR",
7182         ":LLVMDialect",
7183         ":MemRefDialect",
7184         ":OpenMPDialect",
7185         ":Pass",
7186         ":SCFDialect",
7187         ":Support",
7188         ":Transforms",
7189     ],
7192 cc_library(
7193     name = "SCFToControlFlow",
7194     srcs = [
7195         "lib/Conversion/SCFToControlFlow/SCFToControlFlow.cpp",
7196     ],
7197     hdrs = ["include/mlir/Conversion/SCFToControlFlow/SCFToControlFlow.h"],
7198     includes = ["include"],
7199     deps = [
7200         ":ArithDialect",
7201         ":ControlFlowDialect",
7202         ":ConversionPassIncGen",
7203         ":FuncDialect",
7204         ":IR",
7205         ":LLVMDialect",
7206         ":Pass",
7207         ":SCFDialect",
7208         ":Support",
7209         ":TransformUtils",
7210         ":Transforms",
7211     ],
7214 cc_library(
7215     name = "LLVMCommonConversion",
7216     srcs = glob([
7217         "lib/Conversion/LLVMCommon/*.cpp",
7218     ]) + ["lib/Conversion/LLVMCommon/MemRefDescriptor.h"],
7219     hdrs = glob(["include/mlir/Conversion/LLVMCommon/*.h"]),
7220     includes = ["include"],
7221     deps = [
7222         ":IR",
7223         ":LLVMDialect",
7224         ":Support",
7225         ":Transforms",
7226         "//llvm:Core",
7227         "//llvm:Support",
7228     ],
7231 cc_library(
7232     name = "ReconcileUnrealizedCasts",
7233     srcs = glob(["lib/Conversion/ReconcileUnrealizedCasts/*.cpp"]),
7234     hdrs = glob(["include/mlir/Conversion/ReconcileUnrealizedCasts/*.h"]),
7235     includes = ["include"],
7236     deps = [
7237         ":ConversionPassIncGen",
7238         ":IR",
7239         ":Pass",
7240         ":TransformUtils",
7241     ],
7244 cc_library(
7245     name = "ConvertToLLVM",
7246     srcs = glob(["lib/Conversion/ConvertToLLVM/*.cpp"]),
7247     hdrs = glob(["include/mlir/Conversion/ConvertToLLVM/*.h"]),
7248     includes = ["include"],
7249     deps = [
7250         ":ConversionPassIncGen",
7251         ":IR",
7252         ":LLVMCommonConversion",
7253         ":LLVMDialect",
7254         ":Pass",
7255         ":Rewrite",
7256         ":Support",
7257         ":TransformUtils",
7258         "//llvm:Support",
7259     ],
7262 cc_library(
7263     name = "FuncToLLVM",
7264     srcs = [
7265         "lib/Conversion/FuncToLLVM/FuncToLLVM.cpp",
7266     ],
7267     hdrs = [
7268         "include/mlir/Conversion/FuncToLLVM/ConvertFuncToLLVM.h",
7269         "include/mlir/Conversion/FuncToLLVM/ConvertFuncToLLVMPass.h",
7270     ],
7271     includes = ["include"],
7272     deps = [
7273         ":Analysis",
7274         ":ArithToLLVM",
7275         ":ControlFlowToLLVM",
7276         ":ConversionPassIncGen",
7277         ":ConvertToLLVM",
7278         ":DataLayoutInterfaces",
7279         ":DialectUtils",
7280         ":FuncDialect",
7281         ":FuncTransforms",
7282         ":IR",
7283         ":LLVMCommonConversion",
7284         ":LLVMDialect",
7285         ":MathDialect",
7286         ":MemRefDialect",
7287         ":Parser",
7288         ":Pass",
7289         ":Support",
7290         ":TransformUtils",
7291         ":Transforms",
7292         "//llvm:Core",
7293         "//llvm:Support",
7294     ],
7297 cc_library(
7298     name = "ControlFlowToSCF",
7299     srcs = [
7300         "lib/Conversion/ControlFlowToSCF/ControlFlowToSCF.cpp",
7301     ],
7302     hdrs = [
7303         "include/mlir/Conversion/ControlFlowToSCF/ControlFlowToSCF.h",
7304     ],
7305     includes = ["include"],
7306     deps = [
7307         ":ArithDialect",
7308         ":ControlFlowDialect",
7309         ":ConversionPassIncGen",
7310         ":FuncDialect",
7311         ":LLVMDialect",
7312         ":Pass",
7313         ":SCFDialect",
7314         ":Transforms",
7315         ":UBDialect",
7316         "//llvm:Core",
7317         "//llvm:Support",
7318     ],
7321 cc_library(
7322     name = "ControlFlowToLLVM",
7323     srcs = [
7324         "lib/Conversion/ControlFlowToLLVM/ControlFlowToLLVM.cpp",
7325     ],
7326     hdrs = [
7327         "include/mlir/Conversion/ControlFlowToLLVM/ControlFlowToLLVM.h",
7328     ],
7329     includes = ["include"],
7330     deps = [
7331         ":Analysis",
7332         ":ArithToLLVM",
7333         ":ControlFlowDialect",
7334         ":ConversionPassIncGen",
7335         ":ConvertToLLVM",
7336         ":DataLayoutInterfaces",
7337         ":DialectUtils",
7338         ":IR",
7339         ":LLVMCommonConversion",
7340         ":LLVMDialect",
7341         ":MathDialect",
7342         ":MemRefDialect",
7343         ":Parser",
7344         ":Pass",
7345         ":Support",
7346         ":TransformUtils",
7347         ":Transforms",
7348         "//llvm:Core",
7349         "//llvm:Support",
7350     ],
7353 cc_library(
7354     name = "ControlFlowToSPIRV",
7355     srcs = glob(["lib/Conversion/ControlFlowToSPIRV/*.cpp"]),
7356     hdrs = glob(["include/mlir/Conversion/ControlFlowToSPIRV/*.h"]),
7357     includes = ["include"],
7358     deps = [
7359         ":ControlFlowDialect",
7360         ":ConversionPassIncGen",
7361         ":IR",
7362         ":Pass",
7363         ":SPIRVCommonConversion",
7364         ":SPIRVConversion",
7365         ":SPIRVDialect",
7366         ":SPIRVUtils",
7367         ":Support",
7368         ":Transforms",
7369         "//llvm:Support",
7370     ],
7373 cc_library(
7374     name = "MemRefToLLVM",
7375     srcs = glob(["lib/Conversion/MemRefToLLVM/*.cpp"]),
7376     hdrs = glob(["include/mlir/Conversion/MemRefToLLVM/*.h"]),
7377     includes = ["include"],
7378     deps = [
7379         ":Analysis",
7380         ":ArithDialect",
7381         ":ConversionPassIncGen",
7382         ":ConvertToLLVM",
7383         ":DataLayoutInterfaces",
7384         ":FuncDialect",
7385         ":IR",
7386         ":LLVMCommonConversion",
7387         ":LLVMDialect",
7388         ":MemRefDialect",
7389         ":MemRefUtils",
7390         ":Pass",
7391         ":Support",
7392         ":Transforms",
7393         "//llvm:Support",
7394     ],
7397 cc_library(
7398     name = "MemRefToSPIRV",
7399     srcs = glob([
7400         "lib/Conversion/MemRefToSPIRV/*.cpp",
7401         "lib/Conversion/MemRefToSPIRV/*.h",
7402     ]),
7403     hdrs = glob([
7404         "include/mlir/Conversion/MemRefToSPIRV/*.h",
7405     ]),
7406     includes = [
7407         "include",
7408         "lib/Conversion/MemRefToSPIRV",
7409     ],
7410     deps = [
7411         ":ArithDialect",
7412         ":ConversionPassIncGen",
7413         ":FuncDialect",
7414         ":FunctionInterfaces",
7415         ":IR",
7416         ":MemRefDialect",
7417         ":Pass",
7418         ":SPIRVConversion",
7419         ":SPIRVDialect",
7420         ":Support",
7421         ":Transforms",
7422         "//llvm:Support",
7423     ],
7426 cc_library(
7427     name = "ArithAttrToLLVMConversion",
7428     srcs = glob(["lib/Conversion/ArithCommon/*.cpp"]),
7429     hdrs = glob(["include/mlir/Conversion/ArithCommon/*.h"]),
7430     includes = ["include"],
7431     deps = [
7432         ":ArithDialect",
7433         ":LLVMDialect",
7434     ],
7437 cc_library(
7438     name = "ArithToLLVM",
7439     srcs = glob(["lib/Conversion/ArithToLLVM/*.cpp"]),
7440     hdrs = glob(["include/mlir/Conversion/ArithToLLVM/*.h"]),
7441     includes = ["include"],
7442     deps = [
7443         ":Analysis",
7444         ":ArithAttrToLLVMConversion",
7445         ":ArithDialect",
7446         ":ConversionPassIncGen",
7447         ":ConvertToLLVM",
7448         ":IR",
7449         ":LLVMCommonConversion",
7450         ":LLVMDialect",
7451         ":Pass",
7452         ":Support",
7453         ":Transforms",
7454     ],
7457 cc_library(
7458     name = "ArithToSPIRV",
7459     srcs = glob(["lib/Conversion/ArithToSPIRV/*.cpp"]),
7460     hdrs = glob(["include/mlir/Conversion/ArithToSPIRV/*.h"]),
7461     includes = ["include"],
7462     deps = [
7463         ":ArithDialect",
7464         ":ConversionPassIncGen",
7465         ":FuncToSPIRV",
7466         ":IR",
7467         ":Pass",
7468         ":SPIRVCommonConversion",
7469         ":SPIRVConversion",
7470         ":SPIRVDialect",
7471         ":Support",
7472         ":Transforms",
7473         "//llvm:Support",
7474     ],
7477 cc_library(
7478     name = "MathToLLVM",
7479     srcs = glob(["lib/Conversion/MathToLLVM/*.cpp"]),
7480     hdrs = glob(["include/mlir/Conversion/MathToLLVM/*.h"]),
7481     includes = ["include"],
7482     deps = [
7483         ":Analysis",
7484         ":ArithAttrToLLVMConversion",
7485         ":ConversionPassIncGen",
7486         ":ConvertToLLVM",
7487         ":DataLayoutInterfaces",
7488         ":IR",
7489         ":LLVMCommonConversion",
7490         ":LLVMDialect",
7491         ":MathDialect",
7492         ":Pass",
7493         ":Support",
7494         ":Transforms",
7495     ],
7498 cc_library(
7499     name = "MathToFuncs",
7500     srcs = glob(["lib/Conversion/MathToFuncs/*.cpp"]),
7501     hdrs = glob(["include/mlir/Conversion/MathToFuncs/*.h"]),
7502     includes = ["include"],
7503     deps = [
7504         ":ArithDialect",
7505         ":ControlFlowDialect",
7506         ":ConversionPassIncGen",
7507         ":DialectUtils",
7508         ":FuncDialect",
7509         ":IR",
7510         ":LLVMDialect",
7511         ":MathDialect",
7512         ":Pass",
7513         ":SCFDialect",
7514         ":Transforms",
7515         ":VectorDialect",
7516         ":VectorUtils",
7517         "//llvm:Support",
7518     ],
7521 gentbl_cc_library(
7522     name = "BytecodeOpInterfaceIncGen",
7523     tbl_outs = [
7524         (
7525             ["-gen-op-interface-decls"],
7526             "include/mlir/Bytecode/BytecodeOpInterface.h.inc",
7527         ),
7528         (
7529             ["-gen-op-interface-defs"],
7530             "include/mlir/Bytecode/BytecodeOpInterface.cpp.inc",
7531         ),
7532     ],
7533     tblgen = ":mlir-tblgen",
7534     td_file = "include/mlir/Bytecode/BytecodeOpInterface.td",
7535     deps = [":BytecodeOpInterfaceTdFiles"],
7538 gentbl_cc_library(
7539     name = "CallOpInterfacesIncGen",
7540     tbl_outs = [
7541         (
7542             ["-gen-op-interface-decls"],
7543             "include/mlir/Interfaces/CallInterfaces.h.inc",
7544         ),
7545         (
7546             ["-gen-op-interface-defs"],
7547             "include/mlir/Interfaces/CallInterfaces.cpp.inc",
7548         ),
7549     ],
7550     tblgen = ":mlir-tblgen",
7551     td_file = "include/mlir/Interfaces/CallInterfaces.td",
7552     deps = [":CallInterfacesTdFiles"],
7555 cc_library(
7556     name = "CallOpInterfaces",
7557     srcs = ["lib/Interfaces/CallInterfaces.cpp"],
7558     hdrs = ["include/mlir/Interfaces/CallInterfaces.h"],
7559     includes = ["include"],
7560     deps = [
7561         ":CallOpInterfacesIncGen",
7562         ":IR",
7563         "//llvm:Support",
7564     ],
7567 gentbl_cc_library(
7568     name = "CastInterfacesIncGen",
7569     tbl_outs = [
7570         (
7571             ["-gen-op-interface-decls"],
7572             "include/mlir/Interfaces/CastInterfaces.h.inc",
7573         ),
7574         (
7575             ["-gen-op-interface-defs"],
7576             "include/mlir/Interfaces/CastInterfaces.cpp.inc",
7577         ),
7578     ],
7579     tblgen = ":mlir-tblgen",
7580     td_file = "include/mlir/Interfaces/CastInterfaces.td",
7581     deps = [":CastInterfacesTdFiles"],
7584 cc_library(
7585     name = "CastInterfaces",
7586     srcs = ["lib/Interfaces/CastInterfaces.cpp"],
7587     hdrs = ["include/mlir/Interfaces/CastInterfaces.h"],
7588     includes = ["include"],
7589     deps = [
7590         ":CastInterfacesIncGen",
7591         ":IR",
7592         "//llvm:Support",
7593     ],
7596 gentbl_cc_library(
7597     name = "ControlFlowInterfacesIncGen",
7598     tbl_outs = [
7599         (
7600             ["-gen-op-interface-decls"],
7601             "include/mlir/Interfaces/ControlFlowInterfaces.h.inc",
7602         ),
7603         (
7604             ["-gen-op-interface-defs"],
7605             "include/mlir/Interfaces/ControlFlowInterfaces.cpp.inc",
7606         ),
7607     ],
7608     tblgen = ":mlir-tblgen",
7609     td_file = "include/mlir/Interfaces/ControlFlowInterfaces.td",
7610     deps = [":ControlFlowInterfacesTdFiles"],
7613 cc_library(
7614     name = "ControlFlowInterfaces",
7615     srcs = ["lib/Interfaces/ControlFlowInterfaces.cpp"],
7616     hdrs = ["include/mlir/Interfaces/ControlFlowInterfaces.h"],
7617     includes = ["include"],
7618     deps = [
7619         ":ControlFlowInterfacesIncGen",
7620         ":IR",
7621         "//llvm:Support",
7622     ],
7625 gentbl_cc_library(
7626     name = "InferTypeOpInterfaceIncGen",
7627     tbl_outs = [
7628         (
7629             ["-gen-op-interface-decls"],
7630             "include/mlir/Interfaces/InferTypeOpInterface.h.inc",
7631         ),
7632         (
7633             ["-gen-op-interface-defs"],
7634             "include/mlir/Interfaces/InferTypeOpInterface.cpp.inc",
7635         ),
7636     ],
7637     tblgen = ":mlir-tblgen",
7638     td_file = "include/mlir/Interfaces/InferTypeOpInterface.td",
7639     deps = [":InferTypeOpInterfaceTdFiles"],
7642 cc_library(
7643     name = "InferTypeOpInterface",
7644     srcs = ["lib/Interfaces/InferTypeOpInterface.cpp"],
7645     hdrs = ["include/mlir/Interfaces/InferTypeOpInterface.h"],
7646     includes = ["include"],
7647     deps = [
7648         ":IR",
7649         ":InferTypeOpInterfaceIncGen",
7650         ":Support",
7651         "//llvm:Support",
7652     ],
7655 gentbl_cc_library(
7656     name = "SideEffectInterfacesIncGen",
7657     tbl_outs = [
7658         (
7659             ["-gen-op-interface-decls"],
7660             "include/mlir/Interfaces/SideEffectInterfaces.h.inc",
7661         ),
7662         (
7663             ["-gen-op-interface-defs"],
7664             "include/mlir/Interfaces/SideEffectInterfaces.cpp.inc",
7665         ),
7666     ],
7667     tblgen = ":mlir-tblgen",
7668     td_file = "include/mlir/Interfaces/SideEffectInterfaces.td",
7669     deps = [":SideEffectInterfacesTdFiles"],
7672 cc_library(
7673     name = "SideEffectInterfaces",
7674     srcs = ["lib/Interfaces/SideEffectInterfaces.cpp"],
7675     hdrs = ["include/mlir/Interfaces/SideEffectInterfaces.h"],
7676     includes = ["include"],
7677     deps = [
7678         ":IR",
7679         ":SideEffectInterfacesIncGen",
7680         "//llvm:Support",
7681     ],
7684 gentbl_cc_library(
7685     name = "TilingInterfaceIncGen",
7686     tbl_outs = [
7687         (
7688             ["-gen-op-interface-decls"],
7689             "include/mlir/Interfaces/TilingInterface.h.inc",
7690         ),
7691         (
7692             ["-gen-op-interface-defs"],
7693             "include/mlir/Interfaces/TilingInterface.cpp.inc",
7694         ),
7695     ],
7696     tblgen = ":mlir-tblgen",
7697     td_file = "include/mlir/Interfaces/TilingInterface.td",
7698     deps = [":TilingInterfaceTdFiles"],
7701 cc_library(
7702     name = "Analysis",
7703     srcs = glob(
7704         [
7705             "lib/Analysis/*.cpp",
7706             "lib/Analysis/*.h",
7707             "lib/Analysis/*/*.cpp",
7708             "lib/Analysis/*/*.h",
7709         ],
7710     ),
7711     hdrs = glob(
7712         [
7713             "include/mlir/Analysis/*.h",
7714             "include/mlir/Analysis/*/*.h",
7715         ],
7716     ),
7717     copts = [
7718         "$(STACK_FRAME_UNLIMITED)",
7719     ],
7720     includes = ["include"],
7721     deps = [
7722         ":ArithDialect",
7723         ":CallOpInterfaces",
7724         ":ControlFlowInterfaces",
7725         ":DataLayoutInterfaces",
7726         ":FunctionInterfaces",
7727         ":IR",
7728         ":InferIntRangeInterface",
7729         ":LoopLikeInterface",
7730         ":Pass",
7731         ":SideEffectInterfaces",
7732         ":Support",
7733         ":ViewLikeInterface",
7734         "//llvm:Support",
7735     ],
7738 cc_library(
7739     name = "TranslateLib",
7740     srcs = glob([
7741         "lib/Tools/mlir-translate/*.cpp",
7742     ]) + [
7743         "include/mlir/Tools/ParseUtilities.h",
7744     ],
7745     hdrs = glob(["include/mlir/Tools/mlir-translate/*.h"]),
7746     includes = ["include"],
7747     deps = [
7748         ":IR",
7749         ":Parser",
7750         ":Support",
7751         "//llvm:Support",
7752     ],
7755 cc_library(
7756     name = "ToLLVMIRTranslation",
7757     srcs = [
7758         "lib/Target/LLVMIR/DebugTranslation.cpp",
7759         "lib/Target/LLVMIR/DebugTranslation.h",
7760         "lib/Target/LLVMIR/LoopAnnotationTranslation.cpp",
7761         "lib/Target/LLVMIR/LoopAnnotationTranslation.h",
7762         "lib/Target/LLVMIR/ModuleTranslation.cpp",
7763         "lib/Target/LLVMIR/TypeToLLVM.cpp",
7764     ],
7765     hdrs = [
7766         "include/mlir/Target/LLVMIR/Export.h",
7767         "include/mlir/Target/LLVMIR/LLVMTranslationInterface.h",
7768         "include/mlir/Target/LLVMIR/ModuleTranslation.h",
7769         "include/mlir/Target/LLVMIR/TypeToLLVM.h",
7770         "lib/Target/LLVMIR/AttrKindDetail.h",
7771     ],
7772     includes = ["include"],
7773     deps = [
7774         ":DLTIDialect",
7775         ":IR",
7776         ":LLVMConversionIncGen",
7777         ":LLVMDialect",
7778         ":LLVMIRTransforms",
7779         ":LLVMIntrinsicConversionIncGen",
7780         ":OpenMPDialect",
7781         ":Support",
7782         "//llvm:Core",
7783         "//llvm:FrontendOpenMP",
7784         "//llvm:Support",
7785         "//llvm:TransformUtils",
7786     ],
7789 cc_library(
7790     name = "AMXToLLVMIRTranslation",
7791     srcs = glob(["lib/Target/LLVMIR/Dialect/AMX/*.cpp"]),
7792     hdrs = glob(["include/mlir/Target/LLVMIR/Dialect/AMX/*.h"]),
7793     includes = ["include"],
7794     deps = [
7795         ":AMXConversionIncGen",
7796         ":AMXDialect",
7797         ":IR",
7798         ":ToLLVMIRTranslation",
7799         "//llvm:Core",
7800         "//llvm:Support",
7801     ],
7804 cc_library(
7805     name = "X86VectorToLLVMIRTranslation",
7806     srcs = glob(["lib/Target/LLVMIR/Dialect/X86Vector/*.cpp"]),
7807     hdrs = glob(["include/mlir/Target/LLVMIR/Dialect/X86Vector/*.h"]),
7808     includes = ["include"],
7809     deps = [
7810         ":IR",
7811         ":ToLLVMIRTranslation",
7812         ":X86VectorConversionIncGen",
7813         ":X86VectorDialect",
7814         "//llvm:Core",
7815         "//llvm:Support",
7816     ],
7819 cc_library(
7820     name = "ArmNeonToLLVMIRTranslation",
7821     srcs = glob(["lib/Target/LLVMIR/Dialect/ArmNeon/*.cpp"]),
7822     hdrs = glob(["include/mlir/Target/LLVMIR/Dialect/ArmNeon/*.h"]),
7823     includes = ["include"],
7824     deps = [
7825         ":ArmNeonConversionIncGen",
7826         ":ArmNeonDialect",
7827         ":ArmNeonIncGen",
7828         ":IR",
7829         ":ToLLVMIRTranslation",
7830         "//llvm:Core",
7831         "//llvm:Support",
7832     ],
7835 cc_library(
7836     name = "ArmSMEToLLVMIRTranslation",
7837     srcs = glob(["lib/Target/LLVMIR/Dialect/ArmSME/*.cpp"]),
7838     hdrs = glob(["include/mlir/Target/LLVMIR/Dialect/ArmSME/*.h"]),
7839     includes = ["include"],
7840     deps = [
7841         ":ArmSMEConversionIncGen",
7842         ":ArmSMEDialect",
7843         ":IR",
7844         ":ToLLVMIRTranslation",
7845         "//llvm:Core",
7846         "//llvm:Support",
7847     ],
7850 cc_library(
7851     name = "ArmSVEToLLVMIRTranslation",
7852     srcs = glob(["lib/Target/LLVMIR/Dialect/ArmSVE/*.cpp"]),
7853     hdrs = glob(["include/mlir/Target/LLVMIR/Dialect/ArmSVE/*.h"]),
7854     includes = ["include"],
7855     deps = [
7856         ":ArmSVEConversionIncGen",
7857         ":ArmSVEDialect",
7858         ":IR",
7859         ":ToLLVMIRTranslation",
7860         "//llvm:Core",
7861         "//llvm:Support",
7862     ],
7865 cc_library(
7866     name = "NVVMToLLVMIRTranslation",
7867     srcs = glob(["lib/Target/LLVMIR/Dialect/NVVM/*.cpp"]),
7868     hdrs = glob(["include/mlir/Target/LLVMIR/Dialect/NVVM/*.h"]),
7869     includes = ["include"],
7870     deps = [
7871         ":DialectUtils",
7872         ":IR",
7873         ":NVVMConversionIncGen",
7874         ":NVVMDialect",
7875         ":Support",
7876         ":ToLLVMIRTranslation",
7877         "//llvm:Core",
7878         "//llvm:Support",
7879     ],
7882 cc_library(
7883     name = "ROCDLToLLVMIRTranslation",
7884     srcs = glob(["lib/Target/LLVMIR/Dialect/ROCDL/*.cpp"]),
7885     hdrs = glob(["include/mlir/Target/LLVMIR/Dialect/ROCDL/*.h"]),
7886     includes = ["include"],
7887     deps = [
7888         ":IR",
7889         ":ROCDLConversionIncGen",
7890         ":ROCDLDialect",
7891         ":ToLLVMIRTranslation",
7892         "//llvm:Core",
7893         "//llvm:Support",
7894     ],
7897 cc_library(
7898     name = "GPUToLLVMIRTranslation",
7899     srcs = [
7900         "lib/Target/LLVMIR/Dialect/GPU/GPUToLLVMIRTranslation.cpp",
7901         "lib/Target/LLVMIR/Dialect/GPU/SelectObjectAttr.cpp",
7902     ],
7903     hdrs = ["include/mlir/Target/LLVMIR/Dialect/GPU/GPUToLLVMIRTranslation.h"],
7904     includes = ["include"],
7905     deps = [
7906         ":GPUDialect",
7907         ":IR",
7908         ":ToLLVMIRTranslation",
7909         "//llvm:Core",
7910         "//llvm:Support",
7911     ],
7914 cc_library(
7915     name = "BuiltinToLLVMIRTranslation",
7916     srcs = ["lib/Target/LLVMIR/Dialect/Builtin/BuiltinToLLVMIRTranslation.cpp"],
7917     hdrs = ["include/mlir/Target/LLVMIR/Dialect/Builtin/BuiltinToLLVMIRTranslation.h"],
7918     includes = ["include"],
7919     deps = [
7920         ":IR",
7921         ":ToLLVMIRTranslation",
7922         "//llvm:Core",
7923         "//llvm:Support",
7924     ],
7927 cc_library(
7928     name = "LLVMToLLVMIRTranslation",
7929     srcs = ["lib/Target/LLVMIR/Dialect/LLVMIR/LLVMToLLVMIRTranslation.cpp"],
7930     hdrs = ["include/mlir/Target/LLVMIR/Dialect/LLVMIR/LLVMToLLVMIRTranslation.h"],
7931     includes = ["include"],
7932     deps = [
7933         ":IR",
7934         ":LLVMConversionIncGen",
7935         ":LLVMDialect",
7936         ":LLVMIntrinsicConversionIncGen",
7937         ":Support",
7938         ":ToLLVMIRTranslation",
7939         "//llvm:Core",
7940         "//llvm:Support",
7941     ],
7944 cc_library(
7945     name = "OpenMPCommon",
7946     srcs = ["lib/Target/LLVMIR/Dialect/OpenMPCommon.cpp"],
7947     hdrs = ["include/mlir/Target/LLVMIR/Dialect/OpenMPCommon.h"],
7948     includes = ["include"],
7949     deps = [
7950         ":IR",
7951         ":Support",
7952         "//llvm:Core",
7953         "//llvm:FrontendOpenMP",
7954     ],
7957 cc_library(
7958     name = "LLVMIRToLLVMTranslation",
7959     srcs = ["lib/Target/LLVMIR/Dialect/LLVMIR/LLVMIRToLLVMTranslation.cpp"],
7960     hdrs = ["include/mlir/Target/LLVMIR/Dialect/LLVMIR/LLVMIRToLLVMTranslation.h"],
7961     includes = ["include"],
7962     deps = [
7963         ":FromLLVMIRTranslation",
7964         ":LLVMConversionIncGen",
7965         ":LLVMDialect",
7966         ":LLVMIntrinsicConversionIncGen",
7967         ":Support",
7968         "//llvm:Core",
7969         "//llvm:Support",
7970     ],
7973 cc_library(
7974     name = "OpenACCToLLVMIRTranslation",
7975     srcs = glob(["lib/Target/LLVMIR/Dialect/OpenACC/*.cpp"]),
7976     hdrs = glob(["include/mlir/Target/LLVMIR/Dialect/OpenACC/*.h"]),
7977     includes = ["include"],
7978     deps = [
7979         ":IR",
7980         ":LLVMDialect",
7981         ":OpenACCDialect",
7982         ":OpenACCToLLVM",
7983         ":OpenMPCommon",
7984         ":Support",
7985         ":ToLLVMIRTranslation",
7986         "//llvm:Core",
7987         "//llvm:FrontendOpenMP",
7988         "//llvm:Support",
7989     ],
7992 cc_library(
7993     name = "OpenMPToLLVMIRTranslation",
7994     srcs = glob(["lib/Target/LLVMIR/Dialect/OpenMP/*.cpp"]),
7995     hdrs = glob(["include/mlir/Target/LLVMIR/Dialect/OpenMP/*.h"]),
7996     includes = ["include"],
7997     deps = [
7998         ":IR",
7999         ":LLVMDialect",
8000         ":OpenMPCommon",
8001         ":OpenMPDialect",
8002         ":Support",
8003         ":ToLLVMIRTranslation",
8004         ":Transforms",
8005         "//llvm:Core",
8006         "//llvm:FrontendOpenMP",
8007         "//llvm:Support",
8008     ],
8011 cc_library(
8012     name = "AllToLLVMIRTranslations",
8013     hdrs = ["include/mlir/Target/LLVMIR/Dialect/All.h"],
8014     includes = ["include"],
8015     deps = [
8016         ":AMXToLLVMIRTranslation",
8017         ":ArmNeonToLLVMIRTranslation",
8018         ":ArmSMEToLLVMIRTranslation",
8019         ":ArmSVEToLLVMIRTranslation",
8020         ":BuiltinToLLVMIRTranslation",
8021         ":GPUToLLVMIRTranslation",
8022         ":LLVMIRToLLVMTranslation",
8023         ":LLVMToLLVMIRTranslation",
8024         ":NVVMTarget",
8025         ":NVVMToLLVMIRTranslation",
8026         ":OpenACCToLLVMIRTranslation",
8027         ":OpenMPToLLVMIRTranslation",
8028         ":ROCDLTarget",
8029         ":ROCDLToLLVMIRTranslation",
8030         ":X86VectorToLLVMIRTranslation",
8031     ],
8034 cc_library(
8035     name = "ToLLVMIRTranslationRegistration",
8036     srcs = ["lib/Target/LLVMIR/ConvertToLLVMIR.cpp"],
8037     includes = ["include"],
8038     deps = [
8039         ":AllToLLVMIRTranslations",
8040         ":DLTIDialect",
8041         ":FuncDialect",
8042         ":IR",
8043         ":NVVMTarget",
8044         ":ROCDLTarget",
8045         ":ToLLVMIRTranslation",
8046         ":TranslateLib",
8047         "//llvm:Core",
8048         "//llvm:Support",
8049     ],
8052 cc_library(
8053     name = "FromLLVMIRTranslation",
8054     srcs = [
8055         "lib/Target/LLVMIR/DataLayoutImporter.cpp",
8056         "lib/Target/LLVMIR/DataLayoutImporter.h",
8057         "lib/Target/LLVMIR/DebugImporter.cpp",
8058         "lib/Target/LLVMIR/LoopAnnotationImporter.cpp",
8059         "lib/Target/LLVMIR/LoopAnnotationImporter.h",
8060         "lib/Target/LLVMIR/ModuleImport.cpp",
8061         "lib/Target/LLVMIR/TypeFromLLVM.cpp",
8062     ],
8063     hdrs = [
8064         "include/mlir/Target/LLVMIR/Import.h",
8065         "include/mlir/Target/LLVMIR/LLVMImportInterface.h",
8066         "include/mlir/Target/LLVMIR/ModuleImport.h",
8067         "include/mlir/Target/LLVMIR/TypeFromLLVM.h",
8068         "lib/Target/LLVMIR/AttrKindDetail.h",
8069         "lib/Target/LLVMIR/DebugImporter.h",
8070     ],
8071     includes = ["include"],
8072     deps = [
8073         ":DLTIDialect",
8074         ":IR",
8075         ":LLVMConversionIncGen",
8076         ":LLVMDialect",
8077         ":LLVMIntrinsicConversionIncGen",
8078         ":Support",
8079         ":TranslateLib",
8080         "//llvm:Core",
8081         "//llvm:IRPrinter",
8082         "//llvm:IRReader",
8083         "//llvm:Support",
8084     ],
8087 cc_library(
8088     name = "FromLLVMIRTranslationRegistration",
8089     srcs = [
8090         "lib/Target/LLVMIR/ConvertFromLLVMIR.cpp",
8091     ],
8092     deps = [
8093         ":AllToLLVMIRTranslations",
8094         ":DLTIDialect",
8095         ":FromLLVMIRTranslation",
8096         ":IR",
8097         ":TranslateLib",
8098         "//llvm:Core",
8099         "//llvm:IRReader",
8100         "//llvm:Support",
8101     ],
8104 cc_library(
8105     name = "ExecutionEngine",
8106     srcs = [
8107         "include/mlir/ExecutionEngine/CRunnerUtils.h",
8108         "lib/ExecutionEngine/ExecutionEngine.cpp",
8109     ],
8110     hdrs = [
8111         "include/mlir/ExecutionEngine/ExecutionEngine.h",
8112         "include/mlir/ExecutionEngine/MemRefUtils.h",
8113     ],
8114     includes = ["include"],
8115     deps = [
8116         ":AllToLLVMIRTranslations",
8117         ":IR",
8118         ":LLVMDialect",
8119         ":Support",
8120         ":ToLLVMIRTranslation",
8121         "//llvm:AllTargetsAsmParsers",
8122         "//llvm:BitWriter",
8123         "//llvm:Core",
8124         "//llvm:ExecutionEngine",
8125         "//llvm:MC",
8126         "//llvm:OrcJIT",
8127         "//llvm:Support",
8128         "//llvm:Target",  # fixdeps: keep
8129         "//llvm:TargetParser",
8130         "//llvm:TransformUtils",
8131         "//llvm:X86CodeGen",  # fixdeps: keep
8132         "//llvm:X86Disassembler",  # fixdeps: keep
8133     ],
8136 cc_library(
8137     name = "ExecutionEngineUtils",
8138     srcs = ["lib/ExecutionEngine/OptUtils.cpp"],
8139     hdrs = ["include/mlir/ExecutionEngine/OptUtils.h"],
8140     includes = ["include"],
8141     deps = [
8142         "//llvm:Analysis",
8143         "//llvm:Core",
8144         "//llvm:Coroutines",
8145         "//llvm:IPO",
8146         "//llvm:Passes",
8147         "//llvm:Support",
8148         "//llvm:Target",
8149         "//llvm:common_transforms",
8150     ],
8153 cc_library(
8154     name = "PluginsLib",
8155     srcs = [
8156         "lib/Tools/Plugins/DialectPlugin.cpp",
8157         "lib/Tools/Plugins/PassPlugin.cpp",
8158     ],
8159     hdrs = [
8160         "include/mlir/Tools/Plugins/DialectPlugin.h",
8161         "include/mlir/Tools/Plugins/PassPlugin.h",
8162     ],
8163     includes = ["include"],
8164     deps = [
8165         ":IR",
8166         ":Pass",
8167         ":Support",
8168         "//llvm:Support",
8169     ],
8172 cc_library(
8173     name = "MlirOptLib",
8174     srcs = [
8175         "include/mlir/Tools/ParseUtilities.h",
8176         "lib/Tools/mlir-opt/MlirOptMain.cpp",
8177     ],
8178     hdrs = ["include/mlir/Tools/mlir-opt/MlirOptMain.h"],
8179     includes = ["include"],
8180     deps = [
8181         ":BytecodeReader",
8182         ":BytecodeWriter",
8183         ":Debug",
8184         ":IR",
8185         ":IRDLDialect",
8186         ":Parser",
8187         ":Pass",
8188         ":PluginsLib",
8189         ":Support",
8190         "//llvm:Support",
8191     ],
8194 cc_library(
8195     name = "AllTranslations",
8196     hdrs = ["include/mlir/InitAllTranslations.h"],
8197     deps = [
8198         ":FromLLVMIRTranslationRegistration",
8199         ":SPIRVTranslateRegistration",
8200         ":TargetCpp",
8201         ":ToLLVMIRTranslationRegistration",
8202     ],
8205 cc_library(
8206     name = "MlirTranslateMain",
8207     srcs = ["tools/mlir-translate/mlir-translate.cpp"],
8208     local_defines = ["MLIR_INCLUDE_TESTS"],
8209     deps = [
8210         ":AllPassesAndDialects",
8211         ":AllTranslations",
8212         ":Support",
8213         ":TranslateLib",
8214         "//llvm:Support",
8215         "//mlir/test:TestToLLVMIRTranslation",
8216     ],
8219 cc_binary(
8220     name = "mlir-translate",
8221     deps = [":MlirTranslateMain"],
8224 cc_library(
8225     name = "AllPassesAndDialects",
8226     hdrs = [
8227         "include/mlir/InitAllDialects.h",
8228         "include/mlir/InitAllPasses.h",
8229     ],
8230     deps = [
8231         ":AMDGPUDialect",
8232         ":AMDGPUToROCDL",
8233         ":AMDGPUTransforms",
8234         ":AMXDialect",
8235         ":AMXTransforms",
8236         ":AffineDialect",
8237         ":AffinePassIncGen",
8238         ":AffineToStandard",
8239         ":AffineTransformOps",
8240         ":AffineTransforms",
8241         ":ArithDialect",
8242         ":ArithToLLVM",
8243         ":ArithToSPIRV",
8244         ":ArithTransforms",
8245         ":ArithValueBoundsOpInterfaceImpl",
8246         ":ArmNeonDialect",
8247         ":ArmSMEDialect",
8248         ":ArmSMETransforms",
8249         ":ArmSVEDialect",
8250         ":ArmSVETransforms",
8251         ":AsyncDialect",
8252         ":AsyncPassIncGen",
8253         ":AsyncToLLVM",
8254         ":AsyncTransforms",
8255         ":BufferizationDialect",
8256         ":BufferizationTransformOps",
8257         ":BufferizationTransforms",
8258         ":CastInterfaces",
8259         ":ComplexDialect",
8260         ":ComplexToLLVM",
8261         ":ComplexToLibm",
8262         ":ComplexToSPIRV",
8263         ":ControlFlowDialect",
8264         ":ControlFlowTransforms",
8265         ":ConversionPasses",
8266         ":ConvertToLLVM",
8267         ":DLTIDialect",
8268         ":EmitCDialect",
8269         ":FuncDialect",
8270         ":FuncToLLVM",
8271         ":FuncToSPIRV",
8272         ":FuncTransformOps",
8273         ":FuncTransforms",
8274         ":FuncTransformsPassIncGen",
8275         ":GPUDialect",
8276         ":GPUPassIncGen",
8277         ":GPUToGPURuntimeTransforms",
8278         ":GPUToNVVMTransforms",
8279         ":GPUToROCDLTransforms",
8280         ":GPUToSPIRV",
8281         ":GPUToVulkanTransforms",
8282         ":GPUTransformOps",
8283         ":GPUTransforms",
8284         ":IR",
8285         ":IRDLDialect",
8286         ":IndexDialect",
8287         ":LLVMDialect",
8288         ":LLVMIRTransforms",
8289         ":LLVMPassIncGen",
8290         ":LinalgDialect",
8291         ":LinalgPassIncGen",
8292         ":LinalgToStandard",
8293         ":LinalgTransformOps",
8294         ":LinalgTransforms",
8295         ":MLProgramDialect",
8296         ":MathDialect",
8297         ":MathToFuncs",
8298         ":MathToLLVM",
8299         ":MathToLibm",
8300         ":MathToSPIRV",
8301         ":MathTransforms",
8302         ":MemRefDialect",
8303         ":MemRefToLLVM",
8304         ":MemRefToSPIRV",
8305         ":MemRefTransformOps",
8306         ":MemRefTransforms",
8307         ":NVGPUDialect",
8308         ":NVGPUPassIncGen",
8309         ":NVGPUToNVVM",
8310         ":NVGPUTransformOps",
8311         ":NVGPUTransforms",
8312         ":NVVMDialect",
8313         ":NVVMTarget",
8314         ":OpenACCDialect",
8315         ":OpenMPDialect",
8316         ":OpenMPToLLVM",
8317         ":PDLDialect",
8318         ":PDLInterpDialect",
8319         ":PDLToPDLInterp",
8320         ":QuantOps",
8321         ":ROCDLDialect",
8322         ":ROCDLTarget",
8323         ":ReconcileUnrealizedCasts",
8324         ":SCFDialect",
8325         ":SCFPassIncGen",
8326         ":SCFToControlFlow",
8327         ":SCFToGPU",
8328         ":SCFTransformOps",
8329         ":SCFTransforms",
8330         ":SDBM",
8331         ":SPIRVDialect",
8332         ":SPIRVPassIncGen",
8333         ":SPIRVToLLVM",
8334         ":SPIRVTransforms",
8335         ":ShapeDialect",
8336         ":ShapeToStandard",
8337         ":ShapeTransforms",
8338         ":ShapeTransformsPassIncGen",
8339         ":SparseTensorDialect",
8340         ":SparseTensorPipelines",
8341         ":SparseTensorTransformOps",
8342         ":SparseTensorTransforms",
8343         ":TensorDialect",
8344         ":TensorInferTypeOpInterfaceImpl",
8345         ":TensorTilingInterfaceImpl",
8346         ":TensorTransformOps",
8347         ":TensorTransforms",
8348         ":TosaDialect",
8349         ":TosaToLinalg",
8350         ":TransformDialect",
8351         ":TransformDialectTransforms",
8352         ":TransformPDLExtension",
8353         ":Transforms",
8354         ":TransformsPassIncGen",
8355         ":UBDialect",
8356         ":VectorDialect",
8357         ":VectorToLLVM",
8358         ":VectorToSCF",
8359         ":VectorToSPIRV",
8360         ":VectorTransformOps",
8361         ":VectorTransforms",
8362         ":X86VectorDialect",
8363         ":X86VectorTransforms",
8364     ],
8367 cc_binary(
8368     name = "mlir-lsp-server",
8369     srcs = ["tools/mlir-lsp-server/mlir-lsp-server.cpp"],
8370     includes = ["include"],
8371     deps = [
8372         ":AllExtensions",
8373         ":AllPassesAndDialects",
8374         ":BytecodeWriter",
8375         ":IR",
8376         ":MlirLspServerLib",
8377         ":Parser",
8378     ],
8381 cc_binary(
8382     name = "mlir-opt",
8383     srcs = ["tools/mlir-opt/mlir-opt.cpp"],
8384     local_defines = ["MLIR_INCLUDE_TESTS"],
8385     deps = [
8386         ":AllExtensions",
8387         ":AllPassesAndDialects",
8388         ":AllToLLVMIRTranslations",
8389         ":Analysis",
8390         ":IR",
8391         ":MlirOptLib",
8392         ":OpenMPDialect",
8393         ":Pass",
8394         ":QuantOps",
8395         ":SCFToGPU",
8396         ":SerializeToCubin",
8397         ":Support",
8398         ":Transforms",
8399         "//llvm:AllTargetsCodeGens",
8400         "//llvm:Support",
8401         "//mlir/test:TestAffine",
8402         "//mlir/test:TestAnalysis",
8403         "//mlir/test:TestArith",
8404         "//mlir/test:TestBufferization",
8405         "//mlir/test:TestControlFlow",
8406         "//mlir/test:TestDLTI",
8407         "//mlir/test:TestDialect",
8408         "//mlir/test:TestFunc",
8409         "//mlir/test:TestFuncToLLVM",
8410         "//mlir/test:TestGPU",
8411         "//mlir/test:TestIR",
8412         "//mlir/test:TestLLVM",
8413         "//mlir/test:TestLinalg",
8414         "//mlir/test:TestLoopLikeInterface",
8415         "//mlir/test:TestMath",
8416         "//mlir/test:TestMemRef",
8417         "//mlir/test:TestNVGPU",
8418         "//mlir/test:TestOneToNTypeConversion",
8419         "//mlir/test:TestPDLL",
8420         "//mlir/test:TestPass",
8421         "//mlir/test:TestReducer",
8422         "//mlir/test:TestRewrite",
8423         "//mlir/test:TestSCF",
8424         "//mlir/test:TestSPIRV",
8425         "//mlir/test:TestShapeDialect",
8426         "//mlir/test:TestTensor",
8427         "//mlir/test:TestTestDynDialect",
8428         "//mlir/test:TestTilingInterface",
8429         "//mlir/test:TestTosaDialect",
8430         "//mlir/test:TestTransformDialect",
8431         "//mlir/test:TestTransforms",
8432         "//mlir/test:TestTypeDialect",
8433         "//mlir/test:TestVector",
8434         "//mlir/test:TestVectorToSPIRV",
8435     ],
8438 cc_library(
8439     name = "MlirJitRunner",
8440     srcs = ["lib/ExecutionEngine/JitRunner.cpp"],
8441     hdrs = [
8442         "include/mlir/ExecutionEngine/JitRunner.h",
8443         "include/mlir/Tools/ParseUtilities.h",
8444     ],
8445     includes = ["include"],
8446     deps = [
8447         ":AllPassesAndDialects",
8448         ":ExecutionEngine",
8449         ":ExecutionEngineUtils",
8450         ":IR",
8451         ":LLVMDialect",
8452         ":LLVMToLLVMIRTranslation",
8453         ":OpenACCToLLVMIRTranslation",
8454         ":OpenMPToLLVMIRTranslation",
8455         ":Parser",
8456         ":SCFToControlFlow",
8457         ":Support",
8458         "//llvm:Core",
8459         "//llvm:OrcJIT",
8460         "//llvm:Support",
8461     ],
8464 cc_library(
8465     name = "mlir_async_runtime_api",
8466     hdrs = ["include/mlir/ExecutionEngine/AsyncRuntime.h"],
8467     includes = ["include"],
8470 cc_library(
8471     name = "_mlir_async_runtime",
8472     srcs = ["lib/ExecutionEngine/AsyncRuntime.cpp"],
8473     copts = ["-Dmlir_async_runtime_EXPORTS"],
8474     deps = [
8475         ":mlir_async_runtime_api",
8476         "//llvm:Support",
8477     ],
8480 # Indirection to avoid 'libmlir_async_runtime.so' filename clash.
8481 alias(
8482     name = "mlir_async_runtime",
8483     actual = "_mlir_async_runtime",
8486 cc_binary(
8487     name = "libmlir_async_runtime.so",
8488     linkshared = True,
8489     linkstatic = False,
8490     deps = [":mlir_async_runtime"],
8493 cc_library(
8494     name = "_mlir_float16_utils",
8495     srcs = ["lib/ExecutionEngine/Float16bits.cpp"],
8496     hdrs = ["include/mlir/ExecutionEngine/Float16bits.h"],
8497     copts = ["-Dmlir_float16_utils_EXPORTS"],
8498     includes = ["include"],
8501 # Indirection to avoid 'libmlir_float16_utils.so' filename clash.
8502 alias(
8503     name = "mlir_float16_utils",
8504     actual = "_mlir_float16_utils",
8507 cc_binary(
8508     name = "libmlir_float16_utils.so",
8509     linkshared = True,
8510     linkstatic = False,
8511     deps = [":mlir_float16_utils"],
8514 # Unlike mlir_float16_utils, mlir_c_runner_utils, etc, we do *not* make
8515 # this a shared library: because on the CMake side, doing so causes issues
8516 # when building on Windows.  In particular, various functions take/return
8517 # `std::vector` but that class is not designed with dllimport/dllexport
8518 # pragma, therefore it cannot be safely/correctly used across DLL boundaries.
8519 # Consequently, we avoid using the "mlir_xxx_utils" naming scheme,
8520 # since that is reserved/intended for shared libraries only.
8521 cc_library(
8522     name = "SparseTensorRuntime",
8523     srcs = [
8524         "lib/ExecutionEngine/SparseTensor/File.cpp",
8525         "lib/ExecutionEngine/SparseTensor/NNZ.cpp",
8526         "lib/ExecutionEngine/SparseTensor/Storage.cpp",
8527     ],
8528     hdrs = [
8529         "include/mlir/ExecutionEngine/SparseTensor/ArithmeticUtils.h",
8530         "include/mlir/ExecutionEngine/SparseTensor/COO.h",
8531         "include/mlir/ExecutionEngine/SparseTensor/ErrorHandling.h",
8532         "include/mlir/ExecutionEngine/SparseTensor/File.h",
8533         "include/mlir/ExecutionEngine/SparseTensor/Storage.h",
8534     ],
8535     includes = ["include"],
8536     deps = [
8537         ":SparseTensorEnums",
8538         ":mlir_float16_utils",
8539     ],
8542 cc_library(
8543     name = "_mlir_c_runner_utils",
8544     srcs = [
8545         "lib/ExecutionEngine/CRunnerUtils.cpp",
8546         "lib/ExecutionEngine/SparseTensorRuntime.cpp",
8547     ],
8548     hdrs = [
8549         "include/mlir/ExecutionEngine/CRunnerUtils.h",
8550         "include/mlir/ExecutionEngine/Msan.h",
8551         "include/mlir/ExecutionEngine/SparseTensorRuntime.h",
8552     ],
8553     includes = ["include"],
8554     deps = [
8555         ":SparseTensorEnums",
8556         ":SparseTensorRuntime",
8557         ":mlir_float16_utils",
8558         "//llvm:Support",
8559     ],
8562 # Indirection to avoid 'libmlir_c_runner_utils.so' filename clash.
8563 alias(
8564     name = "mlir_c_runner_utils",
8565     actual = "_mlir_c_runner_utils",
8568 cc_headers_only(
8569     name = "mlir_c_runner_utils_hdrs",
8570     src = ":mlir_c_runner_utils",
8573 cc_binary(
8574     name = "libmlir_c_runner_utils.so",
8575     linkshared = True,
8576     linkstatic = False,
8577     deps = [":mlir_c_runner_utils"],
8580 cc_library(
8581     name = "_mlir_runner_utils",
8582     srcs = ["lib/ExecutionEngine/RunnerUtils.cpp"],
8583     hdrs = ["include/mlir/ExecutionEngine/RunnerUtils.h"],
8584     includes = ["include"],
8585     deps = [
8586         ":mlir_c_runner_utils",
8587         "//llvm:Support",
8588     ],
8591 # Indirection to avoid 'libmlir_runner_utils.so' filename clash.
8592 alias(
8593     name = "mlir_runner_utils",
8594     actual = "_mlir_runner_utils",
8597 cc_headers_only(
8598     name = "mlir_runner_utils_hdrs",
8599     src = ":mlir_runner_utils",
8602 cc_binary(
8603     name = "libmlir_runner_utils.so",
8604     linkshared = True,
8605     linkstatic = False,
8606     deps = [":mlir_runner_utils"],
8609 cc_binary(
8610     name = "mlir-cpu-runner",
8611     srcs = ["tools/mlir-cpu-runner/mlir-cpu-runner.cpp"],
8612     deps = [
8613         ":AllToLLVMIRTranslations",
8614         ":BuiltinToLLVMIRTranslation",
8615         ":ExecutionEngineUtils",
8616         ":IR",
8617         ":LLVMDialect",
8618         ":LLVMToLLVMIRTranslation",
8619         ":MlirJitRunner",
8620         ":OpenACCToLLVMIRTranslation",
8621         ":OpenMPToLLVMIRTranslation",
8622         ":ToLLVMIRTranslation",
8623         "//llvm:AsmParser",
8624         "//llvm:Support",
8625         "//llvm:X86AsmParser",
8626     ],
8629 # This target provides the headers from LLVM's Support target without any of
8630 # the symbols. In particular, it does not contain the static registration code
8631 # which may be executed by at most one shared library loaded by ORCJit. Direct
8632 # dependencies need to avoid requiring symbols from LLVMSupport by adding
8633 # copts = ["-DLLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING=1"].
8635 # Bazel links the dependencies' object files instead of the archives, which
8636 # means that symbols are linked in even if none are used. The LLVM cmake build
8637 # on the other hand links archives (or shared libraries, depending on
8638 # BUILD_SHARED_LIBS), skipping them if none of the symbols are used.
8639 # See also https://reviews.llvm.org/D95613.
8640 cc_headers_only(
8641     name = "LLVMSupportHeaders",
8642     src = "//llvm:Support",
8645 cc_library(
8646     name = "_mlir_cuda_runtime",
8647     srcs = ["lib/ExecutionEngine/CudaRuntimeWrappers.cpp"],
8648     # Prevent needing EnableABIBreakingChecks symbol from LLVMSupport.
8649     copts = ["-DLLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING=1"],
8650     # Here:
8651     #   MLIR_ENABLE_CUDA_CUSPARSE   : enables cuSPARSE
8652     #   MLIR_ENABLE_CUDA_CUSPARSELT : enables cuSPARSElt
8653     local_defines = ["MLIR_ENABLE_CUDA_CUSPARSE"],
8654     tags = [
8655         "manual",  # External dependency
8656         "nobuildkite",  # TODO(gcmn): Add support for this target
8657     ],
8658     deps = [
8659         ":LLVMSupportHeaders",
8660         ":mlir_c_runner_utils_hdrs",
8661         "@cuda//:cuda_headers",
8662         "@cuda//:cusparse_static",
8663         "@cuda//:libcuda",
8664     ],
8667 # Indirection to avoid 'libmlir_cuda_runtime.so' filename clash.
8668 alias(
8669     name = "mlir_cuda_runtime",
8670     actual = "_mlir_cuda_runtime",
8671     tags = [
8672         "manual",  # External dependency
8673         "nobuildkite",  # TODO(gcmn): Add support for this target
8674     ],
8677 cc_binary(
8678     name = "libmlir_cuda_runtime.so",
8679     linkshared = True,
8680     linkstatic = False,
8681     tags = [
8682         "manual",  # External dependency
8683         "nobuildkite",  # TODO(gcmn): Add support for this target
8684     ],
8685     deps = [":mlir_cuda_runtime"],
8688 cc_library(
8689     name = "VulkanRuntime",
8690     srcs = ["tools/mlir-vulkan-runner/VulkanRuntime.cpp"],
8691     hdrs = ["tools/mlir-vulkan-runner/VulkanRuntime.h"],
8692     tags = [
8693         "manual",  # External dependency
8694     ],
8695     deps = [
8696         ":FuncDialect",
8697         ":IR",
8698         ":Pass",
8699         ":SPIRVDialect",
8700         ":SideEffectInterfaces",
8701         ":Support",
8702         "//llvm:Support",
8703         "@vulkan_headers",
8704         "@vulkan_sdk//:sdk",
8705     ],
8708 cc_binary(
8709     name = "libvulkan-runtime-wrappers.so",
8710     srcs = ["tools/mlir-vulkan-runner/vulkan-runtime-wrappers.cpp"],
8711     linkshared = True,
8712     linkstatic = False,
8713     tags = [
8714         "manual",  # External dependency
8715     ],
8716     deps = [":VulkanRuntime"],
8719 cc_binary(
8720     name = "mlir-vulkan-runner",
8721     srcs = ["tools/mlir-vulkan-runner/mlir-vulkan-runner.cpp"],
8722     deps = [
8723         ":ArithDialect",
8724         ":BuiltinToLLVMIRTranslation",
8725         ":ExecutionEngineUtils",
8726         ":FuncDialect",
8727         ":FuncToLLVM",
8728         ":FuncToSPIRV",
8729         ":GPUDialect",
8730         ":GPUToSPIRV",
8731         ":GPUToVulkanTransforms",
8732         ":GPUTransforms",
8733         ":LLVMCommonConversion",
8734         ":LLVMDialect",
8735         ":LLVMIRTransforms",
8736         ":LLVMToLLVMIRTranslation",
8737         ":MemRefDialect",
8738         ":MemRefToLLVM",
8739         ":MemRefTransforms",
8740         ":MlirJitRunner",
8741         ":Pass",
8742         ":ReconcileUnrealizedCasts",
8743         ":SPIRVDialect",
8744         ":SPIRVTransforms",
8745         ":ToLLVMIRTranslation",
8746         ":VectorDialect",
8747         ":VectorToLLVM",
8748         "//llvm:Support",
8749     ],
8752 cc_binary(
8753     name = "mlir-spirv-cpu-runner",
8754     srcs = ["tools/mlir-spirv-cpu-runner/mlir-spirv-cpu-runner.cpp"],
8755     deps = [
8756         ":ArithDialect",
8757         ":BuiltinToLLVMIRTranslation",
8758         ":ExecutionEngineUtils",
8759         ":FuncDialect",
8760         ":FuncToLLVM",
8761         ":GPUDialect",
8762         ":GPUToSPIRV",
8763         ":GPUTransforms",
8764         ":LLVMDialect",
8765         ":LLVMToLLVMIRTranslation",
8766         ":MemRefDialect",
8767         ":MlirJitRunner",
8768         ":Pass",
8769         ":SPIRVConversion",
8770         ":SPIRVDialect",
8771         ":SPIRVToLLVM",
8772         ":SPIRVTransforms",
8773         ":ToLLVMIRTranslation",
8774         "//llvm:Core",
8775         "//llvm:Linker",
8776         "//llvm:Support",
8777     ],
8780 cc_library(
8781     name = "TableGen",
8782     srcs = glob(["lib/TableGen/*.cpp"]),
8783     hdrs = glob(["include/mlir/TableGen/*.h"]),
8784     includes = ["include"],
8785     deps = [
8786         ":Support",
8787         "//llvm:Support",
8788         "//llvm:TableGen",
8789         "//llvm:TargetParser",
8790     ],
8793 cc_library(
8794     name = "MlirTableGenMain",
8795     srcs = glob(["lib/Tools/mlir-tblgen/*.cpp"]),
8796     hdrs = glob(["include/mlir/Tools/mlir-tblgen/*.h"]),
8797     includes = ["include"],
8798     deps = [
8799         ":TableGen",
8800         "//llvm:Support",
8801         "//llvm:TableGen",
8802         "//llvm:TargetParser",
8803         "//llvm:config",
8804     ],
8807 cc_binary(
8808     name = "mlir-tblgen",
8809     srcs = glob([
8810         "tools/mlir-tblgen/*.h",
8811         "tools/mlir-tblgen/*.cpp",
8812     ]),
8813     deps = [
8814         ":MlirTableGenMain",
8815         ":Support",
8816         ":TableGen",
8817         "//llvm:CodeGenTypes",
8818         "//llvm:Support",
8819         "//llvm:TableGen",
8820         "//llvm:TargetParser",
8821         "//llvm:config",
8822     ],
8825 cc_binary(
8826     name = "mlir-linalg-ods-yaml-gen",
8827     srcs = [
8828         "tools/mlir-linalg-ods-gen/mlir-linalg-ods-yaml-gen.cpp",
8829     ],
8830     deps = [
8831         ":AsmParser",
8832         ":IR",
8833         ":Support",
8834         "//llvm:Support",
8835         "//llvm:TableGen",
8836         "//llvm:config",
8837     ],
8840 ## OpenMP / OpenACC common
8842 td_library(
8843     name = "AtomicInterfacesTdFiles",
8844     srcs = ["include/mlir/Dialect/OpenACCMPCommon/Interfaces/AtomicInterfaces.td"],
8845     includes = ["include"],
8846     deps = [
8847         ":ControlFlowInterfacesTdFiles",
8848         ":OpBaseTdFiles",
8849     ],
8852 gentbl_cc_library(
8853     name = "AtomicInterfacesIncGen",
8854     tbl_outs = [
8855         (
8856             ["-gen-op-interface-decls"],
8857             "include/mlir/Dialect/OpenACCMPCommon/Interfaces/AtomicInterfaces.h.inc",
8858         ),
8859         (
8860             ["-gen-op-interface-defs"],
8861             "include/mlir/Dialect/OpenACCMPCommon/Interfaces/AtomicInterfaces.cpp.inc",
8862         ),
8863     ],
8864     tblgen = ":mlir-tblgen",
8865     td_file = "include/mlir/Dialect/OpenACCMPCommon/Interfaces/AtomicInterfaces.td",
8866     deps = [
8867         ":AtomicInterfacesTdFiles",
8868     ],
8871 cc_library(
8872     name = "AtomicInterfaces",
8873     srcs = ["lib/Dialect/OpenACCMPCommon/Interfaces/AtomicInterfaces.cpp"],
8874     hdrs = ["include/mlir/Dialect/OpenACCMPCommon/Interfaces/AtomicInterfaces.h"],
8875     includes = ["include"],
8876     deps = [
8877         ":AtomicInterfacesIncGen",
8878         ":ControlFlowInterfaces",
8879         ":IR",
8880         "//llvm:Support",
8881     ],
8884 ## OpenACC dialect
8886 # TODO(gcmn): This is sticking td files in a cc_library
8887 gentbl_cc_library(
8888     name = "AccCommonGen",
8889     includes = ["/llvm/include"],
8890     tbl_outs = [
8891         (
8892             [
8893                 "-gen-directive-decl",
8894                 "-directives-dialect=OpenACC",
8895             ],
8896             "include/mlir/Dialect/OpenACC/AccCommon.td",
8897         ),
8898     ],
8899     tblgen = ":mlir-tblgen",
8900     td_file = "//llvm:include/llvm/Frontend/OpenACC/ACC.td",
8901     deps = ["//llvm:acc_td_files"],
8904 td_library(
8905     name = "OpenAccOpsTdFiles",
8906     srcs = [
8907         "include/mlir/Dialect/OpenACC/AccCommon.td",
8908         "include/mlir/Dialect/OpenACC/OpenACCBase.td",
8909         "include/mlir/Dialect/OpenACC/OpenACCOps.td",
8910         "include/mlir/Dialect/OpenACC/OpenACCOpsTypes.td",
8911         "include/mlir/Dialect/OpenACC/OpenACCTypeInterfaces.td",
8912         "include/mlir/Dialect/OpenACCMPCommon/Interfaces/AtomicInterfaces.td",
8913     ],
8914     includes = ["include"],
8915     deps = [
8916         ":AtomicInterfacesTdFiles",
8917         ":OpBaseTdFiles",
8918     ],
8921 gentbl_cc_library(
8922     name = "OpenACCOpsIncGen",
8923     tbl_outs = [
8924         (
8925             [
8926                 "-gen-dialect-decls",
8927                 "-dialect=acc",
8928             ],
8929             "include/mlir/Dialect/OpenACC/OpenACCOpsDialect.h.inc",
8930         ),
8931         (
8932             [
8933                 "-gen-dialect-defs",
8934                 "-dialect=acc",
8935             ],
8936             "include/mlir/Dialect/OpenACC/OpenACCOpsDialect.cpp.inc",
8937         ),
8938         (
8939             ["-gen-op-decls"],
8940             "include/mlir/Dialect/OpenACC/OpenACCOps.h.inc",
8941         ),
8942         (
8943             ["-gen-op-defs"],
8944             "include/mlir/Dialect/OpenACC/OpenACCOps.cpp.inc",
8945         ),
8946         (
8947             ["-gen-enum-decls"],
8948             "include/mlir/Dialect/OpenACC/OpenACCOpsEnums.h.inc",
8949         ),
8950         (
8951             ["-gen-enum-defs"],
8952             "include/mlir/Dialect/OpenACC/OpenACCOpsEnums.cpp.inc",
8953         ),
8954         (
8955             [
8956                 "-gen-attrdef-decls",
8957                 "-attrdefs-dialect=acc",
8958             ],
8959             "include/mlir/Dialect/OpenACC/OpenACCOpsAttributes.h.inc",
8960         ),
8961         (
8962             [
8963                 "-gen-attrdef-defs",
8964                 "-attrdefs-dialect=acc",
8965             ],
8966             "include/mlir/Dialect/OpenACC/OpenACCOpsAttributes.cpp.inc",
8967         ),
8968         (
8969             ["-gen-op-doc"],
8970             "g3doc/Dialects/OpenACC/OpenACCOps.md",
8971         ),
8972     ],
8973     tblgen = ":mlir-tblgen",
8974     td_file = "include/mlir/Dialect/OpenACC/OpenACCOps.td",
8975     deps = [
8976         ":BuiltinDialectTdFiles",
8977         ":ControlFlowInterfacesTdFiles",
8978         ":OpenAccOpsTdFiles",
8979         ":SideEffectInterfacesTdFiles",
8980     ],
8983 gentbl_cc_library(
8984     name = "OpenACCTypesIncGen",
8985     tbl_outs = [
8986         (
8987             [
8988                 "--gen-typedef-decls",
8989                 "-typedefs-dialect=acc",
8990             ],
8991             "include/mlir/Dialect/OpenACC/OpenACCOpsTypes.h.inc",
8992         ),
8993         (
8994             [
8995                 "--gen-typedef-defs",
8996                 "-typedefs-dialect=acc",
8997             ],
8998             "include/mlir/Dialect/OpenACC/OpenACCOpsTypes.cpp.inc",
8999         ),
9000     ],
9001     tblgen = ":mlir-tblgen",
9002     td_file = "include/mlir/Dialect/OpenACC/OpenACCOpsTypes.td",
9003     deps = [":OpenAccOpsTdFiles"],
9006 gentbl_cc_library(
9007     name = "OpenACCTypeInterfacesIncGen",
9008     tbl_outs = [
9009         (
9010             ["-gen-type-interface-decls"],
9011             "include/mlir/Dialect/OpenACC/OpenACCTypeInterfaces.h.inc",
9012         ),
9013         (
9014             ["-gen-type-interface-defs"],
9015             "include/mlir/Dialect/OpenACC/OpenACCTypeInterfaces.cpp.inc",
9016         ),
9017     ],
9018     tblgen = ":mlir-tblgen",
9019     td_file = "include/mlir/Dialect/OpenACC/OpenACCTypeInterfaces.td",
9020     deps = [":OpenAccOpsTdFiles"],
9023 cc_library(
9024     name = "OpenACCDialect",
9025     srcs = glob(
9026         [
9027             "lib/Dialect/OpenACC/IR/*.cpp",
9028             "lib/Dialect/OpenACC/IR/*.h",
9029         ],
9030     ),
9031     hdrs = glob(
9032         [
9033             "include/mlir/Dialect/OpenACC/*.h",
9034         ],
9035         exclude =
9036             [
9037                 "include/mlir/Dialect/OpenACCMPCommon/Interfaces/AtomicInterfaces.h",
9038             ],
9039     ),
9040     includes = ["include"],
9041     textual_hdrs = [
9042         "include/mlir/Dialect/OpenACCMPCommon/Interfaces/AtomicInterfaces.h",
9043     ],
9044     deps = [
9045         ":AtomicInterfaces",
9046         ":AtomicInterfacesIncGen",
9047         ":ControlFlowInterfaces",
9048         ":IR",
9049         ":LLVMDialect",
9050         ":MemRefDialect",
9051         ":OpenACCOpsIncGen",
9052         ":OpenACCTypeInterfacesIncGen",
9053         ":OpenACCTypesIncGen",
9054         ":Transforms",
9055         "//llvm:Support",
9056     ],
9059 ## OpenMP dialect
9061 # TODO(gcmn): This is sticking td files in a cc_library
9062 gentbl_cc_library(
9063     name = "OmpCommonTdGen",
9064     includes = ["/llvm/include"],
9065     tbl_outs = [
9066         (
9067             [
9068                 "-gen-directive-decl",
9069                 "-directives-dialect=OpenMP",
9070             ],
9071             "include/mlir/Dialect/OpenMP/OmpCommon.td",
9072         ),
9073     ],
9074     tblgen = ":mlir-tblgen",
9075     td_file = "//llvm:include/llvm/Frontend/OpenMP/OMP.td",
9076     deps = [
9077         ":OpBaseTdFiles",
9078         "//llvm:omp_td_files",
9079     ],
9082 td_library(
9083     name = "OpenMPOpsTdFiles",
9084     srcs = [
9085         "include/mlir/Dialect/OpenACCMPCommon/Interfaces/AtomicInterfaces.td",
9086         "include/mlir/Dialect/OpenMP/OmpCommon.td",
9087         "include/mlir/Dialect/OpenMP/OpenMPOps.td",
9088         "include/mlir/Dialect/OpenMP/OpenMPOpsInterfaces.td",
9089         "include/mlir/Dialect/OpenMP/OpenMPTypeInterfaces.td",
9090     ],
9091     deps = [
9092         ":AtomicInterfacesTdFiles",
9093         ":LLVMOpsTdFiles",
9094         ":OpBaseTdFiles",
9095     ],
9098 gentbl_cc_library(
9099     name = "OpenMPOpsIncGen",
9100     tbl_outs = [
9101         (
9102             ["-gen-op-decls"],
9103             "include/mlir/Dialect/OpenMP/OpenMPOps.h.inc",
9104         ),
9105         (
9106             ["-gen-op-defs"],
9107             "include/mlir/Dialect/OpenMP/OpenMPOps.cpp.inc",
9108         ),
9109         (
9110             ["-gen-enum-decls"],
9111             "include/mlir/Dialect/OpenMP/OpenMPOpsEnums.h.inc",
9112         ),
9113         (
9114             ["-gen-enum-defs"],
9115             "include/mlir/Dialect/OpenMP/OpenMPOpsEnums.cpp.inc",
9116         ),
9117         (
9118             [
9119                 "-gen-dialect-decls",
9120                 "-dialect=omp",
9121             ],
9122             "include/mlir/Dialect/OpenMP/OpenMPOpsDialect.h.inc",
9123         ),
9124         (
9125             [
9126                 "-gen-dialect-defs",
9127                 "-dialect=omp",
9128             ],
9129             "include/mlir/Dialect/OpenMP/OpenMPOpsDialect.cpp.inc",
9130         ),
9131         (
9132             [
9133                 "-gen-attrdef-decls",
9134                 "-attrdefs-dialect=omp",
9135             ],
9136             "include/mlir/Dialect/OpenMP/OpenMPOpsAttributes.h.inc",
9137         ),
9138         (
9139             [
9140                 "-gen-attrdef-defs",
9141                 "-attrdefs-dialect=omp",
9142             ],
9143             "include/mlir/Dialect/OpenMP/OpenMPOpsAttributes.cpp.inc",
9144         ),
9145         (
9146             ["-gen-op-doc"],
9147             "g3doc/Dialects/OpenMP/OpenMPOps.md",
9148         ),
9149     ],
9150     tblgen = ":mlir-tblgen",
9151     td_file = "include/mlir/Dialect/OpenMP/OpenMPOps.td",
9152     deps = [":OpenMPOpsTdFiles"],
9155 gentbl_cc_library(
9156     name = "OpenMPTypeInterfacesIncGen",
9157     tbl_outs = [
9158         (
9159             ["-gen-type-interface-decls"],
9160             "include/mlir/Dialect/OpenMP/OpenMPTypeInterfaces.h.inc",
9161         ),
9162         (
9163             ["-gen-type-interface-defs"],
9164             "include/mlir/Dialect/OpenMP/OpenMPTypeInterfaces.cpp.inc",
9165         ),
9166     ],
9167     tblgen = ":mlir-tblgen",
9168     td_file = "include/mlir/Dialect/OpenMP/OpenMPTypeInterfaces.td",
9169     deps = [":OpenMPOpsTdFiles"],
9172 gentbl_cc_library(
9173     name = "OpenMPInterfacesIncGen",
9174     tbl_outs = [
9175         (
9176             ["-gen-op-interface-decls"],
9177             "include/mlir/Dialect/OpenMP/OpenMPOpsInterfaces.h.inc",
9178         ),
9179         (
9180             ["-gen-op-interface-defs"],
9181             "include/mlir/Dialect/OpenMP/OpenMPOpsInterfaces.cpp.inc",
9182         ),
9183     ],
9184     tblgen = ":mlir-tblgen",
9185     td_file = "include/mlir/Dialect/OpenMP/OpenMPOpsInterfaces.td",
9186     deps = [":OpenMPOpsTdFiles"],
9189 cc_library(
9190     name = "OpenMPDialect",
9191     srcs = glob(
9192         [
9193             "lib/Dialect/OpenMP/IR/*.cpp",
9194             "lib/Dialect/OpenMP/IR/*.h",
9195         ],
9196     ),
9197     hdrs = glob(
9198         [
9199             "include/mlir/Dialect/OpenMP/*.h",
9200         ],
9201         exclude =
9202             [
9203                 "include/mlir/Dialect/OpenMP/OpenMPInterfaces.h",
9204                 "include/mlir/Dialect/OpenACCMPCommon/Interfaces/AtomicInterfaces.h",
9205             ],
9206     ),
9207     includes = ["include"],
9208     textual_hdrs = [
9209         "include/mlir/Dialect/OpenMP/OpenMPInterfaces.h",
9210         "include/mlir/Dialect/OpenACCMPCommon/Interfaces/AtomicInterfaces.h",
9211     ],
9212     deps = [
9213         ":AtomicInterfaces",
9214         ":AtomicInterfacesIncGen",
9215         ":ControlFlowInterfaces",
9216         ":FuncDialect",
9217         ":IR",
9218         ":LLVMDialect",
9219         ":OpenMPInterfacesIncGen",
9220         ":OpenMPOpsIncGen",
9221         ":OpenMPTypeInterfacesIncGen",
9222         "//llvm:FrontendOpenMP",
9223         "//llvm:Support",
9224     ],
9227 cc_library(
9228     name = "OpenACCToSCF",
9229     srcs = glob([
9230         "lib/Conversion/OpenACCToSCF/*.cpp",
9231         "lib/Conversion/OpenACCToSCF/*.h",
9232     ]),
9233     hdrs = glob([
9234         "include/mlir/Conversion/OpenACCToSCF/*.h",
9235     ]),
9236     includes = ["include"],
9237     deps = [
9238         ":ArithDialect",
9239         ":ConversionPassIncGen",
9240         ":FuncDialect",
9241         ":IR",
9242         ":OpenACCDialect",
9243         ":OpenACCOpsIncGen",
9244         ":OpenACCTypesIncGen",
9245         ":Pass",
9246         ":SCFDialect",
9247         ":Transforms",
9248     ],
9251 cc_library(
9252     name = "OpenACCToLLVM",
9253     srcs = glob([
9254         "lib/Conversion/OpenACCToLLVM/*.cpp",
9255         "lib/Conversion/OpenACCToLLVM/*.h",
9256     ]),
9257     hdrs = glob([
9258         "include/mlir/Conversion/OpenACCToLLVM/*.h",
9259     ]),
9260     includes = ["include"],
9261     deps = [
9262         ":ConversionPassIncGen",
9263         ":FuncDialect",
9264         ":IR",
9265         ":LLVMCommonConversion",
9266         ":LLVMDialect",
9267         ":OpenACCDialect",
9268         ":Pass",
9269         ":Transforms",
9270         "//llvm:Core",
9271         "//llvm:Support",
9272     ],
9275 cc_library(
9276     name = "OpenMPToLLVM",
9277     srcs = glob([
9278         "lib/Conversion/OpenMPToLLVM/*.cpp",
9279         "lib/Conversion/OpenMPToLLVM/*.h",
9280     ]),
9281     hdrs = glob([
9282         "include/mlir/Conversion/OpenMPToLLVM/*.h",
9283     ]),
9284     includes = ["include"],
9285     deps = [
9286         ":ArithToLLVM",
9287         ":ControlFlowToLLVM",
9288         ":ConversionPassIncGen",
9289         ":FuncDialect",
9290         ":FuncToLLVM",
9291         ":IR",
9292         ":LLVMCommonConversion",
9293         ":LLVMDialect",
9294         ":MemRefToLLVM",
9295         ":OpenMPDialect",
9296         ":Pass",
9297         ":Transforms",
9298         "//llvm:Core",
9299         "//llvm:Support",
9300     ],
9303 td_library(
9304     name = "QuantizationOpsTdFiles",
9305     srcs = [
9306         "include/mlir/Dialect/Quant/QuantOps.td",
9307         "include/mlir/Dialect/Quant/QuantOpsBase.td",
9308     ],
9309     includes = ["include"],
9310     deps = [
9311         ":InferTypeOpInterfaceTdFiles",
9312         ":OpBaseTdFiles",
9313         ":SideEffectInterfacesTdFiles",
9314     ],
9317 gentbl_cc_library(
9318     name = "QuantOpsIncGen",
9319     tbl_outs = [
9320         (
9321             ["-gen-op-decls"],
9322             "include/mlir/Dialect/Quant/QuantOps.h.inc",
9323         ),
9324         (
9325             ["-gen-op-defs"],
9326             "include/mlir/Dialect/Quant/QuantOps.cpp.inc",
9327         ),
9328         (
9329             ["-gen-dialect-decls"],
9330             "include/mlir/Dialect/Quant/QuantOpsDialect.h.inc",
9331         ),
9332         (
9333             ["-gen-dialect-defs"],
9334             "include/mlir/Dialect/Quant/QuantOpsDialect.cpp.inc",
9335         ),
9336         (
9337             ["-gen-op-doc"],
9338             "g3doc/Dialects/QuantOps/QuantOps.md",
9339         ),
9340     ],
9341     tblgen = ":mlir-tblgen",
9342     td_file = "include/mlir/Dialect/Quant/QuantOps.td",
9343     deps = [":QuantizationOpsTdFiles"],
9346 gentbl_cc_library(
9347     name = "QuantDialectBytecodeGen",
9348     tbl_outs = [
9349         (
9350             [
9351                 "-gen-bytecode",
9352                 "-bytecode-dialect=Quant",
9353             ],
9354             "include/mlir/Dialect/Quant/QuantDialectBytecode.cpp.inc",
9355         ),
9356     ],
9357     tblgen = ":mlir-tblgen",
9358     td_file = "include/mlir/Dialect/Quant/QuantDialectBytecode.td",
9359     deps = [
9360         ":BytecodeTdFiles",
9361     ],
9364 cc_library(
9365     name = "QuantOps",
9366     srcs = [
9367         "lib/Dialect/Quant/IR/QuantDialectBytecode.cpp",
9368         "lib/Dialect/Quant/IR/QuantDialectBytecode.h",
9369         "lib/Dialect/Quant/IR/QuantOps.cpp",
9370         "lib/Dialect/Quant/IR/QuantTypes.cpp",
9371         "lib/Dialect/Quant/IR/TypeDetail.h",
9372         "lib/Dialect/Quant/IR/TypeParser.cpp",
9373         "lib/Dialect/Quant/Utils/FakeQuantSupport.cpp",
9374         "lib/Dialect/Quant/Utils/UniformSupport.cpp",
9375     ],
9376     hdrs = [
9377         "include/mlir/Dialect/Quant/FakeQuantSupport.h",
9378         "include/mlir/Dialect/Quant/QuantOps.h",
9379         "include/mlir/Dialect/Quant/QuantTypes.h",
9380         "include/mlir/Dialect/Quant/UniformSupport.h",
9381     ],
9382     includes = ["include"],
9383     deps = [
9384         ":ArithDialect",
9385         ":FuncDialect",
9386         ":IR",
9387         ":InferTypeOpInterface",
9388         ":Pass",
9389         ":QuantDialectBytecodeGen",
9390         ":QuantOpsIncGen",
9391         ":SideEffectInterfaces",
9392         ":Support",
9393         ":TransformUtils",
9394         "//llvm:Support",
9395     ],
9398 td_library(
9399     name = "IndexOpsTdFiles",
9400     srcs = [
9401         "include/mlir/Dialect/Index/IR/IndexDialect.td",
9402         "include/mlir/Dialect/Index/IR/IndexEnums.td",
9403         "include/mlir/Dialect/Index/IR/IndexOps.td",
9404     ],
9405     includes = ["include"],
9406     deps = [
9407         ":CastInterfacesTdFiles",
9408         ":InferIntRangeInterfaceTdFiles",
9409         ":InferTypeOpInterfaceTdFiles",
9410         ":OpBaseTdFiles",
9411         ":SideEffectInterfacesTdFiles",
9412     ],
9415 gentbl_cc_library(
9416     name = "IndexOpsIncGen",
9417     tbl_outs = [
9418         (
9419             ["-gen-op-decls"],
9420             "include/mlir/Dialect/Index/IR/IndexOps.h.inc",
9421         ),
9422         (
9423             ["-gen-op-defs"],
9424             "include/mlir/Dialect/Index/IR/IndexOps.cpp.inc",
9425         ),
9426         (
9427             [
9428                 "-gen-dialect-decls",
9429                 "-dialect=index",
9430             ],
9431             "include/mlir/Dialect/Index/IR/IndexOpsDialect.h.inc",
9432         ),
9433         (
9434             [
9435                 "-gen-dialect-defs",
9436                 "-dialect=index",
9437             ],
9438             "include/mlir/Dialect/Index/IR/IndexOpsDialect.cpp.inc",
9439         ),
9440         (
9441             ["-gen-attrdef-decls"],
9442             "include/mlir/Dialect/Index/IR/IndexOpsAttrDefs.h.inc",
9443         ),
9444         (
9445             ["-gen-attrdef-defs"],
9446             "include/mlir/Dialect/Index/IR/IndexOpsAttrDefs.cpp.inc",
9447         ),
9448     ],
9449     tblgen = ":mlir-tblgen",
9450     td_file = "include/mlir/Dialect/Index/IR/IndexOps.td",
9451     deps = [":IndexOpsTdFiles"],
9454 gentbl_cc_library(
9455     name = "IndexEnumsIncGen",
9456     tbl_outs = [
9457         (
9458             ["-gen-enum-decls"],
9459             "include/mlir/Dialect/Index/IR/IndexEnums.h.inc",
9460         ),
9461         (
9462             ["-gen-enum-defs"],
9463             "include/mlir/Dialect/Index/IR/IndexEnums.cpp.inc",
9464         ),
9465         (
9466             [
9467                 "-gen-attrdef-decls",
9468                 "-attrdefs-dialect=index",
9469             ],
9470             "include/mlir/Dialect/Index/IR/IndexAttrs.h.inc",
9471         ),
9472         (
9473             [
9474                 "-gen-attrdef-defs",
9475                 "-attrdefs-dialect=index",
9476             ],
9477             "include/mlir/Dialect/Index/IR/IndexAttrs.cpp.inc",
9478         ),
9479     ],
9480     tblgen = ":mlir-tblgen",
9481     td_file = "include/mlir/Dialect/Index/IR/IndexEnums.td",
9482     deps = [":IndexOpsTdFiles"],
9485 cc_library(
9486     name = "IndexToLLVM",
9487     srcs = glob([
9488         "lib/Conversion/IndexToLLVM/*.cpp",
9489         "lib/Conversion/IndexToLLVM/*.h",
9490     ]),
9491     hdrs = glob([
9492         "include/mlir/Conversion/IndexToLLVM/*.h",
9493     ]),
9494     includes = ["include"],
9495     deps = [
9496         ":Analysis",
9497         ":ConversionPassIncGen",
9498         ":ConvertToLLVM",
9499         ":IR",
9500         ":IndexDialect",
9501         ":LLVMCommonConversion",
9502         ":LLVMDialect",
9503         ":Pass",
9504         ":Support",
9505         ":Transforms",
9506         "//llvm:Core",
9507         "//llvm:Support",
9508     ],
9511 cc_library(
9512     name = "IndexDialect",
9513     srcs = glob(["lib/Dialect/Index/IR/*.cpp"]),
9514     hdrs = glob(["include/mlir/Dialect/Index/IR/*.h"]),
9515     includes = ["include"],
9516     deps = [
9517         ":CastInterfaces",
9518         ":IR",
9519         ":IndexEnumsIncGen",
9520         ":IndexOpsIncGen",
9521         ":InferIntRangeCommon",
9522         ":InferIntRangeInterface",
9523         ":InferTypeOpInterface",
9524         "//llvm:Support",
9525     ],
9528 td_library(
9529     name = "LinalgOpsTdFiles",
9530     srcs = [
9531         "include/mlir/Dialect/Linalg/IR/LinalgBase.td",
9532         "include/mlir/Dialect/Linalg/IR/LinalgEnums.td",
9533         "include/mlir/Dialect/Linalg/IR/LinalgInterfaces.td",
9534         "include/mlir/Dialect/Linalg/IR/LinalgOps.td",
9535     ],
9536     includes = ["include"],
9537     deps = [
9538         ":ControlFlowInterfacesTdFiles",
9539         ":DestinationStyleOpInterfaceTdFiles",
9540         ":DialectUtilsTdFiles",
9541         ":InferTypeOpInterfaceTdFiles",
9542         ":LoopLikeInterfaceTdFiles",
9543         ":OpBaseTdFiles",
9544         ":SideEffectInterfacesTdFiles",
9545         ":TilingInterfaceTdFiles",
9546         ":ViewLikeInterfaceTdFiles",
9547     ],
9550 td_library(
9551     name = "LinalgTransformOpsTdFiles",
9552     srcs = glob([
9553         "include/mlir/Dialect/Linalg/TransformOps/*.td",
9554     ]),
9555     includes = ["include"],
9556     deps = [
9557         ":SCFTdFiles",
9558         ":TransformDialectTdFiles",
9559     ],
9562 gentbl_cc_library(
9563     name = "LinalgOpsIncGen",
9564     tbl_outs = [
9565         (
9566             ["-gen-op-decls"],
9567             "include/mlir/Dialect/Linalg/IR/LinalgOps.h.inc",
9568         ),
9569         (
9570             ["-gen-op-defs"],
9571             "include/mlir/Dialect/Linalg/IR/LinalgOps.cpp.inc",
9572         ),
9573         (
9574             [
9575                 "-gen-dialect-decls",
9576                 "-dialect=linalg",
9577             ],
9578             "include/mlir/Dialect/Linalg/IR/LinalgOpsDialect.h.inc",
9579         ),
9580         (
9581             [
9582                 "-gen-dialect-defs",
9583                 "-dialect=linalg",
9584             ],
9585             "include/mlir/Dialect/Linalg/IR/LinalgOpsDialect.cpp.inc",
9586         ),
9587         (
9588             ["-gen-attrdef-decls"],
9589             "include/mlir/Dialect/Linalg/IR/LinalgOpsAttrDefs.h.inc",
9590         ),
9591         (
9592             ["-gen-attrdef-defs"],
9593             "include/mlir/Dialect/Linalg/IR/LinalgOpsAttrDefs.cpp.inc",
9594         ),
9595     ],
9596     tblgen = ":mlir-tblgen",
9597     td_file = "include/mlir/Dialect/Linalg/IR/LinalgOps.td",
9598     deps = [":LinalgOpsTdFiles"],
9601 gentbl_cc_library(
9602     name = "LinalgEnumsIncGen",
9603     tbl_outs = [
9604         (
9605             ["-gen-enum-decls"],
9606             "include/mlir/Dialect/Linalg/IR/LinalgOpsEnums.h.inc",
9607         ),
9608         (
9609             ["-gen-enum-defs"],
9610             "include/mlir/Dialect/Linalg/IR/LinalgOpsEnums.cpp.inc",
9611         ),
9612     ],
9613     tblgen = ":mlir-tblgen",
9614     td_file = "include/mlir/Dialect/Linalg/IR/LinalgEnums.td",
9615     deps = [":LinalgOpsTdFiles"],
9618 gentbl_cc_library(
9619     name = "LinalgMatchOpsIncGen",
9620     tbl_outs = [
9621         (
9622             ["-gen-op-decls"],
9623             "include/mlir/Dialect/Linalg/TransformOps/LinalgMatchOps.h.inc",
9624         ),
9625         (
9626             ["-gen-op-defs"],
9627             "include/mlir/Dialect/Linalg/TransformOps/LinalgMatchOps.cpp.inc",
9628         ),
9629     ],
9630     tblgen = ":mlir-tblgen",
9631     td_file = "include/mlir/Dialect/Linalg/TransformOps/LinalgMatchOps.td",
9632     deps = [
9633         ":LinalgTransformEnumsIncGen",
9634         ":LinalgTransformOpsIncGen",
9635         ":LinalgTransformOpsTdFiles",
9636         ":SCFDeviceMappingInterfacesIncGen",
9637     ],
9640 gentbl_cc_library(
9641     name = "LinalgTransformEnumsIncGen",
9642     tbl_outs = [
9643         (
9644             ["-gen-enum-decls"],
9645             "include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOpsEnums.h.inc",
9646         ),
9647         (
9648             ["-gen-enum-defs"],
9649             "include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOpsEnums.cpp.inc",
9650         ),
9651     ],
9652     tblgen = ":mlir-tblgen",
9653     td_file = "include/mlir/Dialect/Linalg/TransformOps/LinalgTransformEnums.td",
9654     deps = [
9655         ":LinalgTransformOpsTdFiles",
9656         ":SCFDeviceMappingInterfacesIncGen",
9657     ],
9660 gentbl_cc_library(
9661     name = "LinalgTransformOpsIncGen",
9662     tbl_outs = [
9663         (
9664             ["-gen-op-decls"],
9665             "include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.h.inc",
9666         ),
9667         (
9668             ["-gen-op-defs"],
9669             "include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp.inc",
9670         ),
9671     ],
9672     tblgen = ":mlir-tblgen",
9673     td_file = "include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.td",
9674     deps = [
9675         ":LinalgTransformEnumsIncGen",
9676         ":LinalgTransformOpsTdFiles",
9677         ":SCFDeviceMappingInterfacesIncGen",
9678     ],
9681 genlinalg(
9682     name = "LinalgNamedStructuredOpsYamlIncGen",
9683     src = "include/mlir/Dialect/Linalg/IR/LinalgNamedStructuredOps.yaml",
9684     linalg_outs = [
9685         (
9686             "-o-impl=$@",
9687             "include/mlir/Dialect/Linalg/IR/LinalgNamedStructuredOps.yamlgen.cpp.inc",
9688         ),
9689         (
9690             "-o-ods-decl=$@",
9691             "include/mlir/Dialect/Linalg/IR/LinalgNamedStructuredOps.yamlgen.td",
9692         ),
9693     ],
9694     linalggen = ":mlir-linalg-ods-yaml-gen",
9697 td_library(
9698     name = "LinalgStructuredOpsTdFiles",
9699     srcs = [
9700         "include/mlir/Dialect/Linalg/IR/LinalgInterfaces.td",
9701         "include/mlir/Dialect/Linalg/IR/LinalgNamedStructuredOps.yamlgen.td",
9702         "include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td",
9703     ],
9704     includes = ["include"],
9705     deps = [
9706         ":CopyOpInterfaceTdFiles",
9707         ":DestinationStyleOpInterface",
9708         ":LinalgOpsTdFiles",
9709         ":OpBaseTdFiles",
9710         ":SideEffectInterfacesTdFiles",
9711     ],
9714 gentbl_cc_library(
9715     name = "LinalgStructuredOpsIncGen",
9716     tbl_outs = [
9717         (
9718             ["-gen-op-decls"],
9719             "include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.h.inc",
9720         ),
9721         (
9722             ["-gen-op-defs"],
9723             "include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.cpp.inc",
9724         ),
9725     ],
9726     tblgen = ":mlir-tblgen",
9727     td_file = "include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td",
9728     deps = [":LinalgStructuredOpsTdFiles"],
9731 gentbl_cc_library(
9732     name = "LinalgInterfacesIncGen",
9733     tbl_outs = [
9734         (
9735             ["-gen-op-interface-decls"],
9736             "include/mlir/Dialect/Linalg/IR/LinalgInterfaces.h.inc",
9737         ),
9738         (
9739             ["-gen-op-interface-defs"],
9740             "include/mlir/Dialect/Linalg/IR/LinalgInterfaces.cpp.inc",
9741         ),
9742     ],
9743     tblgen = ":mlir-tblgen",
9744     td_file = "include/mlir/Dialect/Linalg/IR/LinalgInterfaces.td",
9745     deps = [":LinalgStructuredOpsTdFiles"],
9748 td_library(
9749     name = "BufferizableOpInterfaceTdFiles",
9750     srcs = [
9751         "include/mlir/Dialect/Bufferization/IR/BufferizableOpInterface.td",
9752     ],
9753     includes = ["include"],
9754     deps = [
9755         ":OpBaseTdFiles",
9756     ],
9759 gentbl_cc_library(
9760     name = "BufferizableOpInterfaceIncGen",
9761     tbl_outs = [
9762         (
9763             ["-gen-op-interface-decls"],
9764             "include/mlir/Dialect/Bufferization/IR/BufferizableOpInterface.h.inc",
9765         ),
9766         (
9767             ["-gen-op-interface-defs"],
9768             "include/mlir/Dialect/Bufferization/IR/BufferizableOpInterface.cpp.inc",
9769         ),
9770     ],
9771     tblgen = ":mlir-tblgen",
9772     td_file = "include/mlir/Dialect/Bufferization/IR/BufferizableOpInterface.td",
9773     deps = [
9774         ":BufferizableOpInterfaceTdFiles",
9775     ],
9778 td_library(
9779     name = "LinalgDocTdFiles",
9780     srcs = ["include/mlir/Dialect/Linalg/IR/LinalgDoc.td"],
9781     includes = ["include"],
9782     deps = [
9783         ":LinalgOpsTdFiles",
9784         ":LinalgStructuredOpsTdFiles",
9785     ],
9788 gentbl_cc_library(
9789     name = "LinalgDocIncGen",
9790     tbl_outs = [
9791         (
9792             ["-gen-op-doc"],
9793             "g3doc/Dialects/Linalg/LinalgOps.md",
9794         ),
9795     ],
9796     tblgen = ":mlir-tblgen",
9797     td_file = "include/mlir/Dialect/Linalg/IR/LinalgDoc.td",
9798     deps = [":LinalgDocTdFiles"],
9801 cc_library(
9802     name = "LinalgToStandard",
9803     srcs = glob([
9804         "lib/Conversion/LinalgToStandard/*.cpp",
9805         "lib/Conversion/LinalgToStandard/*.h",
9806     ]),
9807     hdrs = glob([
9808         "include/mlir/Conversion/LinalgToStandard/*.h",
9809     ]),
9810     includes = ["include"],
9811     deps = [
9812         ":AffineDialect",
9813         ":ConversionPassIncGen",
9814         ":FuncDialect",
9815         ":IR",
9816         ":LLVMDialect",
9817         ":LinalgDialect",
9818         ":LinalgTransforms",
9819         ":MemRefDialect",
9820         ":Pass",
9821         ":SCFDialect",
9822         ":Support",
9823         ":Transforms",
9824         "//llvm:Core",
9825         "//llvm:Support",
9826     ],
9829 cc_library(
9830     name = "LinalgDialect",
9831     srcs = glob(["lib/Dialect/Linalg/IR/*.cpp"]),
9832     hdrs = glob(["include/mlir/Dialect/Linalg/IR/*.h"]),
9833     includes = ["include"],
9834     deps = [
9835         ":AffineDialect",
9836         ":ArithDialect",
9837         ":ArithUtils",
9838         ":AsmParser",
9839         ":BufferizationDialect",
9840         ":ComplexDialect",
9841         ":ControlFlowInterfaces",
9842         ":CopyOpInterface",
9843         ":DestinationStyleOpInterface",
9844         ":DialectUtils",
9845         ":FuncDialect",
9846         ":FunctionInterfaces",
9847         ":IR",
9848         ":InferTypeOpInterface",
9849         ":LinalgEnumsIncGen",
9850         ":LinalgInterfacesIncGen",
9851         ":LinalgNamedStructuredOpsYamlIncGen",
9852         ":LinalgOpsIncGen",
9853         ":LinalgStructuredOpsIncGen",
9854         ":MathDialect",
9855         ":MemRefDialect",
9856         ":Parser",
9857         ":SCFDialect",
9858         ":SideEffectInterfaces",
9859         ":SparseTensorDialect",
9860         ":Support",
9861         ":TensorDialect",
9862         ":TilingInterface",
9863         ":ValueBoundsOpInterface",
9864         ":ViewLikeInterface",
9865         "//llvm:Support",
9866     ],
9869 cc_library(
9870     name = "LinalgTransformOps",
9871     srcs = glob([
9872         "lib/Dialect/Linalg/TransformOps/*.cpp",
9873     ]),
9874     hdrs = glob([
9875         "include/mlir/Dialect/Linalg/TransformOps/*.h",
9876     ]),
9877     includes = ["include"],
9878     deps = [
9879         ":AffineDialect",
9880         ":Analysis",
9881         ":ArithDialect",
9882         ":AsmParser",
9883         ":BufferizationDialect",
9884         ":BufferizationTransforms",
9885         ":DialectUtils",
9886         ":FuncDialect",
9887         ":FunctionInterfaces",
9888         ":GPUDialect",
9889         ":IR",
9890         ":IndexDialect",
9891         ":LinalgDialect",
9892         ":LinalgMatchOpsIncGen",
9893         ":LinalgTransformEnumsIncGen",
9894         ":LinalgTransformOpsIncGen",
9895         ":LinalgTransforms",
9896         ":LinalgUtils",
9897         ":SCFDialect",
9898         ":SCFTransforms",
9899         ":Support",
9900         ":TensorDialect",
9901         ":TensorUtils",
9902         ":TilingInterface",
9903         ":TransformDialect",
9904         ":TransformDialectUtils",
9905         ":TransformUtils",
9906         ":VectorDialect",
9907         ":VectorTransforms",
9908         "//llvm:Support",
9909     ],
9912 gentbl_cc_library(
9913     name = "LinalgPassIncGen",
9914     tbl_outs = [
9915         (
9916             [
9917                 "-gen-pass-decls",
9918                 "-name=Linalg",
9919             ],
9920             "include/mlir/Dialect/Linalg/Passes.h.inc",
9921         ),
9922         (
9923             [
9924                 "-gen-pass-capi-header",
9925                 "--prefix=Linalg",
9926             ],
9927             "include/mlir/Dialect/Linalg/Passes.capi.h.inc",
9928         ),
9929         (
9930             [
9931                 "-gen-pass-capi-impl",
9932                 "--prefix=Linalg",
9933             ],
9934             "include/mlir/Dialect/Linalg/Passes.capi.cpp.inc",
9935         ),
9936     ],
9937     tblgen = ":mlir-tblgen",
9938     td_file = "include/mlir/Dialect/Linalg/Passes.td",
9939     deps = [":PassBaseTdFiles"],
9942 cc_library(
9943     name = "LinalgUtils",
9944     srcs = glob([
9945         "lib/Dialect/Linalg/Utils/*.cpp",
9946         "lib/Dialect/Linalg/Utils/*.h",
9947     ]),
9948     hdrs = glob([
9949         "include/mlir/Dialect/Linalg/Utils/*.h",
9950     ]),
9951     deps = [
9952         ":AffineAnalysis",
9953         ":AffineDialect",
9954         ":AffineUtils",
9955         ":Analysis",
9956         ":ArithDialect",
9957         ":ArithUtils",
9958         ":DialectUtils",
9959         ":FuncDialect",
9960         ":IR",
9961         ":LinalgDialect",
9962         ":MemRefDialect",
9963         ":Pass",
9964         ":SCFDialect",
9965         ":TensorDialect",
9966         ":TensorUtils",
9967         "//llvm:Support",
9968     ],
9971 cc_library(
9972     name = "LinalgTransforms",
9973     srcs = glob([
9974         "lib/Dialect/Linalg/Transforms/*.cpp",
9975         "lib/Dialect/Linalg/Transforms/*.h",
9976     ]),
9977     hdrs = [
9978         "include/mlir/Dialect/Linalg/Passes.h",
9979     ] + glob([
9980         "include/mlir/Dialect/Linalg/Transforms/*.h",
9981     ]),
9982     includes = ["include"],
9983     deps = [
9984         ":AffineAnalysis",
9985         ":AffineDialect",
9986         ":AffineTransforms",
9987         ":AffineUtils",
9988         ":Analysis",
9989         ":ArithDialect",
9990         ":ArithTransforms",
9991         ":ArithUtils",
9992         ":BufferizationDialect",
9993         ":BufferizationTransforms",
9994         ":ComplexDialect",
9995         ":ControlFlowDialect",
9996         ":DestinationStyleOpInterface",
9997         ":DialectUtils",
9998         ":FuncDialect",
9999         ":FuncTransforms",
10000         ":GPUDialect",
10001         ":IR",
10002         ":LinalgDialect",
10003         ":LinalgPassIncGen",
10004         ":LinalgStructuredOpsIncGen",
10005         ":LinalgUtils",
10006         ":LoopLikeInterface",
10007         ":MaskableOpInterface",
10008         ":MathDialect",
10009         ":MemRefDialect",
10010         ":MemRefTransforms",
10011         ":Pass",
10012         ":SCFDialect",
10013         ":SCFTransforms",
10014         ":SCFUtils",
10015         ":SparseTensorDialect",
10016         ":Support",
10017         ":TensorDialect",
10018         ":TensorTilingInterfaceImpl",
10019         ":TensorTransforms",
10020         ":TensorUtils",
10021         ":TilingInterface",
10022         ":TransformUtils",
10023         ":Transforms",
10024         ":ValueBoundsOpInterface",
10025         ":VectorDialect",
10026         ":VectorToSCF",
10027         ":VectorTransforms",
10028         ":VectorUtils",
10029         ":X86VectorTransforms",
10030         "//llvm:Support",
10031     ],
10034 td_library(
10035     name = "ValueBoundsOpInterfaceTdFiles",
10036     srcs = [
10037         "include/mlir/Interfaces/ValueBoundsOpInterface.td",
10038     ],
10039     includes = ["include"],
10040     deps = [
10041         ":OpBaseTdFiles",
10042     ],
10045 gentbl_cc_library(
10046     name = "ValueBoundsOpInterfaceIncGen",
10047     tbl_outs = [
10048         (
10049             ["-gen-op-interface-decls"],
10050             "include/mlir/Interfaces/ValueBoundsOpInterface.h.inc",
10051         ),
10052         (
10053             ["-gen-op-interface-defs"],
10054             "include/mlir/Interfaces/ValueBoundsOpInterface.cpp.inc",
10055         ),
10056     ],
10057     tblgen = ":mlir-tblgen",
10058     td_file = "include/mlir/Interfaces/ValueBoundsOpInterface.td",
10059     deps = [
10060         ":ValueBoundsOpInterfaceTdFiles",
10061     ],
10064 cc_library(
10065     name = "ValueBoundsOpInterface",
10066     srcs = ["lib/Interfaces/ValueBoundsOpInterface.cpp"],
10067     hdrs = ["include/mlir/Interfaces/ValueBoundsOpInterface.h"],
10068     includes = ["include"],
10069     deps = [
10070         ":Analysis",
10071         ":DestinationStyleOpInterface",
10072         ":IR",
10073         ":Support",
10074         ":ValueBoundsOpInterfaceIncGen",
10075         "//llvm:Support",
10076     ],
10079 cc_library(
10080     name = "ArithValueBoundsOpInterfaceImpl",
10081     srcs = ["lib/Dialect/Arith/IR/ValueBoundsOpInterfaceImpl.cpp"],
10082     hdrs = ["include/mlir/Dialect/Arith/IR/ValueBoundsOpInterfaceImpl.h"],
10083     includes = ["include"],
10084     deps = [
10085         ":ArithDialect",
10086         ":IR",
10087         ":ValueBoundsOpInterface",
10088     ],
10091 cc_library(
10092     name = "TilingInterface",
10093     srcs = ["lib/Interfaces/TilingInterface.cpp"],
10094     hdrs = ["include/mlir/Interfaces/TilingInterface.h"],
10095     includes = ["include"],
10096     deps = [
10097         ":DialectUtils",
10098         ":IR",
10099         ":Support",
10100         ":TilingInterfaceIncGen",
10101         ":ViewLikeInterface",
10102         "//llvm:Support",
10103     ],
10106 ##---------------------------------------------------------------------------##
10107 # Vector dialect.
10108 ##---------------------------------------------------------------------------##
10110 td_library(
10111     name = "MaskingOpInterfaceTdFiles",
10112     srcs = ["include/mlir/Dialect/Vector/Interfaces/MaskingOpInterface.td"],
10113     includes = ["include"],
10114     deps = [":OpBaseTdFiles"],
10117 td_library(
10118     name = "MaskableOpInterfaceTdFiles",
10119     srcs = ["include/mlir/Dialect/Vector/Interfaces/MaskableOpInterface.td"],
10120     includes = ["include"],
10121     deps = [":OpBaseTdFiles"],
10124 td_library(
10125     name = "VectorOpsTdFiles",
10126     srcs = ["include/mlir/Dialect/Vector/IR/VectorOps.td"],
10127     includes = ["include"],
10128     deps = [
10129         ":ControlFlowInterfacesTdFiles",
10130         ":DestinationStyleOpInterfaceTdFiles",
10131         ":InferTypeOpInterfaceTdFiles",
10132         ":MaskableOpInterfaceTdFiles",
10133         ":MaskingOpInterfaceTdFiles",
10134         ":OpBaseTdFiles",
10135         ":SideEffectInterfacesTdFiles",
10136         ":VectorInterfacesTdFiles",
10137         ":ViewLikeInterfaceTdFiles",
10138     ],
10141 td_library(
10142     name = "VectorTransformOpsTdFiles",
10143     srcs = [
10144         "include/mlir/Dialect/Vector/TransformOps/VectorTransformOps.td",
10145     ],
10146     includes = ["include"],
10147     deps = [
10148         ":PDLDialectTdFiles",
10149         ":SCFTdFiles",
10150         ":TransformDialectTdFiles",
10151         ":VectorTransformsTdFiles",
10152     ],
10155 gentbl_cc_library(
10156     name = "MaskableOpInterfaceIncGen",
10157     tbl_outs = [
10158         (
10159             ["-gen-op-interface-decls"],
10160             "include/mlir/Dialect/Vector/Interfaces/MaskableOpInterface.h.inc",
10161         ),
10162         (
10163             ["-gen-op-interface-defs"],
10164             "include/mlir/Dialect/Vector/Interfaces/MaskableOpInterface.cpp.inc",
10165         ),
10166     ],
10167     tblgen = ":mlir-tblgen",
10168     td_file = "include/mlir/Dialect/Vector/Interfaces/MaskableOpInterface.td",
10169     deps = [":MaskableOpInterfaceTdFiles"],
10172 gentbl_cc_library(
10173     name = "MaskingOpInterfaceIncGen",
10174     tbl_outs = [
10175         (
10176             ["-gen-op-interface-decls"],
10177             "include/mlir/Dialect/Vector/Interfaces/MaskingOpInterface.h.inc",
10178         ),
10179         (
10180             ["-gen-op-interface-defs"],
10181             "include/mlir/Dialect/Vector/Interfaces/MaskingOpInterface.cpp.inc",
10182         ),
10183     ],
10184     tblgen = ":mlir-tblgen",
10185     td_file = "include/mlir/Dialect/Vector/Interfaces/MaskingOpInterface.td",
10186     deps = [":MaskingOpInterfaceTdFiles"],
10189 gentbl_cc_library(
10190     name = "VectorOpsIncGen",
10191     tbl_outs = [
10192         (
10193             ["-gen-op-decls"],
10194             "include/mlir/Dialect/Vector/IR/VectorOps.h.inc",
10195         ),
10196         (
10197             ["-gen-op-defs"],
10198             "include/mlir/Dialect/Vector/IR/VectorOps.cpp.inc",
10199         ),
10200         (
10201             [
10202                 "-gen-dialect-decls",
10203                 "-dialect=vector",
10204             ],
10205             "include/mlir/Dialect/Vector/IR/VectorOpsDialect.h.inc",
10206         ),
10207         (
10208             [
10209                 "-gen-dialect-defs",
10210                 "-dialect=vector",
10211             ],
10212             "include/mlir/Dialect/Vector/IR/VectorOpsDialect.cpp.inc",
10213         ),
10214         (
10215             ["-gen-enum-decls"],
10216             "include/mlir/Dialect/Vector/IR/VectorOpsEnums.h.inc",
10217         ),
10218         (
10219             ["-gen-enum-defs"],
10220             "include/mlir/Dialect/Vector/IR/VectorOpsEnums.cpp.inc",
10221         ),
10222         (
10223             ["-gen-attrdef-decls"],
10224             "include/mlir/Dialect/Vector/IR/VectorOpsAttrDefs.h.inc",
10225         ),
10226         (
10227             ["-gen-attrdef-defs"],
10228             "include/mlir/Dialect/Vector/IR/VectorOpsAttrDefs.cpp.inc",
10229         ),
10230         (
10231             ["-gen-op-doc"],
10232             "g3doc/Dialects/Vector/VectorOps.md",
10233         ),
10234     ],
10235     tblgen = ":mlir-tblgen",
10236     td_file = "include/mlir/Dialect/Vector/IR/VectorOps.td",
10237     deps = [":VectorOpsTdFiles"],
10240 gentbl_cc_library(
10241     name = "VectorTransformOpsIncGen",
10242     tbl_outs = [
10243         (
10244             ["-gen-op-decls"],
10245             "include/mlir/Dialect/Vector/TransformOps/VectorTransformOps.h.inc",
10246         ),
10247         (
10248             ["-gen-op-defs"],
10249             "include/mlir/Dialect/Vector/TransformOps/VectorTransformOps.cpp.inc",
10250         ),
10251     ],
10252     tblgen = ":mlir-tblgen",
10253     td_file = "include/mlir/Dialect/Vector/TransformOps/VectorTransformOps.td",
10254     deps = [
10255         ":VectorTransformOpsTdFiles",
10256     ],
10259 cc_library(
10260     name = "MaskableOpInterface",
10261     srcs = ["lib/Dialect/Vector/Interfaces/MaskableOpInterface.cpp"],
10262     hdrs = ["include/mlir/Dialect/Vector/Interfaces/MaskableOpInterface.h"],
10263     includes = ["include"],
10264     deps = [
10265         ":IR",
10266         ":MaskableOpInterfaceIncGen",
10267         ":MaskingOpInterface",
10268         ":Support",
10269         "//llvm:Support",
10270     ],
10273 cc_library(
10274     name = "MaskingOpInterface",
10275     srcs = ["lib/Dialect/Vector/Interfaces/MaskingOpInterface.cpp"],
10276     hdrs = ["include/mlir/Dialect/Vector/Interfaces/MaskingOpInterface.h"],
10277     includes = ["include"],
10278     deps = [
10279         ":IR",
10280         ":MaskingOpInterfaceIncGen",
10281         ":Support",
10282         "//llvm:Support",
10283     ],
10286 cc_library(
10287     name = "VectorToLLVM",
10288     srcs = glob([
10289         "lib/Conversion/VectorToLLVM/*.cpp",
10290         "lib/Conversion/VectorToLLVM/*.h",
10291     ]),
10292     hdrs = glob([
10293         "include/mlir/Conversion/VectorToLLVM/*.h",
10294     ]),
10295     includes = ["include"],
10296     deps = [
10297         ":AMXDialect",
10298         ":AMXTransforms",
10299         ":ArithDialect",
10300         ":ArithUtils",
10301         ":ArmNeonDialect",
10302         ":ArmSMEDialect",
10303         ":ArmSMETransforms",
10304         ":ArmSVEDialect",
10305         ":ArmSVETransforms",
10306         ":ConversionPassIncGen",
10307         ":DialectUtils",
10308         ":FuncDialect",
10309         ":IR",
10310         ":LLVMCommonConversion",
10311         ":LLVMDialect",
10312         ":MaskableOpInterface",
10313         ":MemRefDialect",
10314         ":Pass",
10315         ":Support",
10316         ":ToLLVMIRTranslation",
10317         ":Transforms",
10318         ":VectorDialect",
10319         ":VectorTransforms",
10320         ":X86VectorDialect",
10321         ":X86VectorTransforms",
10322         "//llvm:Core",
10323         "//llvm:Support",
10324     ],
10327 cc_library(
10328     name = "VectorToArmSME",
10329     srcs = glob([
10330         "lib/Conversion/VectorToArmSME/*.cpp",
10331         "lib/Conversion/VectorToArmSME/*.h",
10332     ]),
10333     hdrs = glob([
10334         "include/mlir/Conversion/VectorToArmSME/*.h",
10335     ]),
10336     includes = ["include"],
10337     deps = [
10338         ":ArmSMEDialect",
10339         ":ArmSMEUtils",
10340         ":ConversionPassIncGen",
10341         ":IR",
10342         ":Pass",
10343         ":Transforms",
10344         "//llvm:Support",
10345     ],
10348 cc_library(
10349     name = "VectorToGPU",
10350     srcs = glob([
10351         "lib/Conversion/VectorToGPU/*.cpp",
10352         "lib/Conversion/VectorToGPU/*.h",
10353     ]),
10354     hdrs = glob([
10355         "include/mlir/Conversion/VectorToGPU/*.h",
10356     ]),
10357     includes = ["include"],
10358     deps = [
10359         ":AffineDialect",
10360         ":Analysis",
10361         ":ArithDialect",
10362         ":ConversionPassIncGen",
10363         ":DialectUtils",
10364         ":FuncDialect",
10365         ":FuncToLLVM",
10366         ":GPUDialect",
10367         ":IR",
10368         ":LLVMDialect",
10369         ":MemRefDialect",
10370         ":NVGPUDialect",
10371         ":NVGPUUtils",
10372         ":NVVMDialect",
10373         ":Pass",
10374         ":SCFDialect",
10375         ":Support",
10376         ":Transforms",
10377         ":VectorDialect",
10378         ":VectorTransforms",
10379         ":VectorUtils",
10380         "//llvm:Core",
10381         "//llvm:Support",
10382     ],
10385 cc_library(
10386     name = "VectorToSCF",
10387     srcs = glob([
10388         "lib/Conversion/VectorToSCF/*.cpp",
10389         "lib/Conversion/VectorToSCF/*.h",
10390     ]),
10391     hdrs = glob([
10392         "include/mlir/Conversion/VectorToSCF/*.h",
10393     ]),
10394     includes = ["include"],
10395     deps = [
10396         ":AffineDialect",
10397         ":AffineUtils",
10398         ":ArithDialect",
10399         ":ConversionPassIncGen",
10400         ":FuncDialect",
10401         ":FuncToLLVM",
10402         ":IR",
10403         ":LLVMDialect",
10404         ":MemRefDialect",
10405         ":Pass",
10406         ":SCFDialect",
10407         ":Support",
10408         ":TensorDialect",
10409         ":Transforms",
10410         ":VectorDialect",
10411         ":VectorTransforms",
10412         "//llvm:Core",
10413         "//llvm:Support",
10414     ],
10417 td_library(
10418     name = "TosaDialectTdFiles",
10419     srcs = glob(["include/mlir/Dialect/Tosa/IR/*.td"]),
10420     deps = [
10421         ":InferTypeOpInterfaceTdFiles",
10422         ":LoopLikeInterfaceTdFiles",
10423         ":OpBaseTdFiles",
10424         ":SideEffectInterfacesTdFiles",
10425         ":VectorInterfacesTdFiles",
10426     ],
10429 gentbl_cc_library(
10430     name = "TosaDialectIncGen",
10431     tbl_outs = [
10432         (
10433             ["-gen-op-decls"],
10434             "include/mlir/Dialect/Tosa/IR/TosaOps.h.inc",
10435         ),
10436         (
10437             ["-gen-op-defs"],
10438             "include/mlir/Dialect/Tosa/IR/TosaOps.cpp.inc",
10439         ),
10440         (
10441             ["-gen-dialect-decls"],
10442             "include/mlir/Dialect/Tosa/IR/TosaOpsDialect.h.inc",
10443         ),
10444         (
10445             ["-gen-dialect-defs"],
10446             "include/mlir/Dialect/Tosa/IR/TosaOpsDialect.cpp.inc",
10447         ),
10448         (
10449             ["-gen-attrdef-decls"],
10450             "include/mlir/Dialect/Tosa/IR/TosaAttributes.h.inc",
10451         ),
10452         (
10453             ["-gen-attrdef-defs"],
10454             "include/mlir/Dialect/Tosa/IR/TosaAttributes.cpp.inc",
10455         ),
10456         (
10457             ["-gen-op-doc"],
10458             "g3doc/Dialects/Tosa/TosaOps.md",
10459         ),
10460     ],
10461     tblgen = ":mlir-tblgen",
10462     td_file = "include/mlir/Dialect/Tosa/IR/TosaOps.td",
10463     deps = [":TosaDialectTdFiles"],
10466 gentbl_cc_library(
10467     name = "TosaInterfacesIncGen",
10468     tbl_outs = [
10469         (
10470             ["-gen-op-interface-decls"],
10471             "include/mlir/Dialect/Tosa/IR/TosaInterfaces.h.inc",
10472         ),
10473         (
10474             ["-gen-op-interface-defs"],
10475             "include/mlir/Dialect/Tosa/IR/TosaInterfaces.cpp.inc",
10476         ),
10477     ],
10478     tblgen = ":mlir-tblgen",
10479     td_file = "include/mlir/Dialect/Tosa/IR/TosaInterfaces.td",
10480     deps = [":TosaDialectTdFiles"],
10483 gentbl_cc_library(
10484     name = "TosaPassIncGen",
10485     tbl_outs = [
10486         (
10487             [
10488                 "-gen-pass-decls",
10489                 "-name=TosaOpt",
10490             ],
10491             "include/mlir/Dialect/Tosa/Transforms/Passes.h.inc",
10492         ),
10493         (
10494             [
10495                 "-gen-enum-decls",
10496                 "-name=TosaOpt",
10497             ],
10498             "include/mlir/Dialect/Tosa/Transforms/PassesEnums.h.inc",
10499         ),
10500         (
10501             [
10502                 "-gen-enum-defs",
10503                 "-name=TosaOpt",
10504             ],
10505             "include/mlir/Dialect/Tosa/Transforms/PassesEnums.cpp.inc",
10506         ),
10507     ],
10508     tblgen = ":mlir-tblgen",
10509     td_file = "include/mlir/Dialect/Tosa/Transforms/Passes.td",
10510     deps = [
10511         ":OpBaseTdFiles",
10512         ":PassBaseTdFiles",
10513     ],
10516 cc_library(
10517     name = "TosaDialect",
10518     srcs = glob([
10519         "lib/Dialect/Tosa/IR/*.cpp",
10520         "lib/Dialect/Tosa/IR/*.h",
10521         "lib/Dialect/Tosa/Utils/*.cpp",
10522         "lib/Dialect/Tosa/Transforms/*.cpp",
10523     ]),
10524     hdrs = glob([
10525         "include/mlir/Dialect/Tosa/IR/*.h",
10526         "include/mlir/Dialect/Tosa/Utils/*.h",
10527         "include/mlir/Dialect/Tosa/Transforms/*.h",
10528     ]),
10529     includes = ["include"],
10530     deps = [
10531         ":Analysis",
10532         ":ArithDialect",
10533         ":Dialect",
10534         ":DialectUtils",
10535         ":FuncDialect",
10536         ":IR",
10537         ":InferTypeOpInterface",
10538         ":LoopLikeInterface",
10539         ":Pass",
10540         ":QuantOps",
10541         ":Support",
10542         ":TensorDialect",
10543         ":TosaDialectIncGen",
10544         ":TosaInterfacesIncGen",
10545         ":TosaPassIncGen",
10546         ":TransformUtils",
10547         ":VectorInterfaces",
10548         "//llvm:Support",
10549     ],
10552 cc_library(
10553     name = "TosaToArith",
10554     srcs = glob([
10555         "lib/Conversion/TosaToArith/*.cpp",
10556         "lib/Conversion/TosaToArith/*.h",
10557     ]),
10558     hdrs = glob([
10559         "include/mlir/Conversion/TosaToArith/*.h",
10560     ]),
10561     includes = [
10562         "include",
10563         "lib/Conversion/TosaToArith",
10564     ],
10565     deps = [
10566         ":ArithDialect",
10567         ":ConversionPassIncGen",
10568         ":FuncDialect",
10569         ":IR",
10570         ":Pass",
10571         ":TosaDialect",
10572         ":Transforms",
10573     ],
10576 cc_library(
10577     name = "TosaToLinalg",
10578     srcs = glob([
10579         "lib/Conversion/TosaToLinalg/*.cpp",
10580         "lib/Conversion/TosaToLinalg/*.h",
10581     ]),
10582     hdrs = glob([
10583         "include/mlir/Conversion/TosaToLinalg/*.h",
10584     ]),
10585     includes = [
10586         "include",
10587         "lib/Conversion/TosaToLinalg",
10588     ],
10589     deps = [
10590         ":ArithDialect",
10591         ":ArithUtils",
10592         ":ConversionPassIncGen",
10593         ":DialectUtils",
10594         ":FuncDialect",
10595         ":IR",
10596         ":LinalgDialect",
10597         ":LinalgUtils",
10598         ":MathDialect",
10599         ":Pass",
10600         ":SCFDialect",
10601         ":TensorDialect",
10602         ":TensorUtils",
10603         ":TosaDialect",
10604         ":Transforms",
10605         "//llvm:Support",
10606     ],
10609 cc_library(
10610     name = "TosaToSCF",
10611     srcs = glob([
10612         "lib/Conversion/TosaToSCF/*.cpp",
10613         "lib/Conversion/TosaToSCF/*.h",
10614     ]),
10615     hdrs = glob([
10616         "include/mlir/Conversion/TosaToSCF/*.h",
10617     ]),
10618     includes = [
10619         "include",
10620         "lib/Conversion/TosaToSCF",
10621     ],
10622     deps = [
10623         ":ConversionPassIncGen",
10624         ":FuncDialect",
10625         ":IR",
10626         ":Pass",
10627         ":SCFDialect",
10628         ":TensorDialect",
10629         ":TosaDialect",
10630         ":Transforms",
10631     ],
10634 cc_library(
10635     name = "TosaToTensor",
10636     srcs = glob([
10637         "lib/Conversion/TosaToTensor/*.cpp",
10638         "lib/Conversion/TosaToTensor/*.h",
10639     ]),
10640     hdrs = glob([
10641         "include/mlir/Conversion/TosaToTensor/*.h",
10642     ]),
10643     includes = [
10644         "include",
10645         "lib/Conversion/TosaToTensor",
10646     ],
10647     deps = [
10648         ":ArithDialect",
10649         ":ArithUtils",
10650         ":ConversionPassIncGen",
10651         ":FuncDialect",
10652         ":IR",
10653         ":Pass",
10654         ":TensorDialect",
10655         ":TensorUtils",
10656         ":TosaDialect",
10657         ":Transforms",
10658     ],
10661 td_library(
10662     name = "TransformDialectTdFiles",
10663     srcs = glob(["include/mlir/Dialect/Transform/IR/*.td"]),
10664     deps = [
10665         ":CastInterfacesTdFiles",
10666         ":ControlFlowInterfacesTdFiles",
10667         ":InferTypeOpInterfaceTdFiles",
10668         ":OpBaseTdFiles",
10669         ":SideEffectInterfacesTdFiles",
10670     ],
10673 gentbl_cc_library(
10674     name = "TransformDialectEnumsIncGen",
10675     tbl_outs = [
10676         (
10677             [
10678                 "-gen-enum-decls",
10679             ],
10680             "include/mlir/Dialect/Transform/IR/TransformDialectEnums.h.inc",
10681         ),
10682         (
10683             [
10684                 "-gen-enum-defs",
10685             ],
10686             "include/mlir/Dialect/Transform/IR/TransformDialectEnums.cpp.inc",
10687         ),
10688     ],
10689     tblgen = ":mlir-tblgen",
10690     td_file = "include/mlir/Dialect/Transform/IR/TransformAttrs.td",
10691     deps = [":TransformDialectTdFiles"],
10694 gentbl_cc_library(
10695     name = "TransformDialectMatchInterfacesIncGen",
10696     tbl_outs = [
10697         (
10698             [
10699                 "-gen-op-interface-decls",
10700             ],
10701             "include/mlir/Dialect/Transform/IR/MatchInterfaces.h.inc",
10702         ),
10703         (
10704             [
10705                 "-gen-op-interface-defs",
10706             ],
10707             "include/mlir/Dialect/Transform/IR/MatchInterfaces.cpp.inc",
10708         ),
10709     ],
10710     tblgen = ":mlir-tblgen",
10711     td_file = "include/mlir/Dialect/Transform/IR/MatchInterfaces.td",
10712     deps = [
10713         ":TransformDialectInterfacesIncGen",
10714         ":TransformDialectTdFiles",
10715     ],
10718 gentbl_cc_library(
10719     name = "TransformDialectInterfacesIncGen",
10720     tbl_outs = [
10721         (
10722             [
10723                 "-gen-op-interface-decls",
10724             ],
10725             "include/mlir/Dialect/Transform/IR/TransformInterfaces.h.inc",
10726         ),
10727         (
10728             [
10729                 "-gen-op-interface-defs",
10730             ],
10731             "include/mlir/Dialect/Transform/IR/TransformInterfaces.cpp.inc",
10732         ),
10733         (
10734             [
10735                 "-gen-type-interface-decls",
10736             ],
10737             "include/mlir/Dialect/Transform/IR/TransformTypeInterfaces.h.inc",
10738         ),
10739         (
10740             [
10741                 "-gen-type-interface-defs",
10742             ],
10743             "include/mlir/Dialect/Transform/IR/TransformTypeInterfaces.cpp.inc",
10744         ),
10745     ],
10746     tblgen = ":mlir-tblgen",
10747     td_file = "include/mlir/Dialect/Transform/IR/TransformInterfaces.td",
10748     deps = [":TransformDialectTdFiles"],
10751 gentbl_cc_library(
10752     name = "TransformDialectIncGen",
10753     tbl_outs = [
10754         (
10755             [
10756                 "-gen-dialect-decls",
10757             ],
10758             "include/mlir/Dialect/Transform/IR/TransformDialect.h.inc",
10759         ),
10760         (
10761             [
10762                 "-gen-dialect-defs",
10763             ],
10764             "include/mlir/Dialect/Transform/IR/TransformDialect.cpp.inc",
10765         ),
10766     ],
10767     tblgen = ":mlir-tblgen",
10768     td_file = "include/mlir/Dialect/Transform/IR/TransformDialect.td",
10769     deps = [":TransformDialectTdFiles"],
10772 gentbl_cc_library(
10773     name = "TransformOpsIncGen",
10774     tbl_outs = [
10775         (
10776             ["-gen-op-decls"],
10777             "include/mlir/Dialect/Transform/IR/TransformOps.h.inc",
10778         ),
10779         (
10780             ["-gen-op-defs"],
10781             "include/mlir/Dialect/Transform/IR/TransformOps.cpp.inc",
10782         ),
10783     ],
10784     tblgen = ":mlir-tblgen",
10785     td_file = "include/mlir/Dialect/Transform/IR/TransformOps.td",
10786     deps = [
10787         ":CallInterfacesTdFiles",
10788         ":FunctionInterfacesTdFiles",
10789         ":TransformDialectTdFiles",
10790     ],
10793 gentbl_cc_library(
10794     name = "TransformTypesIncGen",
10795     tbl_outs = [
10796         (
10797             ["-gen-typedef-decls"],
10798             "include/mlir/Dialect/Transform/IR/TransformTypes.h.inc",
10799         ),
10800         (
10801             ["-gen-typedef-defs"],
10802             "include/mlir/Dialect/Transform/IR/TransformTypes.cpp.inc",
10803         ),
10804     ],
10805     tblgen = ":mlir-tblgen",
10806     td_file = "include/mlir/Dialect/Transform/IR/TransformTypes.td",
10807     deps = [":TransformDialectTdFiles"],
10810 cc_library(
10811     name = "TransformDialect",
10812     srcs = glob(["lib/Dialect/Transform/IR/*.cpp"]),
10813     hdrs = glob(["include/mlir/Dialect/Transform/IR/*.h"]),
10814     deps = [
10815         ":Analysis",
10816         ":CallOpInterfaces",
10817         ":CastInterfaces",
10818         ":ControlFlowInterfaces",
10819         ":ConvertToLLVM",
10820         ":FunctionInterfaces",
10821         ":IR",
10822         ":LLVMCommonConversion",
10823         ":LLVMDialect",
10824         ":LoopLikeInterface",
10825         ":Pass",
10826         ":Rewrite",
10827         ":SideEffectInterfaces",
10828         ":Support",
10829         ":TransformDialectEnumsIncGen",
10830         ":TransformDialectIncGen",
10831         ":TransformDialectInterfacesIncGen",
10832         ":TransformDialectMatchInterfacesIncGen",
10833         ":TransformDialectUtils",
10834         ":TransformOpsIncGen",
10835         ":TransformTypesIncGen",
10836         ":Transforms",
10837         "//llvm:Support",
10838     ],
10841 td_library(
10842     name = "TransformPDLExtensionTdFiles",
10843     srcs = glob(["include/mlir/Dialect/Transform/PDLExtension/*.td"]),
10844     deps = [
10845         ":PDLDialectTdFiles",
10846         ":TransformDialectTdFiles",
10847     ],
10850 gentbl_cc_library(
10851     name = "TransformPDLExtensionOpsIncGen",
10852     tbl_outs = [
10853         (
10854             [
10855                 "-gen-op-decls",
10856             ],
10857             "include/mlir/Dialect/Transform/PDLExtension/PDLExtensionOps.h.inc",
10858         ),
10859         (
10860             [
10861                 "-gen-op-defs",
10862             ],
10863             "include/mlir/Dialect/Transform/PDLExtension/PDLExtensionOps.cpp.inc",
10864         ),
10865     ],
10866     tblgen = ":mlir-tblgen",
10867     td_file = "include/mlir/Dialect/Transform/PDLExtension/PDLExtensionOps.td",
10868     deps = [":TransformPDLExtensionTdFiles"],
10871 cc_library(
10872     name = "TransformPDLExtension",
10873     srcs = glob(["lib/Dialect/Transform/PDLExtension/*.cpp"]),
10874     hdrs = glob(["include/mlir/Dialect/Transform/PDLExtension/*.h"]),
10875     deps = [
10876         ":IR",
10877         ":PDLDialect",
10878         ":PDLInterpDialect",
10879         ":Rewrite",
10880         ":SideEffectInterfaces",
10881         ":Support",
10882         ":TransformDialect",
10883         ":TransformPDLExtensionOpsIncGen",
10884         "//llvm:Support",
10885     ],
10888 td_library(
10889     name = "TransformDialectTransformsTdFiles",
10890     srcs = glob(["include/mlir/Dialect/Transform/Transforms/*.td"]),
10891     deps = [
10892         ":PassBaseTdFiles",
10893         ":TransformDialectTdFiles",
10894     ],
10897 gentbl_cc_library(
10898     name = "TransformDialectTransformsIncGen",
10899     tbl_outs = [
10900         (
10901             [
10902                 "-gen-pass-decls",
10903                 "-name=Transform",
10904             ],
10905             "include/mlir/Dialect/Transform/Transforms/Passes.h.inc",
10906         ),
10907     ],
10908     tblgen = ":mlir-tblgen",
10909     td_file = "include/mlir/Dialect/Transform/Transforms/Passes.td",
10910     deps = [":TransformDialectTransformsTdFiles"],
10913 cc_library(
10914     name = "TransformDialectTransforms",
10915     srcs = glob(["lib/Dialect/Transform/Transforms/*.cpp"]),
10916     hdrs = glob(["include/mlir/Dialect/Transform/Transforms/*.h"]),
10917     deps = [
10918         ":Analysis",
10919         ":FunctionInterfaces",
10920         ":IR",
10921         ":Parser",
10922         ":Pass",
10923         ":SideEffectInterfaces",
10924         ":Support",
10925         ":TransformDialect",
10926         ":TransformDialectTransformsIncGen",
10927         "//llvm:Support",
10928     ],
10931 cc_library(
10932     name = "TransformDialectUtils",
10933     srcs = glob(["lib/Dialect/Transform/Utils/*cpp"]),
10934     hdrs = glob(["include/mlir/Dialect/Transform/Utils/*.h"]),
10935     includes = ["include"],
10936     deps = [
10937         ":DialectUtils",
10938         ":IR",
10939         ":Support",
10940         ":ViewLikeInterface",
10941         "//llvm:Support",
10942     ],
10945 td_library(
10946     name = "ComplexOpsTdFiles",
10947     srcs = [
10948         "include/mlir/Dialect/Complex/IR/ComplexBase.td",
10949         "include/mlir/Dialect/Complex/IR/ComplexOps.td",
10950     ],
10951     includes = ["include"],
10952     deps = [
10953         ":ArithOpsInterfacesTdFiles",
10954         ":ArithOpsTdFiles",
10955         ":BuiltinDialectTdFiles",
10956         ":InferTypeOpInterfaceTdFiles",
10957         ":OpBaseTdFiles",
10958         ":SideEffectInterfacesTdFiles",
10959     ],
10962 gentbl_cc_library(
10963     name = "ComplexAttributesIncGen",
10964     tbl_outs = [
10965         (
10966             ["-gen-attrdef-decls"],
10967             "include/mlir/Dialect/Complex/IR/ComplexAttributes.h.inc",
10968         ),
10969         (
10970             ["-gen-attrdef-defs"],
10971             "include/mlir/Dialect/Complex/IR/ComplexAttributes.cpp.inc",
10972         ),
10973     ],
10974     tblgen = ":mlir-tblgen",
10975     td_file = "include/mlir/Dialect/Complex/IR/ComplexAttributes.td",
10976     deps = [":ComplexOpsTdFiles"],
10979 gentbl_cc_library(
10980     name = "ComplexBaseIncGen",
10981     tbl_outs = [
10982         (
10983             [
10984                 "-gen-dialect-decls",
10985                 "-dialect=complex",
10986             ],
10987             "include/mlir/Dialect/Complex/IR/ComplexOpsDialect.h.inc",
10988         ),
10989         (
10990             [
10991                 "-gen-dialect-defs",
10992                 "-dialect=complex",
10993             ],
10994             "include/mlir/Dialect/Complex/IR/ComplexOpsDialect.cpp.inc",
10995         ),
10996     ],
10997     tblgen = ":mlir-tblgen",
10998     td_file = "include/mlir/Dialect/Complex/IR/ComplexBase.td",
10999     deps = [":ComplexOpsTdFiles"],
11002 gentbl_cc_library(
11003     name = "ComplexOpsIncGen",
11004     tbl_outs = [
11005         (
11006             ["-gen-op-decls"],
11007             "include/mlir/Dialect/Complex/IR/ComplexOps.h.inc",
11008         ),
11009         (
11010             ["-gen-op-defs"],
11011             "include/mlir/Dialect/Complex/IR/ComplexOps.cpp.inc",
11012         ),
11013     ],
11014     tblgen = ":mlir-tblgen",
11015     td_file = "include/mlir/Dialect/Complex/IR/ComplexOps.td",
11016     deps = [":ComplexOpsTdFiles"],
11019 cc_library(
11020     name = "ComplexDialect",
11021     srcs = glob(
11022         [
11023             "lib/Dialect/Complex/IR/*.cpp",
11024             "lib/Dialect/Complex/IR/*.h",
11025         ],
11026     ),
11027     hdrs = ["include/mlir/Dialect/Complex/IR/Complex.h"],
11028     includes = ["include"],
11029     deps = [
11030         ":ArithDialect",
11031         ":ComplexAttributesIncGen",
11032         ":ComplexBaseIncGen",
11033         ":ComplexOpsIncGen",
11034         ":IR",
11035         ":InferTypeOpInterface",
11036         ":SideEffectInterfaces",
11037         "//llvm:Support",
11038     ],
11041 cc_library(
11042     name = "ComplexToLLVM",
11043     srcs = glob([
11044         "lib/Conversion/ComplexToLLVM/*.cpp",
11045         "lib/Conversion/ComplexToLLVM/*.h",
11046     ]),
11047     hdrs = glob([
11048         "include/mlir/Conversion/ComplexToLLVM/*.h",
11049     ]),
11050     includes = ["include"],
11051     deps = [
11052         ":ArithAttrToLLVMConversion",
11053         ":ArithDialect",
11054         ":ComplexDialect",
11055         ":ConversionPassIncGen",
11056         ":ConvertToLLVM",
11057         ":FuncDialect",
11058         ":IR",
11059         ":LLVMCommonConversion",
11060         ":LLVMDialect",
11061         ":Pass",
11062         ":Support",
11063         ":Transforms",
11064         "//llvm:Core",
11065         "//llvm:Support",
11066     ],
11069 cc_library(
11070     name = "ComplexToLibm",
11071     srcs = glob([
11072         "lib/Conversion/ComplexToLibm/*.cpp",
11073         "lib/Conversion/ComplexToLibm/*.h",
11074     ]),
11075     hdrs = glob([
11076         "include/mlir/Conversion/ComplexToLibm/*.h",
11077     ]),
11078     includes = ["include"],
11079     deps = [
11080         ":ComplexDialect",
11081         ":ConversionPassIncGen",
11082         ":DialectUtils",
11083         ":FuncDialect",
11084         ":IR",
11085         ":Pass",
11086         ":Support",
11087         ":Transforms",
11088         "//llvm:Core",
11089         "//llvm:Support",
11090     ],
11093 cc_library(
11094     name = "ComplexToSPIRV",
11095     srcs = glob([
11096         "lib/Conversion/ComplexToSPIRV/*.cpp",
11097         "lib/Conversion/ComplexToSPIRV/*.h",
11098     ]),
11099     hdrs = glob([
11100         "include/mlir/Conversion/ComplexToSPIRV/*.h",
11101     ]),
11102     includes = ["include"],
11103     deps = [
11104         ":ComplexDialect",
11105         ":ConversionPassIncGen",
11106         ":IR",
11107         ":Pass",
11108         ":SPIRVCommonConversion",
11109         ":SPIRVConversion",
11110         ":SPIRVDialect",
11111         ":Support",
11112         ":Transforms",
11113         "//llvm:Core",
11114         "//llvm:Support",
11115     ],
11118 cc_library(
11119     name = "ComplexToStandard",
11120     srcs = glob([
11121         "lib/Conversion/ComplexToStandard/*.cpp",
11122         "lib/Conversion/ComplexToStandard/*.h",
11123     ]),
11124     hdrs = glob([
11125         "include/mlir/Conversion/ComplexToStandard/*.h",
11126     ]),
11127     includes = ["include"],
11128     deps = [
11129         ":ArithDialect",
11130         ":ComplexDialect",
11131         ":ConversionPassIncGen",
11132         ":FuncDialect",
11133         ":IR",
11134         ":MathDialect",
11135         ":Pass",
11136         ":Transforms",
11137     ],
11140 exports_files([
11141     "include/mlir/Interfaces/CallInterfaces.h",
11142     "include/mlir/Interfaces/CastInterfaces.h",
11143     "include/mlir/Interfaces/ControlFlowInterfaces.h",
11144     "include/mlir/Transforms/InliningUtils.h",
11147 td_library(
11148     name = "ArithOpsTdFiles",
11149     srcs = [
11150         "include/mlir/Dialect/Arith/IR/ArithBase.td",
11151         "include/mlir/Dialect/Arith/IR/ArithOps.td",
11152     ],
11153     includes = ["include"],
11154     deps = [
11155         ":ArithOpsInterfacesTdFiles",
11156         ":BuiltinDialectTdFiles",
11157         ":CastInterfacesTdFiles",
11158         ":InferIntRangeInterfaceTdFiles",
11159         ":InferTypeOpInterfaceTdFiles",
11160         ":OpBaseTdFiles",
11161         ":SideEffectInterfacesTdFiles",
11162         ":VectorInterfacesTdFiles",
11163     ],
11166 td_library(
11167     name = "ArithOpsInterfacesTdFiles",
11168     srcs = [
11169         "include/mlir/Dialect/Arith/IR/ArithOpsInterfaces.td",
11170     ],
11171     includes = ["include"],
11172     deps = [
11173         ":OpBaseTdFiles",
11174     ],
11177 gentbl_cc_library(
11178     name = "ArithBaseIncGen",
11179     tbl_outs = [
11180         (
11181             [
11182                 "-gen-dialect-decls",
11183                 "-dialect=arith",
11184             ],
11185             "include/mlir/Dialect/Arith/IR/ArithOpsDialect.h.inc",
11186         ),
11187         (
11188             [
11189                 "-gen-dialect-defs",
11190                 "-dialect=arith",
11191             ],
11192             "include/mlir/Dialect/Arith/IR/ArithOpsDialect.cpp.inc",
11193         ),
11194         (
11195             ["-gen-enum-decls"],
11196             "include/mlir/Dialect/Arith/IR/ArithOpsEnums.h.inc",
11197         ),
11198         (
11199             ["-gen-enum-defs"],
11200             "include/mlir/Dialect/Arith/IR/ArithOpsEnums.cpp.inc",
11201         ),
11202     ],
11203     tblgen = ":mlir-tblgen",
11204     td_file = "include/mlir/Dialect/Arith/IR/ArithBase.td",
11205     deps = [":ArithOpsTdFiles"],
11208 gentbl_cc_library(
11209     name = "ArithOpsIncGen",
11210     tbl_outs = [
11211         (
11212             ["-gen-op-decls"],
11213             "include/mlir/Dialect/Arith/IR/ArithOps.h.inc",
11214         ),
11215         (
11216             ["-gen-op-defs"],
11217             "include/mlir/Dialect/Arith/IR/ArithOps.cpp.inc",
11218         ),
11219         (
11220             [
11221                 "-gen-attrdef-decls",
11222                 "-attrdefs-dialect=arith",
11223             ],
11224             "include/mlir/Dialect/Arith/IR/ArithOpsAttributes.h.inc",
11225         ),
11226         (
11227             [
11228                 "-gen-attrdef-defs",
11229                 "-attrdefs-dialect=arith",
11230             ],
11231             "include/mlir/Dialect/Arith/IR/ArithOpsAttributes.cpp.inc",
11232         ),
11233     ],
11234     tblgen = ":mlir-tblgen",
11235     td_file = "include/mlir/Dialect/Arith/IR/ArithOps.td",
11236     deps = [
11237         ":ArithOpsTdFiles",
11238     ],
11241 gentbl_cc_library(
11242     name = "ArithOpsInterfacesIncGen",
11243     tbl_outs = [
11244         (
11245             ["-gen-op-interface-decls"],
11246             "include/mlir/Dialect/Arith/IR/ArithOpsInterfaces.h.inc",
11247         ),
11248         (
11249             ["-gen-op-interface-defs"],
11250             "include/mlir/Dialect/Arith/IR/ArithOpsInterfaces.cpp.inc",
11251         ),
11252     ],
11253     tblgen = ":mlir-tblgen",
11254     td_file = "include/mlir/Dialect/Arith/IR/ArithOpsInterfaces.td",
11255     deps = [
11256         ":ArithOpsInterfacesTdFiles",
11257     ],
11260 gentbl_cc_library(
11261     name = "ArithCanonicalizationIncGen",
11262     strip_include_prefix = "include/mlir/Dialect/Arith/IR",
11263     tbl_outs = [
11264         (
11265             ["-gen-rewriters"],
11266             "include/mlir/Dialect/Arith/IR/ArithCanonicalization.inc",
11267         ),
11268     ],
11269     tblgen = ":mlir-tblgen",
11270     td_file = "lib/Dialect/Arith/IR/ArithCanonicalization.td",
11271     deps = [
11272         ":ArithOpsTdFiles",
11273         ":CastInterfacesTdFiles",
11274         ":FuncTdFiles",
11275     ],
11278 cc_library(
11279     name = "ArithDialect",
11280     srcs = [
11281         "lib/Dialect/Arith/IR/ArithDialect.cpp",
11282         "lib/Dialect/Arith/IR/ArithOps.cpp",
11283         "lib/Dialect/Arith/IR/InferIntRangeInterfaceImpls.cpp",
11284     ],
11285     hdrs = [
11286         "include/mlir/Dialect/Arith/IR/Arith.h",
11287         "include/mlir/Transforms/InliningUtils.h",
11288     ],
11289     includes = ["include"],
11290     deps = [
11291         ":ArithBaseIncGen",
11292         ":ArithCanonicalizationIncGen",
11293         ":ArithOpsIncGen",
11294         ":ArithOpsInterfacesIncGen",
11295         ":CastInterfaces",
11296         ":CommonFolders",
11297         ":IR",
11298         ":InferIntRangeCommon",
11299         ":InferIntRangeInterface",
11300         ":InferTypeOpInterface",
11301         ":SideEffectInterfaces",
11302         ":UBDialect",
11303         ":VectorInterfaces",
11304         "//llvm:Support",
11305     ],
11308 gentbl_cc_library(
11309     name = "ArithPassIncGen",
11310     tbl_outs = [
11311         (
11312             [
11313                 "-gen-pass-decls",
11314                 "-name=Arith",
11315             ],
11316             "include/mlir/Dialect/Arith/Transforms/Passes.h.inc",
11317         ),
11318     ],
11319     tblgen = ":mlir-tblgen",
11320     td_file = "include/mlir/Dialect/Arith/Transforms/Passes.td",
11321     deps = [":PassBaseTdFiles"],
11324 cc_library(
11325     name = "ArithTransforms",
11326     srcs = glob([
11327         "lib/Dialect/Arith/Transforms/*.cpp",
11328         "lib/Dialect/Arith/Transforms/*.h",
11329     ]),
11330     hdrs = glob([
11331         "include/mlir/Dialect/Arith/Transforms/*.h",
11332     ]),
11333     includes = ["include"],
11334     deps = [
11335         ":Analysis",
11336         ":ArithDialect",
11337         ":ArithPassIncGen",
11338         ":ArithUtils",
11339         ":BufferizationDialect",
11340         ":BufferizationTransforms",
11341         ":FuncDialect",
11342         ":FuncTransforms",
11343         ":IR",
11344         ":InferIntRangeInterface",
11345         ":MemRefDialect",
11346         ":Pass",
11347         ":Support",
11348         ":TensorDialect",
11349         ":TransformUtils",
11350         ":Transforms",
11351         ":ValueBoundsOpInterface",
11352         ":VectorDialect",
11353         "//llvm:Support",
11354     ],
11357 cc_library(
11358     name = "ArithUtils",
11359     srcs = glob([
11360         "lib/Dialect/Arith/Utils/*.cpp",
11361     ]),
11362     hdrs = ["include/mlir/Dialect/Arith/Utils/Utils.h"],
11363     includes = ["include"],
11364     deps = [
11365         ":ArithDialect",
11366         ":ComplexDialect",
11367         ":IR",
11368         "//llvm:Support",
11369     ],
11372 td_library(
11373     name = "MathOpsTdFiles",
11374     srcs = [
11375         "include/mlir/Dialect/Math/IR/MathBase.td",
11376         "include/mlir/Dialect/Math/IR/MathOps.td",
11377     ],
11378     includes = ["include"],
11379     deps = [
11380         ":ArithOpsTdFiles",
11381         ":InferTypeOpInterfaceTdFiles",
11382         ":OpBaseTdFiles",
11383         ":SideEffectInterfacesTdFiles",
11384         ":VectorInterfacesTdFiles",
11385     ],
11388 gentbl_cc_library(
11389     name = "MathBaseIncGen",
11390     tbl_outs = [
11391         (
11392             [
11393                 "-gen-dialect-decls",
11394                 "-dialect=math",
11395             ],
11396             "include/mlir/Dialect/Math/IR/MathOpsDialect.h.inc",
11397         ),
11398         (
11399             [
11400                 "-gen-dialect-defs",
11401                 "-dialect=math",
11402             ],
11403             "include/mlir/Dialect/Math/IR/MathOpsDialect.cpp.inc",
11404         ),
11405     ],
11406     tblgen = ":mlir-tblgen",
11407     td_file = "include/mlir/Dialect/Math/IR/MathBase.td",
11408     deps = [":MathOpsTdFiles"],
11411 gentbl_cc_library(
11412     name = "MathOpsIncGen",
11413     tbl_outs = [
11414         (
11415             ["-gen-op-decls"],
11416             "include/mlir/Dialect/Math/IR/MathOps.h.inc",
11417         ),
11418         (
11419             ["-gen-op-defs"],
11420             "include/mlir/Dialect/Math/IR/MathOps.cpp.inc",
11421         ),
11422     ],
11423     tblgen = ":mlir-tblgen",
11424     td_file = "include/mlir/Dialect/Math/IR/MathOps.td",
11425     deps = [":MathOpsTdFiles"],
11428 gentbl_cc_library(
11429     name = "MathPassIncGen",
11430     tbl_outs = [
11431         (
11432             [
11433                 "-gen-pass-decls",
11434                 "-name=Math",
11435             ],
11436             "include/mlir/Dialect/Math/Transforms/Passes.h.inc",
11437         ),
11438     ],
11439     tblgen = ":mlir-tblgen",
11440     td_file = "include/mlir/Dialect/Math/Transforms/Passes.td",
11441     deps = [":PassBaseTdFiles"],
11444 cc_library(
11445     name = "MathDialect",
11446     srcs = glob(
11447         [
11448             "lib/Dialect/Math/IR/*.cpp",
11449             "lib/Dialect/Math/IR/*.h",
11450         ],
11451     ),
11452     hdrs = [
11453         "include/mlir/Dialect/Math/IR/Math.h",
11454     ],
11455     includes = ["include"],
11456     deps = [
11457         ":ArithDialect",
11458         ":CommonFolders",
11459         ":IR",
11460         ":InferTypeOpInterface",
11461         ":MathBaseIncGen",
11462         ":MathOpsIncGen",
11463         ":SideEffectInterfaces",
11464         ":UBDialect",
11465         ":VectorInterfaces",
11466         "//llvm:Support",
11467     ],
11470 cc_library(
11471     name = "MathTransforms",
11472     srcs = glob([
11473         "lib/Dialect/Math/Transforms/*.cpp",
11474         "lib/Dialect/Math/Transforms/*.h",
11475     ]),
11476     hdrs = glob(["include/mlir/Dialect/Math/Transforms/*.h"]),
11477     includes = ["include"],
11478     deps = [
11479         ":ArithDialect",
11480         ":DialectUtils",
11481         ":IR",
11482         ":MathDialect",
11483         ":MathPassIncGen",
11484         ":Pass",
11485         ":SCFDialect",
11486         ":Transforms",
11487         ":VectorDialect",
11488         ":VectorUtils",
11489         ":X86VectorDialect",
11490         "//llvm:Support",
11491     ],
11494 cc_library(
11495     name = "MathToLibm",
11496     srcs = glob([
11497         "lib/Conversion/MathToLibm/*.cpp",
11498         "lib/Conversion/MathToLibm/*.h",
11499     ]),
11500     hdrs = glob([
11501         "include/mlir/Conversion/MathToLibm/*.h",
11502     ]),
11503     includes = ["include"],
11504     deps = [
11505         ":ArithDialect",
11506         ":ConversionPassIncGen",
11507         ":DialectUtils",
11508         ":FuncDialect",
11509         ":IR",
11510         ":LLVMDialect",
11511         ":MathDialect",
11512         ":Pass",
11513         ":Support",
11514         ":Transforms",
11515         ":VectorDialect",
11516         ":VectorUtils",
11517         "//llvm:Core",
11518         "//llvm:Support",
11519     ],
11522 td_library(
11523     name = "MemRefOpsTdFiles",
11524     srcs = [
11525         "include/mlir/Dialect/MemRef/IR/MemRefBase.td",
11526         "include/mlir/Dialect/MemRef/IR/MemRefOps.td",
11527     ],
11528     includes = ["include"],
11529     deps = [
11530         ":ArithOpsTdFiles",
11531         ":CastInterfacesTdFiles",
11532         ":ControlFlowInterfacesTdFiles",
11533         ":CopyOpInterfaceTdFiles",
11534         ":MemorySlotInterfacesTdFiles",
11535         ":OpBaseTdFiles",
11536         ":ShapedOpInterfacesTdFiles",
11537         ":SideEffectInterfacesTdFiles",
11538         ":ViewLikeInterfaceTdFiles",
11539     ],
11542 gentbl_cc_library(
11543     name = "MemRefBaseIncGen",
11544     tbl_outs = [
11545         (
11546             [
11547                 "-gen-dialect-decls",
11548                 "-dialect=memref",
11549             ],
11550             "include/mlir/Dialect/MemRef/IR/MemRefOpsDialect.h.inc",
11551         ),
11552         (
11553             [
11554                 "-gen-dialect-defs",
11555                 "-dialect=memref",
11556             ],
11557             "include/mlir/Dialect/MemRef/IR/MemRefOpsDialect.cpp.inc",
11558         ),
11559     ],
11560     tblgen = ":mlir-tblgen",
11561     td_file = "include/mlir/Dialect/MemRef/IR/MemRefBase.td",
11562     deps = [":MemRefOpsTdFiles"],
11565 gentbl_cc_library(
11566     name = "MemRefOpsIncGen",
11567     tbl_outs = [
11568         (
11569             ["-gen-op-decls"],
11570             "include/mlir/Dialect/MemRef/IR/MemRefOps.h.inc",
11571         ),
11572         (
11573             ["-gen-op-defs"],
11574             "include/mlir/Dialect/MemRef/IR/MemRefOps.cpp.inc",
11575         ),
11576     ],
11577     tblgen = ":mlir-tblgen",
11578     td_file = "include/mlir/Dialect/MemRef/IR/MemRefOps.td",
11579     deps = [
11580         ":MemRefOpsTdFiles",
11581     ],
11584 cc_library(
11585     name = "MemRefDialect",
11586     srcs = glob(
11587         [
11588             "lib/Dialect/MemRef/IR/*.cpp",
11589             "lib/Dialect/MemRef/IR/*.h",
11590         ],
11591     ),
11592     hdrs = [
11593         "include/mlir/Dialect/MemRef/IR/MemRef.h",
11594         "include/mlir/Dialect/MemRef/IR/MemRefMemorySlot.h",
11595         "include/mlir/Dialect/MemRef/IR/ValueBoundsOpInterfaceImpl.h",
11596     ],
11597     includes = ["include"],
11598     deps = [
11599         ":ArithDialect",
11600         ":ArithUtils",
11601         ":CastInterfaces",
11602         ":ComplexDialect",
11603         ":ControlFlowInterfaces",
11604         ":CopyOpInterface",
11605         ":DialectUtils",
11606         ":IR",
11607         ":InferTypeOpInterface",
11608         ":MemRefBaseIncGen",
11609         ":MemRefOpsIncGen",
11610         ":MemorySlotInterfaces",
11611         ":ShapedOpInterfaces",
11612         ":Support",
11613         ":ValueBoundsOpInterface",
11614         ":ViewLikeInterface",
11615         "//llvm:Support",
11616         "//llvm:TargetParser",
11617     ],
11620 cc_library(
11621     name = "MemRefUtils",
11622     srcs = glob(
11623         [
11624             "lib/Dialect/MemRef/Utils/*.cpp",
11625         ],
11626     ),
11627     hdrs = [
11628         "include/mlir/Dialect/MemRef/Utils/MemRefUtils.h",
11629     ],
11630     includes = ["include"],
11631     deps = [
11632         ":AffineDialect",
11633         ":ArithUtils",
11634         ":MemRefDialect",
11635         ":VectorDialect",
11636     ],
11639 gentbl_cc_library(
11640     name = "MemRefPassIncGen",
11641     tbl_outs = [
11642         (
11643             [
11644                 "-gen-pass-decls",
11645                 "-name=MemRef",
11646             ],
11647             "include/mlir/Dialect/MemRef/Transforms/Passes.h.inc",
11648         ),
11649     ],
11650     tblgen = ":mlir-tblgen",
11651     td_file = "include/mlir/Dialect/MemRef/Transforms/Passes.td",
11652     deps = [":PassBaseTdFiles"],
11655 cc_library(
11656     name = "MemRefTransforms",
11657     srcs = glob(
11658         [
11659             "lib/Dialect/MemRef/Transforms/*.cpp",
11660             "lib/Dialect/MemRef/Transforms/*.h",
11661         ],
11662     ),
11663     hdrs = glob(["include/mlir/Dialect/MemRef/Transforms/*.h"]),
11664     includes = ["include"],
11665     deps = [
11666         ":AffineDialect",
11667         ":AffineTransforms",
11668         ":AffineUtils",
11669         ":ArithDialect",
11670         ":ArithTransforms",
11671         ":ArithUtils",
11672         ":BufferizationDialect",
11673         ":ControlFlowDialect",
11674         ":DialectUtils",
11675         ":FuncDialect",
11676         ":GPUDialect",
11677         ":IR",
11678         ":InferTypeOpInterface",
11679         ":LoopLikeInterface",
11680         ":MemRefDialect",
11681         ":MemRefPassIncGen",
11682         ":MemRefUtils",
11683         ":NVGPUDialect",
11684         ":Pass",
11685         ":RuntimeVerifiableOpInterface",
11686         ":SCFDialect",
11687         ":Support",
11688         ":TensorDialect",
11689         ":Transforms",
11690         ":ValueBoundsOpInterface",
11691         ":VectorDialect",
11692         "//llvm:Support",
11693     ],
11696 td_library(
11697     name = "MemRefTransformOpsTdFiles",
11698     srcs = [
11699         "include/mlir/Dialect/MemRef/TransformOps/MemRefTransformOps.td",
11700     ],
11701     includes = ["include"],
11702     deps = [
11703         ":TransformDialectTdFiles",
11704     ],
11707 gentbl_cc_library(
11708     name = "MemRefTransformOpsIncGen",
11709     tbl_outs = [
11710         (
11711             ["-gen-op-decls"],
11712             "include/mlir/Dialect/MemRef/TransformOps/MemRefTransformOps.h.inc",
11713         ),
11714         (
11715             ["-gen-op-defs"],
11716             "include/mlir/Dialect/MemRef/TransformOps/MemRefTransformOps.cpp.inc",
11717         ),
11718     ],
11719     tblgen = ":mlir-tblgen",
11720     td_file = "include/mlir/Dialect/MemRef/TransformOps/MemRefTransformOps.td",
11721     deps = [
11722         ":MemRefTransformOpsTdFiles",
11723     ],
11726 cc_library(
11727     name = "MemRefTransformOps",
11728     srcs = glob(["lib/Dialect/MemRef/TransformOps/*.cpp"]),
11729     hdrs = glob(["include/mlir/Dialect/MemRef/TransformOps/*.h"]),
11730     includes = ["include"],
11731     deps = [
11732         ":AffineDialect",
11733         ":Analysis",
11734         ":ArithDialect",
11735         ":IR",
11736         ":LLVMCommonConversion",
11737         ":LoopLikeInterface",
11738         ":MemRefDialect",
11739         ":MemRefTransformOpsIncGen",
11740         ":MemRefTransforms",
11741         ":MemRefUtils",
11742         ":NVGPUDialect",
11743         ":SCFDialect",
11744         ":TransformDialect",
11745         ":TransformUtils",
11746         ":VectorDialect",
11747         ":VectorTransforms",
11748         "//llvm:Support",
11749     ],
11752 ##---------------------------------------------------------------------------##
11753 # MLProgram dialect
11754 ##---------------------------------------------------------------------------##
11756 td_library(
11757     name = "MLProgramOpsTdFiles",
11758     srcs = [
11759         "include/mlir/Dialect/MLProgram/IR/MLProgramAttributes.td",
11760         "include/mlir/Dialect/MLProgram/IR/MLProgramBase.td",
11761         "include/mlir/Dialect/MLProgram/IR/MLProgramOps.td",
11762         "include/mlir/Dialect/MLProgram/IR/MLProgramTypes.td",
11763     ],
11764     includes = ["include"],
11765     deps = [
11766         ":BuiltinDialectTdFiles",
11767         ":CallInterfacesTdFiles",
11768         ":ControlFlowInterfacesTdFiles",
11769         ":FunctionInterfacesTdFiles",
11770         ":OpBaseTdFiles",
11771         ":RegionKindInterfaceIncGen",
11772         ":SideEffectInterfacesTdFiles",
11773     ],
11776 gentbl_cc_library(
11777     name = "MLProgramOpsIncGen",
11778     tbl_outs = [
11779         (
11780             ["-gen-op-decls"],
11781             "include/mlir/Dialect/MLProgram/IR/MLProgramOps.h.inc",
11782         ),
11783         (
11784             ["-gen-op-defs"],
11785             "include/mlir/Dialect/MLProgram/IR/MLProgramOps.cpp.inc",
11786         ),
11787         (
11788             ["-gen-dialect-decls"],
11789             "include/mlir/Dialect/MLProgram/IR/MLProgramOpsDialect.h.inc",
11790         ),
11791         (
11792             ["-gen-dialect-defs"],
11793             "include/mlir/Dialect/MLProgram/IR/MLProgramOpsDialect.cpp.inc",
11794         ),
11795     ],
11796     tblgen = ":mlir-tblgen",
11797     td_file = "include/mlir/Dialect/MLProgram/IR/MLProgramOps.td",
11798     deps = [":MLProgramOpsTdFiles"],
11801 gentbl_cc_library(
11802     name = "MLProgramAttributesIncGen",
11803     tbl_outs = [
11804         (
11805             ["-gen-attrdef-decls"],
11806             "include/mlir/Dialect/MLProgram/IR/MLProgramAttributes.h.inc",
11807         ),
11808         (
11809             ["-gen-attrdef-defs"],
11810             "include/mlir/Dialect/MLProgram/IR/MLProgramAttributes.cpp.inc",
11811         ),
11812     ],
11813     tblgen = ":mlir-tblgen",
11814     td_file = "include/mlir/Dialect/MLProgram/IR/MLProgramAttributes.td",
11815     deps = [":MLProgramOpsTdFiles"],
11818 gentbl_cc_library(
11819     name = "MLProgramTypesIncGen",
11820     tbl_outs = [
11821         (
11822             ["-gen-typedef-decls"],
11823             "include/mlir/Dialect/MLProgram/IR/MLProgramTypes.h.inc",
11824         ),
11825         (
11826             ["-gen-typedef-defs"],
11827             "include/mlir/Dialect/MLProgram/IR/MLProgramTypes.cpp.inc",
11828         ),
11829     ],
11830     tblgen = ":mlir-tblgen",
11831     td_file = "include/mlir/Dialect/MLProgram/IR/MLProgramTypes.td",
11832     deps = [":MLProgramOpsTdFiles"],
11835 cc_library(
11836     name = "MLProgramDialect",
11837     srcs = glob([
11838         "lib/Dialect/MLProgram/IR/*.cpp",
11839         "lib/Dialect/MLProgram/IR/*.h",
11840     ]),
11841     hdrs = glob([
11842         "include/mlir/Dialect/MLProgram/IR/*.h",
11843     ]),
11844     includes = ["include"],
11845     deps = [
11846         ":ControlFlowInterfaces",
11847         ":FunctionInterfaces",
11848         ":IR",
11849         ":MLProgramAttributesIncGen",
11850         ":MLProgramOpsIncGen",
11851         ":MLProgramTypesIncGen",
11852         ":Pass",
11853         ":Support",
11854         "//llvm:Support",
11855     ],
11858 ##---------------------------------------------------------------------------##
11859 # Allocation interfaces
11860 ##---------------------------------------------------------------------------##
11862 td_library(
11863     name = "AllocationOpInterfaceTdFiles",
11864     srcs = ["include/mlir/Dialect/Bufferization/IR/AllocationOpInterface.td"],
11865     includes = ["include"],
11866     deps = [":OpBaseTdFiles"],
11869 gentbl_cc_library(
11870     name = "AllocationOpInterfaceIncGen",
11871     tbl_outs = [
11872         (
11873             ["-gen-op-interface-decls"],
11874             "include/mlir/Dialect/Bufferization/IR/AllocationOpInterface.h.inc",
11875         ),
11876         (
11877             ["-gen-op-interface-defs"],
11878             "include/mlir/Dialect/Bufferization/IR/AllocationOpInterface.cpp.inc",
11879         ),
11880     ],
11881     tblgen = ":mlir-tblgen",
11882     td_file = "include/mlir/Dialect/Bufferization/IR/AllocationOpInterface.td",
11883     deps = [":AllocationOpInterfaceTdFiles"],
11886 cc_library(
11887     name = "AllocationOpInterface",
11888     srcs = ["lib/Dialect/Bufferization/IR/AllocationOpInterface.cpp"],
11889     hdrs = ["include/mlir/Dialect/Bufferization/IR/AllocationOpInterface.h"],
11890     includes = ["include"],
11891     deps = [
11892         ":AllocationOpInterfaceIncGen",
11893         ":IR",
11894     ],
11897 td_library(
11898     name = "BufferizationOpsTdFiles",
11899     srcs = [
11900         "include/mlir/Dialect/Bufferization/IR/BufferizationBase.td",
11901         "include/mlir/Dialect/Bufferization/IR/BufferizationEnums.td",
11902         "include/mlir/Dialect/Bufferization/IR/BufferizationOps.td",
11903     ],
11904     includes = ["include"],
11905     deps = [
11906         ":AllocationOpInterfaceTdFiles",
11907         ":CopyOpInterfaceTdFiles",
11908         ":InferTypeOpInterfaceTdFiles",
11909         ":OpBaseTdFiles",
11910         ":SideEffectInterfacesTdFiles",
11911     ],
11914 gentbl_cc_library(
11915     name = "BufferizationBaseIncGen",
11916     tbl_outs = [
11917         (
11918             [
11919                 "-gen-dialect-decls",
11920                 "-dialect=bufferization",
11921             ],
11922             "include/mlir/Dialect/Bufferization/IR/BufferizationOpsDialect.h.inc",
11923         ),
11924         (
11925             [
11926                 "-gen-dialect-defs",
11927                 "-dialect=bufferization",
11928             ],
11929             "include/mlir/Dialect/Bufferization/IR/BufferizationOpsDialect.cpp.inc",
11930         ),
11931     ],
11932     tblgen = ":mlir-tblgen",
11933     td_file = "include/mlir/Dialect/Bufferization/IR/BufferizationBase.td",
11934     deps = [":BufferizationOpsTdFiles"],
11937 td_library(
11938     name = "BufferizationEnumsTdFiles",
11939     srcs = [
11940         "include/mlir/Dialect/Bufferization/IR/BufferizationEnums.td",
11941     ],
11942     includes = ["include"],
11943     deps = [
11944         ":OpBaseTdFiles",
11945     ],
11948 gentbl_cc_library(
11949     name = "BufferizationEnumsIncGen",
11950     tbl_outs = [
11951         (
11952             ["-gen-enum-decls"],
11953             "include/mlir/Dialect/Bufferization/IR/BufferizationEnums.h.inc",
11954         ),
11955         (
11956             ["-gen-enum-defs"],
11957             "include/mlir/Dialect/Bufferization/IR/BufferizationEnums.cpp.inc",
11958         ),
11959     ],
11960     tblgen = ":mlir-tblgen",
11961     td_file = "include/mlir/Dialect/Bufferization/IR/BufferizationEnums.td",
11962     deps = [":BufferizationEnumsTdFiles"],
11965 td_library(
11966     name = "BufferizationTransformOpsTdFiles",
11967     srcs = [
11968         "include/mlir/Dialect/Bufferization/TransformOps/BufferizationTransformOps.td",
11969     ],
11970     includes = ["include"],
11971     deps = [
11972         ":BufferizationOpsTdFiles",
11973         ":TransformDialectTdFiles",
11974     ],
11977 gentbl_cc_library(
11978     name = "BufferizationTransformOpsIncGen",
11979     tbl_outs = [
11980         (
11981             ["-gen-op-decls"],
11982             "include/mlir/Dialect/Bufferization/TransformOps/BufferizationTransformOps.h.inc",
11983         ),
11984         (
11985             ["-gen-op-defs"],
11986             "include/mlir/Dialect/Bufferization/TransformOps/BufferizationTransformOps.cpp.inc",
11987         ),
11988     ],
11989     tblgen = ":mlir-tblgen",
11990     td_file = "include/mlir/Dialect/Bufferization/TransformOps/BufferizationTransformOps.td",
11991     deps = [
11992         ":BufferizationTransformOpsTdFiles",
11993     ],
11996 cc_library(
11997     name = "BufferizationTransformOps",
11998     srcs = [
11999         "lib/Dialect/Bufferization/TransformOps/BufferizationTransformOps.cpp",
12000     ],
12001     hdrs = [
12002         "include/mlir/Dialect/Bufferization/TransformOps/BufferizationTransformOps.h",
12003     ],
12004     includes = ["include"],
12005     deps = [
12006         ":BufferizationDialect",
12007         ":BufferizationEnumsIncGen",
12008         ":BufferizationTransformOpsIncGen",
12009         ":BufferizationTransforms",
12010         ":FunctionInterfaces",
12011         ":IR",
12012         ":LinalgDialect",
12013         ":MemRefDialect",
12014         ":Parser",
12015         ":SideEffectInterfaces",
12016         ":TensorDialect",
12017         ":TransformDialect",
12018         "//llvm:Support",
12019     ],
12022 gentbl_cc_library(
12023     name = "BufferizationOpsIncGen",
12024     tbl_outs = [
12025         (
12026             ["-gen-op-decls"],
12027             "include/mlir/Dialect/Bufferization/IR/BufferizationOps.h.inc",
12028         ),
12029         (
12030             ["-gen-op-defs"],
12031             "include/mlir/Dialect/Bufferization/IR/BufferizationOps.cpp.inc",
12032         ),
12033     ],
12034     tblgen = ":mlir-tblgen",
12035     td_file = "include/mlir/Dialect/Bufferization/IR/BufferizationOps.td",
12036     deps = [
12037         ":BufferizableOpInterfaceTdFiles",
12038         ":BufferizationOpsTdFiles",
12039     ],
12042 cc_library(
12043     name = "BufferizationDialect",
12044     srcs = [
12045         "lib/Dialect/Bufferization/IR/BufferizableOpInterface.cpp",
12046         "lib/Dialect/Bufferization/IR/BufferizationDialect.cpp",
12047         "lib/Dialect/Bufferization/IR/BufferizationOps.cpp",
12048         "lib/Dialect/Bufferization/IR/UnstructuredControlFlow.cpp",
12049     ],
12050     hdrs = [
12051         "include/mlir/Dialect/Bufferization/IR/BufferizableOpInterface.h",
12052         "include/mlir/Dialect/Bufferization/IR/Bufferization.h",
12053         "include/mlir/Dialect/Bufferization/IR/DstBufferizableOpInterfaceImpl.h",
12054         "include/mlir/Dialect/Bufferization/IR/UnstructuredControlFlow.h",
12055     ],
12056     includes = ["include"],
12057     deps = [
12058         ":AffineDialect",
12059         ":AllocationOpInterface",
12060         ":ArithDialect",
12061         ":BufferizableOpInterfaceIncGen",
12062         ":BufferizationBaseIncGen",
12063         ":BufferizationEnumsIncGen",
12064         ":BufferizationOpsIncGen",
12065         ":ControlFlowInterfaces",
12066         ":CopyOpInterface",
12067         ":DestinationStyleOpInterface",
12068         ":FuncDialect",
12069         ":FunctionInterfaces",
12070         ":IR",
12071         ":InferTypeOpInterface",
12072         ":MemRefDialect",
12073         ":SparseTensorDialect",
12074         ":Support",
12075         ":TensorDialect",
12076         "//llvm:Support",
12077     ],
12080 gentbl_cc_library(
12081     name = "BufferizationPassIncGen",
12082     tbl_outs = [
12083         (
12084             [
12085                 "-gen-pass-decls",
12086                 "-name=Bufferization",
12087             ],
12088             "include/mlir/Dialect/Bufferization/Transforms/Passes.h.inc",
12089         ),
12090     ],
12091     tblgen = ":mlir-tblgen",
12092     td_file = "include/mlir/Dialect/Bufferization/Transforms/Passes.td",
12093     deps = [":PassBaseTdFiles"],
12096 cc_library(
12097     name = "BufferizationTransforms",
12098     srcs = glob(
12099         [
12100             "lib/Dialect/Bufferization/Transforms/*.cpp",
12101             "lib/Dialect/Bufferization/Transforms/*.h",
12102         ],
12103     ),
12104     hdrs = glob(["include/mlir/Dialect/Bufferization/Transforms/*.h"]),
12105     includes = ["include"],
12106     deps = [
12107         ":AllocationOpInterface",
12108         ":Analysis",
12109         ":ArithDialect",
12110         ":BufferizationDialect",
12111         ":BufferizationEnumsIncGen",
12112         ":BufferizationPassIncGen",
12113         ":ControlFlowInterfaces",
12114         ":FuncDialect",
12115         ":IR",
12116         ":LoopLikeInterface",
12117         ":MemRefDialect",
12118         ":MemRefUtils",
12119         ":Pass",
12120         ":SCFDialect",
12121         ":SideEffectInterfaces",
12122         ":Support",
12123         ":TensorDialect",
12124         ":Transforms",
12125         ":ViewLikeInterface",
12126         "//llvm:Support",
12127     ],
12130 cc_library(
12131     name = "BufferizationToMemRef",
12132     srcs = [
12133         "lib/Conversion/BufferizationToMemRef/BufferizationToMemRef.cpp",
12134     ],
12135     hdrs = [
12136         "include/mlir/Conversion/BufferizationToMemRef/BufferizationToMemRef.h",
12137     ],
12138     includes = ["include"],
12139     deps = [
12140         ":ArithDialect",
12141         ":BufferizationDialect",
12142         ":BufferizationTransforms",
12143         ":ConversionPassIncGen",
12144         ":FuncDialect",
12145         ":IR",
12146         ":MemRefDialect",
12147         ":Pass",
12148         ":SCFDialect",
12149         ":Support",
12150         ":Transforms",
12151     ],
12154 td_library(
12155     name = "DLTIDialectTdFiles",
12156     srcs = [
12157         "include/mlir/Dialect/DLTI/DLTI.td",
12158         "include/mlir/Dialect/DLTI/DLTIBase.td",
12159     ],
12160     includes = ["include"],
12161     deps = [":OpBaseTdFiles"],
12164 gentbl_cc_library(
12165     name = "DLTIBaseIncGen",
12166     tbl_outs = [
12167         (
12168             [
12169                 "-gen-dialect-decls",
12170                 "-dialect=dlti",
12171             ],
12172             "include/mlir/Dialect/DLTI/DLTIDialect.h.inc",
12173         ),
12174         (
12175             [
12176                 "-gen-dialect-defs",
12177                 "-dialect=dlti",
12178             ],
12179             "include/mlir/Dialect/DLTI/DLTIDialect.cpp.inc",
12180         ),
12181     ],
12182     tblgen = ":mlir-tblgen",
12183     td_file = "include/mlir/Dialect/DLTI/DLTIBase.td",
12184     deps = [":OpBaseTdFiles"],
12187 cc_library(
12188     name = "DLTIDialect",
12189     srcs = glob(["lib/Dialect/DLTI/*.cpp"]),
12190     hdrs = glob(["include/mlir/Dialect/DLTI/*.h"]),
12191     includes = ["include"],
12192     deps = [
12193         ":DLTIBaseIncGen",
12194         ":DataLayoutInterfaces",
12195         ":IR",
12196         "//llvm:Support",
12197     ],
12200 gentbl_cc_library(
12201     name = "ReducerIncGen",
12202     tbl_outs = [
12203         (
12204             [
12205                 "-gen-pass-decls",
12206                 "-name=Reducer",
12207             ],
12208             "include/mlir/Reducer/Passes.h.inc",
12209         ),
12210     ],
12211     tblgen = ":mlir-tblgen",
12212     td_file = "include/mlir/Reducer/Passes.td",
12213     deps = [
12214         ":PassBaseTdFiles",
12215         ":ReducerTdFiles",
12216     ],
12219 cc_library(
12220     name = "Reducer",
12221     srcs = glob(["lib/Reducer/*.cpp"]),
12222     hdrs = glob(["include/mlir/Reducer/*.h"]),
12223     includes = ["include"],
12224     deps = [
12225         ":IR",
12226         ":Pass",
12227         ":ReducerIncGen",
12228         ":Rewrite",
12229         ":Support",
12230         ":TransformUtils",
12231         "//llvm:Support",
12232     ],
12235 cc_library(
12236     name = "MlirReduceLib",
12237     srcs = ["lib/Tools/mlir-reduce/MlirReduceMain.cpp"],
12238     hdrs = [
12239         "include/mlir/Tools/ParseUtilities.h",
12240         "include/mlir/Tools/mlir-reduce/MlirReduceMain.h",
12241     ],
12242     includes = ["include"],
12243     deps = [
12244         ":IR",
12245         ":Parser",
12246         ":Pass",
12247         ":Reducer",
12248         ":Rewrite",
12249         ":Support",
12250         "//llvm:Support",
12251     ],
12254 cc_binary(
12255     name = "mlir-reduce",
12256     srcs = ["tools/mlir-reduce/mlir-reduce.cpp"],
12257     includes = ["include"],
12258     local_defines = ["MLIR_INCLUDE_TESTS"],
12259     stamp = 0,
12260     deps = [
12261         ":AllPassesAndDialects",
12262         ":IR",
12263         ":MlirReduceLib",
12264         "//llvm:Support",
12265         "//mlir/test:TestDialect",
12266     ],
12269 cc_library(
12270     name = "PDLLODS",
12271     srcs = glob(
12272         [
12273             "lib/Tools/PDLL/ODS/*.cpp",
12274             "lib/Tools/PDLL/ODS/*.h",
12275         ],
12276     ),
12277     hdrs = glob(["include/mlir/Tools/PDLL/ODS/*.h"]),
12278     includes = ["include"],
12279     deps = [
12280         ":Support",
12281         "//llvm:Support",
12282         "//llvm:TargetParser",
12283     ],
12286 cc_library(
12287     name = "PDLLAST",
12288     srcs = glob(
12289         [
12290             "lib/Tools/PDLL/AST/*.cpp",
12291             "lib/Tools/PDLL/AST/*.h",
12292         ],
12293     ),
12294     hdrs = glob(["include/mlir/Tools/PDLL/AST/*.h"]),
12295     includes = ["include"],
12296     deps = [
12297         ":Support",
12298         "//llvm:Support",
12299         "//llvm:TargetParser",
12300     ],
12303 cc_library(
12304     name = "PDLLCodeGen",
12305     srcs = glob(
12306         [
12307             "lib/Tools/PDLL/CodeGen/*.cpp",
12308             "lib/Tools/PDLL/CodeGen/*.h",
12309         ],
12310     ),
12311     hdrs = glob(["include/mlir/Tools/PDLL/CodeGen/*.h"]),
12312     includes = ["include"],
12313     deps = [
12314         ":AsmParser",
12315         ":IR",
12316         ":PDLDialect",
12317         ":PDLLAST",
12318         ":PDLLODS",
12319         ":Support",
12320         "//llvm:Support",
12321     ],
12324 cc_library(
12325     name = "PDLLParser",
12326     srcs = glob(
12327         [
12328             "lib/Tools/PDLL/Parser/*.cpp",
12329             "lib/Tools/PDLL/Parser/*.h",
12330         ],
12331     ),
12332     hdrs = glob(["include/mlir/Tools/PDLL/Parser/*.h"]),
12333     includes = ["include"],
12334     deps = [
12335         ":PDLLAST",
12336         ":PDLLODS",
12337         ":Support",
12338         ":TableGen",
12339         "//llvm:Support",
12340         "//llvm:TableGen",
12341         "//llvm:TargetParser",
12342     ],
12345 cc_binary(
12346     name = "mlir-pdll",
12347     srcs = [
12348         "tools/mlir-pdll/mlir-pdll.cpp",
12349     ],
12350     deps = [
12351         ":IR",
12352         ":PDLLAST",
12353         ":PDLLCodeGen",
12354         ":PDLLODS",
12355         ":PDLLParser",
12356         ":Support",
12357         "//llvm:Support",
12358         "//llvm:config",
12359     ],
12362 cc_binary(
12363     name = "mlir-pdll-lsp-server",
12364     srcs = ["tools/mlir-pdll-lsp-server/mlir-pdll-lsp-server.cpp"],
12365     includes = ["include"],
12366     deps = [
12367         ":MlirPdllLspServerLib",
12368         ":Support",
12369     ],
12372 td_library(
12373     name = "DialectConversionPdllFiles",
12374     srcs = ["include/mlir/Transforms/DialectConversion.pdll"],
12375     includes = ["include"],
12378 td_library(
12379     name = "UBDialectTdFiles",
12380     srcs = [
12381         "include/mlir/Dialect/UB/IR/UBOps.td",
12382         "include/mlir/Dialect/UB/IR/UBOpsInterfaces.td",
12383     ],
12384     includes = ["include"],
12385     deps = [
12386         ":OpBaseTdFiles",
12387         ":SideEffectInterfacesTdFiles",
12388     ],
12391 gentbl_cc_library(
12392     name = "UBOpsInterfacesIncGen",
12393     tbl_outs = [
12394         (
12395             ["--gen-attr-interface-decls"],
12396             "include/mlir/Dialect/UB/IR/UBOpsInterfaces.h.inc",
12397         ),
12398         (
12399             ["--gen-attr-interface-defs"],
12400             "include/mlir/Dialect/UB/IR/UBOpsInterfaces.cpp.inc",
12401         ),
12402     ],
12403     tblgen = ":mlir-tblgen",
12404     td_file = "include/mlir/Dialect/UB/IR/UBOpsInterfaces.td",
12405     deps = [":UBDialectTdFiles"],
12408 gentbl_cc_library(
12409     name = "UBOpsIncGen",
12410     tbl_outs = [
12411         (
12412             [
12413                 "-gen-dialect-decls",
12414                 "-dialect=ub",
12415             ],
12416             "include/mlir/Dialect/UB/IR/UBOpsDialect.h.inc",
12417         ),
12418         (
12419             [
12420                 "-gen-dialect-defs",
12421                 "-dialect=ub",
12422             ],
12423             "include/mlir/Dialect/UB/IR/UBOpsDialect.cpp.inc",
12424         ),
12425         (
12426             ["-gen-op-decls"],
12427             "include/mlir/Dialect/UB/IR/UBOps.h.inc",
12428         ),
12429         (
12430             ["-gen-op-defs"],
12431             "include/mlir/Dialect/UB/IR/UBOps.cpp.inc",
12432         ),
12433         (
12434             ["--gen-attrdef-decls"],
12435             "include/mlir/Dialect/UB/IR/UBOpsAttributes.h.inc",
12436         ),
12437         (
12438             ["--gen-attrdef-defs"],
12439             "include/mlir/Dialect/UB/IR/UBOpsAttributes.cpp.inc",
12440         ),
12441     ],
12442     tblgen = ":mlir-tblgen",
12443     td_file = "include/mlir/Dialect/UB/IR/UBOps.td",
12444     deps = [":UBDialectTdFiles"],
12447 cc_library(
12448     name = "UBDialect",
12449     srcs = ["lib/Dialect/UB/IR/UBOps.cpp"],
12450     hdrs = ["include/mlir/Dialect/UB/IR/UBOps.h"],
12451     includes = ["include"],
12452     deps = [
12453         ":IR",
12454         ":SideEffectInterfaces",
12455         ":UBOpsIncGen",
12456         ":UBOpsInterfacesIncGen",
12457         "//llvm:Support",
12458     ],
12461 cc_library(
12462     name = "UBToLLVM",
12463     srcs = glob([
12464         "lib/Conversion/UBToLLVM/*.cpp",
12465         "lib/Conversion/UBToLLVM/*.h",
12466     ]),
12467     hdrs = glob([
12468         "include/mlir/Conversion/UBToLLVM/*.h",
12469     ]),
12470     includes = ["include"],
12471     deps = [
12472         ":ConversionPassIncGen",
12473         ":ConvertToLLVM",
12474         ":IR",
12475         ":LLVMCommonConversion",
12476         ":LLVMDialect",
12477         ":Pass",
12478         ":UBDialect",
12479     ],
12482 cc_library(
12483     name = "UBToSPIRV",
12484     srcs = glob([
12485         "lib/Conversion/UBToSPIRV/*.cpp",
12486         "lib/Conversion/UBToSPIRV/*.h",
12487     ]),
12488     hdrs = glob([
12489         "include/mlir/Conversion/UBToSPIRV/*.h",
12490     ]),
12491     includes = ["include"],
12492     deps = [
12493         ":ConversionPassIncGen",
12494         ":Pass",
12495         ":SPIRVConversion",
12496         ":SPIRVDialect",
12497         ":UBDialect",
12498         "//llvm:Core",
12499     ],