Add mlir-query bazel rules (#116063)
[llvm-project.git] / utils / bazel / llvm-project-overlay / mlir / BUILD.bazel
blobd7d342551df4e213b203339d4402f8b641d98396
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:common_settings.bzl", "bool_flag")
9 load("@bazel_skylib//rules:expand_template.bzl", "expand_template")
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/lldb-scripts/mlirDataFormatters.py",
30     "utils/textmate/mlir.json",
33 bool_flag(
34     name = "enable_cuda",
35     build_setting_default = False,
38 config_setting(
39     name = "enable_cuda_config",
40     flag_values = {
41         ":enable_cuda": "True",
42     },
45 expand_template(
46     name = "mlir_config_h_gen",
47     out = "include/mlir/Config/mlir-config.h",
48     substitutions = {
49         "#cmakedefine01 MLIR_DEPRECATED_GPU_SERIALIZATION_ENABLE": "#define MLIR_DEPRECATED_GPU_SERIALIZATION_ENABLE 0",
50         "#cmakedefine01 MLIR_ENABLE_EXPENSIVE_PATTERN_API_CHECKS": "#define MLIR_ENABLE_EXPENSIVE_PATTERN_API_CHECKS 0",
51         "#cmakedefine MLIR_GREEDY_REWRITE_RANDOMIZER_SEED ${MLIR_GREEDY_REWRITE_RANDOMIZER_SEED}": "/* #undef MLIR_GREEDY_REWRITE_RANDOMIZER_SEED */",
52         "#cmakedefine01 MLIR_ENABLE_NVPTXCOMPILER": "#define MLIR_ENABLE_NVPTXCOMPILER 0",
53         "#cmakedefine01 MLIR_ENABLE_PDL_IN_PATTERNMATCH": "#define MLIR_ENABLE_PDL_IN_PATTERNMATCH 1",
54         "#cmakedefine01 MLIR_ENABLE_ROCM_CONVERSIONS": "#define MLIR_ENABLE_ROCM_CONVERSIONS 0",
55     },
56     template = "include/mlir/Config/mlir-config.h.cmake",
59 cc_library(
60     name = "config",
61     hdrs = [
62         "include/mlir/Config/mlir-config.h",
63     ],
66 filegroup(
67     name = "c_headers",
68     srcs = glob(["include/mlir-c/**/*"]),  # <== i.e. match the entire tree
71 exports_files(glob(["include/**/*.td"]))
74     gentbl_cc_library(
75         name = name + "IncGen",
76         tbl_outs = [
77             (
78                 ["-gen-op-interface-decls"],
79                 "include/mlir/IR/" + name + ".h.inc",
80             ),
81             (
82                 ["-gen-op-interface-defs"],
83                 "include/mlir/IR/" + name + ".cpp.inc",
84             ),
85         ],
86         tblgen = ":mlir-tblgen",
87         td_file = "include/mlir/IR/" + name + ".td",
88         deps = [":OpBaseTdFiles"],
89     )
90     for name in [
91         "OpAsmInterface",
92         "RegionKindInterface",
93         "SymbolInterfaces",
94     ]
97 gentbl_cc_library(
98     name = "TensorEncodingIncGen",
99     tbl_outs = [
100         (
101             ["-gen-attr-interface-decls"],
102             "include/mlir/IR/TensorEncInterfaces.h.inc",
103         ),
104         (
105             ["-gen-attr-interface-defs"],
106             "include/mlir/IR/TensorEncInterfaces.cpp.inc",
107         ),
108     ],
109     tblgen = ":mlir-tblgen",
110     td_file = "include/mlir/IR/TensorEncoding.td",
111     deps = [":TensorOpsTdFiles"],
114 td_library(
115     name = "BuiltinDialectTdFiles",
116     srcs = [
117         "include/mlir/IR/BuiltinAttributeInterfaces.td",
118         "include/mlir/IR/BuiltinAttributes.td",
119         "include/mlir/IR/BuiltinDialect.td",
120         "include/mlir/IR/BuiltinLocationAttributes.td",
121         "include/mlir/IR/BuiltinOps.td",
122         "include/mlir/IR/BuiltinTypeInterfaces.td",
123         "include/mlir/IR/BuiltinTypes.td",
124     ],
125     includes = ["include"],
126     deps = [
127         ":BytecodeTdFiles",
128         ":CallInterfacesTdFiles",
129         ":CastInterfacesTdFiles",
130         ":DataLayoutInterfacesTdFiles",
131         ":OpBaseTdFiles",
132         ":SideEffectInterfacesTdFiles",
133     ],
136 td_library(
137     name = "BuiltinDialectBytecodeTdFiles",
138     srcs = ["include/mlir/IR/BuiltinDialectBytecode.td"],
139     includes = ["include"],
140     deps = [
141         ":BytecodeTdFiles",
142     ],
145 gentbl_cc_library(
146     name = "BuiltinDialectIncGen",
147     tbl_outs = [
148         (
149             ["-gen-dialect-decls"],
150             "include/mlir/IR/BuiltinDialect.h.inc",
151         ),
152         (
153             ["-gen-dialect-defs"],
154             "include/mlir/IR/BuiltinDialect.cpp.inc",
155         ),
156     ],
157     tblgen = ":mlir-tblgen",
158     td_file = "include/mlir/IR/BuiltinDialect.td",
159     deps = [":BuiltinDialectTdFiles"],
162 gentbl_cc_library(
163     name = "BuiltinDialectBytecodeGen",
164     tbl_outs = [
165         (
166             [
167                 "-gen-bytecode",
168                 "-bytecode-dialect=Builtin",
169             ],
170             "include/mlir/IR/BuiltinDialectBytecode.cpp.inc",
171         ),
172     ],
173     tblgen = ":mlir-tblgen",
174     td_file = "include/mlir/IR/BuiltinDialectBytecode.td",
175     deps = [":BuiltinDialectTdFiles"],
178 gentbl_cc_library(
179     name = "BuiltinAttributesIncGen",
180     tbl_outs = [
181         (
182             ["--gen-attrdef-decls"],
183             "include/mlir/IR/BuiltinAttributes.h.inc",
184         ),
185         (
186             ["--gen-attrdef-defs"],
187             "include/mlir/IR/BuiltinAttributes.cpp.inc",
188         ),
189     ],
190     tblgen = ":mlir-tblgen",
191     td_file = "include/mlir/IR/BuiltinAttributes.td",
192     deps = [":BuiltinDialectTdFiles"],
195 gentbl_cc_library(
196     name = "BuiltinAttributeInterfacesIncGen",
197     tbl_outs = [
198         (
199             ["--gen-attr-interface-decls"],
200             "include/mlir/IR/BuiltinAttributeInterfaces.h.inc",
201         ),
202         (
203             ["--gen-attr-interface-defs"],
204             "include/mlir/IR/BuiltinAttributeInterfaces.cpp.inc",
205         ),
206     ],
207     tblgen = ":mlir-tblgen",
208     td_file = "include/mlir/IR/BuiltinAttributeInterfaces.td",
209     deps = [":BuiltinDialectTdFiles"],
212 gentbl_cc_library(
213     name = "BuiltinLocationAttributesIncGen",
214     tbl_outs = [
215         (
216             ["--gen-attrdef-decls"],
217             "include/mlir/IR/BuiltinLocationAttributes.h.inc",
218         ),
219         (
220             ["--gen-attrdef-defs"],
221             "include/mlir/IR/BuiltinLocationAttributes.cpp.inc",
222         ),
223     ],
224     tblgen = ":mlir-tblgen",
225     td_file = "include/mlir/IR/BuiltinLocationAttributes.td",
226     deps = [":BuiltinDialectTdFiles"],
229 gentbl_cc_library(
230     name = "BuiltinOpsIncGen",
231     tbl_outs = [
232         (
233             ["-gen-op-decls"],
234             "include/mlir/IR/BuiltinOps.h.inc",
235         ),
236         (
237             ["-gen-op-defs"],
238             "include/mlir/IR/BuiltinOps.cpp.inc",
239         ),
240     ],
241     tblgen = ":mlir-tblgen",
242     td_file = "include/mlir/IR/BuiltinOps.td",
243     deps = [
244         ":BuiltinDialectTdFiles",
245         ":OpBaseTdFiles",
246     ],
249 gentbl_cc_library(
250     name = "BuiltinTypesIncGen",
251     tbl_outs = [
252         (
253             ["--gen-typedef-decls"],
254             "include/mlir/IR/BuiltinTypes.h.inc",
255         ),
256         (
257             ["--gen-typedef-defs"],
258             "include/mlir/IR/BuiltinTypes.cpp.inc",
259         ),
260         (
261             ["-gen-type-constraint-decls"],
262             "include/mlir/IR/BuiltinTypeConstraints.h.inc",
263         ),
264         (
265             ["-gen-type-constraint-defs"],
266             "include/mlir/IR/BuiltinTypeConstraints.cpp.inc",
267         ),
268     ],
269     tblgen = ":mlir-tblgen",
270     td_file = "include/mlir/IR/BuiltinTypes.td",
271     deps = [":BuiltinDialectTdFiles"],
274 gentbl_cc_library(
275     name = "BuiltinTypeInterfacesIncGen",
276     tbl_outs = [
277         (
278             ["--gen-type-interface-decls"],
279             "include/mlir/IR/BuiltinTypeInterfaces.h.inc",
280         ),
281         (
282             ["--gen-type-interface-defs"],
283             "include/mlir/IR/BuiltinTypeInterfaces.cpp.inc",
284         ),
285     ],
286     tblgen = ":mlir-tblgen",
287     td_file = "include/mlir/IR/BuiltinTypeInterfaces.td",
288     deps = [
289         ":BuiltinDialectTdFiles",
290     ],
293 td_library(
294     name = "FunctionInterfacesTdFiles",
295     srcs = ["include/mlir/Interfaces/FunctionInterfaces.td"],
296     includes = ["include"],
297     deps = [
298         ":CallInterfacesTdFiles",
299         ":OpBaseTdFiles",
300     ],
303 gentbl_cc_library(
304     name = "FunctionInterfacesIncGen",
305     tbl_outs = [
306         (
307             ["-gen-op-interface-decls"],
308             "include/mlir/Interfaces/FunctionInterfaces.h.inc",
309         ),
310         (
311             ["-gen-op-interface-defs"],
312             "include/mlir/Interfaces/FunctionInterfaces.cpp.inc",
313         ),
314     ],
315     tblgen = ":mlir-tblgen",
316     td_file = "include/mlir/Interfaces/FunctionInterfaces.td",
317     deps = [
318         ":FunctionInterfacesTdFiles",
319     ],
322 cc_library(
323     name = "FunctionInterfaces",
324     srcs = [
325         "lib/Interfaces/FunctionImplementation.cpp",
326         "lib/Interfaces/FunctionInterfaces.cpp",
327     ],
328     hdrs = [
329         "include/mlir/Interfaces/FunctionImplementation.h",
330         "include/mlir/Interfaces/FunctionInterfaces.h",
331     ],
332     includes = ["include"],
333     deps = [
334         ":CallOpInterfaces",
335         ":FunctionInterfacesIncGen",
336         ":IR",
337         "//llvm:Support",
338     ],
341 cc_library(
342     name = "IR",
343     srcs = glob([
344         "lib/IR/*.cpp",
345         "lib/IR/*.h",
346         "lib/IR/PDL/*.cpp",
347         "lib/Bytecode/Writer/*.h",
348         "include/mlir/Bytecode/*.h",
349     ]) + [
350         "include/mlir/IR/PDLPatternMatch.h.inc",
351         "include/mlir/Interfaces/CallInterfaces.h",
352         "include/mlir/Interfaces/DataLayoutInterfaces.h",
353         "include/mlir/Interfaces/InferIntRangeInterface.h",
354         "include/mlir/Interfaces/SideEffectInterfaces.h",
355     ],
356     hdrs = glob([
357         "include/mlir/IR/*.h",
358     ]) + [
359         "include/mlir/Interfaces/FoldInterfaces.h",
360     ],
361     includes = ["include"],
362     deps = [
363         ":BuiltinAttributeInterfacesIncGen",
364         ":BuiltinAttributesIncGen",
365         ":BuiltinDialectBytecodeGen",
366         ":BuiltinDialectIncGen",
367         ":BuiltinLocationAttributesIncGen",
368         ":BuiltinOpsIncGen",
369         ":BuiltinTypeInterfacesIncGen",
370         ":BuiltinTypesIncGen",
371         ":BytecodeOpInterfaceIncGen",
372         ":CallOpInterfacesIncGen",
373         ":DataLayoutInterfacesIncGen",
374         ":InferIntRangeInterfaceIncGen",
375         ":OpAsmInterfaceIncGen",
376         ":RegionKindInterfaceIncGen",
377         ":SideEffectInterfacesIncGen",
378         ":Support",
379         ":SymbolInterfacesIncGen",
380         ":TensorEncodingIncGen",
381         ":config",
382         "//llvm:Support",
383         "//llvm:config",
384     ],
387 cc_library(
388     name = "Pass",
389     srcs = glob([
390         "lib/Pass/*.cpp",
391         "lib/Pass/*.h",
392     ]),
393     hdrs = glob([
394         "include/mlir/Pass/*.h",
395     ]),
396     includes = ["include"],
397     deps = [
398         ":IR",
399         ":Parser",
400         ":Support",
401         "//llvm:Support",
402     ],
405 mlir_c_api_cc_library(
406     name = "CAPIIR",
407     srcs = [
408         "lib/CAPI/Dialect/Func.cpp",
409         "lib/CAPI/Dialect/IRDL.cpp",
410         "lib/CAPI/IR/AffineExpr.cpp",
411         "lib/CAPI/IR/AffineMap.cpp",
412         "lib/CAPI/IR/BuiltinAttributes.cpp",
413         "lib/CAPI/IR/BuiltinTypes.cpp",
414         "lib/CAPI/IR/Diagnostics.cpp",
415         "lib/CAPI/IR/DialectHandle.cpp",
416         "lib/CAPI/IR/IR.cpp",
417         "lib/CAPI/IR/IntegerSet.cpp",
418         "lib/CAPI/IR/Pass.cpp",
419         "lib/CAPI/IR/Support.cpp",
420     ],
421     hdrs = [
422         "include/mlir-c/AffineExpr.h",
423         "include/mlir-c/AffineMap.h",
424         "include/mlir-c/BuiltinAttributes.h",
425         "include/mlir-c/BuiltinTypes.h",
426         "include/mlir-c/Diagnostics.h",
427         "include/mlir-c/Dialect/Func.h",
428         "include/mlir-c/Dialect/IRDL.h",
429         "include/mlir-c/ExecutionEngine.h",
430         "include/mlir-c/IR.h",
431         "include/mlir-c/IntegerSet.h",
432         "include/mlir-c/Interfaces.h",
433         "include/mlir-c/Pass.h",
434         "include/mlir-c/RegisterEverything.h",
435         "include/mlir-c/Rewrite.h",
436         "include/mlir-c/Support.h",
437         "include/mlir/CAPI/AffineExpr.h",
438         "include/mlir/CAPI/AffineMap.h",
439         "include/mlir/CAPI/Diagnostics.h",
440         "include/mlir/CAPI/IR.h",
441         "include/mlir/CAPI/IntegerSet.h",
442         "include/mlir/CAPI/Interfaces.h",
443         "include/mlir/CAPI/Pass.h",
444         "include/mlir/CAPI/Registration.h",
445         "include/mlir/CAPI/Rewrite.h",
446         "include/mlir/CAPI/Support.h",
447         "include/mlir/CAPI/Utils.h",
448         "include/mlir/CAPI/Wrap.h",
449     ],
450     header_deps = [
451         ":BytecodeWriter",
452         ":IR",
453         ":Pass",
454         ":Support",
455         ":config",
456         "//llvm:Support",
457     ],
458     includes = ["include"],
459     deps = [
460         ":AsmParser",
461         ":ConversionPassIncGen",
462         ":FuncDialect",
463         ":IRDLDialect",
464         ":InferTypeOpInterface",
465         ":Parser",
466     ],
469 mlir_c_api_cc_library(
470     name = "CAPIInterfaces",
471     srcs = [
472         "lib/CAPI/Interfaces/Interfaces.cpp",
473     ],
474     capi_deps = [
475         ":CAPIIR",
476     ],
477     includes = ["include"],
478     deps = [
479         ":IR",
480         ":InferTypeOpInterface",
481         "//llvm:Support",
482     ],
485 mlir_c_api_cc_library(
486     name = "CAPIAMDGPU",
487     srcs = ["lib/CAPI/Dialect/AMDGPU.cpp"],
488     hdrs = ["include/mlir-c/Dialect/AMDGPU.h"],
489     capi_deps = [
490         ":CAPIIR",
491     ],
492     includes = ["include"],
493     deps = [
494         ":AMDGPUDialect",
495     ],
498 mlir_c_api_cc_library(
499     name = "CAPIArith",
500     srcs = ["lib/CAPI/Dialect/Arith.cpp"],
501     hdrs = ["include/mlir-c/Dialect/Arith.h"],
502     capi_deps = [
503         ":CAPIIR",
504     ],
505     includes = ["include"],
506     deps = [
507         ":ArithDialect",
508     ],
511 mlir_c_api_cc_library(
512     name = "CAPIAsync",
513     srcs = [
514         "lib/CAPI/Dialect/Async.cpp",
515         "lib/CAPI/Dialect/AsyncPasses.cpp",
516     ],
517     hdrs = ["include/mlir-c/Dialect/Async.h"],
518     capi_deps = [
519         ":CAPIIR",
520     ],
521     header_deps = [
522         ":AsyncPassIncGen",
523     ],
524     includes = ["include"],
525     deps = [
526         ":AsyncDialect",
527         ":AsyncTransforms",
528         ":Pass",
529     ],
532 mlir_c_api_cc_library(
533     name = "CAPILinalg",
534     srcs = [
535         "lib/CAPI/Dialect/Linalg.cpp",
536         "lib/CAPI/Dialect/LinalgPasses.cpp",
537     ],
538     hdrs = [
539         "include/mlir-c/Dialect/Linalg.h",
540     ],
541     capi_deps = [
542         ":CAPIIR",
543     ],
544     header_deps = [
545         ":LinalgPassIncGen",
546     ],
547     includes = ["include"],
548     deps = [
549         ":LinalgDialect",
550         ":LinalgTransforms",
551         ":Pass",
552     ],
555 mlir_c_api_cc_library(
556     name = "CAPILLVM",
557     srcs = [
558         "lib/CAPI/Dialect/LLVM.cpp",
559     ],
560     hdrs = [
561         "include/mlir-c/Dialect/LLVM.h",
562     ],
563     capi_deps = [
564         ":CAPIIR",
565     ],
566     includes = ["include"],
567     deps = [
568         ":LLVMDialect",
569         "//llvm:Support",
570     ],
573 mlir_c_api_cc_library(
574     name = "CAPIMath",
575     srcs = ["lib/CAPI/Dialect/Math.cpp"],
576     hdrs = ["include/mlir-c/Dialect/Math.h"],
577     capi_deps = [
578         ":CAPIIR",
579     ],
580     includes = ["include"],
581     deps = [
582         ":MathDialect",
583     ],
586 mlir_c_api_cc_library(
587     name = "CAPIMemRef",
588     srcs = ["lib/CAPI/Dialect/MemRef.cpp"],
589     hdrs = ["include/mlir-c/Dialect/MemRef.h"],
590     capi_deps = [
591         ":CAPIIR",
592     ],
593     includes = ["include"],
594     deps = [
595         ":MemRefDialect",
596     ],
599 mlir_c_api_cc_library(
600     name = "CAPINVGPU",
601     srcs = ["lib/CAPI/Dialect/NVGPU.cpp"],
602     hdrs = ["include/mlir-c/Dialect/NVGPU.h"],
603     capi_deps = [
604         ":CAPIIR",
605     ],
606     includes = ["include"],
607     deps = [
608         ":IR",
609         ":NVGPUDialect",
610     ],
613 mlir_c_api_cc_library(
614     name = "CAPINVVM",
615     srcs = ["lib/CAPI/Dialect/NVVM.cpp"],
616     hdrs = ["include/mlir-c/Dialect/NVVM.h"],
617     capi_deps = [
618         ":CAPIIR",
619     ],
620     includes = ["include"],
621     deps = [
622         ":NVVMDialect",
623     ],
626 mlir_c_api_cc_library(
627     name = "CAPITarget",
628     srcs = ["lib/CAPI/Target/LLVMIR.cpp"],
629     hdrs = ["include/mlir-c/Target/LLVMIR.h"],
630     capi_deps = [
631         ":CAPIIR",
632     ],
633     header_deps = [
634         "//llvm:Support",
635     ],
636     includes = ["include"],
637     deps = [
638         ":LLVMToLLVMIRTranslation",
639         ":Support",
640         ":ToLLVMIRTranslation",
641         ":ToLLVMIRTranslationRegistration",
642         "//llvm:Core",
643     ],
646 mlir_c_api_cc_library(
647     name = "CAPIGPU",
648     srcs = [
649         "lib/CAPI/Dialect/GPU.cpp",
650         "lib/CAPI/Dialect/GPUPasses.cpp",
651     ],
652     hdrs = [
653         "include/mlir-c/Dialect/GPU.h",
654     ],
655     capi_deps = [
656         ":CAPIIR",
657     ],
658     header_deps = [
659         ":GPUPassIncGen",
660     ],
661     includes = ["include"],
662     deps = [
663         ":GPUDialect",
664         ":GPUTransforms",
665         ":Pass",
666         "//llvm:Support",
667     ],
670 mlir_c_api_cc_library(
671     name = "CAPIROCDL",
672     srcs = ["lib/CAPI/Dialect/ROCDL.cpp"],
673     hdrs = ["include/mlir-c/Dialect/ROCDL.h"],
674     capi_deps = [
675         ":CAPIIR",
676     ],
677     includes = ["include"],
678     deps = [
679         ":ROCDLDialect",
680     ],
683 mlir_c_api_cc_library(
684     name = "CAPISCF",
685     srcs = ["lib/CAPI/Dialect/SCF.cpp"],
686     hdrs = ["include/mlir-c/Dialect/SCF.h"],
687     capi_deps = [
688         ":CAPIIR",
689     ],
690     includes = ["include"],
691     deps = [
692         ":SCFDialect",
693     ],
696 mlir_c_api_cc_library(
697     name = "CAPISparseTensor",
698     srcs = [
699         "lib/CAPI/Dialect/SparseTensor.cpp",
700         "lib/CAPI/Dialect/SparseTensorPasses.cpp",
701     ],
702     hdrs = [
703         "include/mlir-c/Dialect/SparseTensor.h",
704     ],
705     capi_deps = [
706         ":CAPIIR",
707     ],
708     header_deps = [
709         ":SparseTensorPassIncGen",
710     ],
711     includes = ["include"],
712     deps = [
713         ":Pass",
714         ":SparseTensorDialect",
715         ":SparseTensorTransforms",
716         ":Support",
717     ],
720 mlir_c_api_cc_library(
721     name = "CAPIQuant",
722     srcs = [
723         "lib/CAPI/Dialect/Quant.cpp",
724     ],
725     hdrs = [
726         "include/mlir-c/Dialect/Quant.h",
727     ],
728     capi_deps = [
729         ":CAPIIR",
730     ],
731     includes = ["include"],
732     deps = [
733         ":QuantOps",
734     ],
737 mlir_c_api_cc_library(
738     name = "CAPIPDL",
739     srcs = [
740         "lib/CAPI/Dialect/PDL.cpp",
741     ],
742     hdrs = [
743         "include/mlir-c/Dialect/PDL.h",
744     ],
745     header_deps = [
746         ":CAPIIRHeaders",
747     ],
748     includes = ["include"],
749     deps = [
750         ":CAPIIR",
751         ":PDLDialect",
752         ":PDLOpsIncGen",
753         ":PDLTypesIncGen",
754     ],
757 mlir_c_api_cc_library(
758     name = "CAPITransformDialect",
759     srcs = [
760         "lib/CAPI/Dialect/Transform.cpp",
761     ],
762     hdrs = [
763         "include/mlir-c/Dialect/Transform.h",
764     ],
765     capi_deps = [
766         ":CAPIIR",
767     ],
768     includes = ["include"],
769     deps = [
770         ":TransformDialect",
771     ],
774 mlir_c_api_cc_library(
775     name = "CAPITransformDialectTransforms",
776     srcs = [
777         "lib/CAPI/Dialect/TransformInterpreter.cpp",
778     ],
779     hdrs = [
780         "include/mlir-c/Dialect/Transform/Interpreter.h",
781     ],
782     capi_deps = [
783         ":CAPIIR",
784         ":CAPITransformDialect",
785     ],
786     includes = ["include"],
787     deps = [
788         ":TransformDialect",
789         ":TransformDialectInterfaces",
790         ":TransformDialectTransforms",
791     ],
794 mlir_c_api_cc_library(
795     name = "CAPIMLProgram",
796     srcs = [
797         "lib/CAPI/Dialect/MLProgram.cpp",
798     ],
799     hdrs = [
800         "include/mlir-c/Dialect/MLProgram.h",
801     ],
802     header_deps = [
803         ":CAPIIRHeaders",
804     ],
805     includes = ["include"],
806     deps = [
807         ":CAPIIR",
808         ":MLProgramDialect",
809         ":MLProgramOpsIncGen",
810         ":MLProgramTypesIncGen",
811     ],
814 mlir_c_api_cc_library(
815     name = "CAPIVector",
816     srcs = ["lib/CAPI/Dialect/Vector.cpp"],
817     hdrs = ["include/mlir-c/Dialect/Vector.h"],
818     capi_deps = [
819         ":CAPIIR",
820     ],
821     includes = ["include"],
822     deps = [
823         ":VectorDialect",
824     ],
827 mlir_c_api_cc_library(
828     name = "CAPIConversion",
829     srcs = ["lib/CAPI/Conversion/Passes.cpp"],
830     hdrs = ["include/mlir-c/Conversion.h"],
831     capi_deps = [
832         ":CAPIIR",
833     ],
834     header_deps = [
835         ":ConversionPassIncGen",
836     ],
837     includes = ["include"],
838     deps = [
839         ":ConversionPasses",
840         ":ConvertToSPIRV",
841         ":Pass",
842     ],
845 mlir_c_api_cc_library(
846     name = "CAPIDebug",
847     srcs = ["lib/CAPI/Debug/Debug.cpp"],
848     hdrs = ["include/mlir-c/Debug.h"],
849     capi_deps = [
850         ":CAPIIR",
851     ],
852     includes = ["include"],
853     deps = [
854         ":Support",
855         "//llvm:Support",
856     ],
859 mlir_c_api_cc_library(
860     name = "CAPIExecutionEngine",
861     srcs = ["lib/CAPI/ExecutionEngine/ExecutionEngine.cpp"],
862     hdrs = [
863         "include/mlir-c/ExecutionEngine.h",
864         "include/mlir/CAPI/ExecutionEngine.h",
865     ],
866     capi_deps = [
867         ":CAPIIR",
868     ],
869     header_deps = [
870         ":ExecutionEngine",
871     ],
872     includes = ["include"],
873     deps = [
874         ":BuiltinToLLVMIRTranslation",
875         ":ExecutionEngineUtils",
876         ":LLVMToLLVMIRTranslation",
877         ":OpenMPToLLVMIRTranslation",
878         "//llvm:OrcJIT",
879         "//llvm:Support",
880     ],
883 mlir_c_api_cc_library(
884     name = "CAPITransforms",
885     srcs = [
886         "lib/CAPI/Transforms/Passes.cpp",
887         "lib/CAPI/Transforms/Rewrite.cpp",
888     ],
889     hdrs = ["include/mlir-c/Transforms.h"],
890     capi_deps = [
891         ":CAPIIR",
892     ],
893     header_deps = [
894         ":TransformsPassIncGen",
895     ],
896     includes = ["include"],
897     deps = [
898         ":IR",
899         ":Pass",
900         ":Rewrite",
901         ":TransformUtils",
902         ":Transforms",
903     ],
906 mlir_c_api_cc_library(
907     name = "CAPIRegisterEverything",
908     srcs = ["lib/CAPI/RegisterEverything/RegisterEverything.cpp"],
909     hdrs = ["include/mlir-c/RegisterEverything.h"],
910     capi_deps = [
911         ":CAPIIR",
912     ],
913     includes = ["include"],
914     deps = [
915         ":AllExtensions",
916         ":AllPassesAndDialects",
917         ":AllToLLVMIRTranslations",
918         ":BuiltinToLLVMIRTranslation",
919         ":IR",
920         ":LLVMToLLVMIRTranslation",
921     ],
924 ##---------------------------------------------------------------------------##
925 # Sources of Python bindings.
926 #----------------------------------------------------------------------------##
928 exports_files(
929     glob(["lib/Bindings/Python/**/*.cpp"]),
932 filegroup(
933     name = "MLIRBindingsPythonHeaderFiles",
934     srcs = glob([
935         "lib/Bindings/Python/*.h",
936         "include/mlir-c/Bindings/Python/*.h",
937         "include/mlir/Bindings/Python/*.h",
938     ]),
941 cc_library(
942     name = "MLIRBindingsPythonHeaders",
943     includes = [
944         "include",
945         "lib/Bindings/Python",
946     ],
947     textual_hdrs = [":MLIRBindingsPythonHeaderFiles"],
948     deps = [
949         ":CAPIIRHeaders",
950         ":CAPITransformsHeaders",
951         "@pybind11",
952         "@rules_python//python/cc:current_py_cc_headers",
953     ],
956 cc_library(
957     name = "MLIRBindingsPythonHeadersAndDeps",
958     includes = [
959         "include",
960         "lib/Bindings/Python",
961     ],
962     textual_hdrs = [":MLIRBindingsPythonHeaderFiles"],
963     deps = [
964         ":CAPIIR",
965         ":CAPITransforms",
966         "@pybind11",
967         "@rules_python//python/cc:current_py_cc_headers",
968     ],
971 # These flags are needed for pybind11 to work.
972 PYBIND11_COPTS = [
973     "-fexceptions",
974     "-frtti",
977 PYBIND11_FEATURES = [
978     # Cannot use header_modules (parse_headers feature fails).
979     "-use_header_modules",
982 filegroup(
983     name = "MLIRBindingsPythonSourceFiles",
984     srcs = [
985         "lib/Bindings/Python/IRAffine.cpp",
986         "lib/Bindings/Python/IRAttributes.cpp",
987         "lib/Bindings/Python/IRCore.cpp",
988         "lib/Bindings/Python/IRInterfaces.cpp",
989         "lib/Bindings/Python/IRModule.cpp",
990         "lib/Bindings/Python/IRTypes.cpp",
991         "lib/Bindings/Python/Pass.cpp",
992         "lib/Bindings/Python/Rewrite.cpp",
993     ],
996 cc_library(
997     name = "MLIRBindingsPythonCore",
998     srcs = [":MLIRBindingsPythonSourceFiles"],
999     copts = PYBIND11_COPTS,
1000     features = PYBIND11_FEATURES,
1001     deps = [
1002         ":CAPIAsync",
1003         ":CAPIDebug",
1004         ":CAPIIR",
1005         ":CAPIInterfaces",
1006         ":MLIRBindingsPythonHeadersAndDeps",
1007         ":Support",
1008         ":config",
1009         "//llvm:Support",
1010         "@pybind11",
1011         "@rules_python//python/cc:current_py_cc_headers",
1012     ],
1015 cc_library(
1016     name = "MLIRBindingsPythonCoreNoCAPI",
1017     srcs = [":MLIRBindingsPythonSourceFiles"],
1018     copts = PYBIND11_COPTS,
1019     features = PYBIND11_FEATURES,
1020     deps = [
1021         ":CAPIAsyncHeaders",
1022         ":CAPIDebugHeaders",
1023         ":CAPIIRHeaders",
1024         ":MLIRBindingsPythonHeaders",
1025         ":Support",
1026         ":config",
1027         "//llvm:Support",
1028         "@pybind11",
1029         "@rules_python//python/cc:current_py_cc_headers",
1030     ],
1033 # Target that bundles together the CAPI objects needed for
1034 # MLIRBindingsPythonCoreNoCAPI.
1035 cc_library(
1036     name = "MLIRBindingsPythonCAPIObjects",
1037     deps = [
1038         ":CAPIAsyncObjects",
1039         ":CAPIDebugObjects",
1040         ":CAPIIRObjects",
1041         ":CAPIInterfacesObjects",
1042         ":CAPITransformsObjects",
1043     ],
1046 # Dynamic library with the MLIR Python extension.
1047 cc_binary(
1048     name = "_mlir.so",
1049     srcs = ["lib/Bindings/Python/MainModule.cpp"],
1050     # These flags are needed for pybind11 to work.
1051     copts = PYBIND11_COPTS,
1052     features = PYBIND11_FEATURES,
1053     linkshared = 1,
1054     linkstatic = 0,
1055     deps = [
1056         ":MLIRBindingsPythonCore",
1057         ":MLIRBindingsPythonHeadersAndDeps",
1058     ],
1061 cc_binary(
1062     name = "_mlirDialectsLinalg.so",
1063     srcs = ["lib/Bindings/Python/DialectLinalg.cpp"],
1064     copts = PYBIND11_COPTS,
1065     features = PYBIND11_FEATURES,
1066     linkshared = 1,
1067     linkstatic = 0,
1068     deps = [
1069         ":CAPIIR",
1070         ":CAPILinalg",
1071         ":MLIRBindingsPythonHeadersAndDeps",
1072     ],
1075 cc_binary(
1076     name = "_mlirDialectsLLVM.so",
1077     srcs = ["lib/Bindings/Python/DialectLLVM.cpp"],
1078     copts = PYBIND11_COPTS,
1079     features = PYBIND11_FEATURES,
1080     linkshared = 1,
1081     linkstatic = 0,
1082     deps = [
1083         ":CAPIIR",
1084         ":CAPILLVM",
1085         ":MLIRBindingsPythonHeadersAndDeps",
1086         "@pybind11",
1087     ],
1090 cc_binary(
1091     name = "_mlirDialectsQuant.so",
1092     srcs = ["lib/Bindings/Python/DialectQuant.cpp"],
1093     copts = PYBIND11_COPTS,
1094     features = PYBIND11_FEATURES,
1095     linkshared = 1,
1096     linkstatic = 0,
1097     deps = [
1098         ":CAPIIR",
1099         ":CAPIQuant",
1100         ":MLIRBindingsPythonHeadersAndDeps",
1101         "@pybind11",
1102     ],
1105 cc_binary(
1106     name = "_mlirDialectsSparseTensor.so",
1107     srcs = ["lib/Bindings/Python/DialectSparseTensor.cpp"],
1108     copts = PYBIND11_COPTS,
1109     features = PYBIND11_FEATURES,
1110     linkshared = 1,
1111     linkstatic = 0,
1112     deps = [
1113         ":CAPIIR",
1114         ":CAPISparseTensor",
1115         ":MLIRBindingsPythonHeadersAndDeps",
1116         "@pybind11",
1117     ],
1120 # Dynamic library with the MLIR Conversions Python extension.
1121 cc_binary(
1122     name = "_mlirExecutionEngine.so",
1123     srcs = ["lib/Bindings/Python/ExecutionEngineModule.cpp"],
1124     copts = PYBIND11_COPTS,
1125     features = PYBIND11_FEATURES,
1126     linkshared = 1,
1127     linkstatic = 0,
1128     deps = [
1129         ":CAPIExecutionEngine",
1130         ":MLIRBindingsPythonHeadersAndDeps",
1131         "@pybind11",
1132         "@rules_python//python/cc:current_py_cc_headers",
1133     ],
1136 # Dynamic library with the MLIR Linalg dialect+passes Python extension.
1137 cc_binary(
1138     name = "_mlirLinalgPasses.so",
1139     srcs = ["lib/Bindings/Python/LinalgPasses.cpp"],
1140     copts = PYBIND11_COPTS,
1141     features = PYBIND11_FEATURES,
1142     linkshared = 1,
1143     linkstatic = 0,
1144     deps = [
1145         ":CAPILinalg",
1146         ":MLIRBindingsPythonHeadersAndDeps",
1147         "@pybind11",
1148         "@rules_python//python/cc:current_py_cc_headers",
1149     ],
1152 ##---------------------------------------------------------------------------##
1154 td_library(
1155     name = "AttrTdFiles",
1156     srcs = [
1157         "include/mlir/IR/AttrTypeBase.td",
1158         "include/mlir/IR/EnumAttr.td",
1159     ],
1160     includes = ["include"],
1163 td_library(
1164     name = "OpBaseTdFiles",
1165     srcs = [
1166         "include/mlir/IR/CommonAttrConstraints.td",
1167         "include/mlir/IR/CommonTypeConstraints.td",
1168         "include/mlir/IR/Constraints.td",
1169         "include/mlir/IR/DialectBase.td",
1170         "include/mlir/IR/Interfaces.td",
1171         "include/mlir/IR/OpAsmInterface.td",
1172         "include/mlir/IR/OpBase.td",
1173         "include/mlir/IR/PatternBase.td",
1174         "include/mlir/IR/Properties.td",
1175         "include/mlir/IR/RegionKindInterface.td",
1176         "include/mlir/IR/SymbolInterfaces.td",
1177         "include/mlir/IR/TensorEncoding.td",
1178         "include/mlir/IR/Traits.td",
1179         "include/mlir/IR/Utils.td",
1180     ],
1181     includes = ["include"],
1182     deps = [
1183         ":AttrTdFiles",
1184     ],
1187 td_library(
1188     name = "BytecodeTdFiles",
1189     srcs = ["include/mlir/IR/BytecodeBase.td"],
1190     includes = ["include"],
1193 td_library(
1194     name = "CallInterfacesTdFiles",
1195     srcs = ["include/mlir/Interfaces/CallInterfaces.td"],
1196     includes = ["include"],
1197     deps = [":OpBaseTdFiles"],
1200 td_library(
1201     name = "CastInterfacesTdFiles",
1202     srcs = ["include/mlir/Interfaces/CastInterfaces.td"],
1203     includes = ["include"],
1204     deps = [":OpBaseTdFiles"],
1207 td_library(
1208     name = "ControlFlowInterfacesTdFiles",
1209     srcs = ["include/mlir/Interfaces/ControlFlowInterfaces.td"],
1210     includes = ["include"],
1211     deps = [":OpBaseTdFiles"],
1214 td_library(
1215     name = "BytecodeOpInterfaceTdFiles",
1216     srcs = ["include/mlir/Bytecode/BytecodeOpInterface.td"],
1217     includes = ["include"],
1218     deps = [":OpBaseTdFiles"],
1221 td_library(
1222     name = "CopyOpInterfaceTdFiles",
1223     srcs = ["include/mlir/Interfaces/CopyOpInterface.td"],
1224     includes = ["include"],
1225     deps = [":OpBaseTdFiles"],
1228 td_library(
1229     name = "DerivedAttributeOpInterfaceTdFiles",
1230     srcs = ["include/mlir/Interfaces/DerivedAttributeOpInterface.td"],
1231     includes = ["include"],
1232     deps = [":OpBaseTdFiles"],
1235 td_library(
1236     name = "DestinationStyleOpInterfaceTdFiles",
1237     srcs = ["include/mlir/Interfaces/DestinationStyleOpInterface.td"],
1238     includes = ["include"],
1239     deps = [":OpBaseTdFiles"],
1242 td_library(
1243     name = "InferIntRangeInterfaceTdFiles",
1244     srcs = ["include/mlir/Interfaces/InferIntRangeInterface.td"],
1245     includes = ["include"],
1246     deps = [":OpBaseTdFiles"],
1249 td_library(
1250     name = "InferTypeOpInterfaceTdFiles",
1251     srcs = ["include/mlir/Interfaces/InferTypeOpInterface.td"],
1252     includes = ["include"],
1253     deps = [":OpBaseTdFiles"],
1256 td_library(
1257     name = "LoopLikeInterfaceTdFiles",
1258     srcs = ["include/mlir/Interfaces/LoopLikeInterface.td"],
1259     includes = ["include"],
1260     deps = [":OpBaseTdFiles"],
1263 td_library(
1264     name = "MemorySlotInterfacesTdFiles",
1265     srcs = ["include/mlir/Interfaces/MemorySlotInterfaces.td"],
1266     includes = ["include"],
1267     deps = [":OpBaseTdFiles"],
1270 td_library(
1271     name = "ShapedOpInterfacesTdFiles",
1272     srcs = ["include/mlir/Interfaces/ShapedOpInterfaces.td"],
1273     includes = ["include"],
1274     deps = [":OpBaseTdFiles"],
1277 td_library(
1278     name = "ParallelCombiningOpInterfaceTdFiles",
1279     srcs = ["include/mlir/Interfaces/ParallelCombiningOpInterface.td"],
1280     includes = ["include"],
1281     deps = [":OpBaseTdFiles"],
1284 td_library(
1285     name = "RuntimeVerifiableOpInterfaceTdFiles",
1286     srcs = ["include/mlir/Interfaces/RuntimeVerifiableOpInterface.td"],
1287     includes = ["include"],
1288     deps = [":OpBaseTdFiles"],
1291 td_library(
1292     name = "SideEffectInterfacesTdFiles",
1293     srcs = [
1294         "include/mlir/Interfaces/SideEffectInterfaceBase.td",
1295         "include/mlir/Interfaces/SideEffectInterfaces.td",
1296     ],
1297     includes = ["include"],
1298     deps = [":OpBaseTdFiles"],
1301 td_library(
1302     name = "TilingInterfaceTdFiles",
1303     srcs = ["include/mlir/Interfaces/TilingInterface.td"],
1304     includes = ["include"],
1305     deps = [":OpBaseTdFiles"],
1308 td_library(
1309     name = "VectorInterfacesTdFiles",
1310     srcs = ["include/mlir/Interfaces/VectorInterfaces.td"],
1311     includes = ["include"],
1312     deps = [":OpBaseTdFiles"],
1315 td_library(
1316     name = "ViewLikeInterfaceTdFiles",
1317     srcs = ["include/mlir/Interfaces/ViewLikeInterface.td"],
1318     includes = ["include"],
1319     deps = [":OpBaseTdFiles"],
1322 td_library(
1323     name = "ReducerTdFiles",
1324     srcs = ["include/mlir/Reducer/Passes.td"],
1325     includes = ["include"],
1326     deps = [":OpBaseTdFiles"],
1329 ##---------------------------------------------------------------------------##
1330 # Affine dialect.
1331 ##---------------------------------------------------------------------------##
1333 td_library(
1334     name = "PassBaseTdFiles",
1335     srcs = ["include/mlir/Pass/PassBase.td"],
1336     includes = ["include"],
1339 td_library(
1340     name = "RewritePassBaseTdFiles",
1341     srcs = ["include/mlir/Rewrite/PassUtil.td"],
1342     includes = ["include"],
1345 td_library(
1346     name = "AffineOpsTdFiles",
1347     srcs = [
1348         "include/mlir/Dialect/Affine/IR/AffineMemoryOpInterfaces.td",
1349         "include/mlir/Dialect/Affine/IR/AffineOps.td",
1350     ],
1351     includes = ["include"],
1352     deps = [
1353         ":ArithOpsTdFiles",
1354         ":FuncTdFiles",
1355         ":LoopLikeInterfaceTdFiles",
1356         ":OpBaseTdFiles",
1357         ":SideEffectInterfacesTdFiles",
1358     ],
1361 gentbl_cc_library(
1362     name = "AffineOpsIncGen",
1363     tbl_outs = [
1364         (
1365             ["-gen-op-decls"],
1366             "include/mlir/Dialect/Affine/IR/AffineOps.h.inc",
1367         ),
1368         (
1369             ["-gen-op-defs"],
1370             "include/mlir/Dialect/Affine/IR/AffineOps.cpp.inc",
1371         ),
1372         (
1373             [
1374                 "-gen-dialect-decls",
1375                 "-dialect=affine",
1376             ],
1377             "include/mlir/Dialect/Affine/IR/AffineOpsDialect.h.inc",
1378         ),
1379         (
1380             [
1381                 "-gen-dialect-defs",
1382                 "-dialect=affine",
1383             ],
1384             "include/mlir/Dialect/Affine/IR/AffineOpsDialect.cpp.inc",
1385         ),
1386     ],
1387     tblgen = ":mlir-tblgen",
1388     td_file = "include/mlir/Dialect/Affine/IR/AffineOps.td",
1389     deps = [":AffineOpsTdFiles"],
1392 gentbl_cc_library(
1393     name = "AffineMemoryOpInterfacesIncGen",
1394     tbl_outs = [
1395         (
1396             ["-gen-op-interface-decls"],
1397             "include/mlir/Dialect/Affine/IR/AffineMemoryOpInterfaces.h.inc",
1398         ),
1399         (
1400             ["-gen-op-interface-defs"],
1401             "include/mlir/Dialect/Affine/IR/AffineMemoryOpInterfaces.cpp.inc",
1402         ),
1403     ],
1404     tblgen = ":mlir-tblgen",
1405     td_file = "include/mlir/Dialect/Affine/IR/AffineMemoryOpInterfaces.td",
1406     deps = [":AffineOpsTdFiles"],
1409 td_library(
1410     name = "AffineTransformOpsTdFiles",
1411     srcs = [
1412         "include/mlir/Dialect/Affine/TransformOps/AffineTransformOps.td",
1413     ],
1414     includes = ["include"],
1415     deps = [
1416         ":TransformDialectTdFiles",
1417     ],
1420 gentbl_cc_library(
1421     name = "AffineTransformOpsIncGen",
1422     tbl_outs = [
1423         (
1424             ["-gen-op-decls"],
1425             "include/mlir/Dialect/Affine/TransformOps/AffineTransformOps.h.inc",
1426         ),
1427         (
1428             ["-gen-op-defs"],
1429             "include/mlir/Dialect/Affine/TransformOps/AffineTransformOps.cpp.inc",
1430         ),
1431     ],
1432     tblgen = ":mlir-tblgen",
1433     td_file = "include/mlir/Dialect/Affine/TransformOps/AffineTransformOps.td",
1434     deps = [
1435         ":AffineTransformOpsTdFiles",
1436     ],
1439 cc_library(
1440     name = "AffineTransformOps",
1441     srcs = glob(["lib/Dialect/Affine/TransformOps/*.cpp"]),
1442     hdrs = glob(["include/mlir/Dialect/Affine/TransformOps/*.h"]),
1443     includes = ["include"],
1444     deps = [
1445         ":AffineAnalysis",
1446         ":AffineDialect",
1447         ":AffineTransformOpsIncGen",
1448         ":AffineUtils",
1449         ":BytecodeOpInterface",
1450         ":IR",
1451         ":TransformDialect",
1452         ":TransformDialectInterfaces",
1453         ":TransformUtils",
1454     ],
1457 ##---------------------------------------------------------------------------##
1458 # AMDGPU dialect.
1459 ##---------------------------------------------------------------------------##
1461 td_library(
1462     name = "AMDGPUTdFiles",
1463     srcs = ["include/mlir/Dialect/AMDGPU/IR/AMDGPU.td"],
1464     includes = ["include"],
1465     deps = [
1466         ":SideEffectInterfacesTdFiles",
1467     ],
1470 gentbl_cc_library(
1471     name = "AMDGPUIncGen",
1472     tbl_outs = [
1473         (
1474             [
1475                 "-gen-attrdef-decls",
1476                 "-dialect=amdgpu",
1477             ],
1478             "include/mlir/Dialect/AMDGPU/IR/AMDGPUAttributes.h.inc",
1479         ),
1480         (
1481             [
1482                 "-gen-attrdef-defs",
1483                 "-dialect=amdgpu",
1484             ],
1485             "include/mlir/Dialect/AMDGPU/IR/AMDGPUAttributes.cpp.inc",
1486         ),
1487         (
1488             [
1489                 "-gen-dialect-decls",
1490                 "-dialect=amdgpu",
1491             ],
1492             "include/mlir/Dialect/AMDGPU/IR/AMDGPUDialect.h.inc",
1493         ),
1494         (
1495             [
1496                 "-gen-dialect-defs",
1497                 "-dialect=amdgpu",
1498             ],
1499             "include/mlir/Dialect/AMDGPU/IR/AMDGPUDialect.cpp.inc",
1500         ),
1501         (
1502             ["-gen-enum-decls"],
1503             "include/mlir/Dialect/AMDGPU/IR/AMDGPUEnums.h.inc",
1504         ),
1505         (
1506             ["-gen-enum-defs"],
1507             "include/mlir/Dialect/AMDGPU/IR/AMDGPUEnums.cpp.inc",
1508         ),
1509         (
1510             ["-gen-op-decls"],
1511             "include/mlir/Dialect/AMDGPU/IR/AMDGPU.h.inc",
1512         ),
1513         (
1514             ["-gen-op-defs"],
1515             "include/mlir/Dialect/AMDGPU/IR/AMDGPU.cpp.inc",
1516         ),
1517         (
1518             ["-gen-op-doc"],
1519             "g3doc/Dialects/AMDGPU/IR/AMDGPU.md",
1520         ),
1521     ],
1522     tblgen = ":mlir-tblgen",
1523     td_file = "include/mlir/Dialect/AMDGPU/IR/AMDGPU.td",
1524     deps = [":AMDGPUTdFiles"],
1527 cc_library(
1528     name = "AMDGPUDialect",
1529     srcs = ["lib/Dialect/AMDGPU/IR/AMDGPUDialect.cpp"],
1530     hdrs = ["include/mlir/Dialect/AMDGPU/IR/AMDGPUDialect.h"],
1531     includes = ["include"],
1532     deps = [
1533         ":AMDGPUIncGen",
1534         ":ArithDialect",
1535         ":BytecodeOpInterface",
1536         ":GPUDialect",
1537         ":IR",
1538         ":ROCDLDialect",
1539         ":SideEffectInterfaces",
1540         "//llvm:Support",
1541     ],
1544 gentbl_cc_library(
1545     name = "AMDGPUPassIncGen",
1546     tbl_outs = [
1547         (
1548             [
1549                 "-gen-pass-decls",
1550                 "-name=AMDGPU",
1551             ],
1552             "include/mlir/Dialect/AMDGPU/Transforms/Passes.h.inc",
1553         ),
1554     ],
1555     tblgen = ":mlir-tblgen",
1556     td_file = "include/mlir/Dialect/AMDGPU/Transforms/Passes.td",
1557     deps = [":PassBaseTdFiles"],
1560 cc_library(
1561     name = "AMDGPUTransforms",
1562     srcs = glob(
1563         [
1564             "lib/Dialect/AMDGPU/Transforms/*.cpp",
1565         ],
1566     ),
1567     hdrs = glob(["include/mlir/Dialect/AMDGPU/Transforms/*.h"]),
1568     includes = ["include"],
1569     deps = [
1570         ":AMDGPUDialect",
1571         ":AMDGPUPassIncGen",
1572         ":AMDGPUUtils",
1573         ":ArithDialect",
1574         ":ControlFlowDialect",
1575         ":FuncDialect",
1576         ":GPUDialect",
1577         ":IR",
1578         ":MemRefDialect",
1579         ":Pass",
1580         ":SideEffectInterfaces",
1581         ":Support",
1582         ":TransformUtils",
1583         ":VectorDialect",
1584     ],
1587 cc_library(
1588     name = "AMDGPUUtils",
1589     srcs = glob(["lib/Dialect/AMDGPU/Utils/*.cpp"]),
1590     hdrs = glob(["include/mlir/Dialect/AMDGPU/Utils/*.h"]),
1591     includes = ["include"],
1592     deps = [
1593         ":Support",
1594         "//llvm:Support",
1595     ],
1598 ##---------------------------------------------------------------------------##
1599 # EmitC dialect.
1600 ##---------------------------------------------------------------------------##
1602 td_library(
1603     name = "EmitCTdFiles",
1604     srcs = [
1605         "include/mlir/Dialect/EmitC/IR/EmitC.td",
1606         "include/mlir/Dialect/EmitC/IR/EmitCAttributes.td",
1607         "include/mlir/Dialect/EmitC/IR/EmitCBase.td",
1608         "include/mlir/Dialect/EmitC/IR/EmitCTypes.td",
1609     ],
1610     includes = ["include"],
1611     deps = [
1612         ":BuiltinDialectTdFiles",
1613         ":CallInterfacesTdFiles",
1614         ":CastInterfacesTdFiles",
1615         ":ControlFlowInterfacesTdFiles",
1616         ":FunctionInterfacesTdFiles",
1617         ":OpBaseTdFiles",
1618         ":SideEffectInterfacesTdFiles",
1619     ],
1622 gentbl_cc_library(
1623     name = "EmitCAttributesIncGen",
1624     tbl_outs = [
1625         (
1626             ["--gen-attrdef-decls"],
1627             "include/mlir/Dialect/EmitC/IR/EmitCAttributes.h.inc",
1628         ),
1629         (
1630             ["--gen-attrdef-defs"],
1631             "include/mlir/Dialect/EmitC/IR/EmitCAttributes.cpp.inc",
1632         ),
1633     ],
1634     tblgen = ":mlir-tblgen",
1635     td_file = "include/mlir/Dialect/EmitC/IR/EmitCAttributes.td",
1636     deps = [":EmitCTdFiles"],
1639 gentbl_cc_library(
1640     name = "EmitCOpsIncGen",
1641     tbl_outs = [
1642         (
1643             ["-gen-dialect-decls"],
1644             "include/mlir/Dialect/EmitC/IR/EmitCDialect.h.inc",
1645         ),
1646         (
1647             ["-gen-dialect-defs"],
1648             "include/mlir/Dialect/EmitC/IR/EmitCDialect.cpp.inc",
1649         ),
1650         (
1651             ["-gen-enum-decls"],
1652             "include/mlir/Dialect/EmitC/IR/EmitCEnums.h.inc",
1653         ),
1654         (
1655             ["-gen-enum-defs"],
1656             "include/mlir/Dialect/EmitC/IR/EmitCEnums.cpp.inc",
1657         ),
1658         (
1659             ["-gen-op-decls"],
1660             "include/mlir/Dialect/EmitC/IR/EmitC.h.inc",
1661         ),
1662         (
1663             ["-gen-op-defs"],
1664             "include/mlir/Dialect/EmitC/IR/EmitC.cpp.inc",
1665         ),
1666         (
1667             ["-gen-typedef-decls"],
1668             "include/mlir/Dialect/EmitC/IR/EmitCTypes.h.inc",
1669         ),
1670         (
1671             ["-gen-typedef-defs"],
1672             "include/mlir/Dialect/EmitC/IR/EmitCTypes.cpp.inc",
1673         ),
1674     ],
1675     tblgen = ":mlir-tblgen",
1676     td_file = "include/mlir/Dialect/EmitC/IR/EmitC.td",
1677     deps = [":EmitCTdFiles"],
1680 gentbl_cc_library(
1681     name = "EmitCPassIncGen",
1682     tbl_outs = [
1683         (
1684             [
1685                 "-gen-pass-decls",
1686                 "-name=EmitC",
1687             ],
1688             "include/mlir/Dialect/EmitC/Transforms/Passes.h.inc",
1689         ),
1690     ],
1691     tblgen = ":mlir-tblgen",
1692     td_file = "include/mlir/Dialect/EmitC/Transforms/Passes.td",
1693     deps = [":PassBaseTdFiles"],
1696 cc_library(
1697     name = "TargetCpp",
1698     srcs = glob([
1699         "lib/Target/Cpp/*.cpp",
1700     ]),
1701     hdrs = glob(["include/mlir/Target/Cpp/*.h"]),
1702     deps = [
1703         ":ControlFlowDialect",
1704         ":EmitCDialect",
1705         ":FuncDialect",
1706         ":IR",
1707         ":Support",
1708         ":TranslateLib",
1709         "//llvm:Support",
1710     ],
1713 ##---------------------------------------------------------------------------##
1714 # Async dialect.
1715 ##---------------------------------------------------------------------------##
1717 td_library(
1718     name = "AsyncOpsTdFiles",
1719     srcs = [
1720         "include/mlir/Dialect/Async/IR/AsyncDialect.td",
1721         "include/mlir/Dialect/Async/IR/AsyncOps.td",
1722         "include/mlir/Dialect/Async/IR/AsyncTypes.td",
1723     ],
1724     includes = ["include"],
1725     deps = [
1726         ":CallInterfacesTdFiles",
1727         ":ControlFlowInterfacesTdFiles",
1728         ":FunctionInterfacesTdFiles",
1729         ":InferTypeOpInterfaceTdFiles",
1730         ":OpBaseTdFiles",
1731         ":SideEffectInterfacesTdFiles",
1732     ],
1735 gentbl_cc_library(
1736     name = "AsyncOpsIncGen",
1737     tbl_outs = [
1738         (
1739             ["-gen-op-decls"],
1740             "include/mlir/Dialect/Async/IR/AsyncOps.h.inc",
1741         ),
1742         (
1743             ["-gen-op-defs"],
1744             "include/mlir/Dialect/Async/IR/AsyncOps.cpp.inc",
1745         ),
1746         (
1747             ["-gen-dialect-decls"],
1748             "include/mlir/Dialect/Async/IR/AsyncOpsDialect.h.inc",
1749         ),
1750         (
1751             ["-gen-dialect-defs"],
1752             "include/mlir/Dialect/Async/IR/AsyncOpsDialect.cpp.inc",
1753         ),
1754         (
1755             ["-gen-typedef-decls"],
1756             "include/mlir/Dialect/Async/IR/AsyncOpsTypes.h.inc",
1757         ),
1758         (
1759             ["-gen-typedef-defs"],
1760             "include/mlir/Dialect/Async/IR/AsyncOpsTypes.cpp.inc",
1761         ),
1762     ],
1763     tblgen = ":mlir-tblgen",
1764     td_file = "include/mlir/Dialect/Async/IR/AsyncOps.td",
1765     deps = [":AsyncOpsTdFiles"],
1768 gentbl_cc_library(
1769     name = "AsyncPassIncGen",
1770     tbl_outs = [
1771         (
1772             [
1773                 "-gen-pass-decls",
1774                 "-name=Async",
1775             ],
1776             "include/mlir/Dialect/Async/Passes.h.inc",
1777         ),
1778         (
1779             [
1780                 "-gen-pass-capi-header",
1781                 "--prefix=Async",
1782             ],
1783             "include/mlir/Dialect/Async/Passes.capi.h.inc",
1784         ),
1785         (
1786             [
1787                 "-gen-pass-capi-impl",
1788                 "--prefix=Async",
1789             ],
1790             "include/mlir/Dialect/Async/Passes.capi.cpp.inc",
1791         ),
1792     ],
1793     tblgen = ":mlir-tblgen",
1794     td_file = "include/mlir/Dialect/Async/Passes.td",
1795     deps = [":PassBaseTdFiles"],
1798 ##---------------------------------------------------------------------------##
1799 # ArmNeon dialect.
1800 ##---------------------------------------------------------------------------##
1802 td_library(
1803     name = "ArmNeonTdFiles",
1804     srcs = ["include/mlir/Dialect/ArmNeon/ArmNeon.td"],
1805     includes = ["include"],
1806     deps = [
1807         ":LLVMOpsTdFiles",
1808         ":OpBaseTdFiles",
1809         ":SideEffectInterfacesTdFiles",
1810     ],
1813 gentbl_cc_library(
1814     name = "ArmNeonIncGen",
1815     tbl_outs = [
1816         (
1817             [
1818                 "-gen-dialect-decls",
1819                 "-dialect=arm_neon",
1820             ],
1821             "include/mlir/Dialect/ArmNeon/ArmNeonDialect.h.inc",
1822         ),
1823         (
1824             [
1825                 "-gen-dialect-defs",
1826                 "-dialect=arm_neon",
1827             ],
1828             "include/mlir/Dialect/ArmNeon/ArmNeonDialect.cpp.inc",
1829         ),
1830         (
1831             ["-gen-op-decls"],
1832             "include/mlir/Dialect/ArmNeon/ArmNeon.h.inc",
1833         ),
1834         (
1835             ["-gen-op-defs"],
1836             "include/mlir/Dialect/ArmNeon/ArmNeon.cpp.inc",
1837         ),
1838         (
1839             ["-gen-op-doc"],
1840             "g3doc/Dialects/ArmNeon/ArmNeon.md",
1841         ),
1842     ],
1843     tblgen = ":mlir-tblgen",
1844     td_file = "include/mlir/Dialect/ArmNeon/ArmNeon.td",
1845     deps = [":ArmNeonTdFiles"],
1848 cc_library(
1849     name = "ArmNeonDialect",
1850     srcs = ["lib/Dialect/ArmNeon/IR/ArmNeonDialect.cpp"],
1851     hdrs = ["include/mlir/Dialect/ArmNeon/ArmNeonDialect.h"],
1852     includes = ["include"],
1853     deps = [
1854         ":ArmNeonIncGen",
1855         ":BytecodeOpInterface",
1856         ":IR",
1857         ":SideEffectInterfaces",
1858         ":VectorDialect",
1859     ],
1862 cc_library(
1863     name = "ArmNeonTransforms",
1864     srcs = glob(["lib/Dialect/ArmNeon/Transforms/*.cpp"]),
1865     hdrs = ["include/mlir/Dialect/ArmNeon/Transforms.h"],
1866     includes = ["include"],
1867     deps = [
1868         ":ArithDialect",
1869         ":ArmNeonDialect",
1870         ":DialectUtils",
1871         ":FuncDialect",
1872         ":IR",
1873         ":LLVMDialect",
1874         ":Support",
1875         ":TransformUtils",
1876         ":VectorDialect",
1877     ],
1880 gentbl_cc_library(
1881     name = "ArmNeonConversionIncGen",
1882     tbl_outs = [
1883         (
1884             ["-gen-llvmir-conversions"],
1885             "include/mlir/Dialect/ArmNeon/ArmNeonConversions.inc",
1886         ),
1887     ],
1888     tblgen = ":mlir-tblgen",
1889     td_file = "include/mlir/Dialect/ArmNeon/ArmNeon.td",
1890     deps = [":ArmNeonTdFiles"],
1893 cc_library(
1894     name = "ArmNeon2dToIntr",
1895     srcs = glob([
1896         "lib/Conversion/ArmNeon2dToIntr/*.cpp",
1897     ]),
1898     hdrs = glob([
1899         "include/mlir/Conversion/ArmNeon2dToIntr/*.h",
1900     ]),
1901     includes = ["include"],
1902     deps = [
1903         ":ArmNeonDialect",
1904         ":ConversionPassIncGen",
1905         ":IR",
1906         ":Pass",
1907         ":TransformUtils",
1908         ":VectorDialect",
1909     ],
1912 ##---------------------------------------------------------------------------##
1913 # ArmSME dialect.
1914 ##---------------------------------------------------------------------------##
1916 td_library(
1917     name = "ArmSMETdFiles",
1918     srcs = [
1919         "include/mlir/Dialect/ArmSME/IR/ArmSME.td",
1920     ],
1921     includes = ["include"],
1922     deps = [
1923         ":ArithOpsTdFiles",
1924         ":FuncTdFiles",
1925         ":LLVMOpsTdFiles",
1926         ":OpBaseTdFiles",
1927         ":SideEffectInterfacesTdFiles",
1928     ],
1931 gentbl_cc_library(
1932     name = "ArmSMETransformsPassIncGen",
1933     tbl_outs = [
1934         (
1935             [
1936                 "-gen-pass-decls",
1937                 "-name=ArmSME",
1938             ],
1939             "include/mlir/Dialect/ArmSME/Transforms/Passes.h.inc",
1940         ),
1941         (
1942             ["-gen-enum-decls"],
1943             "include/mlir/Dialect/ArmSME/Transforms/PassesEnums.h.inc",
1944         ),
1945         (
1946             ["-gen-enum-defs"],
1947             "include/mlir/Dialect/ArmSME/Transforms/PassesEnums.cpp.inc",
1948         ),
1949     ],
1950     tblgen = ":mlir-tblgen",
1951     td_file = "include/mlir/Dialect/ArmSME/Transforms/Passes.td",
1952     deps = [
1953         ":OpBaseTdFiles",
1954         ":PassBaseTdFiles",
1955     ],
1958 gentbl_cc_library(
1959     name = "ArmSMEIncGen",
1960     tbl_outs = [
1961         (
1962             ["-gen-op-decls"],
1963             "include/mlir/Dialect/ArmSME/IR/ArmSME.h.inc",
1964         ),
1965         (
1966             ["-gen-op-defs"],
1967             "include/mlir/Dialect/ArmSME/IR/ArmSME.cpp.inc",
1968         ),
1969         (
1970             ["-gen-typedef-decls"],
1971             "include/mlir/Dialect/ArmSME/IR/ArmSMETypes.h.inc",
1972         ),
1973         (
1974             ["-gen-typedef-defs"],
1975             "include/mlir/Dialect/ArmSME/IR/ArmSMETypes.cpp.inc",
1976         ),
1977         (
1978             [
1979                 "-gen-dialect-decls",
1980                 "-dialect=arm_sme",
1981             ],
1982             "include/mlir/Dialect/ArmSME/IR/ArmSMEDialect.h.inc",
1983         ),
1984         (
1985             [
1986                 "-gen-dialect-defs",
1987                 "-dialect=arm_sme",
1988             ],
1989             "include/mlir/Dialect/ArmSME/IR/ArmSMEDialect.cpp.inc",
1990         ),
1991     ],
1992     tblgen = ":mlir-tblgen",
1993     td_file = "include/mlir/Dialect/ArmSME/IR/ArmSME.td",
1994     deps = [":ArmSMETdFiles"],
1997 gentbl_cc_library(
1998     name = "ArmSMEOpsIncGen",
1999     tbl_outs = [
2000         (
2001             ["-gen-op-decls"],
2002             "include/mlir/Dialect/ArmSME/IR/ArmSMEOps.h.inc",
2003         ),
2004         (
2005             ["-gen-op-defs"],
2006             "include/mlir/Dialect/ArmSME/IR/ArmSMEOps.cpp.inc",
2007         ),
2008         (
2009             ["-gen-enum-decls"],
2010             "include/mlir/Dialect/ArmSME/IR/ArmSMEEnums.h.inc",
2011         ),
2012         (
2013             ["-gen-enum-defs"],
2014             "include/mlir/Dialect/ArmSME/IR/ArmSMEEnums.cpp.inc",
2015         ),
2016         (
2017             [
2018                 "-gen-attrdef-decls",
2019                 "-attrdefs-dialect=arm_sme",
2020             ],
2021             "include/mlir/Dialect/ArmSME/IR/ArmSMEAttrDefs.h.inc",
2022         ),
2023         (
2024             [
2025                 "-gen-attrdef-defs",
2026                 "-attrdefs-dialect=arm_sme",
2027             ],
2028             "include/mlir/Dialect/ArmSME/IR/ArmSMEAttrDefs.cpp.inc",
2029         ),
2030     ],
2031     tblgen = ":mlir-tblgen",
2032     td_file = "include/mlir/Dialect/ArmSME/IR/ArmSMEOps.td",
2033     deps = [":ArmSMETdFiles"],
2036 gentbl_cc_library(
2037     name = "ArmSMEConversionIncGen",
2038     tbl_outs = [
2039         (
2040             ["-gen-llvmir-conversions"],
2041             "include/mlir/Dialect/ArmSME/IR/ArmSMEOpsConversions.inc",
2042         ),
2043     ],
2044     tblgen = ":mlir-tblgen",
2045     td_file = "include/mlir/Dialect/ArmSME/IR/ArmSMEOps.td",
2046     deps = [":ArmSMETdFiles"],
2049 gentbl_cc_library(
2050     name = "ArmSMEOpInterfacesIncGen",
2051     tbl_outs = [
2052         (
2053             ["-gen-op-interface-decls"],
2054             "include/mlir/Dialect/ArmSME/IR/ArmSMEOpInterfaces.h.inc",
2055         ),
2056         (
2057             ["-gen-op-interface-defs"],
2058             "include/mlir/Dialect/ArmSME/IR/ArmSMEOpInterfaces.cpp.inc",
2059         ),
2060     ],
2061     tblgen = ":mlir-tblgen",
2062     td_file = "include/mlir/Dialect/ArmSME/IR/ArmSMEOps.td",
2063     deps = [":ArmSMETdFiles"],
2066 cc_library(
2067     name = "ArmSMEOpInterfaces",
2068     hdrs = [
2069         "include/mlir/Dialect/ArmSME/IR/ArmSMEOpInterfaces.h",
2070     ],
2071     includes = ["include"],
2072     deps = [
2073         ":ArmSMEOpInterfacesIncGen",
2074         ":IR",
2075         ":Support",
2076         ":VectorDialect",
2077         "//llvm:Support",
2078     ],
2081 gentbl_cc_library(
2082     name = "ArmSMEIntrinsicOpsIncGen",
2083     tbl_outs = [
2084         (
2085             ["-gen-op-decls"],
2086             "include/mlir/Dialect/ArmSME/IR/ArmSMEIntrinsicOps.h.inc",
2087         ),
2088         (
2089             ["-gen-op-defs"],
2090             "include/mlir/Dialect/ArmSME/IR/ArmSMEIntrinsicOps.cpp.inc",
2091         ),
2092         (
2093             ["-gen-llvmir-conversions"],
2094             "include/mlir/Dialect/ArmSME/IR/ArmSMEIntrinsicConversions.inc",
2095         ),
2096     ],
2097     tblgen = ":mlir-tblgen",
2098     td_file = "include/mlir/Dialect/ArmSME/IR/ArmSMEIntrinsicOps.td",
2099     deps = [":ArmSMETdFiles"],
2102 cc_library(
2103     name = "ArmSMEEnums",
2104     hdrs = [
2105         "include/mlir/Dialect/ArmSME/IR/ArmSMEEnums.h",
2106     ],
2107     deps = [
2108         ":ArmSMEIncGen",
2109         ":ArmSMEOpsIncGen",
2110         ":IR",
2111     ],
2114 cc_library(
2115     name = "ArmSMEDialect",
2116     srcs = glob(["lib/Dialect/ArmSME/IR/*.cpp"]),
2117     hdrs = [
2118         "include/mlir/Dialect/ArmSME/IR/ArmSME.h",
2119         "include/mlir/Dialect/ArmSME/Utils/Utils.h",
2120     ],
2121     includes = ["include"],
2122     deps = [
2123         ":ArmSMEEnums",
2124         ":ArmSMEIncGen",
2125         ":ArmSMEIntrinsicOpsIncGen",
2126         ":ArmSMEOpInterfaces",
2127         ":ArmSMEOpInterfacesIncGen",
2128         ":ArmSMEOpsIncGen",
2129         ":BytecodeOpInterface",
2130         ":FunctionInterfaces",
2131         ":IR",
2132         ":LLVMDialect",
2133         ":MemRefDialect",
2134         ":SCFDialect",
2135         ":SideEffectInterfaces",
2136         ":VectorDialect",
2137         "//llvm:Support",
2138     ],
2141 cc_library(
2142     name = "ArmSMETransforms",
2143     srcs = glob(["lib/Dialect/ArmSME/Transforms/*.cpp"]),
2144     hdrs = glob(["include/mlir/Dialect/ArmSME/Transforms/*.h"]),
2145     includes = ["include"],
2146     deps = [
2147         ":Analysis",
2148         ":ArithUtils",
2149         ":ArmSMEDialect",
2150         ":ArmSMETransformsPassIncGen",
2151         ":ControlFlowDialect",
2152         ":DialectUtils",
2153         ":FuncDialect",
2154         ":FuncTransforms",
2155         ":FunctionInterfaces",
2156         ":IR",
2157         ":IndexDialect",
2158         ":LLVMCommonConversion",
2159         ":LLVMDialect",
2160         ":MemRefDialect",
2161         ":Pass",
2162         ":SCFDialect",
2163         ":SCFTransforms",
2164         ":TransformUtils",
2165         ":VectorUtils",
2166         "//llvm:Support",
2167     ],
2170 cc_library(
2171     name = "ArmSMEToSCF",
2172     srcs = glob(["lib/Conversion/ArmSMEToSCF/*.cpp"]),
2173     hdrs = glob(["include/mlir/Conversion/ArmSMEToSCF/*.h"]),
2174     includes = ["include"],
2175     deps = [
2176         ":ArithDialect",
2177         ":ArmSMEDialect",
2178         ":ConversionPassIncGen",
2179         ":Pass",
2180         ":SCFDialect",
2181         ":TransformUtils",
2182     ],
2185 cc_library(
2186     name = "ArmSMEToLLVM",
2187     srcs = glob(["lib/Conversion/ArmSMEToLLVM/*.cpp"]),
2188     hdrs = glob(["include/mlir/Conversion/ArmSMEToLLVM/*.h"]),
2189     includes = ["include"],
2190     deps = [
2191         ":ArithDialect",
2192         ":ArmSMEDialect",
2193         ":ArmSMETransforms",
2194         ":ControlFlowDialect",
2195         ":ConversionPassIncGen",
2196         ":FuncDialect",
2197         ":FunctionInterfaces",
2198         ":LLVMCommonConversion",
2199         ":LLVMDialect",
2200         ":MemRefDialect",
2201         ":Pass",
2202         ":TransformUtils",
2203         ":VectorDialect",
2204         "//llvm:Support",
2205     ],
2208 ##---------------------------------------------------------------------------##
2209 # ArmSVE dialect.
2210 ##---------------------------------------------------------------------------##
2212 td_library(
2213     name = "ArmSVETdFiles",
2214     srcs = [
2215         "include/mlir/Dialect/ArmSVE/IR/ArmSVE.td",
2216     ],
2217     includes = ["include"],
2218     deps = [
2219         ":ArithOpsTdFiles",
2220         ":FuncTdFiles",
2221         ":LLVMOpsTdFiles",
2222         ":OpBaseTdFiles",
2223         ":SideEffectInterfacesTdFiles",
2224     ],
2227 gentbl_cc_library(
2228     name = "ArmSVEIncGen",
2229     tbl_outs = [
2230         (
2231             ["-gen-op-decls"],
2232             "include/mlir/Dialect/ArmSVE/IR/ArmSVE.h.inc",
2233         ),
2234         (
2235             ["-gen-op-defs"],
2236             "include/mlir/Dialect/ArmSVE/IR/ArmSVE.cpp.inc",
2237         ),
2238         (
2239             ["-gen-typedef-decls"],
2240             "include/mlir/Dialect/ArmSVE/IR/ArmSVETypes.h.inc",
2241         ),
2242         (
2243             ["-gen-typedef-defs"],
2244             "include/mlir/Dialect/ArmSVE/IR/ArmSVETypes.cpp.inc",
2245         ),
2246         (
2247             [
2248                 "-gen-dialect-decls",
2249                 "-dialect=arm_sve",
2250             ],
2251             "include/mlir/Dialect/ArmSVE/IR/ArmSVEDialect.h.inc",
2252         ),
2253         (
2254             [
2255                 "-gen-dialect-defs",
2256                 "-dialect=arm_sve",
2257             ],
2258             "include/mlir/Dialect/ArmSVE/IR/ArmSVEDialect.cpp.inc",
2259         ),
2260     ],
2261     tblgen = ":mlir-tblgen",
2262     td_file = "include/mlir/Dialect/ArmSVE/IR/ArmSVE.td",
2263     deps = [":ArmSVETdFiles"],
2266 cc_library(
2267     name = "ArmSVEDialect",
2268     srcs = ["lib/Dialect/ArmSVE/IR/ArmSVEDialect.cpp"],
2269     hdrs = ["include/mlir/Dialect/ArmSVE/IR/ArmSVEDialect.h"],
2270     includes = ["include"],
2271     deps = [
2272         ":ArmSVEIncGen",
2273         ":BytecodeOpInterface",
2274         ":IR",
2275         ":LLVMDialect",
2276         ":SideEffectInterfaces",
2277         ":VectorDialect",
2278         "//llvm:Support",
2279     ],
2282 gentbl_cc_library(
2283     name = "ArmSVEPassIncGen",
2284     tbl_outs = [
2285         (
2286             [
2287                 "-gen-pass-decls",
2288                 "-name=ArmSVE",
2289             ],
2290             "include/mlir/Dialect/ArmSVE/Transforms/Passes.h.inc",
2291         ),
2292     ],
2293     tblgen = ":mlir-tblgen",
2294     td_file = "include/mlir/Dialect/ArmSVE/Transforms/Passes.td",
2295     deps = [":PassBaseTdFiles"],
2298 cc_library(
2299     name = "ArmSVETransforms",
2300     srcs = glob(["lib/Dialect/ArmSVE/Transforms/*.cpp"]),
2301     hdrs = glob(["include/mlir/Dialect/ArmSVE/Transforms/*.h"]),
2302     includes = ["include"],
2303     deps = [
2304         ":ArmSVEDialect",
2305         ":ArmSVEPassIncGen",
2306         ":DialectUtils",
2307         ":FuncDialect",
2308         ":IR",
2309         ":LLVMCommonConversion",
2310         ":LLVMDialect",
2311         ":MemRefDialect",
2312         ":Pass",
2313         ":TransformUtils",
2314         ":VectorDialect",
2315     ],
2318 gentbl_cc_library(
2319     name = "ArmSVEConversionIncGen",
2320     tbl_outs = [
2321         (
2322             ["-gen-llvmir-conversions"],
2323             "include/mlir/Dialect/ArmSVE/IR/ArmSVEConversions.inc",
2324         ),
2325     ],
2326     tblgen = ":mlir-tblgen",
2327     td_file = "include/mlir/Dialect/ArmSVE/IR/ArmSVE.td",
2328     deps = [":ArmSVETdFiles"],
2331 ##---------------------------------------------------------------------------##
2332 # AMX dialect.
2333 ##---------------------------------------------------------------------------##
2335 td_library(
2336     name = "AMXTdFiles",
2337     srcs = ["include/mlir/Dialect/AMX/AMX.td"],
2338     includes = ["include"],
2339     deps = [
2340         ":BuiltinDialectTdFiles",
2341         ":LLVMOpsTdFiles",
2342         ":SideEffectInterfacesTdFiles",
2343     ],
2346 gentbl_cc_library(
2347     name = "AMXIncGen",
2348     tbl_outs = [
2349         (
2350             [
2351                 "-gen-dialect-decls",
2352                 "-dialect=amx",
2353             ],
2354             "include/mlir/Dialect/AMX/AMXDialect.h.inc",
2355         ),
2356         (
2357             [
2358                 "-gen-dialect-defs",
2359                 "-dialect=amx",
2360             ],
2361             "include/mlir/Dialect/AMX/AMXDialect.cpp.inc",
2362         ),
2363         (
2364             [
2365                 "-gen-typedef-decls",
2366                 "-typedefs-dialect=amx",
2367             ],
2368             "include/mlir/Dialect/AMX/AMXTypes.h.inc",
2369         ),
2370         (
2371             [
2372                 "-gen-typedef-defs",
2373                 "-typedefs-dialect=amx",
2374             ],
2375             "include/mlir/Dialect/AMX/AMXTypes.cpp.inc",
2376         ),
2377         (
2378             ["-gen-op-decls"],
2379             "include/mlir/Dialect/AMX/AMX.h.inc",
2380         ),
2381         (
2382             ["-gen-op-defs"],
2383             "include/mlir/Dialect/AMX/AMX.cpp.inc",
2384         ),
2385         (
2386             ["-gen-op-doc"],
2387             "g3doc/Dialects/AMX/AMX.md",
2388         ),
2389     ],
2390     tblgen = ":mlir-tblgen",
2391     td_file = "include/mlir/Dialect/AMX/AMX.td",
2392     deps = [":AMXTdFiles"],
2395 cc_library(
2396     name = "AMXDialect",
2397     srcs = ["lib/Dialect/AMX/IR/AMXDialect.cpp"],
2398     hdrs = ["include/mlir/Dialect/AMX/AMXDialect.h"],
2399     includes = ["include"],
2400     deps = [
2401         ":AMXIncGen",
2402         ":BytecodeOpInterface",
2403         ":IR",
2404         ":LLVMDialect",
2405         ":SideEffectInterfaces",
2406         "//llvm:Support",
2407     ],
2410 cc_library(
2411     name = "AMXTransforms",
2412     srcs = glob(["lib/Dialect/AMX/Transforms/*.cpp"]),
2413     hdrs = ["include/mlir/Dialect/AMX/Transforms.h"],
2414     includes = ["include"],
2415     deps = [
2416         ":AMXDialect",
2417         ":ConvertToLLVMInterface",
2418         ":IR",
2419         ":LLVMCommonConversion",
2420         ":LLVMDialect",
2421     ],
2424 gentbl_cc_library(
2425     name = "AMXConversionIncGen",
2426     tbl_outs = [
2427         (
2428             ["-gen-llvmir-conversions"],
2429             "include/mlir/Dialect/AMX/AMXConversions.inc",
2430         ),
2431     ],
2432     tblgen = ":mlir-tblgen",
2433     td_file = "include/mlir/Dialect/AMX/AMX.td",
2434     deps = [":AMXTdFiles"],
2437 ##---------------------------------------------------------------------------##
2438 # X86Vector dialect.
2439 ##---------------------------------------------------------------------------##
2441 td_library(
2442     name = "X86VectorTdFiles",
2443     srcs = ["include/mlir/Dialect/X86Vector/X86Vector.td"],
2444     includes = ["include"],
2445     deps = [
2446         ":InferTypeOpInterfaceTdFiles",
2447         ":LLVMOpsTdFiles",
2448         ":SideEffectInterfacesTdFiles",
2449     ],
2452 gentbl_cc_library(
2453     name = "X86VectorIncGen",
2454     tbl_outs = [
2455         (
2456             [
2457                 "-gen-dialect-decls",
2458                 "-dialect=x86vector",
2459             ],
2460             "include/mlir/Dialect/X86Vector/X86VectorDialect.h.inc",
2461         ),
2462         (
2463             [
2464                 "-gen-dialect-defs",
2465                 "-dialect=x86vector",
2466             ],
2467             "include/mlir/Dialect/X86Vector/X86VectorDialect.cpp.inc",
2468         ),
2469         (
2470             ["-gen-op-decls"],
2471             "include/mlir/Dialect/X86Vector/X86Vector.h.inc",
2472         ),
2473         (
2474             ["-gen-op-defs"],
2475             "include/mlir/Dialect/X86Vector/X86Vector.cpp.inc",
2476         ),
2477         (
2478             ["-gen-op-doc"],
2479             "g3doc/Dialects/X86Vector/X86Vector.md",
2480         ),
2481     ],
2482     tblgen = ":mlir-tblgen",
2483     td_file = "include/mlir/Dialect/X86Vector/X86Vector.td",
2484     deps = [":X86VectorTdFiles"],
2487 cc_library(
2488     name = "X86VectorDialect",
2489     srcs = ["lib/Dialect/X86Vector/IR/X86VectorDialect.cpp"],
2490     hdrs = ["include/mlir/Dialect/X86Vector/X86VectorDialect.h"],
2491     includes = ["include"],
2492     deps = [
2493         ":BytecodeOpInterface",
2494         ":IR",
2495         ":InferTypeOpInterface",
2496         ":LLVMDialect",
2497         ":SideEffectInterfaces",
2498         ":X86VectorIncGen",
2499     ],
2502 cc_library(
2503     name = "X86VectorTransforms",
2504     srcs = glob(["lib/Dialect/X86Vector/Transforms/*.cpp"]),
2505     hdrs = ["include/mlir/Dialect/X86Vector/Transforms.h"],
2506     includes = ["include"],
2507     deps = [
2508         ":ArithDialect",
2509         ":IR",
2510         ":LLVMCommonConversion",
2511         ":LLVMDialect",
2512         ":VectorDialect",
2513         ":VectorUtils",
2514         ":X86VectorDialect",
2515         "//llvm:Support",
2516     ],
2519 gentbl_cc_library(
2520     name = "X86VectorConversionIncGen",
2521     tbl_outs = [
2522         (
2523             ["-gen-llvmir-conversions"],
2524             "include/mlir/Dialect/X86Vector/X86VectorConversions.inc",
2525         ),
2526     ],
2527     tblgen = ":mlir-tblgen",
2528     td_file = "include/mlir/Dialect/X86Vector/X86Vector.td",
2529     deps = [":X86VectorTdFiles"],
2532 ##---------------------------------------------------------------------------##
2533 # IRDL dialect.
2534 ##---------------------------------------------------------------------------##
2536 td_library(
2537     name = "IRDLTdFiles",
2538     srcs = [
2539         "include/mlir/Dialect/IRDL/IR/IRDL.td",
2540         "include/mlir/Dialect/IRDL/IR/IRDLAttributes.td",
2541         "include/mlir/Dialect/IRDL/IR/IRDLInterfaces.td",
2542         "include/mlir/Dialect/IRDL/IR/IRDLOps.td",
2543         "include/mlir/Dialect/IRDL/IR/IRDLTypes.td",
2544     ],
2545     includes = ["include"],
2546     deps = [
2547         ":InferTypeOpInterfaceTdFiles",
2548         ":OpBaseTdFiles",
2549         ":SideEffectInterfacesTdFiles",
2550     ],
2553 gentbl_cc_library(
2554     name = "IRDLIncGen",
2555     tbl_outs = [
2556         (
2557             ["-gen-dialect-decls"],
2558             "include/mlir/Dialect/IRDL/IR/IRDLDialect.h.inc",
2559         ),
2560         (
2561             ["-gen-dialect-defs"],
2562             "include/mlir/Dialect/IRDL/IR/IRDLDialect.cpp.inc",
2563         ),
2564         (
2565             ["-gen-op-decls"],
2566             "include/mlir/Dialect/IRDL/IR/IRDL.h.inc",
2567         ),
2568         (
2569             ["-gen-op-defs"],
2570             "include/mlir/Dialect/IRDL/IR/IRDL.cpp.inc",
2571         ),
2572         (
2573             ["-gen-typedef-decls"],
2574             "include/mlir/Dialect/IRDL/IR/IRDLTypes.h.inc",
2575         ),
2576         (
2577             ["-gen-typedef-defs"],
2578             "include/mlir/Dialect/IRDL/IR/IRDLTypes.cpp.inc",
2579         ),
2580     ],
2581     tblgen = ":mlir-tblgen",
2582     td_file = "include/mlir/Dialect/IRDL/IR/IRDLOps.td",
2583     deps = [":IRDLTdFiles"],
2586 gentbl_cc_library(
2587     name = "IRDLInterfacesIncGen",
2588     tbl_outs = [
2589         (
2590             ["-gen-op-interface-decls"],
2591             "include/mlir/Dialect/IRDL/IR/IRDLInterfaces.h.inc",
2592         ),
2593         (
2594             ["-gen-op-interface-defs"],
2595             "include/mlir/Dialect/IRDL/IR/IRDLInterfaces.cpp.inc",
2596         ),
2597     ],
2598     tblgen = ":mlir-tblgen",
2599     td_file = "include/mlir/Dialect/IRDL/IR/IRDLInterfaces.td",
2600     deps = [":IRDLTdFiles"],
2603 gentbl_cc_library(
2604     name = "IRDLAttributesIncGen",
2605     tbl_outs = [
2606         (
2607             ["-gen-attrdef-decls"],
2608             "include/mlir/Dialect/IRDL/IR/IRDLAttributes.h.inc",
2609         ),
2610         (
2611             ["-gen-attrdef-defs"],
2612             "include/mlir/Dialect/IRDL/IR/IRDLAttributes.cpp.inc",
2613         ),
2614     ],
2615     tblgen = ":mlir-tblgen",
2616     td_file = "include/mlir/Dialect/IRDL/IR/IRDLAttributes.td",
2617     deps = [":IRDLTdFiles"],
2620 gentbl_cc_library(
2621     name = "IRDLEnumsIncGen",
2622     tbl_outs = [
2623         (
2624             ["-gen-enum-decls"],
2625             "include/mlir/Dialect/IRDL/IR/IRDLEnums.h.inc",
2626         ),
2627         (
2628             ["-gen-enum-defs"],
2629             "include/mlir/Dialect/IRDL/IR/IRDLEnums.cpp.inc",
2630         ),
2631     ],
2632     tblgen = ":mlir-tblgen",
2633     td_file = "include/mlir/Dialect/IRDL/IR/IRDLAttributes.td",
2634     deps = [":IRDLTdFiles"],
2637 gentbl_cc_library(
2638     name = "IRDLOpsIncGen",
2639     tbl_outs = [
2640         (
2641             ["-gen-op-decls"],
2642             "include/mlir/Dialect/IRDL/IR/IRDLOps.h.inc",
2643         ),
2644         (
2645             ["-gen-op-defs"],
2646             "include/mlir/Dialect/IRDL/IR/IRDLOps.cpp.inc",
2647         ),
2648     ],
2649     tblgen = ":mlir-tblgen",
2650     td_file = "include/mlir/Dialect/IRDL/IR/IRDLOps.td",
2651     deps = [":IRDLTdFiles"],
2654 gentbl_cc_library(
2655     name = "IRDLTypesIncGen",
2656     tbl_outs = [
2657         (
2658             ["-gen-typedef-decls"],
2659             "include/mlir/Dialect/IRDL/IR/IRDLTypesGen.h.inc",
2660         ),
2661         (
2662             ["-gen-typedef-defs"],
2663             "include/mlir/Dialect/IRDL/IR/IRDLTypesGen.cpp.inc",
2664         ),
2665     ],
2666     tblgen = ":mlir-tblgen",
2667     td_file = "include/mlir/Dialect/IRDL/IR/IRDLTypes.td",
2668     deps = [":IRDLTdFiles"],
2671 cc_library(
2672     name = "IRDLDialect",
2673     srcs = [
2674         "lib/Dialect/IRDL/IR/IRDL.cpp",
2675         "lib/Dialect/IRDL/IR/IRDLOps.cpp",
2676         "lib/Dialect/IRDL/IRDLLoading.cpp",
2677         "lib/Dialect/IRDL/IRDLSymbols.cpp",
2678         "lib/Dialect/IRDL/IRDLVerifiers.cpp",
2679     ],
2680     hdrs = [
2681         "include/mlir/Dialect/IRDL/IR/IRDL.h",
2682         "include/mlir/Dialect/IRDL/IR/IRDLInterfaces.h",
2683         "include/mlir/Dialect/IRDL/IR/IRDLTraits.h",
2684         "include/mlir/Dialect/IRDL/IRDLLoading.h",
2685         "include/mlir/Dialect/IRDL/IRDLSymbols.h",
2686         "include/mlir/Dialect/IRDL/IRDLVerifiers.h",
2687     ],
2688     includes = ["include"],
2689     deps = [
2690         ":BytecodeOpInterface",
2691         ":Dialect",
2692         ":IR",
2693         ":IRDLAttributesIncGen",
2694         ":IRDLEnumsIncGen",
2695         ":IRDLIncGen",
2696         ":IRDLInterfacesIncGen",
2697         ":IRDLOpsIncGen",
2698         ":IRDLTypesIncGen",
2699         ":InferTypeOpInterface",
2700         ":SideEffectInterfaces",
2701         ":Support",
2702         "//llvm:Core",
2703         "//llvm:Support",
2704     ],
2707 ##---------------------------------------------------------------------------##
2708 # SCF dialect.
2709 ##---------------------------------------------------------------------------##
2711 td_library(
2712     name = "SCFTdFiles",
2713     srcs = [
2714         "include/mlir/Dialect/SCF/IR/DeviceMappingInterface.td",
2715         "include/mlir/Dialect/SCF/IR/SCFOps.td",
2716     ],
2717     includes = ["include"],
2718     deps = [
2719         ":ControlFlowInterfacesTdFiles",
2720         ":DestinationStyleOpInterfaceTdFiles",
2721         ":InferTypeOpInterfaceTdFiles",
2722         ":LoopLikeInterfaceTdFiles",
2723         ":ParallelCombiningOpInterfaceTdFiles",
2724         ":SideEffectInterfacesTdFiles",
2725         ":ViewLikeInterfaceTdFiles",
2726     ],
2729 gentbl_cc_library(
2730     name = "SCFIncGen",
2731     tbl_outs = [
2732         (
2733             ["-gen-op-decls"],
2734             "include/mlir/Dialect/SCF/IR/SCFOps.h.inc",
2735         ),
2736         (
2737             ["-gen-op-defs"],
2738             "include/mlir/Dialect/SCF/IR/SCFOps.cpp.inc",
2739         ),
2740         (
2741             ["-gen-dialect-decls"],
2742             "include/mlir/Dialect/SCF/IR/SCFOpsDialect.h.inc",
2743         ),
2744         (
2745             ["-gen-dialect-defs"],
2746             "include/mlir/Dialect/SCF/IR/SCFOpsDialect.cpp.inc",
2747         ),
2748     ],
2749     tblgen = ":mlir-tblgen",
2750     td_file = "include/mlir/Dialect/SCF/IR/SCFOps.td",
2751     deps = [":SCFTdFiles"],
2754 gentbl_cc_library(
2755     name = "SCFDeviceMappingInterfacesIncGen",
2756     tbl_outs = [
2757         (
2758             ["-gen-attr-interface-decls"],
2759             "include/mlir/Dialect/SCF/IR/DeviceMappingAttrInterface.h.inc",
2760         ),
2761         (
2762             ["-gen-attr-interface-defs"],
2763             "include/mlir/Dialect/SCF/IR/DeviceMappingAttrInterface.cpp.inc",
2764         ),
2765         (
2766             ["-gen-attrdef-decls"],
2767             "include/mlir/Dialect/SCF/IR/DeviceMappingAttributes.h.inc",
2768         ),
2769         (
2770             ["-gen-attrdef-defs"],
2771             "include/mlir/Dialect/SCF/IR/DeviceMappingAttributes.cpp.inc",
2772         ),
2773     ],
2774     tblgen = ":mlir-tblgen",
2775     td_file = "include/mlir/Dialect/SCF/IR/DeviceMappingInterface.td",
2776     deps = [":SCFTdFiles"],
2779 gentbl_cc_library(
2780     name = "SCFPassIncGen",
2781     tbl_outs = [
2782         (
2783             [
2784                 "-gen-pass-decls",
2785                 "-name=SCF",
2786             ],
2787             "include/mlir/Dialect/SCF/Transforms/Passes.h.inc",
2788         ),
2789     ],
2790     tblgen = ":mlir-tblgen",
2791     td_file = "include/mlir/Dialect/SCF/Transforms/Passes.td",
2792     deps = [":PassBaseTdFiles"],
2795 cc_library(
2796     name = "SCFTransforms",
2797     srcs = glob([
2798         "lib/Dialect/SCF/Transforms/*.cpp",
2799     ]),
2800     hdrs = glob([
2801         "include/mlir/Dialect/SCF/Transforms/*.h",
2802     ]),
2803     includes = ["include"],
2804     deps = [
2805         ":AffineAnalysis",
2806         ":AffineDialect",
2807         ":Analysis",
2808         ":ArithDialect",
2809         ":ArithUtils",
2810         ":BufferizationDialect",
2811         ":BufferizationInterfaces",
2812         ":BufferizationTransforms",
2813         ":DestinationStyleOpInterface",
2814         ":DialectUtils",
2815         ":FuncDialect",
2816         ":IR",
2817         ":LoopLikeInterface",
2818         ":MemRefDialect",
2819         ":Pass",
2820         ":Rewrite",
2821         ":SCFDialect",
2822         ":SCFPassIncGen",
2823         ":SCFUtils",
2824         ":SideEffectInterfaces",
2825         ":Support",
2826         ":TensorDialect",
2827         ":TensorTransforms",
2828         ":TilingInterface",
2829         ":TransformUtils",
2830         ":ViewLikeInterface",
2831         "//llvm:Support",
2832     ],
2835 td_library(
2836     name = "SCFTransformOpsTdFiles",
2837     srcs = [
2838         "include/mlir/Dialect/SCF/TransformOps/SCFTransformOps.td",
2839     ],
2840     includes = ["include"],
2841     deps = [
2842         ":PDLDialect",
2843         ":TransformLoopExtensionTdFiles",
2844     ],
2847 gentbl_cc_library(
2848     name = "SCFTransformOpsIncGen",
2849     tbl_outs = [
2850         (
2851             ["-gen-op-decls"],
2852             "include/mlir/Dialect/SCF/TransformOps/SCFTransformOps.h.inc",
2853         ),
2854         (
2855             ["-gen-op-defs"],
2856             "include/mlir/Dialect/SCF/TransformOps/SCFTransformOps.cpp.inc",
2857         ),
2858     ],
2859     tblgen = ":mlir-tblgen",
2860     td_file = "include/mlir/Dialect/SCF/TransformOps/SCFTransformOps.td",
2861     deps = [
2862         ":SCFTransformOpsTdFiles",
2863     ],
2866 cc_library(
2867     name = "SCFTransformOps",
2868     srcs = glob(["lib/Dialect/SCF/TransformOps/*.cpp"]),
2869     hdrs = glob(["include/mlir/Dialect/SCF/TransformOps/*.h"]),
2870     includes = ["include"],
2871     deps = [
2872         ":AffineDialect",
2873         ":AffineUtils",
2874         ":ArithDialect",
2875         ":ArithUtils",
2876         ":BytecodeOpInterface",
2877         ":DialectUtils",
2878         ":FuncDialect",
2879         ":IR",
2880         ":LoopLikeInterface",
2881         ":SCFDialect",
2882         ":SCFToControlFlow",
2883         ":SCFTransformOpsIncGen",
2884         ":SCFTransforms",
2885         ":SCFUtils",
2886         ":TransformDialect",
2887         ":TransformDialectInterfaces",
2888         ":VectorDialect",
2889     ],
2892 ##---------------------------------------------------------------------------##
2893 # SparseTensor dialect.
2894 ##---------------------------------------------------------------------------##
2896 td_library(
2897     name = "SparseTensorTdFiles",
2898     srcs = glob([
2899         "include/mlir/Dialect/SparseTensor/IR/*.td",
2900     ]),
2901     includes = ["include"],
2902     deps = [
2903         ":ControlFlowInterfacesTdFiles",
2904         ":InferTypeOpInterfaceTdFiles",
2905         ":LoopLikeInterfaceTdFiles",
2906         ":OpBaseTdFiles",
2907         ":SideEffectInterfacesTdFiles",
2908     ],
2911 gentbl_cc_library(
2912     name = "SparseTensorAttrDefsIncGen",
2913     tbl_outs = [
2914         (
2915             ["--gen-attrdef-decls"],
2916             "include/mlir/Dialect/SparseTensor/IR/SparseTensorAttrDefs.h.inc",
2917         ),
2918         (
2919             ["--gen-attrdef-defs"],
2920             "include/mlir/Dialect/SparseTensor/IR/SparseTensorAttrDefs.cpp.inc",
2921         ),
2922         (
2923             ["--gen-enum-decls"],
2924             "include/mlir/Dialect/SparseTensor/IR/SparseTensorAttrEnums.h.inc",
2925         ),
2926         (
2927             ["--gen-enum-defs"],
2928             "include/mlir/Dialect/SparseTensor/IR/SparseTensorAttrEnums.cpp.inc",
2929         ),
2930     ],
2931     tblgen = ":mlir-tblgen",
2932     td_file = "include/mlir/Dialect/SparseTensor/IR/SparseTensorAttrDefs.td",
2933     deps = [":SparseTensorTdFiles"],
2936 gentbl_cc_library(
2937     name = "SparseTensorOpsIncGen",
2938     tbl_outs = [
2939         (
2940             [
2941                 "-gen-dialect-decls",
2942                 "-dialect=sparse_tensor",
2943             ],
2944             "include/mlir/Dialect/SparseTensor/IR/SparseTensorOpsDialect.h.inc",
2945         ),
2946         (
2947             [
2948                 "-gen-dialect-defs",
2949                 "-dialect=sparse_tensor",
2950             ],
2951             "include/mlir/Dialect/SparseTensor/IR/SparseTensorOpsDialect.cpp.inc",
2952         ),
2953         (
2954             ["-gen-op-decls"],
2955             "include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.h.inc",
2956         ),
2957         (
2958             ["-gen-op-defs"],
2959             "include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.cpp.inc",
2960         ),
2961         (
2962             ["-gen-op-doc"],
2963             "g3doc/Dialects/SparseTensor/SparseTensor.md",
2964         ),
2965     ],
2966     tblgen = ":mlir-tblgen",
2967     td_file = "include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td",
2968     deps = [":SparseTensorTdFiles"],
2971 gentbl_cc_library(
2972     name = "SparseTensorTypesIncGen",
2973     tbl_outs = [
2974         (
2975             ["--gen-typedef-decls"],
2976             "include/mlir/Dialect/SparseTensor/IR/SparseTensorTypes.h.inc",
2977         ),
2978         (
2979             ["--gen-typedef-defs"],
2980             "include/mlir/Dialect/SparseTensor/IR/SparseTensorTypes.cpp.inc",
2981         ),
2982     ],
2983     tblgen = ":mlir-tblgen",
2984     td_file = "include/mlir/Dialect/SparseTensor/IR/SparseTensorTypes.td",
2985     deps = [":SparseTensorTdFiles"],
2988 gentbl_cc_library(
2989     name = "SparseTensorPassIncGen",
2990     tbl_outs = [
2991         (
2992             [
2993                 "-gen-pass-decls",
2994                 "-name=SparseTensor",
2995             ],
2996             "include/mlir/Dialect/SparseTensor/Transforms/Passes.h.inc",
2997         ),
2998         (
2999             [
3000                 "-gen-pass-capi-header",
3001                 "--prefix=SparseTensor",
3002             ],
3003             "include/mlir/Dialect/SparseTensor/Transforms/Passes.capi.h.inc",
3004         ),
3005         (
3006             [
3007                 "-gen-pass-capi-impl",
3008                 "--prefix=SparseTensor",
3009             ],
3010             "include/mlir/Dialect/SparseTensor/Transforms/Passes.capi.cpp.inc",
3011         ),
3012     ],
3013     tblgen = ":mlir-tblgen",
3014     td_file = "include/mlir/Dialect/SparseTensor/Transforms/Passes.td",
3015     deps = [":PassBaseTdFiles"],
3018 gentbl_cc_library(
3019     name = "SparseTensorInterfacesIncGen",
3020     tbl_outs = [
3021         (
3022             ["-gen-op-interface-decls"],
3023             "include/mlir/Dialect/SparseTensor/IR/SparseTensorInterfaces.h.inc",
3024         ),
3025         (
3026             ["-gen-op-interface-defs"],
3027             "include/mlir/Dialect/SparseTensor/IR/SparseTensorInterfaces.cpp.inc",
3028         ),
3029     ],
3030     tblgen = ":mlir-tblgen",
3031     td_file = "include/mlir/Dialect/SparseTensor/IR/SparseTensorInterfaces.td",
3032     deps = [":SparseTensorTdFiles"],
3035 td_library(
3036     name = "SparseTensorTransformOpsTdFiles",
3037     srcs = glob([
3038         "include/mlir/Dialect/SparseTensor/TransformOps/*.td",
3039     ]),
3040     includes = ["include"],
3041     deps = [
3042         ":TransformDialectTdFiles",
3043     ],
3046 gentbl_cc_library(
3047     name = "SparseTensorTransformOpsIncGen",
3048     tbl_outs = [
3049         (
3050             ["-gen-op-decls"],
3051             "include/mlir/Dialect/SparseTensor/TransformOps/SparseTensorTransformOps.h.inc",
3052         ),
3053         (
3054             ["-gen-op-defs"],
3055             "include/mlir/Dialect/SparseTensor/TransformOps/SparseTensorTransformOps.cpp.inc",
3056         ),
3057     ],
3058     tblgen = ":mlir-tblgen",
3059     td_file = "include/mlir/Dialect/SparseTensor/TransformOps/SparseTensorTransformOps.td",
3060     deps = [
3061         ":SparseTensorTransformOpsTdFiles",
3062     ],
3065 # This library is shared by both SparseTensorDialect and
3066 # SparseTensorRuntime, so it must not depend on any of the MLIR/LLVM
3067 # internals or else mlir_c_runner_utils will inherit that dependency.
3068 cc_library(
3069     name = "SparseTensorEnums",
3070     hdrs = ["include/mlir/Dialect/SparseTensor/IR/Enums.h"],
3071     includes = ["include"],
3074 cc_library(
3075     name = "SparseTensorDialect",
3076     srcs = glob([
3077         "lib/Dialect/SparseTensor/IR/*.cpp",
3078         "lib/Dialect/SparseTensor/IR/Detail/*.cpp",
3079         "lib/Dialect/SparseTensor/IR/Detail/*.h",
3080     ]),
3081     hdrs = [
3082         "include/mlir/Dialect/SparseTensor/IR/SparseTensor.h",
3083         "include/mlir/Dialect/SparseTensor/IR/SparseTensorInterfaces.h",
3084         "include/mlir/Dialect/SparseTensor/IR/SparseTensorStorageLayout.h",
3085         "include/mlir/Dialect/SparseTensor/IR/SparseTensorType.h",
3086     ],
3087     includes = ["include"],
3088     deps = [
3089         ":ArithDialect",
3090         ":BufferizationInterfaces",
3091         ":BytecodeOpInterface",
3092         ":ComplexDialect",
3093         ":ControlFlowInterfaces",
3094         ":DialectUtils",
3095         ":IR",
3096         ":InferTypeOpInterface",
3097         ":LoopLikeInterface",
3098         ":SideEffectInterfaces",
3099         ":SparseTensorAttrDefsIncGen",
3100         ":SparseTensorEnums",
3101         ":SparseTensorInterfacesIncGen",
3102         ":SparseTensorOpsIncGen",
3103         ":SparseTensorTypesIncGen",
3104         "//llvm:Support",
3105     ],
3108 cc_library(
3109     name = "SparseTensorTransformOps",
3110     srcs = glob([
3111         "lib/Dialect/SparseTensor/TransformOps/*.cpp",
3112     ]),
3113     hdrs = glob([
3114         "include/mlir/Dialect/SparseTensor/TransformOps/*.h",
3115     ]),
3116     includes = ["include"],
3117     deps = [
3118         ":IR",
3119         ":LinalgTransformOps",
3120         ":SparseTensorDialect",
3121         ":SparseTensorTransformOpsIncGen",
3122         ":TransformDialect",
3123         ":TransformDialectInterfaces",
3124     ],
3127 cc_library(
3128     name = "SparseTensorUtils",
3129     srcs = glob([
3130         "lib/Dialect/SparseTensor/Utils/*.cpp",
3131     ]),
3132     hdrs = glob([
3133         "include/mlir/Dialect/SparseTensor/Utils/*.h",
3134     ]),
3135     includes = ["include"],
3136     deps = [
3137         ":ArithDialect",
3138         ":ComplexDialect",
3139         ":IR",
3140         ":LinalgDialect",
3141         ":MathDialect",
3142         ":SparseTensorDialect",
3143         ":SparseTensorEnums",
3144         "//llvm:Support",
3145     ],
3148 cc_library(
3149     name = "SparseTensorTransforms",
3150     srcs = glob([
3151         "lib/Dialect/SparseTensor/Transforms/*.cpp",
3152         "lib/Dialect/SparseTensor/Transforms/Utils/*.cpp",
3153         "lib/Dialect/SparseTensor/Transforms/Utils/*.h",
3154     ]),
3155     hdrs = [
3156         "include/mlir/Dialect/SparseTensor/Transforms/BufferizableOpInterfaceImpl.h",
3157         "include/mlir/Dialect/SparseTensor/Transforms/Passes.h",
3158     ],
3159     includes = ["include"],
3160     deps = [
3161         ":AffineDialect",
3162         ":ArithDialect",
3163         ":ArithUtils",
3164         ":BufferizationDialect",
3165         ":BufferizationInterfaces",
3166         ":BufferizationTransforms",
3167         ":ComplexDialect",
3168         ":DialectUtils",
3169         ":FuncDialect",
3170         ":FuncTransforms",
3171         ":GPUDialect",
3172         ":IR",
3173         ":LLVMCommonConversion",
3174         ":LLVMDialect",
3175         ":LinalgDialect",
3176         ":LinalgTransforms",
3177         ":LinalgUtils",
3178         ":MathDialect",
3179         ":MemRefDialect",
3180         ":Pass",
3181         ":SCFDialect",
3182         ":SCFTransforms",
3183         ":SparseTensorDialect",
3184         ":SparseTensorEnums",
3185         ":SparseTensorPassIncGen",
3186         ":SparseTensorUtils",
3187         ":Support",
3188         ":TensorDialect",
3189         ":TransformUtils",
3190         ":Transforms",
3191         ":VectorDialect",
3192         ":VectorTransforms",
3193         "//llvm:Support",
3194     ],
3197 cc_library(
3198     name = "SparseTensorPipelines",
3199     srcs = glob([
3200         "lib/Dialect/SparseTensor/Pipelines/*.cpp",
3201     ]),
3202     hdrs = [
3203         "include/mlir/Dialect/SparseTensor/Pipelines/Passes.h",
3204     ],
3205     includes = ["include"],
3206     local_defines = if_cuda_available(["MLIR_GPU_TO_CUBIN_PASS_ENABLE"]),
3207     deps = [
3208         ":ArithTransforms",
3209         ":BufferizationTransforms",
3210         ":ConversionPasses",
3211         ":FuncDialect",
3212         ":GPUDialect",
3213         ":GPUToNVVMTransforms",
3214         ":GPUTransforms",
3215         ":LinalgTransforms",
3216         ":MemRefTransforms",
3217         ":NVVMDialect",
3218         ":Pass",
3219         ":SparseTensorDialect",
3220         ":SparseTensorTransforms",
3221         ":Transforms",
3222         ":VectorToLLVM",
3223     ],
3226 ##---------------------------------------------------------------------------##
3227 # Mesh Dialect
3228 ##---------------------------------------------------------------------------##
3230 td_library(
3231     name = "MeshTdFiles",
3232     srcs = [
3233         "include/mlir/Dialect/Mesh/IR/MeshBase.td",
3234         "include/mlir/Dialect/Mesh/IR/MeshOps.td",
3235     ],
3236     includes = ["include"],
3237     deps = [
3238         ":BuiltinDialectTdFiles",
3239         ":DestinationStyleOpInterfaceTdFiles",
3240         ":InferTypeOpInterfaceTdFiles",
3241         ":SideEffectInterfacesTdFiles",
3242     ],
3245 gentbl_cc_library(
3246     name = "MeshIncGen",
3247     tbl_outs = [
3248         (
3249             [
3250                 "-gen-op-decls",
3251                 "-dialect=mesh",
3252             ],
3253             "include/mlir/Dialect/Mesh/IR/MeshOps.h.inc",
3254         ),
3255         (
3256             [
3257                 "-gen-op-defs",
3258                 "-dialect=mesh",
3259             ],
3260             "include/mlir/Dialect/Mesh/IR/MeshOps.cpp.inc",
3261         ),
3262         (
3263             [
3264                 "-gen-dialect-decls",
3265                 "-dialect=mesh",
3266             ],
3267             "include/mlir/Dialect/Mesh/IR/MeshDialect.h.inc",
3268         ),
3269         (
3270             [
3271                 "-gen-dialect-defs",
3272                 "-dialect=mesh",
3273             ],
3274             "include/mlir/Dialect/Mesh/IR/MeshDialect.cpp.inc",
3275         ),
3276         (
3277             [
3278                 "-gen-enum-decls",
3279                 "-dialect=mesh",
3280             ],
3281             "include/mlir/Dialect/Mesh/IR/MeshEnums.h.inc",
3282         ),
3283         (
3284             [
3285                 "-gen-enum-defs",
3286                 "-dialect=mesh",
3287             ],
3288             "include/mlir/Dialect/Mesh/IR/MeshEnums.cpp.inc",
3289         ),
3290         (
3291             [
3292                 "-gen-attrdef-decls",
3293                 "-dialect=mesh",
3294             ],
3295             "include/mlir/Dialect/Mesh/IR/MeshAttributes.h.inc",
3296         ),
3297         (
3298             [
3299                 "-gen-attrdef-defs",
3300                 "-dialect=mesh",
3301             ],
3302             "include/mlir/Dialect/Mesh/IR/MeshAttributes.cpp.inc",
3303         ),
3304         (
3305             [
3306                 "-gen-typedef-decls",
3307                 "-typedefs-dialect=mesh",
3308             ],
3309             "include/mlir/Dialect/Mesh/IR/MeshTypes.h.inc",
3310         ),
3311         (
3312             [
3313                 "-gen-typedef-defs",
3314                 "-typedefs-dialect=mesh",
3315             ],
3316             "include/mlir/Dialect/Mesh/IR/MeshTypes.cpp.inc",
3317         ),
3318     ],
3319     tblgen = ":mlir-tblgen",
3320     td_file = "include/mlir/Dialect/Mesh/IR/MeshOps.td",
3321     deps = [
3322         ":MeshTdFiles",
3323         ":ShapeOpsTdFiles",
3324     ],
3327 gentbl_cc_library(
3328     name = "MeshShardingInterfaceIncGen",
3329     tbl_outs = [
3330         (
3331             ["-gen-op-interface-decls"],
3332             "include/mlir/Dialect/Mesh/Interfaces/ShardingInterface.h.inc",
3333         ),
3334         (
3335             ["-gen-op-interface-defs"],
3336             "include/mlir/Dialect/Mesh/Interfaces/ShardingInterface.cpp.inc",
3337         ),
3338     ],
3339     tblgen = ":mlir-tblgen",
3340     td_file = "include/mlir/Dialect/Mesh/Interfaces/ShardingInterface.td",
3341     deps = [":OpBaseTdFiles"],
3344 cc_library(
3345     name = "MeshShardingInterface",
3346     srcs = ["lib/Dialect/Mesh/Interfaces/ShardingInterface.cpp"],
3347     hdrs = [
3348         "include/mlir/Dialect/Mesh/Interfaces/ShardingInterface.h",
3349         "include/mlir/Dialect/Mesh/Interfaces/ShardingInterfaceImpl.h",
3350     ],
3351     includes = ["include"],
3352     deps = [
3353         ":DialectUtils",
3354         ":IR",
3355         ":MeshDialect",
3356         ":MeshShardingInterfaceIncGen",
3357         ":Support",
3358         ":TensorDialect",
3359         "//llvm:Support",
3360     ],
3363 cc_library(
3364     name = "MeshDialect",
3365     srcs = ["lib/Dialect/Mesh/IR/MeshOps.cpp"],
3366     hdrs = [
3367         "include/mlir/Dialect/Mesh/IR/MeshDialect.h",
3368         "include/mlir/Dialect/Mesh/IR/MeshOps.h",
3369     ],
3370     includes = ["include"],
3371     deps = [
3372         ":ArithDialect",
3373         ":BytecodeOpInterface",
3374         ":DestinationStyleOpInterface",
3375         ":DialectUtils",
3376         ":IR",
3377         ":InferTypeOpInterface",
3378         ":InliningUtils",
3379         ":MeshIncGen",
3380         ":SideEffectInterfaces",
3381         ":Support",
3382         ":ViewLikeInterface",
3383         "//llvm:Support",
3384     ],
3387 gentbl_cc_library(
3388     name = "MeshTransformsPassIncGen",
3389     tbl_outs = [
3390         (
3391             [
3392                 "-gen-pass-decls",
3393                 "-name=Mesh",
3394             ],
3395             "include/mlir/Dialect/Mesh/Transforms/Passes.h.inc",
3396         ),
3397     ],
3398     tblgen = ":mlir-tblgen",
3399     td_file = "include/mlir/Dialect/Mesh/Transforms/Passes.td",
3400     deps = [":PassBaseTdFiles"],
3403 cc_library(
3404     name = "MeshTransforms",
3405     srcs = glob([
3406         "lib/Dialect/Mesh/Transforms/*.cpp",
3407         "lib/Dialect/Mesh/Transforms/*.h",
3408     ]),
3409     hdrs = glob(["include/mlir/Dialect/Mesh/Transforms/*.h"]),
3410     includes = ["include"],
3411     deps = [
3412         ":AffineDialect",
3413         ":AffineUtils",
3414         ":ArithDialect",
3415         ":ArithUtils",
3416         ":ControlFlowDialect",
3417         ":ControlFlowInterfaces",
3418         ":DialectUtils",
3419         ":FuncDialect",
3420         ":FunctionInterfaces",
3421         ":IR",
3422         ":MeshDialect",
3423         ":MeshShardingInterface",
3424         ":MeshTransformsPassIncGen",
3425         ":Pass",
3426         ":Support",
3427         ":TensorDialect",
3428         ":Transforms",
3429         "//llvm:Support",
3430     ],
3433 ##---------------------------------------------------------------------------##
3434 # NVGPU dialect.
3435 ##---------------------------------------------------------------------------##
3437 td_library(
3438     name = "NVGPUTdFiles",
3439     srcs = ["include/mlir/Dialect/NVGPU/IR/NVGPU.td"],
3440     includes = ["include"],
3441     deps = [
3442         ":InferTypeOpInterfaceTdFiles",
3443         ":SideEffectInterfacesTdFiles",
3444     ],
3447 gentbl_cc_library(
3448     name = "NVGPUIncGen",
3449     tbl_outs = [
3450         (
3451             [
3452                 "-gen-dialect-decls",
3453                 "-dialect=nvgpu",
3454             ],
3455             "include/mlir/Dialect/NVGPU/IR/NVGPUDialect.h.inc",
3456         ),
3457         (
3458             [
3459                 "-gen-dialect-defs",
3460                 "-dialect=nvgpu",
3461             ],
3462             "include/mlir/Dialect/NVGPU/IR/NVGPUDialect.cpp.inc",
3463         ),
3464         (
3465             ["-gen-op-decls"],
3466             "include/mlir/Dialect/NVGPU/IR/NVGPU.h.inc",
3467         ),
3468         (
3469             ["-gen-op-defs"],
3470             "include/mlir/Dialect/NVGPU/IR/NVGPU.cpp.inc",
3471         ),
3472         (
3473             ["-gen-op-doc"],
3474             "g3doc/Dialects/NVGPU/NVGPU.md",
3475         ),
3476         (
3477             ["-gen-typedef-decls"],
3478             "include/mlir/Dialect/NVGPU/IR/NVGPUTypes.h.inc",
3479         ),
3480         (
3481             ["-gen-typedef-defs"],
3482             "include/mlir/Dialect/NVGPU/IR/NVGPUTypes.cpp.inc",
3483         ),
3484         (
3485             ["-gen-enum-decls"],
3486             "include/mlir/Dialect/NVGPU/IR/NVGPUEnums.h.inc",
3487         ),
3488         (
3489             ["-gen-enum-defs"],
3490             "include/mlir/Dialect/NVGPU/IR/NVGPUEnums.cpp.inc",
3491         ),
3492         (
3493             ["-gen-attrdef-decls"],
3494             "include/mlir/Dialect/NVGPU/IR/NVGPUAttrDefs.h.inc",
3495         ),
3496         (
3497             ["-gen-attrdef-defs"],
3498             "include/mlir/Dialect/NVGPU/IR/NVGPUAttrDefs.cpp.inc",
3499         ),
3500     ],
3501     tblgen = ":mlir-tblgen",
3502     td_file = "include/mlir/Dialect/NVGPU/IR/NVGPU.td",
3503     deps = [":NVGPUTdFiles"],
3506 gentbl_cc_library(
3507     name = "NVGPUPassIncGen",
3508     tbl_outs = [
3509         (
3510             [
3511                 "-gen-pass-decls",
3512                 "-name=NVGPU",
3513             ],
3514             "include/mlir/Dialect/NVGPU/Transforms/Passes.h.inc",
3515         ),
3516     ],
3517     tblgen = ":mlir-tblgen",
3518     td_file = "include/mlir/Dialect/NVGPU/Transforms/Passes.td",
3519     deps = [":PassBaseTdFiles"],
3522 cc_library(
3523     name = "NVGPUDialect",
3524     srcs = ["lib/Dialect/NVGPU/IR/NVGPUDialect.cpp"],
3525     hdrs = ["include/mlir/Dialect/NVGPU/IR/NVGPUDialect.h"],
3526     includes = ["include"],
3527     deps = [
3528         ":BytecodeOpInterface",
3529         ":GPUDialect",
3530         ":IR",
3531         ":InferTypeOpInterface",
3532         ":LLVMDialect",
3533         ":NVGPUIncGen",
3534         ":SideEffectInterfaces",
3535         "//llvm:Support",
3536     ],
3539 cc_library(
3540     name = "NVGPUTransformOps",
3541     srcs = glob([
3542         "lib/Dialect/NVGPU/TransformOps/*.cpp",
3543     ]),
3544     hdrs = glob([
3545         "include/mlir/Dialect/NVGPU/TransformOps/*.h",
3546     ]),
3547     includes = ["include"],
3548     deps = [
3549         ":AffineDialect",
3550         ":Analysis",
3551         ":ArithDialect",
3552         ":ArithUtils",
3553         ":DialectUtils",
3554         ":GPUDialect",
3555         ":GPUToGPURuntimeTransforms",
3556         ":IR",
3557         ":LLVMCommonConversion",
3558         ":LinalgDialect",
3559         ":MemRefDialect",
3560         ":NVGPUDialect",
3561         ":NVGPUToNVVM",
3562         ":NVGPUTransformOpsIncGen",
3563         ":NVGPUTransforms",
3564         ":NVVMDialect",
3565         ":SCFDialect",
3566         ":SCFTransforms",
3567         ":TransformDialect",
3568         ":TransformDialectInterfaces",
3569         ":VectorDialect",
3570         "//llvm:Support",
3571     ],
3574 td_library(
3575     name = "NVGPUTransformOpsTdFiles",
3576     srcs = glob([
3577         "include/mlir/Dialect/NVGPU/TransformOps/*.td",
3578     ]),
3579     includes = ["include"],
3580     deps = [
3581         ":TransformDialectTdFiles",
3582     ],
3585 gentbl_cc_library(
3586     name = "NVGPUTransformOpsIncGen",
3587     tbl_outs = [
3588         (
3589             ["-gen-op-decls"],
3590             "include/mlir/Dialect/NVGPU/TransformOps/NVGPUTransformOps.h.inc",
3591         ),
3592         (
3593             ["-gen-op-defs"],
3594             "include/mlir/Dialect/NVGPU/TransformOps/NVGPUTransformOps.cpp.inc",
3595         ),
3596     ],
3597     tblgen = ":mlir-tblgen",
3598     td_file = "include/mlir/Dialect/NVGPU/TransformOps/NVGPUTransformOps.td",
3599     deps = [
3600         ":NVGPUTransformOpsTdFiles",
3601     ],
3604 cc_library(
3605     name = "NVGPUUtils",
3606     srcs = ["lib/Dialect/NVGPU/Utils/MMAUtils.cpp"],
3607     hdrs = ["include/mlir/Dialect/NVGPU/Utils/MMAUtils.h"],
3608     includes = ["include"],
3609     deps = [
3610         ":AffineDialect",
3611         ":ArithDialect",
3612         ":IR",
3613         ":NVGPUDialect",
3614         ":NVVMDialect",
3615         ":VectorDialect",
3616     ],
3619 cc_library(
3620     name = "NVGPUTransforms",
3621     srcs = glob([
3622         "lib/Dialect/NVGPU/Transforms/*.cpp",
3623     ]),
3624     hdrs = glob([
3625         "include/mlir/Dialect/NVGPU/Transforms/*.h",
3626     ]),
3627     includes = ["include"],
3628     deps = [
3629         ":ArithDialect",
3630         ":GPUDialect",
3631         ":IR",
3632         ":MemRefDialect",
3633         ":NVGPUDialect",
3634         ":NVGPUPassIncGen",
3635         ":Pass",
3636         ":SideEffectInterfaces",
3637         ":Support",
3638         ":VectorDialect",
3639         "//llvm:Support",
3640     ],
3643 ##---------------------------------------------------------------------------##
3644 # XeGPU dialect.
3645 ##---------------------------------------------------------------------------##
3647 td_library(
3648     name = "XeGPUTdFiles",
3649     srcs = glob(["include/mlir/Dialect/XeGPU/IR/*.td"]),
3650     includes = ["include"],
3651     deps = [
3652         ":BuiltinDialectTdFiles",
3653         ":OpBaseTdFiles",
3654         ":ShapedOpInterfacesTdFiles",
3655         ":ViewLikeInterfaceTdFiles",
3656     ],
3659 gentbl_cc_library(
3660     name = "XeGPUIncGen",
3661     tbl_outs = [
3662         (
3663             [
3664                 "-gen-dialect-decls",
3665                 "-dialect=xegpu",
3666             ],
3667             "include/mlir/Dialect/XeGPU/IR/XeGPUDialect.h.inc",
3668         ),
3669         (
3670             [
3671                 "-gen-dialect-defs",
3672                 "-dialect=xegpu",
3673             ],
3674             "include/mlir/Dialect/XeGPU/IR/XeGPUDialect.cpp.inc",
3675         ),
3676         (
3677             ["-gen-op-decls"],
3678             "include/mlir/Dialect/XeGPU/IR/XeGPU.h.inc",
3679         ),
3680         (
3681             ["-gen-op-defs"],
3682             "include/mlir/Dialect/XeGPU/IR/XeGPU.cpp.inc",
3683         ),
3684         (
3685             ["-gen-op-doc"],
3686             "g3doc/Dialects/XeGPU/XeGPU.md",
3687         ),
3688         (
3689             [
3690                 "-gen-typedef-decls",
3691                 "-typedefs-dialect=xegpu",
3692             ],
3693             "include/mlir/Dialect/XeGPU/IR/XeGPUTypes.h.inc",
3694         ),
3695         (
3696             [
3697                 "-gen-typedef-defs",
3698                 "-typedefs-dialect=xegpu",
3699             ],
3700             "include/mlir/Dialect/XeGPU/IR/XeGPUTypes.cpp.inc",
3701         ),
3702         (
3703             [
3704                 "-gen-attrdef-decls",
3705                 "-attrdefs-dialect=xegpu",
3706             ],
3707             "include/mlir/Dialect/XeGPU/IR/XeGPUAttrs.h.inc",
3708         ),
3709         (
3710             [
3711                 "-gen-attrdef-defs",
3712                 "-attrdefs-dialect=xegpu",
3713             ],
3714             "include/mlir/Dialect/XeGPU/IR/XeGPUAttrs.cpp.inc",
3715         ),
3716     ],
3717     tblgen = ":mlir-tblgen",
3718     td_file = "include/mlir/Dialect/XeGPU/IR/XeGPU.td",
3719     deps = [
3720         ":ArithOpsTdFiles",
3721         ":XeGPUTdFiles",
3722     ],
3725 td_library(
3726     name = "XeGPUAttrTdFiles",
3727     srcs = [
3728         "include/mlir/Dialect/XeGPU/IR/XeGPUAttrs.td",
3729         "include/mlir/Dialect/XeGPU/IR/XeGPUDialect.td",
3730     ],
3731     includes = ["include"],
3732     deps = [
3733         ":BuiltinDialectTdFiles",
3734         ":OpBaseTdFiles",
3735         ":ShapedOpInterfacesTdFiles",
3736         ":ViewLikeInterfaceTdFiles",
3737     ],
3740 # Separated from the XeGPUIncGen target because the enum declaration causes
3741 # duplicate declarations with the Arith enums.
3742 gentbl_cc_library(
3743     name = "XeGPUEnumsIncGen",
3744     tbl_outs = [
3745         (
3746             ["-gen-enum-decls"],
3747             "include/mlir/Dialect/XeGPU/IR/XeGPUEnums.h.inc",
3748         ),
3749         (
3750             ["-gen-enum-defs"],
3751             "include/mlir/Dialect/XeGPU/IR/XeGPUEnums.cpp.inc",
3752         ),
3753     ],
3754     tblgen = ":mlir-tblgen",
3755     td_file = "include/mlir/Dialect/XeGPU/IR/XeGPUAttrs.td",
3756     deps = [":XeGPUAttrTdFiles"],
3759 cc_library(
3760     name = "XeGPUDialect",
3761     srcs = [
3762         "lib/Dialect/XeGPU/IR/XeGPUDialect.cpp",
3763         "lib/Dialect/XeGPU/IR/XeGPUOps.cpp",
3764     ],
3765     hdrs = ["include/mlir/Dialect/XeGPU/IR/XeGPU.h"],
3766     includes = ["include"],
3767     deps = [
3768         ":ArithDialect",
3769         ":ArithUtils",
3770         ":BytecodeOpInterface",
3771         ":DialectUtils",
3772         ":IR",
3773         ":MaskableOpInterface",
3774         ":ShapedOpInterfaces",
3775         ":SideEffectInterfaces",
3776         ":VectorDialect",
3777         ":ViewLikeInterface",
3778         ":XeGPUEnumsIncGen",
3779         ":XeGPUIncGen",
3780         "//llvm:Support",
3781     ],
3784 gentbl_cc_library(
3785     name = "XeGPUPassIncGen",
3786     tbl_outs = [
3787         (
3788             [
3789                 "-gen-pass-decls",
3790                 "-name=XeGPU",
3791             ],
3792             "include/mlir/Dialect/XeGPU/Transforms/Passes.h.inc",
3793         ),
3794     ],
3795     tblgen = ":mlir-tblgen",
3796     td_file = "include/mlir/Dialect/XeGPU/Transforms/Passes.td",
3797     deps = [":PassBaseTdFiles"],
3800 cc_library(
3801     name = "XeGPUTransforms",
3802     srcs = glob([
3803         "lib/Dialect/XeGPU/Transforms/*.cpp",
3804     ]),
3805     hdrs = glob([
3806         "include/mlir/Dialect/XeGPU/Transforms/*.h",
3807     ]),
3808     includes = ["include"],
3809     deps = [
3810         ":AffineUtils",
3811         ":IR",
3812         ":MemRefDialect",
3813         ":Pass",
3814         ":SideEffectInterfaces",
3815         ":Support",
3816         ":TransformUtils",
3817         ":XeGPUDialect",
3818         ":XeGPUPassIncGen",
3819         "//llvm:Support",
3820     ],
3823 td_library(
3824     name = "FuncTdFiles",
3825     srcs = [
3826         "include/mlir/Dialect/Func/IR/FuncOps.td",
3827     ],
3828     includes = ["include"],
3829     deps = [
3830         ":AttrTdFiles",
3831         ":CallInterfacesTdFiles",
3832         ":CastInterfacesTdFiles",
3833         ":ControlFlowInterfacesTdFiles",
3834         ":FunctionInterfacesTdFiles",
3835         ":InferTypeOpInterfaceTdFiles",
3836         ":OpBaseTdFiles",
3837         ":SideEffectInterfacesTdFiles",
3838         ":VectorInterfacesTdFiles",
3839     ],
3842 gentbl_cc_library(
3843     name = "FuncIncGen",
3844     tbl_outs = [
3845         (
3846             ["-gen-op-decls"],
3847             "include/mlir/Dialect/Func/IR/FuncOps.h.inc",
3848         ),
3849         (
3850             ["-gen-op-defs"],
3851             "include/mlir/Dialect/Func/IR/FuncOps.cpp.inc",
3852         ),
3853         (
3854             ["-gen-dialect-decls"],
3855             "include/mlir/Dialect/Func/IR/FuncOpsDialect.h.inc",
3856         ),
3857         (
3858             ["-gen-dialect-defs"],
3859             "include/mlir/Dialect/Func/IR/FuncOpsDialect.cpp.inc",
3860         ),
3861         (
3862             ["-gen-enum-decls"],
3863             "include/mlir/Dialect/Func/IR/FuncOpsEnums.h.inc",
3864         ),
3865         (
3866             ["-gen-enum-defs"],
3867             "include/mlir/Dialect/Func/IR/FuncOpsEnums.cpp.inc",
3868         ),
3869     ],
3870     tblgen = ":mlir-tblgen",
3871     td_file = "include/mlir/Dialect/Func/IR/FuncOps.td",
3872     deps = [":FuncTdFiles"],
3875 cc_library(
3876     name = "Dialect",
3877     srcs = glob([
3878         "lib/Dialect/*.cpp",
3879     ]),
3880     hdrs = glob(
3881         include = ["include/mlir/Dialect/*.h"],
3882         exclude = ["include/mlir/Dialect/CommonFolders.h"],
3883     ),
3884     includes = ["include"],
3885     deps = [
3886         ":IR",
3887         "//llvm:Support",
3888     ],
3891 td_library(
3892     name = "DialectUtilsTdFiles",
3893     srcs = [
3894         "include/mlir/Dialect/Utils/StructuredOpsUtils.td",
3895     ],
3896     includes = ["include"],
3897     deps = [":OpBaseTdFiles"],
3900 gentbl_cc_library(
3901     name = "DialectUtilsIncGen",
3902     tbl_outs = [
3903         (
3904             ["-gen-enum-decls"],
3905             "include/mlir/Dialect/Utils/DialectUtilsEnums.h.inc",
3906         ),
3907         (
3908             ["-gen-enum-defs"],
3909             "include/mlir/Dialect/Utils/DialectUtilsEnums.cpp.inc",
3910         ),
3911     ],
3912     tblgen = ":mlir-tblgen",
3913     td_file = "include/mlir/Dialect/Utils/StructuredOpsUtils.td",
3914     deps = [":DialectUtilsTdFiles"],
3917 cc_library(
3918     name = "DialectUtils",
3919     srcs = glob([
3920         "lib/Dialect/Utils/*.cpp",
3921     ]),
3922     hdrs = glob([
3923         "include/mlir/Dialect/Utils/*.h",
3924     ]),
3925     includes = ["include"],
3926     deps = [
3927         ":DialectUtilsIncGen",
3928         ":IR",
3929         ":Support",
3930         "//llvm:Support",
3931     ],
3934 cc_library(
3935     name = "AffineDialect",
3936     srcs = glob([
3937         "lib/Dialect/Affine/IR/*.cpp",
3938     ]),
3939     hdrs = glob([
3940         "include/mlir/Dialect/Affine/IR/*.h",
3941     ]),
3942     includes = ["include"],
3943     deps = [
3944         ":AffineMemoryOpInterfacesIncGen",
3945         ":AffineOpsIncGen",
3946         ":ArithDialect",
3947         ":ControlFlowInterfaces",
3948         ":DialectUtils",
3949         ":IR",
3950         ":InliningUtils",
3951         ":LoopLikeInterface",
3952         ":MemRefDialect",
3953         ":ShapedOpInterfaces",
3954         ":Support",
3955         ":UBDialect",
3956         ":ValueBoundsOpInterface",
3957         "//llvm:Support",
3958     ],
3961 cc_library(
3962     name = "EmitCDialect",
3963     srcs = glob([
3964         "lib/Dialect/EmitC/IR/*.cpp",
3965     ]),
3966     hdrs = glob([
3967         "include/mlir/Dialect/EmitC/IR/*.h",
3968     ]),
3969     includes = ["include"],
3970     deps = [
3971         ":BytecodeOpInterface",
3972         ":CastInterfaces",
3973         ":ControlFlowInterfaces",
3974         ":EmitCAttributesIncGen",
3975         ":EmitCOpsIncGen",
3976         ":FunctionInterfaces",
3977         ":IR",
3978         ":SideEffectInterfaces",
3979         "//llvm:Support",
3980     ],
3983 cc_library(
3984     name = "EmitCTransforms",
3985     srcs = glob([
3986         "lib/Dialect/EmitC/Transforms/*.cpp",
3987     ]),
3988     hdrs = glob([
3989         "include/mlir/Dialect/EmitC/Transforms/*.h",
3990     ]),
3991     includes = ["include"],
3992     deps = [
3993         ":EmitCDialect",
3994         ":EmitCPassIncGen",
3995         ":IR",
3996         ":Pass",
3997         ":TransformUtils",
3998         "//llvm:Support",
3999     ],
4002 cc_library(
4003     name = "AsyncDialect",
4004     srcs = glob([
4005         "lib/Dialect/Async/IR/*.cpp",
4006     ]),
4007     hdrs = glob([
4008         "include/mlir/Dialect/Async/IR/*.h",
4009     ]),
4010     includes = ["include"],
4011     deps = [
4012         ":AsyncOpsIncGen",
4013         ":BytecodeOpInterface",
4014         ":CallOpInterfaces",
4015         ":ControlFlowInterfaces",
4016         ":FunctionInterfaces",
4017         ":IR",
4018         ":InferTypeOpInterface",
4019         ":SideEffectInterfaces",
4020         "//llvm:Support",
4021     ],
4024 cc_library(
4025     name = "AsyncTransforms",
4026     srcs = glob([
4027         "lib/Dialect/Async/Transforms/*.cpp",
4028         "lib/Dialect/Async/Transforms/*.h",
4029     ]),
4030     hdrs = [
4031         "include/mlir/Dialect/Async/Passes.h",
4032         "include/mlir/Dialect/Async/Transforms.h",
4033     ],
4034     includes = ["include"],
4035     deps = [
4036         ":Analysis",
4037         ":ArithDialect",
4038         ":AsyncDialect",
4039         ":AsyncPassIncGen",
4040         ":ControlFlowDialect",
4041         ":FuncDialect",
4042         ":IR",
4043         ":Pass",
4044         ":SCFDialect",
4045         ":SCFToControlFlow",
4046         ":Support",
4047         ":TransformUtils",
4048         "//llvm:Support",
4049     ],
4052 cc_library(
4053     name = "AffineAnalysis",
4054     srcs = glob([
4055         "lib/Dialect/Affine/Analysis/*.cpp",
4056     ]),
4057     hdrs = glob(["include/mlir/Dialect/Affine/Analysis/*.h"]),
4058     includes = ["include"],
4059     deps = [
4060         ":AffineDialect",
4061         ":Analysis",
4062         ":ArithDialect",
4063         ":CallOpInterfaces",
4064         ":DialectUtils",
4065         ":IR",
4066         ":SideEffectInterfaces",
4067         ":Support",
4068         ":ViewLikeInterface",
4069         "//llvm:Support",
4070     ],
4073 cc_library(
4074     name = "AffineUtils",
4075     srcs = glob(
4076         [
4077             "lib/Dialect/Affine/Utils/*.cpp",
4078         ],
4079     ),
4080     hdrs = [
4081         "include/mlir/Dialect/Affine/LoopFusionUtils.h",
4082         "include/mlir/Dialect/Affine/LoopUtils.h",
4083         "include/mlir/Dialect/Affine/Utils.h",
4084         "include/mlir/Dialect/Affine/ViewLikeInterfaceUtils.h",
4085     ],
4086     includes = ["include"],
4087     deps = [
4088         ":AffineAnalysis",
4089         ":AffineDialect",
4090         ":Analysis",
4091         ":ArithUtils",
4092         ":DialectUtils",
4093         ":FuncDialect",
4094         ":IR",
4095         ":MemRefDialect",
4096         ":SCFDialect",
4097         ":Support",
4098         ":TransformUtils",
4099         ":ViewLikeInterface",
4100         "//llvm:Support",
4101     ],
4104 gentbl_cc_library(
4105     name = "AffinePassIncGen",
4106     tbl_outs = [
4107         (
4108             [
4109                 "-gen-pass-decls",
4110                 "-name=Affine",
4111             ],
4112             "include/mlir/Dialect/Affine/Passes.h.inc",
4113         ),
4114     ],
4115     tblgen = ":mlir-tblgen",
4116     td_file = "include/mlir/Dialect/Affine/Passes.td",
4117     deps = [":PassBaseTdFiles"],
4120 cc_library(
4121     name = "AffineTransforms",
4122     srcs = glob([
4123         "lib/Dialect/Affine/Transforms/*.cpp",
4124     ]),
4125     hdrs = [
4126         "include/mlir/Dialect/Affine/Passes.h",
4127         "include/mlir/Dialect/Affine/Transforms/Transforms.h",
4128     ],
4129     includes = ["include"],
4130     deps = [
4131         ":AffineAnalysis",
4132         ":AffineDialect",
4133         ":AffinePassIncGen",
4134         ":AffineUtils",
4135         ":Analysis",
4136         ":ArithDialect",
4137         ":ArithUtils",
4138         ":FuncDialect",
4139         ":IR",
4140         ":MemRefDialect",
4141         ":Pass",
4142         ":SCFDialect",
4143         ":SCFUtils",
4144         ":SideEffectInterfaces",
4145         ":Support",
4146         ":TensorDialect",
4147         ":TransformUtils",
4148         ":Transforms",
4149         ":ValueBoundsOpInterface",
4150         ":VectorDialect",
4151         ":VectorUtils",
4152         "//llvm:Support",
4153     ],
4156 gentbl_cc_library(
4157     name = "ConversionPassIncGen",
4158     tbl_outs = [
4159         (
4160             [
4161                 "-gen-pass-decls",
4162                 "-name=Conversion",
4163             ],
4164             "include/mlir/Conversion/Passes.h.inc",
4165         ),
4166         (
4167             [
4168                 "-gen-pass-capi-header",
4169                 "--prefix=Conversion",
4170             ],
4171             "include/mlir/Conversion/Passes.capi.h.inc",
4172         ),
4173         (
4174             [
4175                 "-gen-pass-capi-impl",
4176                 "--prefix=Conversion",
4177             ],
4178             "include/mlir/Conversion/Passes.capi.cpp.inc",
4179         ),
4180     ],
4181     tblgen = ":mlir-tblgen",
4182     td_file = "include/mlir/Conversion/Passes.td",
4183     deps = [":PassBaseTdFiles"],
4186 cc_library(
4187     name = "ConversionPasses",
4188     hdrs = ["include/mlir/Conversion/Passes.h"],
4189     includes = ["include"],
4190     deps = [
4191         ":AMDGPUToROCDL",
4192         ":AffineToStandard",
4193         ":ArithToAMDGPU",
4194         ":ArithToArmSME",
4195         ":ArithToEmitC",
4196         ":ArithToLLVM",
4197         ":ArithToSPIRV",
4198         ":ArmNeon2dToIntr",
4199         ":ArmSMEToLLVM",
4200         ":ArmSMEToSCF",
4201         ":AsyncToLLVM",
4202         ":BufferizationToMemRef",
4203         ":ComplexToLLVM",
4204         ":ComplexToLibm",
4205         ":ComplexToSPIRV",
4206         ":ComplexToStandard",
4207         ":ControlFlowToLLVM",
4208         ":ControlFlowToSCF",
4209         ":ControlFlowToSPIRV",
4210         ":ConversionPassIncGen",
4211         ":ConvertToLLVM",
4212         ":ConvertToSPIRV",
4213         ":FuncToEmitC",
4214         ":FuncToLLVM",
4215         ":FuncToSPIRV",
4216         ":GPUToGPURuntimeTransforms",
4217         ":GPUToLLVMSPVTransforms",
4218         ":GPUToNVVMTransforms",
4219         ":GPUToROCDLTransforms",
4220         ":GPUToSPIRV",
4221         ":GPUToVulkanTransforms",
4222         ":IndexToLLVM",
4223         ":IndexToSPIRV",
4224         ":LinalgToStandard",
4225         ":MathToFuncs",
4226         ":MathToLLVM",
4227         ":MathToLibm",
4228         ":MathToROCDL",
4229         ":MathToSPIRV",
4230         ":MemRefToEmitC",
4231         ":MemRefToLLVM",
4232         ":MemRefToSPIRV",
4233         ":NVGPUToNVVM",
4234         ":NVVMToLLVM",
4235         ":OpenACCToSCF",
4236         ":OpenMPToLLVM",
4237         ":PDLToPDLInterp",
4238         ":ReconcileUnrealizedCasts",
4239         ":SCFToControlFlow",
4240         ":SCFToEmitC",
4241         ":SCFToGPU",
4242         ":SCFToOpenMP",
4243         ":SCFToSPIRV",
4244         ":SPIRVToLLVM",
4245         ":ShapeToStandard",
4246         ":TensorToLinalg",
4247         ":TensorToSPIRV",
4248         ":TosaToArith",
4249         ":TosaToLinalg",
4250         ":TosaToMLProgram",
4251         ":TosaToSCF",
4252         ":TosaToTensor",
4253         ":UBToLLVM",
4254         ":UBToSPIRV",
4255         ":VectorToArmSME",
4256         ":VectorToGPU",
4257         ":VectorToLLVM",
4258         ":VectorToSCF",
4259         ":VectorToSPIRV",
4260         ":VectorToXeGPU",
4261     ],
4264 cc_library(
4265     name = "AsyncToLLVM",
4266     srcs = glob([
4267         "lib/Conversion/AsyncToLLVM/*.cpp",
4268     ]),
4269     hdrs = glob(["include/mlir/Conversion/AsyncToLLVM/*.h"]),
4270     includes = ["include"],
4271     deps = [
4272         ":ArithDialect",
4273         ":AsyncDialect",
4274         ":ConversionPassIncGen",
4275         ":ConvertToLLVMInterface",
4276         ":FuncDialect",
4277         ":FuncToLLVM",
4278         ":FuncTransforms",
4279         ":IR",
4280         ":LLVMCommonConversion",
4281         ":LLVMDialect",
4282         ":Pass",
4283         ":TransformUtils",
4284         "//llvm:Support",
4285     ],
4288 cc_library(
4289     name = "AffineToStandard",
4290     srcs = glob([
4291         "lib/Conversion/AffineToStandard/*.cpp",
4292     ]),
4293     hdrs = glob(["include/mlir/Conversion/AffineToStandard/*.h"]),
4294     includes = ["include"],
4295     deps = [
4296         ":AffineDialect",
4297         ":AffineTransforms",
4298         ":AffineUtils",
4299         ":ConversionPassIncGen",
4300         ":IR",
4301         ":MemRefDialect",
4302         ":SCFDialect",
4303         ":Support",
4304         ":TransformUtils",
4305         ":Transforms",
4306         ":VectorDialect",
4307     ],
4310 cc_library(
4311     name = "SCFDialect",
4312     srcs = glob(
4313         [
4314             "lib/Dialect/SCF/IR/*.cpp",
4315         ],
4316     ),
4317     hdrs = glob(
4318         [
4319             "include/mlir/Dialect/SCF/IR/*.h",
4320         ],
4321     ),
4322     includes = ["include"],
4323     deps = [
4324         ":ArithDialect",
4325         ":ArithUtils",
4326         ":BufferizationInterfaces",
4327         ":ControlFlowDialect",
4328         ":ControlFlowInterfaces",
4329         ":DestinationStyleOpInterface",
4330         ":FunctionInterfaces",
4331         ":IR",
4332         ":InferTypeOpInterface",
4333         ":InliningUtils",
4334         ":LoopLikeInterface",
4335         ":MemRefDialect",
4336         ":ParallelCombiningOpInterface",
4337         ":SCFDeviceMappingInterfacesIncGen",
4338         ":SCFIncGen",
4339         ":SideEffectInterfaces",
4340         ":Support",
4341         ":TensorDialect",
4342         ":ValueBoundsOpInterface",
4343         ":ViewLikeInterface",
4344         "//llvm:Support",
4345     ],
4348 cc_library(
4349     name = "SCFUtils",
4350     srcs = glob(
4351         [
4352             "lib/Dialect/SCF/Utils/*.cpp",
4353         ],
4354     ),
4355     hdrs = glob(
4356         [
4357             "include/mlir/Dialect/SCF/Utils/*.h",
4358         ],
4359     ),
4360     includes = ["include"],
4361     deps = [
4362         ":AffineAnalysis",
4363         ":AffineDialect",
4364         ":Analysis",
4365         ":ArithDialect",
4366         ":ArithUtils",
4367         ":DialectUtils",
4368         ":FuncDialect",
4369         ":IR",
4370         ":SCFDialect",
4371         ":SideEffectInterfaces",
4372         ":Support",
4373         ":TransformUtils",
4374         "//llvm:Support",
4375     ],
4378 cc_library(
4379     name = "InferIntRangeCommon",
4380     srcs = [
4381         "lib/Interfaces/Utils/InferIntRangeCommon.cpp",
4382     ],
4383     hdrs = ["include/mlir/Interfaces/Utils/InferIntRangeCommon.h"],
4384     includes = ["include"],
4385     deps = [
4386         ":InferIntRangeInterface",
4387         "//llvm:Support",
4388     ],
4391 cc_library(
4392     name = "DataLayoutInterfaces",
4393     srcs = ["lib/Interfaces/DataLayoutInterfaces.cpp"],
4394     hdrs = ["include/mlir/Interfaces/DataLayoutInterfaces.h"],
4395     includes = ["include"],
4396     deps = [
4397         ":DataLayoutInterfacesIncGen",
4398         ":IR",
4399         "//llvm:Support",
4400     ],
4403 cc_library(
4404     name = "InliningUtils",
4405     srcs = ["lib/Transforms/Utils/InliningUtils.cpp"],
4406     hdrs = ["include/mlir/Transforms/InliningUtils.h"],
4407     includes = ["include"],
4408     deps = [
4409         ":CallOpInterfaces",
4410         ":IR",
4411         "//llvm:Support",
4412     ],
4415 cc_library(
4416     name = "LoopLikeInterface",
4417     srcs = ["lib/Interfaces/LoopLikeInterface.cpp"],
4418     hdrs = ["include/mlir/Interfaces/LoopLikeInterface.h"],
4419     includes = ["include"],
4420     deps = [
4421         ":FunctionInterfaces",
4422         ":IR",
4423         ":LoopLikeInterfaceIncGen",
4424         "//llvm:Support",
4425     ],
4428 cc_library(
4429     name = "MemorySlotInterfaces",
4430     srcs = ["lib/Interfaces/MemorySlotInterfaces.cpp"],
4431     hdrs = ["include/mlir/Interfaces/MemorySlotInterfaces.h"],
4432     includes = ["include"],
4433     deps = [
4434         ":IR",
4435         ":MemorySlotInterfacesIncGen",
4436     ],
4439 cc_library(
4440     name = "ShapedOpInterfaces",
4441     srcs = ["lib/Interfaces/ShapedOpInterfaces.cpp"],
4442     hdrs = ["include/mlir/Interfaces/ShapedOpInterfaces.h"],
4443     includes = ["include"],
4444     deps = [
4445         ":IR",
4446         ":ShapedOpInterfacesIncGen",
4447     ],
4450 cc_library(
4451     name = "ParallelCombiningOpInterface",
4452     srcs = ["lib/Interfaces/ParallelCombiningOpInterface.cpp"],
4453     hdrs = ["include/mlir/Interfaces/ParallelCombiningOpInterface.h"],
4454     includes = ["include"],
4455     deps = [
4456         ":IR",
4457         ":ParallelCombiningOpInterfaceIncGen",
4458     ],
4461 cc_library(
4462     name = "RuntimeVerifiableOpInterface",
4463     srcs = ["lib/Interfaces/RuntimeVerifiableOpInterface.cpp"],
4464     hdrs = ["include/mlir/Interfaces/RuntimeVerifiableOpInterface.h"],
4465     includes = ["include"],
4466     deps = [
4467         ":IR",
4468         ":RuntimeVerifiableOpInterfaceIncGen",
4469     ],
4472 cc_library(
4473     name = "VectorInterfaces",
4474     srcs = ["lib/Interfaces/VectorInterfaces.cpp"],
4475     hdrs = ["include/mlir/Interfaces/VectorInterfaces.h"],
4476     includes = ["include"],
4477     deps = [
4478         ":IR",
4479         ":VectorInterfacesIncGen",
4480     ],
4483 cc_library(
4484     name = "ViewLikeInterface",
4485     srcs = ["lib/Interfaces/ViewLikeInterface.cpp"],
4486     hdrs = ["include/mlir/Interfaces/ViewLikeInterface.h"],
4487     includes = ["include"],
4488     deps = [
4489         ":DialectUtils",
4490         ":IR",
4491         ":ViewLikeInterfaceIncGen",
4492     ],
4495 cc_library(
4496     name = "CopyOpInterface",
4497     srcs = ["lib/Interfaces/CopyOpInterface.cpp"],
4498     hdrs = ["include/mlir/Interfaces/CopyOpInterface.h"],
4499     includes = ["include"],
4500     deps = [
4501         ":CopyOpInterfaceIncGen",
4502         ":IR",
4503     ],
4506 td_library(
4507     name = "ShapeOpsTdFiles",
4508     srcs = [
4509         "include/mlir/Dialect/Shape/IR/ShapeBase.td",
4510         "include/mlir/Dialect/Shape/IR/ShapeOps.td",
4511     ],
4512     includes = ["include"],
4513     deps = [
4514         ":CallInterfacesTdFiles",
4515         ":CastInterfacesTdFiles",
4516         ":ControlFlowInterfacesTdFiles",
4517         ":FunctionInterfacesTdFiles",
4518         ":InferTypeOpInterfaceTdFiles",
4519         ":SideEffectInterfacesTdFiles",
4520     ],
4523 gentbl_cc_library(
4524     name = "ShapeOpsIncGen",
4525     tbl_outs = [
4526         (
4527             ["-gen-op-decls"],
4528             "include/mlir/Dialect/Shape/IR/ShapeOps.h.inc",
4529         ),
4530         (
4531             ["-gen-op-defs"],
4532             "include/mlir/Dialect/Shape/IR/ShapeOps.cpp.inc",
4533         ),
4534         (
4535             ["-gen-dialect-decls"],
4536             "include/mlir/Dialect/Shape/IR/ShapeOpsDialect.h.inc",
4537         ),
4538         (
4539             ["-gen-dialect-defs"],
4540             "include/mlir/Dialect/Shape/IR/ShapeOpsDialect.cpp.inc",
4541         ),
4542         (
4543             ["-gen-typedef-decls"],
4544             "include/mlir/Dialect/Shape/IR/ShapeOpsTypes.h.inc",
4545         ),
4546         (
4547             ["-gen-typedef-defs"],
4548             "include/mlir/Dialect/Shape/IR/ShapeOpsTypes.cpp.inc",
4549         ),
4550     ],
4551     tblgen = ":mlir-tblgen",
4552     td_file = "include/mlir/Dialect/Shape/IR/ShapeOps.td",
4553     deps = [":ShapeOpsTdFiles"],
4556 gentbl_cc_library(
4557     name = "MLIRShapeCanonicalizationIncGen",
4558     strip_include_prefix = "include/mlir/Dialect/Shape/IR",
4559     tbl_outs = [
4560         (
4561             ["-gen-rewriters"],
4562             "include/mlir/Dialect/Shape/IR/ShapeCanonicalization.inc",
4563         ),
4564     ],
4565     tblgen = ":mlir-tblgen",
4566     td_file = "lib/Dialect/Shape/IR/ShapeCanonicalization.td",
4567     deps = [
4568         ":FuncTdFiles",
4569         ":ShapeOpsTdFiles",
4570         ":TensorOpsTdFiles",
4571     ],
4574 cc_library(
4575     name = "ShapeDialect",
4576     srcs = glob(["lib/Dialect/Shape/IR/*.cpp"]),
4577     hdrs = ["include/mlir/Dialect/Shape/IR/Shape.h"],
4578     includes = ["include"],
4579     deps = [
4580         ":ArithDialect",
4581         ":BufferizationInterfaces",
4582         ":BytecodeOpInterface",
4583         ":CallOpInterfaces",
4584         ":CastInterfaces",
4585         ":CommonFolders",
4586         ":ControlFlowInterfaces",
4587         ":Dialect",
4588         ":FunctionInterfaces",
4589         ":IR",
4590         ":InferTypeOpInterface",
4591         ":InliningUtils",
4592         ":MLIRShapeCanonicalizationIncGen",
4593         ":ShapeOpsIncGen",
4594         ":SideEffectInterfaces",
4595         ":TensorDialect",
4596         ":UBDialect",
4597         "//llvm:Support",
4598     ],
4601 gentbl_cc_library(
4602     name = "ShapeToStandardGen",
4603     strip_include_prefix = "lib/Conversion/ShapeToStandard",
4604     tbl_outs = [
4605         (
4606             ["-gen-rewriters"],
4607             "lib/Conversion/ShapeToStandard/ShapeToStandard.cpp.inc",
4608         ),
4609     ],
4610     tblgen = ":mlir-tblgen",
4611     td_file = "lib/Conversion/ShapeToStandard/ShapeToStandard.td",
4612     deps = [":ShapeOpsTdFiles"],
4615 cc_library(
4616     name = "ShapeToStandard",
4617     srcs = glob([
4618         "lib/Conversion/ShapeToStandard/*.cpp",
4619     ]),
4620     hdrs = ["include/mlir/Conversion/ShapeToStandard/ShapeToStandard.h"],
4621     includes = ["include"],
4622     deps = [
4623         ":ArithDialect",
4624         ":ControlFlowDialect",
4625         ":ConversionPassIncGen",
4626         ":FuncDialect",
4627         ":IR",
4628         ":Pass",
4629         ":SCFDialect",
4630         ":ShapeDialect",
4631         ":ShapeToStandardGen",
4632         ":TensorDialect",
4633         ":TransformUtils",
4634         "//llvm:Support",
4635     ],
4638 gentbl_cc_library(
4639     name = "ShapeTransformsPassIncGen",
4640     tbl_outs = [(
4641         [
4642             "-gen-pass-decls",
4643             "-name=Shape",
4644         ],
4645         "include/mlir/Dialect/Shape/Transforms/Passes.h.inc",
4646     )],
4647     tblgen = ":mlir-tblgen",
4648     td_file = "include/mlir/Dialect/Shape/Transforms/Passes.td",
4649     deps = [":PassBaseTdFiles"],
4652 cc_library(
4653     name = "ShapeTransforms",
4654     srcs = glob([
4655         "lib/Dialect/Shape/Transforms/*.cpp",
4656     ]),
4657     hdrs = [
4658         "include/mlir/Dialect/Shape/Analysis/ShapeMappingAnalysis.h",
4659         "include/mlir/Dialect/Shape/Transforms/BufferizableOpInterfaceImpl.h",
4660         "include/mlir/Dialect/Shape/Transforms/Passes.h",
4661     ],
4662     includes = ["include"],
4663     deps = [
4664         ":ArithDialect",
4665         ":BufferizationDialect",
4666         ":BufferizationInterfaces",
4667         ":BufferizationTransforms",
4668         ":FuncDialect",
4669         ":IR",
4670         ":MemRefDialect",
4671         ":Pass",
4672         ":ShapeDialect",
4673         ":ShapeTransformsPassIncGen",
4674         ":TensorDialect",
4675         ":TransformUtils",
4676         "//llvm:Support",
4677     ],
4680 td_library(
4681     name = "ControlFlowOpsTdFiles",
4682     srcs = [
4683         "include/mlir/Dialect/ControlFlow/IR/ControlFlowOps.td",
4684     ],
4685     includes = ["include"],
4686     deps = [
4687         ":AttrTdFiles",
4688         ":CallInterfacesTdFiles",
4689         ":CastInterfacesTdFiles",
4690         ":ControlFlowInterfacesTdFiles",
4691         ":InferTypeOpInterfaceTdFiles",
4692         ":OpBaseTdFiles",
4693         ":SideEffectInterfacesTdFiles",
4694     ],
4697 gentbl_cc_library(
4698     name = "ControlFlowOpsIncGen",
4699     tbl_outs = [
4700         (
4701             ["-gen-op-decls"],
4702             "include/mlir/Dialect/ControlFlow/IR/ControlFlowOps.h.inc",
4703         ),
4704         (
4705             ["-gen-op-defs"],
4706             "include/mlir/Dialect/ControlFlow/IR/ControlFlowOps.cpp.inc",
4707         ),
4708         (
4709             ["-gen-dialect-decls"],
4710             "include/mlir/Dialect/ControlFlow/IR/ControlFlowOpsDialect.h.inc",
4711         ),
4712         (
4713             ["-gen-dialect-defs"],
4714             "include/mlir/Dialect/ControlFlow/IR/ControlFlowOpsDialect.cpp.inc",
4715         ),
4716         (
4717             ["-gen-enum-decls"],
4718             "include/mlir/Dialect/ControlFlow/IR/ControlFlowOpsEnums.h.inc",
4719         ),
4720         (
4721             ["-gen-enum-defs"],
4722             "include/mlir/Dialect/ControlFlow/IR/ControlFlowOpsEnums.cpp.inc",
4723         ),
4724     ],
4725     tblgen = ":mlir-tblgen",
4726     td_file = "include/mlir/Dialect/ControlFlow/IR/ControlFlowOps.td",
4727     deps = [
4728         ":AttrTdFiles",
4729         ":ControlFlowOpsTdFiles",
4730     ],
4733 cc_library(
4734     name = "ControlFlowDialect",
4735     srcs = glob(
4736         [
4737             "lib/Dialect/ControlFlow/IR/*.cpp",
4738         ],
4739     ),
4740     hdrs = glob([
4741         "include/mlir/Dialect/ControlFlow/IR/*.h",
4742     ]),
4743     includes = ["include"],
4744     deps = [
4745         ":ArithDialect",
4746         ":BufferizationInterfaces",
4747         ":BytecodeOpInterface",
4748         ":ControlFlowInterfaces",
4749         ":ControlFlowOpsIncGen",
4750         ":ConvertToLLVMInterface",
4751         ":IR",
4752         ":InliningUtils",
4753         ":SideEffectInterfaces",
4754         ":Support",
4755         "//llvm:Support",
4756     ],
4759 cc_library(
4760     name = "ControlFlowTransforms",
4761     srcs = glob([
4762         "lib/Dialect/ControlFlow/Transforms/*.cpp",
4763     ]),
4764     hdrs = glob([
4765         "include/mlir/Dialect/ControlFlow/Transforms/*.h",
4766     ]),
4767     includes = ["include"],
4768     deps = [
4769         ":BufferizationDialect",
4770         ":BufferizationInterfaces",
4771         ":BufferizationTransforms",
4772         ":ControlFlowDialect",
4773         ":IR",
4774         ":MemRefDialect",
4775     ],
4778 cc_library(
4779     name = "FuncDialect",
4780     srcs = glob(
4781         [
4782             "lib/Dialect/Func/IR/*.cpp",
4783         ],
4784     ),
4785     hdrs = glob([
4786         "include/mlir/Dialect/Func/IR/*.h",
4787     ]),
4788     includes = ["include"],
4789     deps = [
4790         ":BufferizationInterfaces",
4791         ":BytecodeOpInterface",
4792         ":CallOpInterfaces",
4793         ":ControlFlowInterfaces",
4794         ":ConvertToLLVMInterface",
4795         ":FuncIncGen",
4796         ":FunctionInterfaces",
4797         ":IR",
4798         ":InferTypeOpInterface",
4799         ":InliningUtils",
4800         ":SideEffectInterfaces",
4801         ":Support",
4802         "//llvm:Support",
4803     ],
4806 cc_library(
4807     name = "FuncExtensions",
4808     srcs = glob(["lib/Dialect/Func/Extensions/*.cpp"]),
4809     hdrs = glob(["include/mlir/Dialect/Func/Extensions/*.h"]),
4810     includes = ["include"],
4811     deps = [
4812         ":ControlFlowDialect",
4813         ":FuncDialect",
4814         ":IR",
4815         ":InliningUtils",
4816         ":MeshShardingInterface",
4817     ],
4820 td_library(
4821     name = "FuncTransformOpsTdFiles",
4822     srcs = [
4823         "include/mlir/Dialect/Func/TransformOps/FuncTransformOps.td",
4824     ],
4825     includes = ["include"],
4826     deps = [
4827         ":TransformDialectTdFiles",
4828     ],
4831 gentbl_cc_library(
4832     name = "FuncTransformOpsIncGen",
4833     strip_include_prefix = "include",
4834     tbl_outs = [
4835         (
4836             ["-gen-op-decls"],
4837             "include/mlir/Dialect/Func/TransformOps/FuncTransformOps.h.inc",
4838         ),
4839         (
4840             ["-gen-op-defs"],
4841             "include/mlir/Dialect/Func/TransformOps/FuncTransformOps.cpp.inc",
4842         ),
4843     ],
4844     tblgen = ":mlir-tblgen",
4845     td_file = "include/mlir/Dialect/Func/TransformOps/FuncTransformOps.td",
4846     deps = [
4847         ":FuncTransformOpsTdFiles",
4848     ],
4851 cc_library(
4852     name = "FuncTransformOps",
4853     srcs = [
4854         "lib/Dialect/Func/TransformOps/FuncTransformOps.cpp",
4855     ],
4856     hdrs = [
4857         "include/mlir/Dialect/Func/TransformOps/FuncTransformOps.h",
4858     ],
4859     includes = ["include"],
4860     deps = [
4861         ":BytecodeOpInterface",
4862         ":FuncDialect",
4863         ":FuncToLLVM",
4864         ":FuncTransformOpsIncGen",
4865         ":IR",
4866         ":LLVMCommonConversion",
4867         ":LLVMDialect",
4868         ":TransformDialect",
4869         ":TransformDialectInterfaces",
4870         ":TransformUtils",
4871     ],
4874 cc_library(
4875     name = "AllExtensions",
4876     hdrs = ["include/mlir/InitAllExtensions.h"],
4877     deps = [
4878         ":AffineTransformOps",
4879         ":ArithToLLVM",
4880         ":AMXTransforms",
4881         ":BufferizationTransformOps",
4882         ":BuiltinToLLVMIRTranslation",
4883         ":ComplexToLLVM",
4884         ":ControlFlowToLLVM",
4885         ":DLTITransformOps",
4886         ":FuncExtensions",
4887         ":FuncToLLVM",
4888         ":FuncTransformOps",
4889         ":GPUToLLVMIRTranslation",
4890         ":GPUTransformOps",
4891         ":IndexToLLVM",
4892         ":LLVMToLLVMIRTranslation",
4893         ":LinalgTransformOps",
4894         ":MathToLLVM",
4895         ":MemRefToLLVM",
4896         ":MemRefTransformOps",
4897         ":MeshDialect",
4898         ":NVGPUTransformOps",
4899         ":NVVMTarget",
4900         ":NVVMToLLVM",
4901         ":OpenMPToLLVM",
4902         ":ROCDLTarget",
4903         ":ROCDLToLLVMIRTranslation",
4904         ":SCFTransformOps",
4905         ":SparseTensorTransformOps",
4906         ":TensorExtensions",
4907         ":TensorTransformOps",
4908         ":TransformDebugExtension",
4909         ":TransformIRDLExtension",
4910         ":TransformLoopExtension",
4911         ":TransformPDLExtension",
4912         ":UBToLLVM",
4913         ":VCIXToLLVMIRTranslation",
4914         ":VectorTransformOps",
4915     ],
4918 # TODO(zinenko): remove this after updating users.
4920 gentbl_cc_library(
4921     name = "FuncTransformsPassIncGen",
4922     tbl_outs = [(
4923         [
4924             "-gen-pass-decls",
4925             "-name=Func",
4926         ],
4927         "include/mlir/Dialect/Func/Transforms/Passes.h.inc",
4928     )],
4929     tblgen = ":mlir-tblgen",
4930     td_file = "include/mlir/Dialect/Func/Transforms/Passes.td",
4931     deps = [":PassBaseTdFiles"],
4934 cc_library(
4935     name = "FuncTransforms",
4936     srcs = glob([
4937         "lib/Dialect/Func/Transforms/*.cpp",
4938     ]),
4939     hdrs = glob(["include/mlir/Dialect/Func/Transforms/*.h"]),
4940     includes = ["include"],
4941     deps = [
4942         ":BufferizationDialect",
4943         ":BufferizationTransforms",
4944         ":FuncDialect",
4945         ":FuncTransformsPassIncGen",
4946         ":IR",
4947         ":MemRefDialect",
4948         ":Pass",
4949         ":Support",
4950         ":TransformUtils",
4951         "//llvm:Support",
4952     ],
4955 cc_library(
4956     name = "VectorDialect",
4957     srcs = glob(
4958         [
4959             "lib/Dialect/Vector/IR/*.cpp",
4960         ],
4961     ),
4962     hdrs = glob([
4963         "include/mlir/Dialect/Vector/IR/*.h",
4964     ]),
4965     includes = ["include"],
4966     deps = [
4967         ":AffineDialect",
4968         ":Analysis",
4969         ":ArithDialect",
4970         ":ArithUtils",
4971         ":BufferizationInterfaces",
4972         ":BytecodeOpInterface",
4973         ":ControlFlowInterfaces",
4974         ":DestinationStyleOpInterface",
4975         ":DialectUtils",
4976         ":IR",
4977         ":InferTypeOpInterface",
4978         ":InliningUtils",
4979         ":MaskableOpInterface",
4980         ":MaskingOpInterface",
4981         ":MemRefDialect",
4982         ":SideEffectInterfaces",
4983         ":SubsetOpInterface",
4984         ":Support",
4985         ":TensorDialect",
4986         ":ValueBoundsOpInterface",
4987         ":VectorAttributesIncGen",
4988         ":VectorDialectIncGen",
4989         ":VectorInterfaces",
4990         ":VectorOpsIncGen",
4991         ":ViewLikeInterface",
4992         "//llvm:Support",
4993     ],
4996 cc_library(
4997     name = "VectorTransformOps",
4998     srcs = [
4999         "lib/Dialect/Vector/TransformOps/VectorTransformOps.cpp",
5000     ],
5001     hdrs = [
5002         "include/mlir/Dialect/Vector/TransformOps/VectorTransformOps.h",
5003     ],
5004     includes = ["include"],
5005     deps = [
5006         ":IR",
5007         ":LLVMCommonConversion",
5008         ":LLVMDialect",
5009         ":TransformDialect",
5010         ":TransformDialectInterfaces",
5011         ":TransformUtils",
5012         ":VectorDialect",
5013         ":VectorToLLVM",
5014         ":VectorToSCF",
5015         ":VectorTransformOpsIncGen",
5016         ":VectorTransforms",
5017         ":X86VectorTransforms",
5018     ],
5021 td_library(
5022     name = "VectorTransformsTdFiles",
5023     srcs = ["include/mlir/Dialect/Vector/Transforms/VectorTransformsBase.td"],
5024     includes = ["include"],
5025     deps = [":OpBaseTdFiles"],
5028 gentbl_cc_library(
5029     name = "VectorEnumsIncGen",
5030     tbl_outs = [
5031         (
5032             ["-gen-enum-decls"],
5033             "include/mlir/Dialect/Vector/Transforms/VectorTransformsEnums.h.inc",
5034         ),
5035         (
5036             ["-gen-enum-defs"],
5037             "include/mlir/Dialect/Vector/Transforms/VectorTransformsEnums.cpp.inc",
5038         ),
5039     ],
5040     tblgen = ":mlir-tblgen",
5041     td_file = "include/mlir/Dialect/Vector/Transforms/VectorTransformsBase.td",
5042     deps = [
5043         ":OpBaseTdFiles",
5044     ],
5047 gentbl_cc_library(
5048     name = "VectorPassIncGen",
5049     tbl_outs = [
5050         (
5051             [
5052                 "-gen-pass-decls",
5053                 "-name=Vector",
5054             ],
5055             "include/mlir/Dialect/Vector/Transforms/Passes.h.inc",
5056         ),
5057     ],
5058     tblgen = ":mlir-tblgen",
5059     td_file = "include/mlir/Dialect/Vector/Transforms/Passes.td",
5060     deps = [":PassBaseTdFiles"],
5063 cc_library(
5064     name = "VectorTransforms",
5065     srcs = glob(
5066         [
5067             "lib/Dialect/Vector/Transforms/*.cpp",
5068         ],
5069     ),
5070     hdrs = glob([
5071         "include/mlir/Dialect/Vector/Transforms/*.h",
5072     ]),
5073     includes = ["include"],
5074     deps = [
5075         ":AffineDialect",
5076         ":ArithDialect",
5077         ":ArithTransforms",
5078         ":ArithUtils",
5079         ":BufferizationDialect",
5080         ":BufferizationInterfaces",
5081         ":BufferizationTransforms",
5082         ":DialectUtils",
5083         ":FuncDialect",
5084         ":FunctionInterfaces",
5085         ":IR",
5086         ":LinalgDialect",
5087         ":MemRefDialect",
5088         ":MemRefUtils",
5089         ":Pass",
5090         ":SCFDialect",
5091         ":SideEffectInterfaces",
5092         ":SubsetOpInterface",
5093         ":Support",
5094         ":TensorDialect",
5095         ":TransformUtils",
5096         ":VectorDialect",
5097         ":VectorEnumsIncGen",
5098         ":VectorInterfaces",
5099         ":VectorPassIncGen",
5100         ":VectorUtils",
5101         "//llvm:Support",
5102     ],
5105 cc_library(
5106     name = "VectorUtils",
5107     srcs = glob(
5108         [
5109             "lib/Dialect/Vector/Utils/*.cpp",
5110         ],
5111     ),
5112     hdrs = glob([
5113         "include/mlir/Dialect/Vector/Utils/*.h",
5114     ]),
5115     includes = ["include"],
5116     deps = [
5117         ":AffineAnalysis",
5118         ":AffineDialect",
5119         ":ArithDialect",
5120         ":DialectUtils",
5121         ":FuncDialect",
5122         ":IR",
5123         ":MemRefDialect",
5124         ":Support",
5125         ":TensorDialect",
5126         ":VectorDialect",
5127         "//llvm:Support",
5128     ],
5131 cc_library(
5132     name = "Support",
5133     srcs = glob([
5134         "lib/Support/*.cpp",
5135     ]),
5136     hdrs = glob(["include/mlir/Support/*.h"]),
5137     includes = ["include"],
5138     deps = ["//llvm:Support"],
5141 cc_library(
5142     name = "Debug",
5143     srcs = glob([
5144         "lib/Debug/*.cpp",
5145         "lib/Debug/BreakpointManagers/*.cpp",
5146         "lib/Debug/Observers/*.cpp",
5147     ]),
5148     hdrs = glob([
5149         "include/mlir/Debug/*.h",
5150         "include/mlir/Debug/BreakpointManagers/*.h",
5151         "include/mlir/Debug/Observers/*.h",
5152     ]),
5153     includes = ["include"],
5154     deps = [
5155         ":CAPIIR",
5156         ":IR",
5157         ":Rewrite",
5158         ":Support",
5159         "//llvm:Support",
5160     ],
5163 cc_library(
5164     name = "MlirLspServerSupportLib",
5165     srcs = glob(
5166         [
5167             "lib/Tools/lsp-server-support/*.cpp",
5168         ],
5169     ),
5170     hdrs = glob(
5171         [
5172             "include/mlir/Tools/lsp-server-support/*.h",
5173         ],
5174     ),
5175     deps = [
5176         ":Support",
5177         "//llvm:Support",
5178     ],
5181 cc_library(
5182     name = "MlirLspServerLib",
5183     srcs = glob(
5184         [
5185             "lib/Tools/mlir-lsp-server/*.cpp",
5186             "lib/Tools/mlir-lsp-server/*.h",
5187         ],
5188     ),
5189     hdrs = glob(
5190         ["include/mlir/Tools/mlir-lsp-server/*.h"],
5191     ),
5192     includes = ["include"],
5193     deps = [
5194         ":AsmParser",
5195         ":BytecodeWriter",
5196         ":FunctionInterfaces",
5197         ":IR",
5198         ":MlirLspServerSupportLib",
5199         ":Parser",
5200         ":Support",
5201         "//llvm:Support",
5202     ],
5205 cc_library(
5206     name = "MlirPdllLspServerLib",
5207     srcs = glob(
5208         [
5209             "lib/Tools/mlir-pdll-lsp-server/*.cpp",
5210             "lib/Tools/mlir-pdll-lsp-server/*.h",
5211         ],
5212     ),
5213     hdrs = glob(
5214         ["include/mlir/Tools/mlir-pdll-lsp-server/*.h"],
5215     ),
5216     includes = ["include"],
5217     deps = [
5218         ":IR",
5219         ":MlirLspServerSupportLib",
5220         ":PDLLAST",
5221         ":PDLLCodeGen",
5222         ":PDLLODS",
5223         ":PDLLParser",
5224         ":Support",
5225         "//llvm:Support",
5226     ],
5229 cc_library(
5230     name = "TableGenLspServerLib",
5231     srcs = glob([
5232         "lib/Tools/tblgen-lsp-server/*.cpp",
5233         "lib/Tools/tblgen-lsp-server/*.h",
5234     ]),
5235     hdrs = glob(["include/mlir/Tools/tblgen-lsp-server/*.h"]),
5236     includes = ["include"],
5237     deps = [
5238         ":MlirLspServerSupportLib",
5239         ":Support",
5240         "//llvm:Support",
5241         "//llvm:TableGen",
5242     ],
5245 cc_binary(
5246     name = "tblgen-lsp-server",
5247     srcs = ["tools/tblgen-lsp-server/tblgen-lsp-server.cpp"],
5248     includes = ["include"],
5249     deps = [
5250         ":Support",
5251         ":TableGenLspServerLib",
5252     ],
5255 cc_library(
5256     name = "AsmParserTokenKinds",
5257     # strip_include_prefix does not apply to textual_hdrs.
5258     hdrs = ["lib/AsmParser/TokenKinds.def"],
5259     strip_include_prefix = "lib/AsmParser",
5260     textual_hdrs = ["lib/AsmParser/TokenKinds.def"],
5263 cc_library(
5264     name = "AsmParser",
5265     srcs = glob([
5266         "lib/AsmParser/*.cpp",
5267         "lib/AsmParser/*.h",
5268     ]),
5269     hdrs = glob([
5270         "include/mlir/AsmParser/*.h",
5271     ]),
5272     includes = ["include"],
5273     deps = [
5274         ":AsmParserTokenKinds",
5275         ":IR",
5276         ":Support",
5277         "//llvm:Support",
5278     ],
5281 cc_library(
5282     name = "BytecodeReader",
5283     srcs = glob([
5284         "lib/Bytecode/Reader/*.cpp",
5285     ]),
5286     hdrs = ["include/mlir/Bytecode/BytecodeReader.h"],
5287     includes = ["include"],
5288     deps = [
5289         ":AsmParser",
5290         ":BytecodeOpInterface",
5291         ":IR",
5292         ":Support",
5293         "//llvm:Support",
5294     ],
5297 cc_library(
5298     name = "BytecodeWriter",
5299     srcs = glob([
5300         "lib/Bytecode/Writer/*.cpp",
5301         "lib/Bytecode/Writer/*.h",
5302     ]),
5303     hdrs = ["include/mlir/Bytecode/BytecodeWriter.h"],
5304     includes = ["include"],
5305     deps = [
5306         ":BytecodeOpInterface",
5307         ":IR",
5308         ":Support",
5309         "//llvm:Support",
5310         "//llvm:config",
5311     ],
5314 cc_library(
5315     name = "Parser",
5316     srcs = glob([
5317         "lib/Parser/*.cpp",
5318     ]),
5319     hdrs = glob([
5320         "include/mlir/Parser/*.h",
5321     ]),
5322     includes = ["include"],
5323     deps = [
5324         ":AsmParser",
5325         ":BytecodeReader",
5326         ":IR",
5327         "//llvm:Support",
5328     ],
5331 gentbl_cc_library(
5332     name = "LLVMDialectInterfaceIncGen",
5333     tbl_outs = [
5334         (
5335             ["-gen-op-interface-decls"],
5336             "include/mlir/Dialect/LLVMIR/LLVMInterfaces.h.inc",
5337         ),
5338         (
5339             ["-gen-op-interface-defs"],
5340             "include/mlir/Dialect/LLVMIR/LLVMInterfaces.cpp.inc",
5341         ),
5342         (
5343             ["-gen-attr-interface-decls"],
5344             "include/mlir/Dialect/LLVMIR/LLVMAttrInterfaces.h.inc",
5345         ),
5346         (
5347             ["-gen-attr-interface-defs"],
5348             "include/mlir/Dialect/LLVMIR/LLVMAttrInterfaces.cpp.inc",
5349         ),
5350         (
5351             ["-gen-type-interface-decls"],
5352             "include/mlir/Dialect/LLVMIR/LLVMTypeInterfaces.h.inc",
5353         ),
5354         (
5355             ["-gen-type-interface-defs"],
5356             "include/mlir/Dialect/LLVMIR/LLVMTypeInterfaces.cpp.inc",
5357         ),
5358     ],
5359     tblgen = ":mlir-tblgen",
5360     td_file = "include/mlir/Dialect/LLVMIR/LLVMInterfaces.td",
5361     deps = [":LLVMOpsTdFiles"],
5364 cc_library(
5365     name = "LLVMDialect",
5366     srcs = glob(
5367         [
5368             "lib/Dialect/LLVMIR/IR/*.cpp",
5369             "lib/Dialect/LLVMIR/IR/*.h",
5370         ],
5371         exclude = [
5372             "lib/Dialect/LLVMIR/IR/*AMX*.cpp",
5373             "lib/Dialect/LLVMIR/IR/*AMX*.h",
5374             "lib/Dialect/LLVMIR/IR/*ArmSVE*.cpp",
5375             "lib/Dialect/LLVMIR/IR/*ArmSVE*.h",
5376             "lib/Dialect/LLVMIR/IR/NVVM*.cpp",
5377             "lib/Dialect/LLVMIR/IR/NVVM*.h",
5378             "lib/Dialect/LLVMIR/IR/ROCDL*.cpp",
5379             "lib/Dialect/LLVMIR/IR/BasicPtxBuilderInterface.cpp",
5380             "lib/Dialect/LLVMIR/IR/ROCDL*.h",
5381             "lib/Dialect/LLVMIR/IR/VCIX*.cpp",
5382             "lib/Dialect/LLVMIR/IR/VCIX*.h",
5383             "lib/Dialect/LLVMIR/IR/*X86Vector*.cpp",
5384             "lib/Dialect/LLVMIR/IR/*X86Vector*.h",
5385         ],
5386     ),
5387     hdrs = glob(
5388         ["include/mlir/Dialect/LLVMIR/*.h"],
5389         exclude = [
5390             "include/mlir/Dialect/LLVMIR/*AMX*.h",
5391             "include/mlir/Dialect/LLVMIR/*ArmSVE*.h",
5392             "include/mlir/Dialect/LLVMIR/NVVM*.h",
5393             "include/mlir/Dialect/LLVMIR/BasicPtxBuilderInterface.h",
5394             "include/mlir/Dialect/LLVMIR/ROCDL*.h",
5395             "include/mlir/Dialect/LLVMIR/VCIX*.h",
5396             "include/mlir/Dialect/LLVMIR/*X86Vector*.h",
5397         ],
5398     ),
5399     includes = ["include"],
5400     deps = [
5401         ":BytecodeOpInterface",
5402         ":CallOpInterfaces",
5403         ":ControlFlowInterfaces",
5404         ":DataLayoutInterfaces",
5405         ":FunctionInterfaces",
5406         ":IR",
5407         ":InferTypeOpInterface",
5408         ":InliningUtils",
5409         ":LLVMDialectInterfaceIncGen",
5410         ":LLVMIntrinsicOpsIncGen",
5411         ":LLVMOpsIncGen",
5412         ":LLVMTypesIncGen",
5413         ":MemorySlotInterfaces",
5414         ":MemorySlotInterfacesIncGen",
5415         ":SideEffectInterfaces",
5416         ":Support",
5417         ":ViewLikeInterface",
5418         "//llvm:AsmParser",
5419         "//llvm:BinaryFormat",
5420         "//llvm:BitReader",
5421         "//llvm:BitWriter",
5422         "//llvm:Core",
5423         "//llvm:Support",
5424     ],
5427 gentbl_cc_library(
5428     name = "LLVMPassIncGen",
5429     tbl_outs = [
5430         (
5431             [
5432                 "-gen-pass-decls",
5433                 "-name=LLVM",
5434             ],
5435             "include/mlir/Dialect/LLVMIR/Transforms/Passes.h.inc",
5436         ),
5437     ],
5438     tblgen = ":mlir-tblgen",
5439     td_file = "include/mlir/Dialect/LLVMIR/Transforms/Passes.td",
5440     deps = [":PassBaseTdFiles"],
5443 cc_library(
5444     name = "LLVMIRTransforms",
5445     srcs = glob([
5446         "lib/Dialect/LLVMIR/Transforms/*.cpp",
5447     ]),
5448     hdrs = glob(["include/mlir/Dialect/LLVMIR/Transforms/*.h"]),
5449     includes = ["include"],
5450     deps = [
5451         ":Analysis",
5452         ":DataLayoutInterfaces",
5453         ":FuncDialect",
5454         ":IR",
5455         ":InliningUtils",
5456         ":LLVMDialect",
5457         ":LLVMPassIncGen",
5458         ":NVVMDialect",
5459         ":Pass",
5460         ":TransformUtils",
5461         ":ViewLikeInterface",
5462         "//llvm:BinaryFormat",
5463         "//llvm:Support",
5464     ],
5467 td_library(
5468     name = "GPUOpsTdFiles",
5469     srcs = [
5470         "include/mlir/Dialect/GPU/IR/CompilationAttrInterfaces.td",
5471         "include/mlir/Dialect/GPU/IR/CompilationAttrs.td",
5472         "include/mlir/Dialect/GPU/IR/GPUBase.td",
5473         "include/mlir/Dialect/GPU/IR/GPUDeviceMappingAttr.td",
5474         "include/mlir/Dialect/GPU/IR/GPUOps.td",
5475         "include/mlir/Dialect/GPU/IR/ParallelLoopMapperAttr.td",
5476     ],
5477     includes = ["include"],
5478     deps = [
5479         ":DLTIDialectTdFiles",
5480         ":DataLayoutInterfacesTdFiles",
5481         ":FunctionInterfacesTdFiles",
5482         ":InferIntRangeInterfaceTdFiles",
5483         ":LLVMOpsTdFiles",
5484         ":OpBaseTdFiles",
5485         ":SCFTdFiles",
5486         ":SideEffectInterfacesTdFiles",
5487     ],
5490 gentbl_cc_library(
5491     name = "GPUDeviceMapperEnumsGen",
5492     tbl_outs = [
5493         (
5494             ["-gen-enum-decls"],
5495             "include/mlir/Dialect/GPU/TransformOps/GPUDeviceMapperEnums.h.inc",
5496         ),
5497         (
5498             ["-gen-enum-defs"],
5499             "include/mlir/Dialect/GPU/TransformOps/GPUDeviceMapperEnums.cpp.inc",
5500         ),
5501     ],
5502     tblgen = ":mlir-tblgen",
5503     td_file = "include/mlir/Dialect/GPU/IR/GPUDeviceMappingAttr.td",
5504     deps = [
5505         ":GPUOpsTdFiles",
5506         ":OpBaseTdFiles",
5507     ],
5510 gentbl_cc_library(
5511     name = "GPUCompilationAttrInterfacesIncGen",
5512     tbl_outs = [
5513         (
5514             ["-gen-attr-interface-decls"],
5515             "include/mlir/Dialect/GPU/IR/CompilationAttrInterfaces.h.inc",
5516         ),
5517         (
5518             ["-gen-attr-interface-defs"],
5519             "include/mlir/Dialect/GPU/IR/CompilationAttrInterfaces.cpp.inc",
5520         ),
5521     ],
5522     tblgen = ":mlir-tblgen",
5523     td_file = "include/mlir/Dialect/GPU/IR/CompilationAttrInterfaces.td",
5524     deps = [
5525         ":AttrTdFiles",
5526         ":OpBaseTdFiles",
5527     ],
5530 gentbl_cc_library(
5531     name = "GPUBaseIncGen",
5532     tbl_outs = [
5533         (
5534             ["-gen-op-interface-decls"],
5535             "include/mlir/Dialect/GPU/IR/GPUOpInterfaces.h.inc",
5536         ),
5537         (
5538             ["-gen-op-interface-defs"],
5539             "include/mlir/Dialect/GPU/IR/GPUOpInterfaces.cpp.inc",
5540         ),
5541     ],
5542     tblgen = ":mlir-tblgen",
5543     td_file = "include/mlir/Dialect/GPU/IR/GPUBase.td",
5544     deps = [":OpBaseTdFiles"],
5547 gentbl_cc_library(
5548     name = "GPUOpsIncGen",
5549     tbl_outs = [
5550         (
5551             [
5552                 "-gen-dialect-decls",
5553                 "-dialect=gpu",
5554             ],
5555             "include/mlir/Dialect/GPU/IR/GPUOpsDialect.h.inc",
5556         ),
5557         (
5558             [
5559                 "-gen-dialect-defs",
5560                 "-dialect=gpu",
5561             ],
5562             "include/mlir/Dialect/GPU/IR/GPUOpsDialect.cpp.inc",
5563         ),
5564         (
5565             ["-gen-op-decls"],
5566             "include/mlir/Dialect/GPU/IR/GPUOps.h.inc",
5567         ),
5568         (
5569             ["-gen-op-defs"],
5570             "include/mlir/Dialect/GPU/IR/GPUOps.cpp.inc",
5571         ),
5572         (
5573             ["-gen-enum-decls"],
5574             "include/mlir/Dialect/GPU/IR/GPUOpsEnums.h.inc",
5575         ),
5576         (
5577             ["-gen-enum-defs"],
5578             "include/mlir/Dialect/GPU/IR/GPUOpsEnums.cpp.inc",
5579         ),
5580         (
5581             ["-gen-attrdef-decls"],
5582             "include/mlir/Dialect/GPU/IR/GPUOpsAttributes.h.inc",
5583         ),
5584         (
5585             ["-gen-attrdef-defs"],
5586             "include/mlir/Dialect/GPU/IR/GPUOpsAttributes.cpp.inc",
5587         ),
5588     ],
5589     tblgen = ":mlir-tblgen",
5590     td_file = "include/mlir/Dialect/GPU/IR/GPUOps.td",
5591     deps = [
5592         ":DLTIDialectTdFiles",
5593         ":GPUOpsTdFiles",
5594     ],
5597 cc_library(
5598     name = "GPUDialect",
5599     srcs = glob(
5600         [
5601             "lib/Dialect/GPU/IR/*.cpp",
5602         ],
5603     ),
5604     hdrs = glob(["include/mlir/Dialect/GPU/IR/*.h"]),
5605     includes = ["include"],
5606     deps = [
5607         ":ArithDialect",
5608         ":BufferizationInterfaces",
5609         ":BytecodeOpInterface",
5610         ":ControlFlowInterfaces",
5611         ":DLTIDialect",
5612         ":FunctionInterfaces",
5613         ":GPUBaseIncGen",
5614         ":GPUCompilationAttrInterfacesIncGen",
5615         ":GPUOpsIncGen",
5616         ":IR",
5617         ":InferIntRangeInterface",
5618         ":InferTypeOpInterface",
5619         ":InliningUtils",
5620         ":MemRefDialect",
5621         ":SCFDialect",
5622         ":SideEffectInterfaces",
5623         ":Support",
5624         "//llvm:Core",
5625         "//llvm:Support",
5626     ],
5629 gentbl_cc_library(
5630     name = "GPUPassIncGen",
5631     tbl_outs = [
5632         (
5633             [
5634                 "-gen-pass-decls",
5635                 "-name=GPU",
5636             ],
5637             "include/mlir/Dialect/GPU/Transforms/Passes.h.inc",
5638         ),
5639         (
5640             [
5641                 "-gen-pass-capi-header",
5642                 "--prefix=GPU",
5643             ],
5644             "include/mlir/Dialect/GPU/Transforms/Passes.capi.h.inc",
5645         ),
5646         (
5647             [
5648                 "-gen-pass-capi-impl",
5649                 "--prefix=GPU",
5650             ],
5651             "include/mlir/Dialect/GPU/Transforms/Passes.capi.cpp.inc",
5652         ),
5653     ],
5654     tblgen = ":mlir-tblgen",
5655     td_file = "include/mlir/Dialect/GPU/Transforms/Passes.td",
5656     deps = [":PassBaseTdFiles"],
5659 cc_library(
5660     name = "GPUPipelines",
5661     srcs = ["lib/Dialect/GPU/Pipelines/GPUToNVVMPipeline.cpp"],
5662     hdrs = ["include/mlir/Dialect/GPU/Pipelines/Passes.h"],
5663     includes = ["include"],
5664     deps = [
5665         ":AffineToStandard",
5666         ":ArithToLLVM",
5667         ":FuncDialect",
5668         ":FuncToLLVM",
5669         ":GPUDialect",
5670         ":GPUToGPURuntimeTransforms",
5671         ":GPUToNVVMTransforms",
5672         ":GPUTransforms",
5673         ":IndexToLLVM",
5674         ":LLVMDialect",
5675         ":LinalgTransforms",
5676         ":MathToLLVM",
5677         ":MemRefToLLVM",
5678         ":MemRefTransforms",
5679         ":NVGPUToNVVM",
5680         ":NVVMToLLVM",
5681         ":Pass",
5682         ":ReconcileUnrealizedCasts",
5683         ":SCFToControlFlow",
5684         ":Transforms",
5685         ":VectorToLLVM",
5686         ":VectorToSCF",
5687     ],
5690 cc_library(
5691     name = "GPUTransforms",
5692     srcs = glob(
5693         [
5694             "lib/Dialect/GPU/Transforms/*.cpp",
5695         ],
5696     ),
5697     hdrs = glob(["include/mlir/Dialect/GPU/Transforms/*.h"]),
5698     includes = ["include"],
5699     deps = [
5700         ":AffineDialect",
5701         ":AffineUtils",
5702         ":ArithDialect",
5703         ":AsmParser",
5704         ":AsyncDialect",
5705         ":BufferizationDialect",
5706         ":BufferizationInterfaces",
5707         ":ControlFlowDialect",
5708         ":DLTIDialect",
5709         ":DialectUtils",
5710         ":ExecutionEngineUtils",
5711         ":FuncDialect",
5712         ":GPUDialect",
5713         ":GPUPassIncGen",
5714         ":GPUToLLVMIRTranslation",
5715         ":IR",
5716         ":IndexDialect",
5717         ":LLVMDialect",
5718         ":LLVMToLLVMIRTranslation",
5719         ":MemRefDialect",
5720         ":NVVMDialect",
5721         ":NVVMTarget",
5722         ":Pass",
5723         ":ROCDLDialect",
5724         ":ROCDLTarget",
5725         ":ROCDLToLLVMIRTranslation",
5726         ":SCFDialect",
5727         ":SPIRVDialect",
5728         ":SPIRVTarget",
5729         ":SideEffectInterfaces",
5730         ":Support",
5731         ":ToLLVMIRTranslation",
5732         ":TransformUtils",
5733         ":Transforms",
5734         ":VCIXToLLVMIRTranslation",
5735         ":VectorDialect",
5736         ":config",
5737         "//llvm:Core",
5738         "//llvm:MC",
5739         "//llvm:Support",
5740         "//llvm:Target",
5741     ] + if_cuda_available([
5742         ":NVVMToLLVMIRTranslation",
5743         "//llvm:NVPTXCodeGen",
5744     ]),
5747 td_library(
5748     name = "GPUTransformOpsTdFiles",
5749     srcs = [
5750         "include/mlir/Dialect/GPU/TransformOps/GPUTransformOps.td",
5751     ],
5752     includes = ["include"],
5753     deps = [
5754         ":TransformDialectTdFiles",
5755     ],
5758 gentbl_cc_library(
5759     name = "GPUTransformOpsIncGen",
5760     tbl_outs = [
5761         (
5762             ["-gen-op-decls"],
5763             "include/mlir/Dialect/GPU/TransformOps/GPUTransformOps.h.inc",
5764         ),
5765         (
5766             ["-gen-op-defs"],
5767             "include/mlir/Dialect/GPU/TransformOps/GPUTransformOps.cpp.inc",
5768         ),
5769     ],
5770     tblgen = ":mlir-tblgen",
5771     td_file = "include/mlir/Dialect/GPU/TransformOps/GPUTransformOps.td",
5772     deps = [
5773         ":GPUTransformOpsTdFiles",
5774     ],
5777 cc_library(
5778     name = "GPUTransformOps",
5779     srcs = glob([
5780         "lib/Dialect/GPU/TransformOps/*.cpp",
5781     ]),
5782     hdrs = glob([
5783         "include/mlir/Dialect/GPU/TransformOps/*.h",
5784     ]),
5785     includes = ["include"],
5786     deps = [
5787         ":AffineDialect",
5788         ":ArithDialect",
5789         ":DialectUtils",
5790         ":FuncDialect",
5791         ":GPUDialect",
5792         ":GPUToGPURuntimeTransforms",
5793         ":GPUToNVVMTransforms",
5794         ":GPUTransformOpsIncGen",
5795         ":GPUTransforms",
5796         ":IR",
5797         ":LLVMCommonConversion",
5798         ":MemRefDialect",
5799         ":NVVMDialect",
5800         ":SCFDialect",
5801         ":Support",
5802         ":TransformDialect",
5803         ":TransformDialectInterfaces",
5804         ":TransformUtils",
5805         ":VectorDialect",
5806         ":VectorTransforms",
5807         "//llvm:Support",
5808     ],
5811 td_library(
5812     name = "LLVMOpsTdFiles",
5813     srcs = [
5814         "include/mlir/Dialect/LLVMIR/LLVMAttrDefs.td",
5815         "include/mlir/Dialect/LLVMIR/LLVMDialect.td",
5816         "include/mlir/Dialect/LLVMIR/LLVMEnums.td",
5817         "include/mlir/Dialect/LLVMIR/LLVMInterfaces.td",
5818         "include/mlir/Dialect/LLVMIR/LLVMIntrinsicOps.td",
5819         "include/mlir/Dialect/LLVMIR/LLVMOpBase.td",
5820         "include/mlir/Dialect/LLVMIR/LLVMOps.td",
5821         "include/mlir/Dialect/LLVMIR/LLVMTypes.td",
5822     ],
5823     includes = ["include"],
5824     deps = [
5825         ":CallInterfacesTdFiles",
5826         ":ControlFlowInterfacesTdFiles",
5827         ":DataLayoutInterfacesTdFiles",
5828         ":FunctionInterfacesTdFiles",
5829         ":InferTypeOpInterfaceTdFiles",
5830         ":MemorySlotInterfacesTdFiles",
5831         ":OpBaseTdFiles",
5832         ":SideEffectInterfacesTdFiles",
5833         ":ViewLikeInterfaceTdFiles",
5834     ],
5837 cc_library(
5838     name = "GPUCommonTransforms",
5839     hdrs = [
5840         "lib/Conversion/GPUCommon/GPUOpsLowering.h",
5841         "lib/Conversion/GPUCommon/IndexIntrinsicsOpLowering.h",
5842         "lib/Conversion/GPUCommon/OpToFuncCallLowering.h",
5843     ],
5844     deps = [
5845         ":ArithDialect",
5846         ":GPUDialect",
5847         ":IR",
5848         ":LLVMCommonConversion",
5849         ":LLVMDialect",
5850     ],
5853 gentbl_cc_library(
5854     name = "GPUToNVVMGen",
5855     strip_include_prefix = "lib/Conversion/GPUToNVVM",
5856     tbl_outs = [
5857         (
5858             ["-gen-rewriters"],
5859             "lib/Conversion/GPUToNVVM/GPUToNVVM.cpp.inc",
5860         ),
5861     ],
5862     tblgen = ":mlir-tblgen",
5863     td_file = "lib/Conversion/GPUToNVVM/GPUToNVVM.td",
5864     deps = [
5865         ":GPUOpsTdFiles",
5866         ":NVVMOpsTdFiles",
5867     ],
5870 cc_library(
5871     name = "GPUToLLVMSPVTransforms",
5872     srcs = glob([
5873         "lib/Conversion/GPUToLLVMSPV/*.cpp",
5874     ]),
5875     hdrs = glob([
5876         "include/mlir/Conversion/GPUToLLVMSPV/*.h",
5877     ]),
5878     includes = ["include"],
5879     deps = [
5880         ":ConversionPassIncGen",
5881         ":GPUDialect",
5882         ":GPUToGPURuntimeTransforms",
5883         ":IR",
5884         ":LLVMCommonConversion",
5885         ":LLVMDialect",
5886         ":Pass",
5887         ":SPIRVCommonAttrToLLVMConversion",
5888         ":SPIRVDialect",
5889         ":Support",
5890         ":TransformUtils",
5891         "//llvm:Support",
5892     ],
5895 cc_library(
5896     name = "GPUToNVVMTransforms",
5897     srcs = glob([
5898         "lib/Conversion/GPUToNVVM/*.cpp",
5899     ]),
5900     hdrs = glob([
5901         "include/mlir/Conversion/GPUToNVVM/*.h",
5902     ]),
5903     includes = ["include"],
5904     deps = [
5905         ":ArithToLLVM",
5906         ":ControlFlowDialect",
5907         ":ControlFlowToLLVM",
5908         ":ConversionPassIncGen",
5909         ":FuncDialect",
5910         ":FuncToLLVM",
5911         ":GPUCommonTransforms",
5912         ":GPUDialect",
5913         ":GPUToGPURuntimeTransforms",
5914         ":GPUToNVVMGen",
5915         ":GPUTransforms",
5916         ":IR",
5917         ":LLVMCommonConversion",
5918         ":LLVMDialect",
5919         ":MathDialect",
5920         ":MemRefDialect",
5921         ":MemRefToLLVM",
5922         ":NVGPUDialect",
5923         ":NVVMDialect",
5924         ":TransformUtils",
5925         ":VectorToLLVM",
5926     ],
5929 cc_library(
5930     name = "AMDGPUToROCDL",
5931     srcs = glob([
5932         "lib/Conversion/AMDGPUToROCDL/*.cpp",
5933     ]) + ["include/mlir/Conversion/GPUToROCDL/Runtimes.h"],
5934     hdrs = glob([
5935         "include/mlir/Conversion/AMDGPUToROCDL/*.h",
5936     ]),
5937     includes = ["include"],
5938     deps = [
5939         ":AMDGPUDialect",
5940         ":AMDGPUUtils",
5941         ":ConversionPassIncGen",
5942         ":IR",
5943         ":LLVMCommonConversion",
5944         ":LLVMDialect",
5945         ":Pass",
5946         ":ROCDLDialect",
5947         "//llvm:Support",
5948     ],
5951 cc_library(
5952     name = "NVGPUToNVVM",
5953     srcs = glob([
5954         "lib/Conversion/NVGPUToNVVM/*.cpp",
5955     ]),
5956     hdrs = glob([
5957         "include/mlir/Conversion/NVGPUToNVVM/*.h",
5958     ]),
5959     includes = ["include"],
5960     deps = [
5961         ":ArithDialect",
5962         ":ConversionPassIncGen",
5963         ":GPUDialect",
5964         ":GPUToGPURuntimeTransforms",
5965         ":IR",
5966         ":LLVMCommonConversion",
5967         ":LLVMDialect",
5968         ":MemRefDialect",
5969         ":NVGPUDialect",
5970         ":NVVMDialect",
5971         ":Pass",
5972         ":SCFTransforms",
5973         "//llvm:Support",
5974     ],
5977 cc_library(
5978     name = "VectorToSPIRV",
5979     srcs = glob([
5980         "lib/Conversion/VectorToSPIRV/*.cpp",
5981     ]),
5982     hdrs = glob([
5983         "include/mlir/Conversion/VectorToSPIRV/*.h",
5984     ]),
5985     includes = ["include"],
5986     deps = [
5987         ":ArithDialect",
5988         ":ConversionPassIncGen",
5989         ":DialectUtils",
5990         ":IR",
5991         ":Pass",
5992         ":SPIRVConversion",
5993         ":SPIRVDialect",
5994         ":Support",
5995         ":TransformUtils",
5996         ":VectorDialect",
5997         "//llvm:Support",
5998     ],
6001 gentbl_cc_library(
6002     name = "GPUToROCDLTGen",
6003     strip_include_prefix = "lib/Conversion/GPUToROCDL",
6004     tbl_outs = [
6005         (
6006             ["-gen-rewriters"],
6007             "lib/Conversion/GPUToROCDL/GPUToROCDL.cpp.inc",
6008         ),
6009     ],
6010     tblgen = ":mlir-tblgen",
6011     td_file = "lib/Conversion/GPUToROCDL/GPUToROCDL.td",
6012     deps = [
6013         ":GPUOpsTdFiles",
6014         ":ROCDLOpsTdFiles",
6015     ],
6018 cc_library(
6019     name = "GPUToROCDLTransforms",
6020     srcs = [
6021         "include/mlir/Conversion/GPUToROCDL/Runtimes.h",
6022         "lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp",
6023     ],
6024     hdrs = ["include/mlir/Conversion/GPUToROCDL/GPUToROCDLPass.h"],
6025     includes = ["include"],
6026     deps = [
6027         ":AMDGPUToROCDL",
6028         ":ArithToLLVM",
6029         ":ArithTransforms",
6030         ":ControlFlowDialect",
6031         ":ControlFlowToLLVM",
6032         ":ConversionPassIncGen",
6033         ":FuncDialect",
6034         ":FuncToLLVM",
6035         ":GPUCommonTransforms",
6036         ":GPUDialect",
6037         ":GPUToGPURuntimeTransforms",
6038         ":GPUToROCDLTGen",
6039         ":GPUTransforms",
6040         ":IR",
6041         ":LLVMCommonConversion",
6042         ":LLVMDialect",
6043         ":MathDialect",
6044         ":MathToLLVM",
6045         ":MathToROCDL",
6046         ":MemRefDialect",
6047         ":MemRefToLLVM",
6048         ":Pass",
6049         ":ROCDLDialect",
6050         ":TransformUtils",
6051         ":Transforms",
6052         ":VectorDialect",
6053         ":VectorToLLVM",
6054         "//llvm:Support",
6055     ],
6058 cc_library(
6059     name = "GPUToVulkanTransforms",
6060     srcs = [
6061         "lib/Conversion/GPUToVulkan/ConvertGPULaunchFuncToVulkanLaunchFunc.cpp",
6062         "lib/Conversion/GPUToVulkan/ConvertLaunchFuncToVulkanCalls.cpp",
6063     ],
6064     hdrs = ["include/mlir/Conversion/GPUToVulkan/ConvertGPUToVulkanPass.h"],
6065     includes = ["include"],
6066     deps = [
6067         ":ConversionPassIncGen",
6068         ":FuncDialect",
6069         ":GPUDialect",
6070         ":IR",
6071         ":LLVMDialect",
6072         ":Pass",
6073         ":SPIRVDialect",
6074         ":SPIRVSerialization",
6075         ":Support",
6076         "//llvm:Support",
6077     ],
6080 cc_library(
6081     name = "GPUToGPURuntimeTransforms",
6082     srcs = [
6083         "lib/Conversion/GPUCommon/AttrToSPIRVConverter.cpp",
6084         "lib/Conversion/GPUCommon/GPUOpsLowering.cpp",
6085         "lib/Conversion/GPUCommon/GPUToLLVMConversion.cpp",
6086     ],
6087     hdrs = [
6088         "include/mlir/Conversion/GPUCommon/AttrToSPIRVConverter.h",
6089         "include/mlir/Conversion/GPUCommon/GPUCommonPass.h",
6090         "lib/Conversion/GPUCommon/GPUOpsLowering.h",
6091     ],
6092     includes = ["include"],
6093     deps = [
6094         ":ArithToLLVM",
6095         ":AsyncDialect",
6096         ":AsyncToLLVM",
6097         ":ControlFlowToLLVM",
6098         ":ConversionPassIncGen",
6099         ":ConvertToLLVM",
6100         ":ConvertToLLVMInterface",
6101         ":FuncToLLVM",
6102         ":GPUCommonTransforms",
6103         ":GPUDialect",
6104         ":GPUTransforms",
6105         ":IR",
6106         ":LLVMCommonConversion",
6107         ":LLVMDialect",
6108         ":MemRefDialect",
6109         ":MemRefToLLVM",
6110         ":SPIRVDialect",
6111         ":Support",
6112         ":VectorToLLVM",
6113         "//llvm:Support",
6114     ],
6117 cc_library(
6118     name = "GPUToSPIRV",
6119     srcs = glob([
6120         "lib/Conversion/GPUToSPIRV/*.cpp",
6121     ]),
6122     hdrs = glob([
6123         "include/mlir/Conversion/GPUToSPIRV/*.h",
6124     ]),
6125     includes = [
6126         "include",
6127         "lib/Conversions/GPUToSPIRV",
6128     ],
6129     deps = [
6130         ":ArithToSPIRV",
6131         ":ConversionPassIncGen",
6132         ":FuncDialect",
6133         ":FuncToSPIRV",
6134         ":GPUDialect",
6135         ":IR",
6136         ":MemRefToSPIRV",
6137         ":SCFToSPIRV",
6138         ":SPIRVConversion",
6139         ":SPIRVDialect",
6140         ":Support",
6141         ":TransformUtils",
6142         ":VectorToSPIRV",
6143         "//llvm:Support",
6144     ],
6147 cc_library(
6148     name = "PDLToPDLInterp",
6149     srcs = glob([
6150         "lib/Conversion/PDLToPDLInterp/*.cpp",
6151         "lib/Conversion/PDLToPDLInterp/*.h",
6152     ]),
6153     hdrs = [
6154         "include/mlir/Conversion/PDLToPDLInterp/PDLToPDLInterp.h",
6155         "lib/Conversion/PDLToPDLInterp/RootOrdering.h",
6156     ],
6157     includes = ["include"],
6158     deps = [
6159         ":ConversionPassIncGen",
6160         ":IR",
6161         ":InferTypeOpInterface",
6162         ":PDLDialect",
6163         ":PDLInterpDialect",
6164         ":Pass",
6165         ":Support",
6166         "//llvm:Support",
6167     ],
6170 cc_library(
6171     name = "SPIRVToLLVM",
6172     srcs = glob([
6173         "lib/Conversion/SPIRVToLLVM/*.cpp",
6174     ]),
6175     hdrs = glob([
6176         "include/mlir/Conversion/SPIRVToLLVM/*.h",
6177     ]),
6178     includes = ["include"],
6179     deps = [
6180         ":ArithToLLVM",
6181         ":ConversionPassIncGen",
6182         ":FuncDialect",
6183         ":FuncToLLVM",
6184         ":GPUDialect",
6185         ":IR",
6186         ":LLVMCommonConversion",
6187         ":LLVMDialect",
6188         ":MemRefToLLVM",
6189         ":Pass",
6190         ":SPIRVCommonAttrToLLVMConversion",
6191         ":SPIRVDialect",
6192         ":SPIRVUtils",
6193         ":Support",
6194         ":TransformUtils",
6195         "//llvm:Support",
6196     ],
6199 gentbl_cc_library(
6200     name = "LLVMOpsIncGen",
6201     tbl_outs = [
6202         (
6203             ["-gen-op-decls"],
6204             "include/mlir/Dialect/LLVMIR/LLVMOps.h.inc",
6205         ),
6206         (
6207             ["-gen-op-defs"],
6208             "include/mlir/Dialect/LLVMIR/LLVMOps.cpp.inc",
6209         ),
6210         (
6211             ["-gen-dialect-decls"],
6212             "include/mlir/Dialect/LLVMIR/LLVMOpsDialect.h.inc",
6213         ),
6214         (
6215             ["-gen-dialect-defs"],
6216             "include/mlir/Dialect/LLVMIR/LLVMOpsDialect.cpp.inc",
6217         ),
6218         (
6219             ["-gen-enum-decls"],
6220             "include/mlir/Dialect/LLVMIR/LLVMOpsEnums.h.inc",
6221         ),
6222         (
6223             ["-gen-enum-defs"],
6224             "include/mlir/Dialect/LLVMIR/LLVMOpsEnums.cpp.inc",
6225         ),
6226         (
6227             [
6228                 "--gen-attrdef-decls",
6229                 "-attrdefs-dialect=llvm",
6230             ],
6231             "include/mlir/Dialect/LLVMIR/LLVMOpsAttrDefs.h.inc",
6232         ),
6233         (
6234             [
6235                 "--gen-attrdef-defs",
6236                 "-attrdefs-dialect=llvm",
6237             ],
6238             "include/mlir/Dialect/LLVMIR/LLVMOpsAttrDefs.cpp.inc",
6239         ),
6240     ],
6241     tblgen = ":mlir-tblgen",
6242     td_file = "include/mlir/Dialect/LLVMIR/LLVMOps.td",
6243     deps = [":LLVMOpsTdFiles"],
6246 gentbl_cc_library(
6247     name = "LLVMTypesIncGen",
6248     tbl_outs = [
6249         (
6250             [
6251                 "-gen-typedef-decls",
6252                 "-typedefs-dialect=llvm",
6253             ],
6254             "include/mlir/Dialect/LLVMIR/LLVMTypes.h.inc",
6255         ),
6256         (
6257             [
6258                 "-gen-typedef-defs",
6259                 "-typedefs-dialect=llvm",
6260             ],
6261             "include/mlir/Dialect/LLVMIR/LLVMTypes.cpp.inc",
6262         ),
6263     ],
6264     tblgen = ":mlir-tblgen",
6265     td_file = "include/mlir/Dialect/LLVMIR/LLVMTypes.td",
6266     deps = [":LLVMOpsTdFiles"],
6269 gentbl_cc_library(
6270     name = "LLVMIntrinsicOpsIncGen",
6271     tbl_outs = [
6272         (
6273             ["-gen-op-decls"],
6274             "include/mlir/Dialect/LLVMIR/LLVMIntrinsicOps.h.inc",
6275         ),
6276         (
6277             ["-gen-op-defs"],
6278             "include/mlir/Dialect/LLVMIR/LLVMIntrinsicOps.cpp.inc",
6279         ),
6280     ],
6281     tblgen = ":mlir-tblgen",
6282     td_file = "include/mlir/Dialect/LLVMIR/LLVMIntrinsicOps.td",
6283     deps = [":LLVMOpsTdFiles"],
6286 gentbl_cc_library(
6287     name = "LLVMConversionIncGen",
6288     tbl_outs = [
6289         (
6290             ["-gen-llvmir-conversions"],
6291             "include/mlir/Dialect/LLVMIR/LLVMConversions.inc",
6292         ),
6293         (
6294             ["-gen-enum-to-llvmir-conversions"],
6295             "include/mlir/Dialect/LLVMIR/LLVMConversionEnumsToLLVM.inc",
6296         ),
6297         (
6298             ["-gen-enum-from-llvmir-conversions"],
6299             "include/mlir/Dialect/LLVMIR/LLVMConversionEnumsFromLLVM.inc",
6300         ),
6301         (
6302             ["-gen-op-from-llvmir-conversions"],
6303             "include/mlir/Dialect/LLVMIR/LLVMOpFromLLVMIRConversions.inc",
6304         ),
6305     ],
6306     tblgen = ":mlir-tblgen",
6307     td_file = "include/mlir/Dialect/LLVMIR/LLVMOps.td",
6308     deps = [":LLVMOpsTdFiles"],
6311 gentbl_cc_library(
6312     name = "LLVMIntrinsicConversionIncGen",
6313     tbl_outs = [
6314         (
6315             ["-gen-llvmir-conversions"],
6316             "include/mlir/Dialect/LLVMIR/LLVMIntrinsicConversions.inc",
6317         ),
6318         (
6319             ["-gen-intr-from-llvmir-conversions"],
6320             "include/mlir/Dialect/LLVMIR/LLVMIntrinsicFromLLVMIRConversions.inc",
6321         ),
6322         (
6323             ["-gen-convertible-llvmir-intrinsics"],
6324             "include/mlir/Dialect/LLVMIR/LLVMConvertibleLLVMIRIntrinsics.inc",
6325         ),
6326     ],
6327     tblgen = ":mlir-tblgen",
6328     td_file = "include/mlir/Dialect/LLVMIR/LLVMIntrinsicOps.td",
6329     deps = [":LLVMOpsTdFiles"],
6332 cc_library(
6333     name = "NVVMDialect",
6334     srcs = [
6335         "lib/Dialect/LLVMIR/IR/BasicPtxBuilderInterface.cpp",
6336         "lib/Dialect/LLVMIR/IR/NVVMDialect.cpp",
6337     ],
6338     hdrs = [
6339         "include/mlir/Dialect/LLVMIR/BasicPtxBuilderInterface.h",
6340         "include/mlir/Dialect/LLVMIR/NVVMDialect.h",
6341     ],
6342     includes = ["include"],
6343     deps = [
6344         ":BasicPtxBuilderIntGen",
6345         ":BytecodeOpInterface",
6346         ":ConvertToLLVMInterface",
6347         ":DialectUtils",
6348         ":GPUDialect",
6349         ":IR",
6350         ":LLVMDialect",
6351         ":NVVMOpsIncGen",
6352         ":SideEffectInterfaces",
6353         ":Support",
6354         "//llvm:AsmParser",
6355         "//llvm:Core",
6356         "//llvm:Support",
6357     ],
6360 cc_library(
6361     name = "TargetLLVM",
6362     srcs = ["lib/Target/LLVM/ModuleToObject.cpp"],
6363     hdrs = glob(["include/mlir/Target/LLVM/*.h"]),
6364     includes = ["include"],
6365     deps = [
6366         ":ExecutionEngineUtils",
6367         ":IR",
6368         ":LLVMToLLVMIRTranslation",
6369         ":ToLLVMIRTranslation",
6370         "//llvm:BitWriter",
6371         "//llvm:Core",
6372         "//llvm:IPO",
6373         "//llvm:IRReader",
6374         "//llvm:Linker",
6375         "//llvm:MC",
6376         "//llvm:Passes",
6377         "//llvm:Support",
6378         "//llvm:Target",
6379         "//llvm:TargetParser",
6380     ],
6383 cc_library(
6384     name = "NVVMTarget",
6385     srcs = ["lib/Target/LLVM/NVVM/Target.cpp"],
6386     hdrs = glob(["include/mlir/Target/LLVM/NVVM/*.h"]),
6387     includes = ["include"],
6388     deps = [
6389         ":GPUDialect",
6390         ":GPUToLLVMIRTranslation",
6391         ":LLVMToLLVMIRTranslation",
6392         ":NVVMDialect",
6393         ":NVVMToLLVMIRTranslation",
6394         ":TargetLLVM",
6395         ":ToLLVMIRTranslation",
6396         "//llvm:NVPTXCodeGen",
6397         "//llvm:Support",
6398         "//llvm:config",
6399     ],
6402 td_library(
6403     name = "BasicPtxBuilderIntTdFiles",
6404     srcs = [
6405         "include/mlir/Dialect/LLVMIR/BasicPtxBuilderInterface.td",
6406     ],
6407     includes = ["include"],
6408     deps = [
6409         ":GPUOpsTdFiles",
6410         ":LLVMOpsTdFiles",
6411         ":OpBaseTdFiles",
6412     ],
6415 td_library(
6416     name = "NVVMOpsTdFiles",
6417     srcs = ["include/mlir/Dialect/LLVMIR/NVVMOps.td"],
6418     includes = ["include"],
6419     deps = [
6420         ":BasicPtxBuilderIntTdFiles",
6421         ":GPUOpsTdFiles",
6422         ":LLVMOpsTdFiles",
6423         ":OpBaseTdFiles",
6424         ":SideEffectInterfacesTdFiles",
6425     ],
6428 gentbl_cc_library(
6429     name = "BasicPtxBuilderIntGen",
6430     tbl_outs = [
6431         (
6432             [
6433                 "-gen-op-interface-decls",
6434             ],
6435             "include/mlir/Dialect/LLVMIR/BasicPtxBuilderInterface.h.inc",
6436         ),
6437         (
6438             [
6439                 "-gen-op-interface-defs",
6440             ],
6441             "include/mlir/Dialect/LLVMIR/BasicPtxBuilderInterface.cpp.inc",
6442         ),
6443     ],
6444     tblgen = ":mlir-tblgen",
6445     td_file = "include/mlir/Dialect/LLVMIR/BasicPtxBuilderInterface.td",
6446     deps = [
6447         ":BasicPtxBuilderIntTdFiles",
6448         ":GPUOpsTdFiles",
6449         ":LLVMOpsTdFiles",
6450     ],
6453 gentbl_cc_library(
6454     name = "NVVMOpsIncGen",
6455     tbl_outs = [
6456         (
6457             ["-gen-op-decls"],
6458             "include/mlir/Dialect/LLVMIR/NVVMOps.h.inc",
6459         ),
6460         (
6461             ["-gen-op-defs"],
6462             "include/mlir/Dialect/LLVMIR/NVVMOps.cpp.inc",
6463         ),
6464         (
6465             [
6466                 "-gen-dialect-decls",
6467                 "-dialect=nvvm",
6468             ],
6469             "include/mlir/Dialect/LLVMIR/NVVMOpsDialect.h.inc",
6470         ),
6471         (
6472             [
6473                 "-gen-dialect-defs",
6474                 "-dialect=nvvm",
6475             ],
6476             "include/mlir/Dialect/LLVMIR/NVVMOpsDialect.cpp.inc",
6477         ),
6478         (
6479             ["-gen-enum-decls"],
6480             "include/mlir/Dialect/LLVMIR/NVVMOpsEnums.h.inc",
6481         ),
6482         (
6483             ["-gen-enum-defs"],
6484             "include/mlir/Dialect/LLVMIR/NVVMOpsEnums.cpp.inc",
6485         ),
6486         (
6487             [
6488                 "-gen-attrdef-decls",
6489                 "-attrdefs-dialect=nvvm",
6490             ],
6491             "include/mlir/Dialect/LLVMIR/NVVMOpsAttributes.h.inc",
6492         ),
6493         (
6494             [
6495                 "-gen-attrdef-defs",
6496                 "-attrdefs-dialect=nvvm",
6497             ],
6498             "include/mlir/Dialect/LLVMIR/NVVMOpsAttributes.cpp.inc",
6499         ),
6500     ],
6501     tblgen = ":mlir-tblgen",
6502     td_file = "include/mlir/Dialect/LLVMIR/NVVMOps.td",
6503     deps = [":NVVMOpsTdFiles"],
6506 gentbl_cc_library(
6507     name = "NVVMConversionIncGen",
6508     tbl_outs = [
6509         (
6510             ["-gen-llvmir-conversions"],
6511             "include/mlir/Dialect/LLVMIR/NVVMConversions.inc",
6512         ),
6513     ],
6514     tblgen = ":mlir-tblgen",
6515     td_file = "include/mlir/Dialect/LLVMIR/NVVMOps.td",
6516     deps = [":NVVMOpsTdFiles"],
6519 gentbl_cc_library(
6520     name = "NVVMFromLLVMIRConversionsIncGen",
6521     tbl_outs = [
6522         (
6523             ["-gen-intr-from-llvmir-conversions"],
6524             "include/mlir/Dialect/LLVMIR/NVVMFromLLVMIRConversions.inc",
6525         ),
6526     ],
6527     tblgen = ":mlir-tblgen",
6528     td_file = "include/mlir/Dialect/LLVMIR/NVVMOps.td",
6529     deps = [":NVVMOpsTdFiles"],
6532 gentbl_cc_library(
6533     name = "NVVMConvertibleLLVMIRIntrinsicsIncGen",
6534     tbl_outs = [
6535         (
6536             ["-gen-convertible-llvmir-intrinsics"],
6537             "include/mlir/Dialect/LLVMIR/NVVMConvertibleLLVMIRIntrinsics.inc",
6538         ),
6539     ],
6540     tblgen = ":mlir-tblgen",
6541     td_file = "include/mlir/Dialect/LLVMIR/NVVMOps.td",
6542     deps = [":NVVMOpsTdFiles"],
6545 cc_library(
6546     name = "NVVMToLLVM",
6547     srcs = ["lib/Conversion/NVVMToLLVM/NVVMToLLVM.cpp"],
6548     hdrs = glob(["include/mlir/Conversion/NVVMToLLVM/*.h"]),
6549     includes = ["include"],
6550     deps = [
6551         ":ConversionPassIncGen",
6552         ":ConvertToLLVMInterface",
6553         ":FuncDialect",
6554         ":IR",
6555         ":LLVMCommonConversion",
6556         ":LLVMDialect",
6557         ":NVVMDialect",
6558         ":Pass",
6559         ":Support",
6560         "//llvm:Support",
6561     ],
6564 cc_library(
6565     name = "ROCDLDialect",
6566     srcs = ["lib/Dialect/LLVMIR/IR/ROCDLDialect.cpp"],
6567     hdrs = ["include/mlir/Dialect/LLVMIR/ROCDLDialect.h"],
6568     includes = ["include"],
6569     deps = [
6570         ":BytecodeOpInterface",
6571         ":GPUDialect",
6572         ":IR",
6573         ":LLVMDialect",
6574         ":ROCDLOpsIncGen",
6575         ":SideEffectInterfaces",
6576         "//llvm:AsmParser",
6577         "//llvm:Core",
6578         "//llvm:Support",
6579     ],
6582 cc_library(
6583     name = "ROCDLTarget",
6584     srcs = [
6585         "lib/Target/LLVM/ROCDL/Target.cpp",
6586         "lib/Target/LLVM/ROCDL/Utils.cpp",
6587     ],
6588     hdrs = glob(["include/mlir/Target/LLVM/ROCDL/*.h"]),
6589     includes = ["include"],
6590     deps = [
6591         ":GPUDialect",
6592         ":GPUToLLVMIRTranslation",
6593         ":LLVMToLLVMIRTranslation",
6594         ":ROCDLDialect",
6595         ":ROCDLToLLVMIRTranslation",
6596         ":Support",
6597         ":TargetLLVM",
6598         ":ToLLVMIRTranslation",
6599         "//llvm:Core",
6600         "//llvm:FrontendOffloading",
6601         "//llvm:MC",
6602         "//llvm:MCParser",
6603         "//llvm:Support",
6604         "//llvm:TargetParser",
6605     ],
6608 td_library(
6609     name = "ROCDLOpsTdFiles",
6610     srcs = ["include/mlir/Dialect/LLVMIR/ROCDLOps.td"],
6611     includes = ["include"],
6612     deps = [
6613         ":GPUOpsTdFiles",
6614         ":LLVMOpsTdFiles",
6615         ":OpBaseTdFiles",
6616         ":SideEffectInterfacesTdFiles",
6617     ],
6620 gentbl_cc_library(
6621     name = "ROCDLOpsIncGen",
6622     tbl_outs = [
6623         (
6624             ["-gen-op-decls"],
6625             "include/mlir/Dialect/LLVMIR/ROCDLOps.h.inc",
6626         ),
6627         (
6628             ["-gen-op-defs"],
6629             "include/mlir/Dialect/LLVMIR/ROCDLOps.cpp.inc",
6630         ),
6631         (
6632             [
6633                 "-gen-dialect-decls",
6634                 "-dialect=rocdl",
6635             ],
6636             "include/mlir/Dialect/LLVMIR/ROCDLOpsDialect.h.inc",
6637         ),
6638         (
6639             [
6640                 "-gen-dialect-defs",
6641                 "-dialect=rocdl",
6642             ],
6643             "include/mlir/Dialect/LLVMIR/ROCDLOpsDialect.cpp.inc",
6644         ),
6645         (
6646             [
6647                 "-gen-attrdef-decls",
6648                 "-attrdefs-dialect=rocdl",
6649             ],
6650             "include/mlir/Dialect/LLVMIR/ROCDLOpsAttributes.h.inc",
6651         ),
6652         (
6653             [
6654                 "-gen-attrdef-defs",
6655                 "-attrdefs-dialect=rocdl",
6656             ],
6657             "include/mlir/Dialect/LLVMIR/ROCDLOpsAttributes.cpp.inc",
6658         ),
6659     ],
6660     tblgen = ":mlir-tblgen",
6661     td_file = "include/mlir/Dialect/LLVMIR/ROCDLOps.td",
6662     deps = [":ROCDLOpsTdFiles"],
6665 gentbl_cc_library(
6666     name = "ROCDLConversionIncGen",
6667     tbl_outs = [
6668         (
6669             ["-gen-llvmir-conversions"],
6670             "include/mlir/Dialect/LLVMIR/ROCDLConversions.inc",
6671         ),
6672     ],
6673     tblgen = ":mlir-tblgen",
6674     td_file = "include/mlir/Dialect/LLVMIR/ROCDLOps.td",
6675     deps = [":ROCDLOpsTdFiles"],
6678 cc_library(
6679     name = "PDLDialect",
6680     srcs = glob([
6681         "lib/Dialect/PDL/IR/*.cpp",
6682     ]),
6683     hdrs = glob([
6684         "include/mlir/Dialect/PDL/IR/*.h",
6685     ]),
6686     includes = ["include"],
6687     deps = [
6688         ":BytecodeOpInterface",
6689         ":IR",
6690         ":InferTypeOpInterface",
6691         ":PDLOpsIncGen",
6692         ":PDLTypesIncGen",
6693         ":SideEffectInterfaces",
6694         "//llvm:Support",
6695     ],
6698 td_library(
6699     name = "PDLDialectTdFiles",
6700     srcs = [
6701         "include/mlir/Dialect/PDL/IR/PDLDialect.td",
6702         "include/mlir/Dialect/PDL/IR/PDLOps.td",
6703         "include/mlir/Dialect/PDL/IR/PDLTypes.td",
6704     ],
6705     deps = [
6706         ":OpBaseTdFiles",
6707         ":SideEffectInterfacesTdFiles",
6708     ],
6711 gentbl_cc_library(
6712     name = "PDLOpsIncGen",
6713     tbl_outs = [
6714         (
6715             ["-gen-op-decls"],
6716             "include/mlir/Dialect/PDL/IR/PDLOps.h.inc",
6717         ),
6718         (
6719             ["-gen-op-defs"],
6720             "include/mlir/Dialect/PDL/IR/PDLOps.cpp.inc",
6721         ),
6722         (
6723             ["-gen-dialect-decls"],
6724             "include/mlir/Dialect/PDL/IR/PDLOpsDialect.h.inc",
6725         ),
6726         (
6727             ["-gen-dialect-defs"],
6728             "include/mlir/Dialect/PDL/IR/PDLOpsDialect.cpp.inc",
6729         ),
6730     ],
6731     tblgen = ":mlir-tblgen",
6732     td_file = "include/mlir/Dialect/PDL/IR/PDLOps.td",
6733     deps = [":PDLDialectTdFiles"],
6736 gentbl_cc_library(
6737     name = "PDLTypesIncGen",
6738     tbl_outs = [
6739         (
6740             ["-gen-typedef-decls"],
6741             "include/mlir/Dialect/PDL/IR/PDLOpsTypes.h.inc",
6742         ),
6743         (
6744             ["-gen-typedef-defs"],
6745             "include/mlir/Dialect/PDL/IR/PDLOpsTypes.cpp.inc",
6746         ),
6747     ],
6748     tblgen = ":mlir-tblgen",
6749     td_file = "include/mlir/Dialect/PDL/IR/PDLTypes.td",
6750     deps = [":PDLDialectTdFiles"],
6753 cc_library(
6754     name = "PDLInterpDialect",
6755     srcs = glob([
6756         "lib/Dialect/PDLInterp/IR/*.cpp",
6757     ]),
6758     hdrs = glob([
6759         "include/mlir/Dialect/PDLInterp/IR/*.h",
6760     ]),
6761     includes = ["include"],
6762     deps = [
6763         ":BytecodeOpInterface",
6764         ":FunctionInterfaces",
6765         ":IR",
6766         ":InferTypeOpInterface",
6767         ":PDLDialect",
6768         ":PDLInterpOpsIncGen",
6769         ":SideEffectInterfaces",
6770     ],
6773 td_library(
6774     name = "PDLInterpOpsTdFiles",
6775     srcs = ["include/mlir/Dialect/PDLInterp/IR/PDLInterpOps.td"],
6776     includes = ["include"],
6777     deps = [
6778         ":FunctionInterfacesTdFiles",
6779         ":OpBaseTdFiles",
6780         ":PDLDialectTdFiles",
6781         ":SideEffectInterfacesTdFiles",
6782     ],
6785 gentbl_cc_library(
6786     name = "PDLInterpOpsIncGen",
6787     tbl_outs = [
6788         (
6789             ["-gen-op-decls"],
6790             "include/mlir/Dialect/PDLInterp/IR/PDLInterpOps.h.inc",
6791         ),
6792         (
6793             ["-gen-op-defs"],
6794             "include/mlir/Dialect/PDLInterp/IR/PDLInterpOps.cpp.inc",
6795         ),
6796         (
6797             [
6798                 "-gen-dialect-decls",
6799                 "-dialect=pdl_interp",
6800             ],
6801             "include/mlir/Dialect/PDLInterp/IR/PDLInterpOpsDialect.h.inc",
6802         ),
6803         (
6804             [
6805                 "-gen-dialect-defs",
6806                 "-dialect=pdl_interp",
6807             ],
6808             "include/mlir/Dialect/PDLInterp/IR/PDLInterpOpsDialect.cpp.inc",
6809         ),
6810     ],
6811     tblgen = ":mlir-tblgen",
6812     td_file = "include/mlir/Dialect/PDLInterp/IR/PDLInterpOps.td",
6813     deps = [":PDLInterpOpsTdFiles"],
6816 cc_library(
6817     name = "PolynomialDialect",
6818     srcs = glob([
6819         "lib/Dialect/Polynomial/IR/*.cpp",
6820     ]),
6821     hdrs = glob([
6822         "include/mlir/Dialect/Polynomial/IR/*.h",
6823     ]),
6824     includes = ["include"],
6825     deps = [
6826         ":ArithDialect",
6827         ":IR",
6828         ":InferTypeOpInterface",
6829         ":PolynomialAttributesIncGen",
6830         ":PolynomialCanonicalizationIncGen",
6831         ":PolynomialIncGen",
6832         ":Support",
6833         "//llvm:Support",
6834     ],
6837 td_library(
6838     name = "PolynomialTdFiles",
6839     srcs = glob(["include/mlir/Dialect/Polynomial/IR/*.td"]),
6840     includes = ["include"],
6841     deps = [
6842         ":BuiltinDialectTdFiles",
6843         ":InferTypeOpInterfaceTdFiles",
6844         ":OpBaseTdFiles",
6845         ":SideEffectInterfacesTdFiles",
6846     ],
6849 gentbl_cc_library(
6850     name = "PolynomialIncGen",
6851     tbl_outs = [
6852         (
6853             ["-gen-op-decls"],
6854             "include/mlir/Dialect/Polynomial/IR/Polynomial.h.inc",
6855         ),
6856         (
6857             ["-gen-op-defs"],
6858             "include/mlir/Dialect/Polynomial/IR/Polynomial.cpp.inc",
6859         ),
6860         (
6861             [
6862                 "-gen-dialect-decls",
6863                 "-dialect=polynomial",
6864             ],
6865             "include/mlir/Dialect/Polynomial/IR/PolynomialDialect.h.inc",
6866         ),
6867         (
6868             [
6869                 "-gen-dialect-defs",
6870                 "-dialect=polynomial",
6871             ],
6872             "include/mlir/Dialect/Polynomial/IR/PolynomialDialect.cpp.inc",
6873         ),
6874         (
6875             [
6876                 "--gen-typedef-decls",
6877                 "-typedefs-dialect=polynomial",
6878             ],
6879             "include/mlir/Dialect/Polynomial/IR/PolynomialTypes.h.inc",
6880         ),
6881         (
6882             [
6883                 "--gen-typedef-defs",
6884                 "-typedefs-dialect=polynomial",
6885             ],
6886             "include/mlir/Dialect/Polynomial/IR/PolynomialTypes.cpp.inc",
6887         ),
6888         (
6889             ["-gen-op-doc"],
6890             "g3doc/Dialects/Polynomial/Polynomial.md",
6891         ),
6892     ],
6893     tblgen = ":mlir-tblgen",
6894     td_file = "include/mlir/Dialect/Polynomial/IR/Polynomial.td",
6895     deps = [":PolynomialTdFiles"],
6898 gentbl_cc_library(
6899     name = "PolynomialAttributesIncGen",
6900     tbl_outs = [
6901         (
6902             [
6903                 "-gen-attrdef-decls",
6904                 "-attrdefs-dialect=polynomial",
6905             ],
6906             "include/mlir/Dialect/Polynomial/IR/PolynomialAttributes.h.inc",
6907         ),
6908         (
6909             [
6910                 "-gen-attrdef-defs",
6911                 "-attrdefs-dialect=polynomial",
6912             ],
6913             "include/mlir/Dialect/Polynomial/IR/PolynomialAttributes.cpp.inc",
6914         ),
6915     ],
6916     tblgen = ":mlir-tblgen",
6917     td_file = "include/mlir/Dialect/Polynomial/IR/Polynomial.td",
6918     deps = [":PolynomialTdFiles"],
6921 gentbl_cc_library(
6922     name = "PolynomialCanonicalizationIncGen",
6923     strip_include_prefix = "include/mlir/Dialect/Polynomial/IR",
6924     tbl_outs = [
6925         (
6926             ["-gen-rewriters"],
6927             "include/mlir/Dialect/Polynomial/IR/PolynomialCanonicalization.inc",
6928         ),
6929     ],
6930     tblgen = ":mlir-tblgen",
6931     td_file = "lib/Dialect/Polynomial/IR/PolynomialCanonicalization.td",
6932     deps = [
6933         ":ArithOpsTdFiles",
6934         ":PolynomialTdFiles",
6935     ],
6938 td_library(
6939     name = "PtrTdFiles",
6940     srcs = [
6941         "include/mlir/Dialect/Ptr/IR/PtrAttrDefs.td",
6942         "include/mlir/Dialect/Ptr/IR/PtrDialect.td",
6943         "include/mlir/Dialect/Ptr/IR/PtrOps.td",
6944     ],
6945     includes = ["include"],
6946     deps = [
6947         ":AttrTdFiles",
6948         ":BuiltinDialectTdFiles",
6949         ":DataLayoutInterfacesTdFiles",
6950         ":OpBaseTdFiles",
6951     ],
6954 gentbl_cc_library(
6955     name = "PtrDialectIncGen",
6956     tbl_outs = [
6957         (
6958             ["-gen-dialect-decls"],
6959             "include/mlir/Dialect/Ptr/IR/PtrOpsDialect.h.inc",
6960         ),
6961         (
6962             ["-gen-dialect-defs"],
6963             "include/mlir/Dialect/Ptr/IR/PtrOpsDialect.cpp.inc",
6964         ),
6965         (
6966             ["-gen-typedef-decls"],
6967             "include/mlir/Dialect/Ptr/IR/PtrOpsTypes.h.inc",
6968         ),
6969         (
6970             ["-gen-typedef-defs"],
6971             "include/mlir/Dialect/Ptr/IR/PtrOpsTypes.cpp.inc",
6972         ),
6973     ],
6974     tblgen = ":mlir-tblgen",
6975     td_file = "include/mlir/Dialect/Ptr/IR/PtrDialect.td",
6976     deps = [
6977         ":PtrTdFiles",
6978     ],
6981 gentbl_cc_library(
6982     name = "PtrOpsIncGen",
6983     tbl_outs = [
6984         (
6985             ["-gen-op-decls"],
6986             "include/mlir/Dialect/Ptr/IR/PtrOps.h.inc",
6987         ),
6988         (
6989             ["-gen-op-defs"],
6990             "include/mlir/Dialect/Ptr/IR/PtrOps.cpp.inc",
6991         ),
6992     ],
6993     tblgen = ":mlir-tblgen",
6994     td_file = "include/mlir/Dialect/Ptr/IR/PtrOps.td",
6995     deps = [
6996         ":PtrTdFiles",
6997     ],
7000 gentbl_cc_library(
7001     name = "PtrAttrsIncGen",
7002     tbl_outs = [
7003         (
7004             ["-gen-attrdef-decls"],
7005             "include/mlir/Dialect/Ptr/IR/PtrOpsAttrs.h.inc",
7006         ),
7007         (
7008             ["-gen-attrdef-defs"],
7009             "include/mlir/Dialect/Ptr/IR/PtrOpsAttrs.cpp.inc",
7010         ),
7011     ],
7012     tblgen = ":mlir-tblgen",
7013     td_file = "include/mlir/Dialect/Ptr/IR/PtrAttrDefs.td",
7014     deps = [
7015         ":PtrTdFiles",
7016     ],
7019 cc_library(
7020     name = "PtrDialect",
7021     srcs = glob(
7022         [
7023             "lib/Dialect/Ptr/IR/*.cpp",
7024         ],
7025     ),
7026     hdrs = glob([
7027         "include/mlir/Dialect/Ptr/IR/*.h",
7028     ]),
7029     includes = ["include"],
7030     deps = [
7031         ":BytecodeOpInterface",
7032         ":DataLayoutInterfaces",
7033         ":IR",
7034         ":InliningUtils",
7035         ":PtrAttrsIncGen",
7036         ":PtrDialectIncGen",
7037         ":PtrOpsIncGen",
7038         "//llvm:Support",
7039     ],
7042 td_library(
7043     name = "SPIRVOpsTdFiles",
7044     srcs = glob(["include/mlir/Dialect/SPIRV/IR/*.td"]),
7045     includes = ["include"],
7046     deps = [
7047         ":BuiltinDialectTdFiles",
7048         ":CallInterfacesTdFiles",
7049         ":ControlFlowInterfacesTdFiles",
7050         ":FunctionInterfacesTdFiles",
7051         ":InferTypeOpInterfaceTdFiles",
7052         ":OpBaseTdFiles",
7053         ":SideEffectInterfacesTdFiles",
7054     ],
7057 gentbl_cc_library(
7058     name = "SPIRVOpsIncGen",
7059     tbl_outs = [
7060         (
7061             ["-gen-op-decls"],
7062             "include/mlir/Dialect/SPIRV/IR/SPIRVOps.h.inc",
7063         ),
7064         (
7065             ["-gen-op-defs"],
7066             "include/mlir/Dialect/SPIRV/IR/SPIRVOps.cpp.inc",
7067         ),
7068         (
7069             ["-gen-dialect-decls"],
7070             "include/mlir/Dialect/SPIRV/IR/SPIRVOpsDialect.h.inc",
7071         ),
7072         (
7073             ["-gen-dialect-defs"],
7074             "include/mlir/Dialect/SPIRV/IR/SPIRVOpsDialect.cpp.inc",
7075         ),
7076         (
7077             ["-gen-op-doc"],
7078             "g3doc/Dialects/SPIRV/SPIRVOps.md",
7079         ),
7080         (
7081             ["-gen-enum-decls"],
7082             "include/mlir/Dialect/SPIRV/IR/SPIRVEnums.h.inc",
7083         ),
7084         (
7085             ["-gen-enum-defs"],
7086             "include/mlir/Dialect/SPIRV/IR/SPIRVEnums.cpp.inc",
7087         ),
7088         (
7089             ["-gen-spirv-enum-avail-decls"],
7090             "include/mlir/Dialect/SPIRV/IR/SPIRVEnumAvailability.h.inc",
7091         ),
7092         (
7093             ["-gen-spirv-enum-avail-defs"],
7094             "include/mlir/Dialect/SPIRV/IR/SPIRVEnumAvailability.cpp.inc",
7095         ),
7096         (
7097             ["-gen-spirv-capability-implication"],
7098             "include/mlir/Dialect/SPIRV/IR/SPIRVCapabilityImplication.inc",
7099         ),
7100     ],
7101     tblgen = ":mlir-tblgen",
7102     td_file = "include/mlir/Dialect/SPIRV/IR/SPIRVOps.td",
7103     deps = [":SPIRVOpsTdFiles"],
7106 gentbl_cc_library(
7107     name = "SPIRVAttributesIncGen",
7108     tbl_outs = [
7109         (
7110             ["-gen-attrdef-decls"],
7111             "include/mlir/Dialect/SPIRV/IR/SPIRVAttributes.h.inc",
7112         ),
7113         (
7114             ["-gen-attrdef-defs"],
7115             "include/mlir/Dialect/SPIRV/IR/SPIRVAttributes.cpp.inc",
7116         ),
7117     ],
7118     tblgen = ":mlir-tblgen",
7119     td_file = "include/mlir/Dialect/SPIRV/IR/SPIRVAttributes.td",
7120     deps = [":SPIRVOpsTdFiles"],
7123 gentbl_cc_library(
7124     name = "SPIRVCanonicalizationIncGen",
7125     strip_include_prefix = "lib/Dialect/SPIRV/IR",
7126     tbl_outs = [
7127         (
7128             ["-gen-rewriters"],
7129             "lib/Dialect/SPIRV/IR/SPIRVCanonicalization.inc",
7130         ),
7131     ],
7132     tblgen = ":mlir-tblgen",
7133     td_file = "lib/Dialect/SPIRV/IR/SPIRVCanonicalization.td",
7134     deps = [":SPIRVOpsTdFiles"],
7137 gentbl_cc_library(
7138     name = "SPIRVAvailabilityIncGen",
7139     tbl_outs = [
7140         (
7141             ["-gen-avail-interface-decls"],
7142             "include/mlir/Dialect/SPIRV/IR/SPIRVAvailability.h.inc",
7143         ),
7144         (
7145             ["-gen-avail-interface-defs"],
7146             "include/mlir/Dialect/SPIRV/IR/SPIRVAvailability.cpp.inc",
7147         ),
7148         (
7149             ["-gen-spirv-avail-impls"],
7150             "include/mlir/Dialect/SPIRV/IR/SPIRVOpAvailabilityImpl.inc",
7151         ),
7152     ],
7153     tblgen = ":mlir-tblgen",
7154     td_file = "include/mlir/Dialect/SPIRV/IR/SPIRVOps.td",
7155     deps = [":SPIRVOpsTdFiles"],
7158 gentbl_cc_library(
7159     name = "SPIRVAttrUtilsGen",
7160     tbl_outs = [
7161         (
7162             ["-gen-spirv-attr-utils"],
7163             "include/mlir/Dialect/SPIRV/IR/SPIRVAttrUtils.inc",
7164         ),
7165     ],
7166     tblgen = ":mlir-tblgen",
7167     td_file = "include/mlir/Dialect/SPIRV/IR/SPIRVBase.td",
7168     deps = [":SPIRVOpsTdFiles"],
7171 gentbl_cc_library(
7172     name = "SPIRVSerializationGen",
7173     tbl_outs = [
7174         (
7175             ["-gen-spirv-serialization"],
7176             "include/mlir/Dialect/SPIRV/IR/SPIRVSerialization.inc",
7177         ),
7178     ],
7179     tblgen = ":mlir-tblgen",
7180     td_file = "include/mlir/Dialect/SPIRV/IR/SPIRVOps.td",
7181     deps = [":SPIRVOpsTdFiles"],
7184 cc_library(
7185     name = "SPIRVDialect",
7186     srcs = glob([
7187         "lib/Dialect/SPIRV/IR/*.cpp",
7188         "lib/Dialect/SPIRV/IR/*.h",
7189     ]),
7190     hdrs = glob([
7191         "include/mlir/Dialect/SPIRV/IR/*.h",
7192     ]),
7193     includes = ["include"],
7194     deps = [
7195         ":BytecodeOpInterface",
7196         ":CallOpInterfaces",
7197         ":CommonFolders",
7198         ":ControlFlowInterfaces",
7199         ":FunctionInterfaces",
7200         ":GPUDialect",
7201         ":IR",
7202         ":InferTypeOpInterface",
7203         ":InliningUtils",
7204         ":Parser",
7205         ":SPIRVAttrUtilsGen",
7206         ":SPIRVAttributesIncGen",
7207         ":SPIRVAvailabilityIncGen",
7208         ":SPIRVCanonicalizationIncGen",
7209         ":SPIRVOpsIncGen",
7210         ":SideEffectInterfaces",
7211         ":Support",
7212         ":UBDialect",
7213         "//llvm:Support",
7214     ],
7217 cc_library(
7218     name = "SPIRVTarget",
7219     srcs = ["lib/Target/SPIRV/Target.cpp"],
7220     hdrs = ["include/mlir/Target/SPIRV/Target.h"],
7221     includes = ["include"],
7222     deps = [
7223         ":GPUDialect",
7224         ":SPIRVDialect",
7225         ":SPIRVSerialization",
7226     ],
7229 gentbl_cc_library(
7230     name = "SPIRVPassIncGen",
7231     tbl_outs = [
7232         (
7233             [
7234                 "-gen-pass-decls",
7235                 "-name=SPIRV",
7236             ],
7237             "include/mlir/Dialect/SPIRV/Transforms/Passes.h.inc",
7238         ),
7239     ],
7240     tblgen = ":mlir-tblgen",
7241     td_file = "include/mlir/Dialect/SPIRV/Transforms/Passes.td",
7242     deps = [":PassBaseTdFiles"],
7245 cc_library(
7246     name = "SPIRVUtils",
7247     srcs = glob([
7248         "lib/Dialect/SPIRV/Utils/*.cpp",
7249     ]),
7250     hdrs = glob([
7251         "include/mlir/Dialect/SPIRV/Utils/*.h",
7252     ]),
7253     includes = ["include"],
7254     deps = [":SPIRVDialect"],
7257 cc_library(
7258     name = "SPIRVConversion",
7259     srcs = ["lib/Dialect/SPIRV/Transforms/SPIRVConversion.cpp"],
7260     hdrs = ["include/mlir/Dialect/SPIRV/Transforms/SPIRVConversion.h"],
7261     includes = ["include"],
7262     deps = [
7263         ":ArithDialect",
7264         ":DialectUtils",
7265         ":FuncDialect",
7266         ":IR",
7267         ":Pass",
7268         ":SPIRVDialect",
7269         ":Support",
7270         ":TransformUtils",
7271         ":VectorDialect",
7272         ":VectorTransforms",
7273         "//llvm:Support",
7274     ],
7277 cc_library(
7278     name = "SPIRVTransforms",
7279     srcs = glob(
7280         [
7281             "lib/Dialect/SPIRV/Transforms/*.cpp",
7282         ],
7283         exclude = ["lib/Dialect/SPIRV/Transforms/SPIRVConversion.cpp"],
7284     ),
7285     hdrs = glob(
7286         ["include/mlir/Dialect/SPIRV/Transforms/*.h"],
7287         exclude = ["include/mlir/Dialect/SPIRV/Transforms/SPIRVConversion.h"],
7288     ),
7289     includes = ["include"],
7290     deps = [
7291         ":FuncDialect",
7292         ":IR",
7293         ":Pass",
7294         ":SPIRVConversion",
7295         ":SPIRVDialect",
7296         ":SPIRVPassIncGen",
7297         ":SPIRVUtils",
7298         ":Support",
7299         ":TransformUtils",
7300         "//llvm:Support",
7301     ],
7304 cc_library(
7305     name = "SPIRVCommonConversion",
7306     hdrs = ["lib/Conversion/SPIRVCommon/Pattern.h"],
7307     includes = ["include"],
7308     deps = [
7309         ":IR",
7310         ":SPIRVDialect",
7311         ":TransformUtils",
7312         "//llvm:Support",
7313     ],
7316 cc_library(
7317     name = "SPIRVCommonAttrToLLVMConversion",
7318     srcs = ["lib/Conversion/SPIRVCommon/AttrToLLVMConverter.cpp"],
7319     hdrs = ["include/mlir/Conversion/SPIRVCommon/AttrToLLVMConverter.h"],
7320     includes = ["include"],
7321     deps = [
7322         ":SPIRVDialect",
7323     ],
7326 cc_library(
7327     name = "MathToSPIRV",
7328     srcs = glob([
7329         "lib/Conversion/MathToSPIRV/*.cpp",
7330     ]),
7331     hdrs = glob([
7332         "include/mlir/Conversion/MathToSPIRV/*.h",
7333     ]),
7334     includes = [
7335         "include",
7336         "lib/Conversion/MathToSPIRV",
7337     ],
7338     deps = [
7339         ":ConversionPassIncGen",
7340         ":IR",
7341         ":MathDialect",
7342         ":Pass",
7343         ":SPIRVCommonConversion",
7344         ":SPIRVConversion",
7345         ":SPIRVDialect",
7346         ":TransformUtils",
7347         "//llvm:Support",
7348     ],
7351 cc_library(
7352     name = "MathToROCDL",
7353     srcs = glob([
7354         "lib/Conversion/MathToROCDL/*.cpp",
7355     ]),
7356     hdrs = glob([
7357         "include/mlir/Conversion/MathToROCDL/*.h",
7358     ]),
7359     includes = ["include"],
7360     deps = [
7361         ":ConversionPassIncGen",
7362         ":DialectUtils",
7363         ":FuncDialect",
7364         ":GPUCommonTransforms",
7365         ":GPUToGPURuntimeTransforms",
7366         ":IR",
7367         ":LLVMCommonConversion",
7368         ":LLVMDialect",
7369         ":MathDialect",
7370         ":Pass",
7371         ":ROCDLDialect",
7372         ":TransformUtils",
7373         ":VectorDialect",
7374     ],
7377 cc_library(
7378     name = "FuncToEmitC",
7379     srcs = glob([
7380         "lib/Conversion/FuncToEmitC/*.cpp",
7381     ]),
7382     hdrs = glob([
7383         "include/mlir/Conversion/FuncToEmitC/*.h",
7384     ]),
7385     includes = [
7386         "include",
7387         "lib/Conversion/FuncToEmitC",
7388     ],
7389     deps = [
7390         ":ConversionPassIncGen",
7391         ":EmitCDialect",
7392         ":FuncDialect",
7393         ":Pass",
7394         ":TransformUtils",
7395     ],
7398 cc_library(
7399     name = "FuncToSPIRV",
7400     srcs = glob([
7401         "lib/Conversion/FuncToSPIRV/*.cpp",
7402     ]),
7403     hdrs = glob([
7404         "include/mlir/Conversion/FuncToSPIRV/*.h",
7405     ]),
7406     includes = [
7407         "include",
7408         "lib/Conversion/FuncToSPIRV",
7409     ],
7410     deps = [
7411         ":ConversionPassIncGen",
7412         ":FuncDialect",
7413         ":IR",
7414         ":Pass",
7415         ":SPIRVCommonConversion",
7416         ":SPIRVConversion",
7417         ":SPIRVDialect",
7418         ":SPIRVUtils",
7419         ":Support",
7420         ":TransformUtils",
7421         "//llvm:Support",
7422     ],
7425 cc_library(
7426     name = "TensorToLinalg",
7427     srcs = glob([
7428         "lib/Conversion/TensorToLinalg/*.cpp",
7429     ]),
7430     hdrs = glob([
7431         "include/mlir/Conversion/TensorToLinalg/*.h",
7432     ]),
7433     includes = [
7434         "include",
7435         "lib/Conversion/TensorToLinalg",
7436     ],
7437     deps = [
7438         ":ArithDialect",
7439         ":ConversionPassIncGen",
7440         ":IR",
7441         ":LinalgDialect",
7442         ":LinalgTransforms",
7443         ":Pass",
7444         ":Support",
7445         ":TensorDialect",
7446         ":TransformUtils",
7447         "//llvm:Support",
7448     ],
7451 cc_library(
7452     name = "TensorToSPIRV",
7453     srcs = glob([
7454         "lib/Conversion/TensorToSPIRV/*.cpp",
7455     ]),
7456     hdrs = glob([
7457         "include/mlir/Conversion/TensorToSPIRV/*.h",
7458     ]),
7459     includes = [
7460         "include",
7461         "lib/Conversion/TensorToSPIRV",
7462     ],
7463     deps = [
7464         ":ArithToSPIRV",
7465         ":ConversionPassIncGen",
7466         ":FuncToSPIRV",
7467         ":IR",
7468         ":Pass",
7469         ":SPIRVCommonConversion",
7470         ":SPIRVConversion",
7471         ":SPIRVDialect",
7472         ":SPIRVUtils",
7473         ":Support",
7474         ":TensorDialect",
7475         ":TransformUtils",
7476         "//llvm:Support",
7477     ],
7480 cc_library(
7481     name = "SPIRVBinaryUtils",
7482     srcs = ["lib/Target/SPIRV/SPIRVBinaryUtils.cpp"],
7483     hdrs = ["include/mlir/Target/SPIRV/SPIRVBinaryUtils.h"],
7484     includes = ["include"],
7485     deps = [
7486         ":SPIRVDialect",
7487         ":Support",
7488         "//llvm:config",
7489     ],
7492 cc_library(
7493     name = "SPIRVSerialization",
7494     srcs = [
7495         "lib/Target/SPIRV/Serialization/Serialization.cpp",
7496         "lib/Target/SPIRV/Serialization/SerializeOps.cpp",
7497         "lib/Target/SPIRV/Serialization/Serializer.cpp",
7498         "lib/Target/SPIRV/Serialization/Serializer.h",
7499     ],
7500     hdrs = ["include/mlir/Target/SPIRV/Serialization.h"],
7501     includes = ["include"],
7502     deps = [
7503         ":IR",
7504         ":SPIRVBinaryUtils",
7505         ":SPIRVDialect",
7506         ":SPIRVSerializationGen",
7507         ":Support",
7508         "//llvm:Support",
7509     ],
7512 cc_library(
7513     name = "SPIRVDeserialization",
7514     srcs = glob([
7515         "lib/Target/SPIRV/Deserialization/*.cpp",
7516         "lib/Target/SPIRV/Deserialization/*.h",
7517     ]),
7518     hdrs = ["include/mlir/Target/SPIRV/Deserialization.h"],
7519     includes = ["include"],
7520     deps = [
7521         ":IR",
7522         ":SPIRVBinaryUtils",
7523         ":SPIRVDialect",
7524         ":SPIRVSerializationGen",
7525         ":Support",
7526         "//llvm:Support",
7527     ],
7530 cc_library(
7531     name = "SPIRVModuleCombiner",
7532     srcs = glob(
7533         ["lib/Dialect/SPIRV/Linking/ModuleCombiner/*.cpp"],
7534     ),
7535     hdrs = ["include/mlir/Dialect/SPIRV/Linking/ModuleCombiner.h"],
7536     includes = ["include"],
7537     deps = [
7538         ":IR",
7539         ":SPIRVDialect",
7540         ":Support",
7541         "//llvm:Support",
7542     ],
7545 cc_library(
7546     name = "SPIRVTranslateRegistration",
7547     srcs = ["lib/Target/SPIRV/TranslateRegistration.cpp"],
7548     includes = ["include"],
7549     deps = [
7550         ":IR",
7551         ":Parser",
7552         ":SPIRVDeserialization",
7553         ":SPIRVDialect",
7554         ":SPIRVSerialization",
7555         ":Support",
7556         ":TranslateLib",
7557         "//llvm:Support",
7558     ],
7561 td_library(
7562     name = "TensorOpsTdFiles",
7563     srcs = [
7564         "include/mlir/Dialect/Tensor/IR/TensorBase.td",
7565         "include/mlir/Dialect/Tensor/IR/TensorOps.td",
7566     ],
7567     includes = ["include"],
7568     deps = [
7569         ":CastInterfacesTdFiles",
7570         ":ControlFlowInterfacesTdFiles",
7571         ":DestinationStyleOpInterfaceTdFiles",
7572         ":InferTypeOpInterfaceTdFiles",
7573         ":OpBaseTdFiles",
7574         ":ParallelCombiningOpInterfaceTdFiles",
7575         ":ShapedOpInterfacesTdFiles",
7576         ":SideEffectInterfacesTdFiles",
7577         ":TilingInterfaceTdFiles",
7578         ":ViewLikeInterfaceTdFiles",
7579     ],
7582 gentbl_cc_library(
7583     name = "TensorOpsIncGen",
7584     tbl_outs = [
7585         (
7586             [
7587                 "-gen-dialect-decls",
7588                 "-dialect=tensor",
7589             ],
7590             "include/mlir/Dialect/Tensor/IR/TensorOpsDialect.h.inc",
7591         ),
7592         (
7593             [
7594                 "-gen-dialect-defs",
7595                 "-dialect=tensor",
7596             ],
7597             "include/mlir/Dialect/Tensor/IR/TensorOpsDialect.cpp.inc",
7598         ),
7599         (
7600             ["-gen-op-decls"],
7601             "include/mlir/Dialect/Tensor/IR/TensorOps.h.inc",
7602         ),
7603         (
7604             ["-gen-op-defs"],
7605             "include/mlir/Dialect/Tensor/IR/TensorOps.cpp.inc",
7606         ),
7607     ],
7608     tblgen = ":mlir-tblgen",
7609     td_file = "include/mlir/Dialect/Tensor/IR/TensorOps.td",
7610     deps = [":TensorOpsTdFiles"],
7613 cc_library(
7614     name = "TensorDialect",
7615     srcs = [
7616         "lib/Dialect/Tensor/IR/TensorDialect.cpp",
7617         "lib/Dialect/Tensor/IR/TensorOps.cpp",
7618         "lib/Dialect/Tensor/IR/ValueBoundsOpInterfaceImpl.cpp",
7619     ],
7620     hdrs = [
7621         "include/mlir/Dialect/Tensor/IR/ShardingInterfaceImpl.h",
7622         "include/mlir/Dialect/Tensor/IR/Tensor.h",
7623         "include/mlir/Dialect/Tensor/IR/ValueBoundsOpInterfaceImpl.h",
7624     ],
7625     includes = ["include"],
7626     deps = [
7627         ":AffineDialect",
7628         ":ArithDialect",
7629         ":ArithUtils",
7630         ":BufferizationInterfaces",
7631         ":BytecodeOpInterface",
7632         ":CastInterfaces",
7633         ":ComplexDialect",
7634         ":ControlFlowInterfaces",
7635         ":DestinationStyleOpInterface",
7636         ":DialectUtils",
7637         ":IR",
7638         ":InferTypeOpInterface",
7639         ":InliningUtils",
7640         ":LoopLikeInterface",
7641         ":ParallelCombiningOpInterface",
7642         ":ShapedOpInterfaces",
7643         ":SideEffectInterfaces",
7644         ":SubsetOpInterface",
7645         ":Support",
7646         ":TensorOpsIncGen",
7647         ":TilingInterface",
7648         ":TransformDialectInterfaces",
7649         ":ValueBoundsOpInterface",
7650         ":ViewLikeInterface",
7651         "//llvm:Support",
7652     ],
7655 cc_library(
7656     name = "TensorInferTypeOpInterfaceImpl",
7657     srcs = ["lib/Dialect/Tensor/IR/TensorInferTypeOpInterfaceImpl.cpp"],
7658     hdrs = ["include/mlir/Dialect/Tensor/IR/TensorInferTypeOpInterfaceImpl.h"],
7659     includes = ["include"],
7660     deps = [
7661         ":AffineDialect",
7662         ":ArithUtils",
7663         ":DialectUtils",
7664         ":IR",
7665         ":InferTypeOpInterface",
7666         ":TensorDialect",
7667     ],
7670 cc_library(
7671     name = "TensorTilingInterfaceImpl",
7672     srcs = ["lib/Dialect/Tensor/IR/TensorTilingInterfaceImpl.cpp"],
7673     hdrs = ["include/mlir/Dialect/Tensor/IR/TensorTilingInterfaceImpl.h"],
7674     includes = ["include"],
7675     deps = [
7676         ":AffineDialect",
7677         ":AffineUtils",
7678         ":ArithUtils",
7679         ":DialectUtils",
7680         ":IR",
7681         ":LinalgDialect",
7682         ":LinalgUtils",
7683         ":SCFDialect",
7684         ":TensorDialect",
7685         ":TensorUtils",
7686         ":TilingInterface",
7687         ":InferTypeOpInterface",
7688         ":ValueBoundsOpInterface",
7689     ],
7692 cc_library(
7693     name = "TensorExtensions",
7694     srcs = glob(["lib/Dialect/Tensor/Extensions/*.cpp"]),
7695     hdrs = glob(["include/mlir/Dialect/Tensor/Extensions/*.h"]),
7696     includes = ["include"],
7697     deps = [
7698         ":DialectUtils",
7699         ":IR",
7700         ":MeshDialect",
7701         ":MeshShardingInterface",
7702         ":MeshShardingInterfaceIncGen",
7703         ":Support",
7704         ":TensorDialect",
7705         "//llvm:Support",
7706     ],
7709 cc_library(
7710     name = "TensorUtils",
7711     srcs = ["lib/Dialect/Tensor/Utils/Utils.cpp"],
7712     hdrs = ["include/mlir/Dialect/Tensor/Utils/Utils.h"],
7713     includes = ["include"],
7714     deps = [
7715         ":AffineDialect",
7716         ":ArithDialect",
7717         ":ArithUtils",
7718         ":DialectUtils",
7719         ":TensorDialect",
7720         ":ValueBoundsOpInterface",
7721         ":VectorDialect",
7722     ],
7725 gentbl_cc_library(
7726     name = "TensorPassIncGen",
7727     tbl_outs = [
7728         (
7729             [
7730                 "-gen-pass-decls",
7731                 "-name=Tensor",
7732             ],
7733             "include/mlir/Dialect/Tensor/Transforms/Passes.h.inc",
7734         ),
7735     ],
7736     tblgen = ":mlir-tblgen",
7737     td_file = "include/mlir/Dialect/Tensor/Transforms/Passes.td",
7738     deps = [":PassBaseTdFiles"],
7741 cc_library(
7742     name = "TensorTransforms",
7743     srcs = glob(
7744         [
7745             "lib/Dialect/Tensor/Transforms/*.cpp",
7746         ],
7747     ),
7748     hdrs = glob(["include/mlir/Dialect/Tensor/Transforms/*.h"]),
7749     includes = ["include"],
7750     deps = [
7751         ":AffineDialect",
7752         ":AffineTransforms",
7753         ":AffineUtils",
7754         ":ArithDialect",
7755         ":ArithUtils",
7756         ":BufferizationDialect",
7757         ":BufferizationInterfaces",
7758         ":BufferizationTransforms",
7759         ":DialectUtils",
7760         ":FuncDialect",
7761         ":IR",
7762         ":LinalgDialect",
7763         ":MemRefDialect",
7764         ":Pass",
7765         ":SCFDialect",
7766         ":SubsetOpInterface",
7767         ":TensorDialect",
7768         ":TensorPassIncGen",
7769         ":TensorUtils",
7770         ":TilingInterface",
7771         ":TransformUtils",
7772         ":ValueBoundsOpInterface",
7773         ":VectorDialect",
7774         ":VectorUtils",
7775         ":ViewLikeInterface",
7776         "//llvm:Support",
7777     ],
7780 td_library(
7781     name = "TensorTransformOpsTdFiles",
7782     srcs = [
7783         "include/mlir/Dialect/Tensor/TransformOps/TensorTransformOps.td",
7784     ],
7785     includes = ["include"],
7786     deps = [
7787         ":TransformDialectTdFiles",
7788     ],
7791 gentbl_cc_library(
7792     name = "TensorTransformOpsIncGen",
7793     tbl_outs = [
7794         (
7795             ["-gen-op-decls"],
7796             "include/mlir/Dialect/Tensor/TransformOps/TensorTransformOps.h.inc",
7797         ),
7798         (
7799             ["-gen-op-defs"],
7800             "include/mlir/Dialect/Tensor/TransformOps/TensorTransformOps.cpp.inc",
7801         ),
7802     ],
7803     tblgen = ":mlir-tblgen",
7804     td_file = "include/mlir/Dialect/Tensor/TransformOps/TensorTransformOps.td",
7805     deps = [
7806         ":TensorTransformOpsTdFiles",
7807     ],
7810 cc_library(
7811     name = "TensorTransformOps",
7812     srcs = glob(["lib/Dialect/Tensor/TransformOps/*.cpp"]),
7813     hdrs = glob(["include/mlir/Dialect/Tensor/TransformOps/*.h"]),
7814     includes = ["include"],
7815     deps = [
7816         ":AffineDialect",
7817         ":IR",
7818         ":SCFDialect",
7819         ":TensorDialect",
7820         ":TensorTransformOpsIncGen",
7821         ":TensorTransforms",
7822         ":TensorUtils",
7823         ":TransformDialect",
7824         ":TransformDialectInterfaces",
7825         ":TransformUtils",
7826     ],
7829 cc_library(
7830     name = "Rewrite",
7831     srcs = glob([
7832         "lib/Rewrite/*.cpp",
7833         "lib/Rewrite/*.h",
7834     ]),
7835     hdrs = glob(["include/mlir/Rewrite/*.h"]),
7836     includes = ["include"],
7837     deps = [
7838         ":Analysis",
7839         ":IR",
7840         ":PDLDialect",
7841         ":PDLInterpDialect",
7842         ":PDLToPDLInterp",
7843         ":Pass",
7844         ":SideEffectInterfaces",
7845         "//llvm:Support",
7846     ],
7849 cc_library(
7850     name = "TransformUtils",
7851     srcs = glob(
7852         include = ["lib/Transforms/Utils/*.cpp"],
7853         exclude = ["lib/Transforms/Utils/InliningUtils.cpp"],
7854     ) + [
7855     ],
7856     hdrs = [
7857         "include/mlir/Transforms/CFGToSCF.h",
7858         "include/mlir/Transforms/CommutativityUtils.h",
7859         "include/mlir/Transforms/ControlFlowSinkUtils.h",
7860         "include/mlir/Transforms/DialectConversion.h",
7861         "include/mlir/Transforms/FoldUtils.h",
7862         "include/mlir/Transforms/GreedyPatternRewriteDriver.h",
7863         "include/mlir/Transforms/Inliner.h",
7864         "include/mlir/Transforms/LoopInvariantCodeMotionUtils.h",
7865         "include/mlir/Transforms/OneToNTypeConversion.h",
7866         "include/mlir/Transforms/RegionUtils.h",
7867         "include/mlir/Transforms/WalkPatternRewriteDriver.h",
7868     ],
7869     includes = ["include"],
7870     deps = [
7871         ":Analysis",
7872         ":CallOpInterfaces",
7873         ":ControlFlowInterfaces",
7874         ":FunctionInterfaces",
7875         ":IR",
7876         ":InliningUtils",
7877         ":LoopLikeInterface",
7878         ":Pass",
7879         ":Rewrite",
7880         ":SideEffectInterfaces",
7881         ":SubsetOpInterface",
7882         ":Support",
7883         ":config",
7884         "//llvm:Support",
7885     ],
7888 gentbl_cc_library(
7889     name = "DerivedAttributeOpInterfaceIncGen",
7890     tbl_outs = [
7891         (
7892             ["-gen-op-interface-decls"],
7893             "include/mlir/Interfaces/DerivedAttributeOpInterface.h.inc",
7894         ),
7895         (
7896             ["-gen-op-interface-defs"],
7897             "include/mlir/Interfaces/DerivedAttributeOpInterface.cpp.inc",
7898         ),
7899     ],
7900     tblgen = ":mlir-tblgen",
7901     td_file = "include/mlir/Interfaces/DerivedAttributeOpInterface.td",
7902     deps = [":DerivedAttributeOpInterfaceTdFiles"],
7905 cc_library(
7906     name = "DerivedAttributeOpInterface",
7907     srcs = ["lib/Interfaces/DerivedAttributeOpInterface.cpp"],
7908     hdrs = ["include/mlir/Interfaces/DerivedAttributeOpInterface.h"],
7909     includes = ["include"],
7910     deps = [
7911         ":DerivedAttributeOpInterfaceIncGen",
7912         ":IR",
7913     ],
7916 gentbl_cc_library(
7917     name = "DestinationStyleOpInterfaceIncGen",
7918     tbl_outs = [
7919         (
7920             ["-gen-op-interface-decls"],
7921             "include/mlir/Interfaces/DestinationStyleOpInterface.h.inc",
7922         ),
7923         (
7924             ["-gen-op-interface-defs"],
7925             "include/mlir/Interfaces/DestinationStyleOpInterface.cpp.inc",
7926         ),
7927     ],
7928     tblgen = ":mlir-tblgen",
7929     td_file = "include/mlir/Interfaces/DestinationStyleOpInterface.td",
7930     deps = [":DestinationStyleOpInterfaceTdFiles"],
7933 cc_library(
7934     name = "DestinationStyleOpInterface",
7935     srcs = ["lib/Interfaces/DestinationStyleOpInterface.cpp"],
7936     hdrs = ["include/mlir/Interfaces/DestinationStyleOpInterface.h"],
7937     includes = ["include"],
7938     deps = [
7939         ":DestinationStyleOpInterfaceIncGen",
7940         ":IR",
7941         "//llvm:Support",
7942     ],
7945 gentbl_cc_library(
7946     name = "InferIntRangeInterfaceIncGen",
7947     tbl_outs = [
7948         (
7949             ["-gen-op-interface-decls"],
7950             "include/mlir/Interfaces/InferIntRangeInterface.h.inc",
7951         ),
7952         (
7953             ["-gen-op-interface-defs"],
7954             "include/mlir/Interfaces/InferIntRangeInterface.cpp.inc",
7955         ),
7956     ],
7957     tblgen = ":mlir-tblgen",
7958     td_file = "include/mlir/Interfaces/InferIntRangeInterface.td",
7959     deps = [":InferIntRangeInterfaceTdFiles"],
7962 cc_library(
7963     name = "InferIntRangeInterface",
7964     srcs = ["lib/Interfaces/InferIntRangeInterface.cpp"],
7965     hdrs = ["include/mlir/Interfaces/InferIntRangeInterface.h"],
7966     includes = ["include"],
7967     deps = [
7968         ":IR",
7969         ":InferIntRangeInterfaceIncGen",
7970     ],
7973 td_library(
7974     name = "DataLayoutInterfacesTdFiles",
7975     srcs = ["include/mlir/Interfaces/DataLayoutInterfaces.td"],
7976     includes = ["include"],
7979 gentbl_cc_library(
7980     name = "DataLayoutInterfacesIncGen",
7981     tbl_outs = [
7982         (
7983             ["-gen-attr-interface-decls"],
7984             "include/mlir/Interfaces/DataLayoutAttrInterface.h.inc",
7985         ),
7986         (
7987             ["-gen-attr-interface-defs"],
7988             "include/mlir/Interfaces/DataLayoutAttrInterface.cpp.inc",
7989         ),
7990         (
7991             ["-gen-op-interface-decls"],
7992             "include/mlir/Interfaces/DataLayoutOpInterface.h.inc",
7993         ),
7994         (
7995             ["-gen-op-interface-defs"],
7996             "include/mlir/Interfaces/DataLayoutOpInterface.cpp.inc",
7997         ),
7998         (
7999             ["-gen-type-interface-decls"],
8000             "include/mlir/Interfaces/DataLayoutTypeInterface.h.inc",
8001         ),
8002         (
8003             ["-gen-type-interface-defs"],
8004             "include/mlir/Interfaces/DataLayoutTypeInterface.cpp.inc",
8005         ),
8006     ],
8007     tblgen = ":mlir-tblgen",
8008     td_file = "include/mlir/Interfaces/DataLayoutInterfaces.td",
8009     deps = [":OpBaseTdFiles"],
8012 gentbl_cc_library(
8013     name = "LoopLikeInterfaceIncGen",
8014     tbl_outs = [
8015         (
8016             ["-gen-op-interface-decls"],
8017             "include/mlir/Interfaces/LoopLikeInterface.h.inc",
8018         ),
8019         (
8020             ["-gen-op-interface-defs"],
8021             "include/mlir/Interfaces/LoopLikeInterface.cpp.inc",
8022         ),
8023     ],
8024     tblgen = ":mlir-tblgen",
8025     td_file = "include/mlir/Interfaces/LoopLikeInterface.td",
8026     deps = [":LoopLikeInterfaceTdFiles"],
8029 gentbl_cc_library(
8030     name = "MemorySlotInterfacesIncGen",
8031     tbl_outs = [
8032         (
8033             ["-gen-op-interface-decls"],
8034             "include/mlir/Interfaces/MemorySlotOpInterfaces.h.inc",
8035         ),
8036         (
8037             ["-gen-op-interface-defs"],
8038             "include/mlir/Interfaces/MemorySlotOpInterfaces.cpp.inc",
8039         ),
8040         (
8041             ["-gen-type-interface-decls"],
8042             "include/mlir/Interfaces/MemorySlotTypeInterfaces.h.inc",
8043         ),
8044         (
8045             ["-gen-type-interface-defs"],
8046             "include/mlir/Interfaces/MemorySlotTypeInterfaces.cpp.inc",
8047         ),
8048     ],
8049     tblgen = ":mlir-tblgen",
8050     td_file = "include/mlir/Interfaces/MemorySlotInterfaces.td",
8051     deps = [":MemorySlotInterfacesTdFiles"],
8054 gentbl_cc_library(
8055     name = "ShapedOpInterfacesIncGen",
8056     tbl_outs = [
8057         (
8058             ["-gen-op-interface-decls"],
8059             "include/mlir/Interfaces/ShapedOpInterfaces.h.inc",
8060         ),
8061         (
8062             ["-gen-op-interface-defs"],
8063             "include/mlir/Interfaces/ShapedOpInterfaces.cpp.inc",
8064         ),
8065     ],
8066     tblgen = ":mlir-tblgen",
8067     td_file = "include/mlir/Interfaces/ShapedOpInterfaces.td",
8068     deps = [":ShapedOpInterfacesTdFiles"],
8071 gentbl_cc_library(
8072     name = "ParallelCombiningOpInterfaceIncGen",
8073     tbl_outs = [
8074         (
8075             ["-gen-op-interface-decls"],
8076             "include/mlir/Interfaces/ParallelCombiningOpInterface.h.inc",
8077         ),
8078         (
8079             ["-gen-op-interface-defs"],
8080             "include/mlir/Interfaces/ParallelCombiningOpInterface.cpp.inc",
8081         ),
8082     ],
8083     tblgen = ":mlir-tblgen",
8084     td_file = "include/mlir/Interfaces/ParallelCombiningOpInterface.td",
8085     deps = [":ParallelCombiningOpInterfaceTdFiles"],
8088 gentbl_cc_library(
8089     name = "RuntimeVerifiableOpInterfaceIncGen",
8090     tbl_outs = [
8091         (
8092             ["-gen-op-interface-decls"],
8093             "include/mlir/Interfaces/RuntimeVerifiableOpInterface.h.inc",
8094         ),
8095         (
8096             ["-gen-op-interface-defs"],
8097             "include/mlir/Interfaces/RuntimeVerifiableOpInterface.cpp.inc",
8098         ),
8099     ],
8100     tblgen = ":mlir-tblgen",
8101     td_file = "include/mlir/Interfaces/RuntimeVerifiableOpInterface.td",
8102     deps = [":RuntimeVerifiableOpInterfaceTdFiles"],
8105 gentbl_cc_library(
8106     name = "VectorInterfacesIncGen",
8107     tbl_outs = [
8108         (
8109             ["-gen-op-interface-decls"],
8110             "include/mlir/Interfaces/VectorInterfaces.h.inc",
8111         ),
8112         (
8113             ["-gen-op-interface-defs"],
8114             "include/mlir/Interfaces/VectorInterfaces.cpp.inc",
8115         ),
8116     ],
8117     tblgen = ":mlir-tblgen",
8118     td_file = "include/mlir/Interfaces/VectorInterfaces.td",
8119     deps = [":VectorInterfacesTdFiles"],
8122 gentbl_cc_library(
8123     name = "ViewLikeInterfaceIncGen",
8124     tbl_outs = [
8125         (
8126             ["-gen-op-interface-decls"],
8127             "include/mlir/Interfaces/ViewLikeInterface.h.inc",
8128         ),
8129         (
8130             ["-gen-op-interface-defs"],
8131             "include/mlir/Interfaces/ViewLikeInterface.cpp.inc",
8132         ),
8133     ],
8134     tblgen = ":mlir-tblgen",
8135     td_file = "include/mlir/Interfaces/ViewLikeInterface.td",
8136     deps = [":ViewLikeInterfaceTdFiles"],
8139 gentbl_cc_library(
8140     name = "CopyOpInterfaceIncGen",
8141     tbl_outs = [
8142         (
8143             ["-gen-op-interface-decls"],
8144             "include/mlir/Interfaces/CopyOpInterface.h.inc",
8145         ),
8146         (
8147             ["-gen-op-interface-defs"],
8148             "include/mlir/Interfaces/CopyOpInterface.cpp.inc",
8149         ),
8150     ],
8151     tblgen = ":mlir-tblgen",
8152     td_file = "include/mlir/Interfaces/CopyOpInterface.td",
8153     deps = [":CopyOpInterfaceTdFiles"],
8156 gentbl_cc_library(
8157     name = "TransformsPassIncGen",
8158     tbl_outs = [
8159         (
8160             [
8161                 "-gen-pass-decls",
8162                 "-name=Transforms",
8163             ],
8164             "include/mlir/Transforms/Passes.h.inc",
8165         ),
8166         (
8167             [
8168                 "-gen-pass-capi-header",
8169                 "--prefix=Transforms",
8170             ],
8171             "include/mlir/Transforms/Transforms.capi.h.inc",
8172         ),
8173         (
8174             [
8175                 "-gen-pass-capi-impl",
8176                 "--prefix=Transforms",
8177             ],
8178             "include/mlir/Transforms/Transforms.capi.cpp.inc",
8179         ),
8180     ],
8181     tblgen = ":mlir-tblgen",
8182     td_file = "include/mlir/Transforms/Passes.td",
8183     deps = [
8184         ":PassBaseTdFiles",
8185         ":RewritePassBaseTdFiles",
8186     ],
8189 cc_library(
8190     name = "Transforms",
8191     srcs = glob([
8192         "lib/Transforms/*.cpp",
8193     ]),
8194     hdrs = [
8195         "include/mlir/Transforms/CSE.h",
8196         "include/mlir/Transforms/EndomorphismSimplification.h",
8197         "include/mlir/Transforms/HomomorphismSimplification.h",
8198         "include/mlir/Transforms/LocationSnapshot.h",
8199         "include/mlir/Transforms/Mem2Reg.h",
8200         "include/mlir/Transforms/Passes.h",
8201         "include/mlir/Transforms/SROA.h",
8202         "include/mlir/Transforms/ViewOpGraph.h",
8203     ],
8204     includes = ["include"],
8205     deps = [
8206         ":Analysis",
8207         ":CallOpInterfaces",
8208         ":ControlFlowInterfaces",
8209         ":FunctionInterfaces",
8210         ":IR",
8211         ":LoopLikeInterface",
8212         ":MemorySlotInterfaces",
8213         ":Pass",
8214         ":RuntimeVerifiableOpInterface",
8215         ":SideEffectInterfaces",
8216         ":Support",
8217         ":TransformUtils",
8218         ":TransformsPassIncGen",
8219         "//llvm:Support",
8220     ],
8223 cc_library(
8224     name = "CommonFolders",
8225     srcs = [
8226     ],
8227     hdrs = ["include/mlir/Dialect/CommonFolders.h"],
8228     includes = ["include"],
8229     deps = [
8230         ":IR",
8231         "//llvm:Support",
8232     ],
8235 cc_library(
8236     name = "SCFToGPU",
8237     srcs = glob(["lib/Conversion/SCFToGPU/*.cpp"]),
8238     hdrs = glob(["include/mlir/Conversion/SCFToGPU/*.h"]),
8239     includes = ["include"],
8240     deps = [
8241         ":AffineDialect",
8242         ":AffineToStandard",
8243         ":ArithDialect",
8244         ":ComplexDialect",
8245         ":ConversionPassIncGen",
8246         ":FunctionInterfaces",
8247         ":GPUDialect",
8248         ":GPUTransforms",
8249         ":IR",
8250         ":MemRefDialect",
8251         ":Pass",
8252         ":SCFDialect",
8253         ":SideEffectInterfaces",
8254         ":Support",
8255         ":TransformUtils",
8256         ":Transforms",
8257         "//llvm:Support",
8258     ],
8261 cc_library(
8262     name = "SCFToEmitC",
8263     srcs = glob(["lib/Conversion/SCFToEmitC/*.cpp"]),
8264     hdrs = glob(["include/mlir/Conversion/SCFToEmitC/*.h"]),
8265     includes = ["include"],
8266     deps = [
8267         ":ArithDialect",
8268         ":ConversionPassIncGen",
8269         ":EmitCDialect",
8270         ":IR",
8271         ":SCFDialect",
8272         ":TransformUtils",
8273         ":Transforms",
8274     ],
8277 cc_library(
8278     name = "SCFToSPIRV",
8279     srcs = glob([
8280         "lib/Conversion/SCFToSPIRV/*.cpp",
8281     ]),
8282     hdrs = glob([
8283         "include/mlir/Conversion/SCFToSPIRV/*.h",
8284     ]),
8285     includes = ["include"],
8286     deps = [
8287         ":ArithToSPIRV",
8288         ":ConversionPassIncGen",
8289         ":FuncToSPIRV",
8290         ":IR",
8291         ":IndexToSPIRV",
8292         ":MemRefToSPIRV",
8293         ":Pass",
8294         ":SCFDialect",
8295         ":SPIRVConversion",
8296         ":SPIRVDialect",
8297         ":TransformUtils",
8298         "//llvm:Support",
8299     ],
8302 cc_library(
8303     name = "SCFToOpenMP",
8304     srcs = [
8305         "lib/Conversion/SCFToOpenMP/SCFToOpenMP.cpp",
8306     ],
8307     hdrs = ["include/mlir/Conversion/SCFToOpenMP/SCFToOpenMP.h"],
8308     includes = ["include"],
8309     deps = [
8310         ":AffineAnalysis",
8311         ":Analysis",
8312         ":ArithDialect",
8313         ":ConversionPassIncGen",
8314         ":IR",
8315         ":LLVMDialect",
8316         ":MemRefDialect",
8317         ":OpenMPDialect",
8318         ":Pass",
8319         ":SCFDialect",
8320         ":TransformUtils",
8321     ],
8324 cc_library(
8325     name = "SCFToControlFlow",
8326     srcs = [
8327         "lib/Conversion/SCFToControlFlow/SCFToControlFlow.cpp",
8328     ],
8329     hdrs = ["include/mlir/Conversion/SCFToControlFlow/SCFToControlFlow.h"],
8330     includes = ["include"],
8331     deps = [
8332         ":ArithDialect",
8333         ":ControlFlowDialect",
8334         ":ConversionPassIncGen",
8335         ":IR",
8336         ":LLVMDialect",
8337         ":SCFDialect",
8338         ":SCFTransforms",
8339         ":TransformUtils",
8340         ":Transforms",
8341     ],
8344 cc_library(
8345     name = "LLVMCommonConversion",
8346     srcs = glob([
8347         "lib/Conversion/LLVMCommon/*.cpp",
8348     ]) + ["lib/Conversion/LLVMCommon/MemRefDescriptor.h"],
8349     hdrs = glob(["include/mlir/Conversion/LLVMCommon/*.h"]),
8350     includes = ["include"],
8351     deps = [
8352         ":DataLayoutInterfaces",
8353         ":IR",
8354         ":LLVMDialect",
8355         ":Support",
8356         ":TransformUtils",
8357         ":Transforms",
8358         "//llvm:Core",
8359         "//llvm:Support",
8360     ],
8363 cc_library(
8364     name = "ReconcileUnrealizedCasts",
8365     srcs = glob(["lib/Conversion/ReconcileUnrealizedCasts/*.cpp"]),
8366     hdrs = glob(["include/mlir/Conversion/ReconcileUnrealizedCasts/*.h"]),
8367     includes = ["include"],
8368     deps = [
8369         ":ConversionPassIncGen",
8370         ":IR",
8371         ":Pass",
8372         ":TransformUtils",
8373     ],
8376 cc_library(
8377     name = "ConvertToLLVMInterface",
8378     srcs = ["lib/Conversion/ConvertToLLVM/ToLLVMInterface.cpp"],
8379     hdrs = ["include/mlir/Conversion/ConvertToLLVM/ToLLVMInterface.h"],
8380     includes = ["include"],
8381     deps = [
8382         ":IR",
8383         ":Support",
8384         "//llvm:Support",
8385     ],
8388 cc_library(
8389     name = "ConvertToLLVM",
8390     srcs = ["lib/Conversion/ConvertToLLVM/ConvertToLLVMPass.cpp"],
8391     hdrs = ["include/mlir/Conversion/ConvertToLLVM/ToLLVMPass.h"],
8392     includes = ["include"],
8393     deps = [
8394         ":ConversionPassIncGen",
8395         ":ConvertToLLVMInterface",
8396         ":IR",
8397         ":LLVMCommonConversion",
8398         ":LLVMDialect",
8399         ":Pass",
8400         ":Rewrite",
8401         ":TransformUtils",
8402     ],
8405 cc_library(
8406     name = "FuncToLLVM",
8407     srcs = [
8408         "lib/Conversion/FuncToLLVM/FuncToLLVM.cpp",
8409     ],
8410     hdrs = [
8411         "include/mlir/Conversion/FuncToLLVM/ConvertFuncToLLVM.h",
8412         "include/mlir/Conversion/FuncToLLVM/ConvertFuncToLLVMPass.h",
8413     ],
8414     includes = ["include"],
8415     deps = [
8416         ":Analysis",
8417         ":ArithToLLVM",
8418         ":ControlFlowToLLVM",
8419         ":ConversionPassIncGen",
8420         ":ConvertToLLVMInterface",
8421         ":DataLayoutInterfaces",
8422         ":DialectUtils",
8423         ":FuncDialect",
8424         ":FuncTransforms",
8425         ":FunctionInterfaces",
8426         ":IR",
8427         ":LLVMCommonConversion",
8428         ":LLVMDialect",
8429         ":MathDialect",
8430         ":MemRefDialect",
8431         ":Parser",
8432         ":Pass",
8433         ":Support",
8434         ":TransformUtils",
8435         ":Transforms",
8436         "//llvm:Core",
8437         "//llvm:Support",
8438     ],
8441 cc_library(
8442     name = "ConvertToSPIRV",
8443     srcs = ["lib/Conversion/ConvertToSPIRV/ConvertToSPIRVPass.cpp"],
8444     hdrs = ["include/mlir/Conversion/ConvertToSPIRV/ConvertToSPIRVPass.h"],
8445     includes = ["include"],
8446     deps = [
8447         ":ArithToSPIRV",
8448         ":ArithTransforms",
8449         ":ConversionPassIncGen",
8450         ":FuncToSPIRV",
8451         ":GPUDialect",
8452         ":GPUToSPIRV",
8453         ":IR",
8454         ":IndexToSPIRV",
8455         ":MemRefToSPIRV",
8456         ":Pass",
8457         ":Rewrite",
8458         ":SCFToSPIRV",
8459         ":SPIRVConversion",
8460         ":SPIRVDialect",
8461         ":SPIRVTransforms",
8462         ":TransformUtils",
8463         ":Transforms",
8464         ":UBToSPIRV",
8465         ":VectorDialect",
8466         ":VectorToSPIRV",
8467         ":VectorTransforms",
8468     ],
8471 cc_library(
8472     name = "VectorToXeGPU",
8473     srcs = ["lib/Conversion/VectorToXeGPU/VectorToXeGPU.cpp"],
8474     hdrs = ["include/mlir/Conversion/VectorToXeGPU/VectorToXeGPU.h"],
8475     includes = ["include"],
8476     deps = [
8477         ":ArithDialect",
8478         ":ConversionPassIncGen",
8479         ":IR",
8480         ":MemRefDialect",
8481         ":Pass",
8482         ":TransformUtils",
8483         ":Transforms",
8484         ":VectorDialect",
8485         ":XeGPUDialect",
8486         "//llvm:Support",
8487     ],
8490 cc_library(
8491     name = "ControlFlowToSCF",
8492     srcs = [
8493         "lib/Conversion/ControlFlowToSCF/ControlFlowToSCF.cpp",
8494     ],
8495     hdrs = [
8496         "include/mlir/Conversion/ControlFlowToSCF/ControlFlowToSCF.h",
8497     ],
8498     includes = ["include"],
8499     deps = [
8500         ":ArithDialect",
8501         ":ControlFlowDialect",
8502         ":ConversionPassIncGen",
8503         ":FuncDialect",
8504         ":LLVMDialect",
8505         ":Pass",
8506         ":SCFDialect",
8507         ":TransformUtils",
8508         ":UBDialect",
8509     ],
8512 cc_library(
8513     name = "ControlFlowToLLVM",
8514     srcs = [
8515         "lib/Conversion/ControlFlowToLLVM/ControlFlowToLLVM.cpp",
8516     ],
8517     hdrs = [
8518         "include/mlir/Conversion/ControlFlowToLLVM/ControlFlowToLLVM.h",
8519     ],
8520     includes = ["include"],
8521     deps = [
8522         ":ControlFlowDialect",
8523         ":ConversionPassIncGen",
8524         ":ConvertToLLVMInterface",
8525         ":IR",
8526         ":LLVMCommonConversion",
8527         ":LLVMDialect",
8528         ":Pass",
8529         ":TransformUtils",
8530         "//llvm:Support",
8531     ],
8534 cc_library(
8535     name = "ControlFlowToSPIRV",
8536     srcs = glob(["lib/Conversion/ControlFlowToSPIRV/*.cpp"]),
8537     hdrs = glob(["include/mlir/Conversion/ControlFlowToSPIRV/*.h"]),
8538     includes = ["include"],
8539     deps = [
8540         ":ControlFlowDialect",
8541         ":ConversionPassIncGen",
8542         ":IR",
8543         ":Pass",
8544         ":SPIRVCommonConversion",
8545         ":SPIRVConversion",
8546         ":SPIRVDialect",
8547         ":SPIRVUtils",
8548         ":Support",
8549         ":TransformUtils",
8550         "//llvm:Support",
8551     ],
8554 cc_library(
8555     name = "MemRefToEmitC",
8556     srcs = glob([
8557         "lib/Conversion/MemRefToEmitC/*.cpp",
8558     ]),
8559     hdrs = glob([
8560         "include/mlir/Conversion/MemRefToEmitC/*.h",
8561     ]),
8562     includes = [
8563         "include",
8564         "lib/Conversion/MemRefToEmitC",
8565     ],
8566     deps = [
8567         ":ConversionPassIncGen",
8568         ":EmitCDialect",
8569         ":IR",
8570         ":MemRefDialect",
8571         ":Pass",
8572         ":TransformUtils",
8573     ],
8576 cc_library(
8577     name = "MemRefToLLVM",
8578     srcs = glob(["lib/Conversion/MemRefToLLVM/*.cpp"]),
8579     hdrs = glob(["include/mlir/Conversion/MemRefToLLVM/*.h"]),
8580     includes = ["include"],
8581     deps = [
8582         ":Analysis",
8583         ":ArithDialect",
8584         ":ConversionPassIncGen",
8585         ":ConvertToLLVMInterface",
8586         ":FuncDialect",
8587         ":IR",
8588         ":LLVMCommonConversion",
8589         ":LLVMDialect",
8590         ":MemRefDialect",
8591         ":MemRefUtils",
8592         ":Pass",
8593         ":Support",
8594         "//llvm:Support",
8595     ],
8598 cc_library(
8599     name = "MemRefToSPIRV",
8600     srcs = glob([
8601         "lib/Conversion/MemRefToSPIRV/*.cpp",
8602     ]),
8603     hdrs = glob([
8604         "include/mlir/Conversion/MemRefToSPIRV/*.h",
8605     ]),
8606     includes = [
8607         "include",
8608         "lib/Conversion/MemRefToSPIRV",
8609     ],
8610     deps = [
8611         ":ArithDialect",
8612         ":ConversionPassIncGen",
8613         ":FunctionInterfaces",
8614         ":IR",
8615         ":MemRefDialect",
8616         ":Pass",
8617         ":SPIRVConversion",
8618         ":SPIRVDialect",
8619         ":Support",
8620         ":TransformUtils",
8621         "//llvm:Support",
8622     ],
8625 cc_library(
8626     name = "ArithAttrToLLVMConversion",
8627     srcs = glob(["lib/Conversion/ArithCommon/*.cpp"]),
8628     hdrs = glob(["include/mlir/Conversion/ArithCommon/*.h"]),
8629     includes = ["include"],
8630     deps = [
8631         ":ArithDialect",
8632         ":LLVMDialect",
8633     ],
8636 cc_library(
8637     name = "ArithToAMDGPU",
8638     srcs = glob(["lib/Conversion/ArithToAMDGPU/*.cpp"]),
8639     hdrs = glob(["include/mlir/Conversion/ArithToAMDGPU/*.h"]),
8640     includes = ["include"],
8641     deps = [
8642         ":AMDGPUDialect",
8643         ":AMDGPUUtils",
8644         ":ArithDialect",
8645         ":ArithUtils",
8646         ":ConversionPassIncGen",
8647         ":IR",
8648         ":LLVMDialect",
8649         ":Pass",
8650         ":ROCDLDialect",
8651         ":Support",
8652         ":TransformUtils",
8653         ":VectorDialect",
8654     ],
8657 cc_library(
8658     name = "ArithToArmSME",
8659     srcs = glob([
8660         "lib/Conversion/ArithToArmSME/*.cpp",
8661     ]),
8662     hdrs = glob([
8663         "include/mlir/Conversion/ArithToArmSME/*.h",
8664     ]),
8665     includes = ["include"],
8666     deps = [
8667         ":ArithDialect",
8668         ":ArmSMEDialect",
8669         ":ConversionPassIncGen",
8670         ":Pass",
8671         ":TransformUtils",
8672     ],
8675 cc_library(
8676     name = "ArithToEmitC",
8677     srcs = glob([
8678         "lib/Conversion/ArithToEmitC/*.cpp",
8679     ]),
8680     hdrs = glob([
8681         "include/mlir/Conversion/ArithToEmitC/*.h",
8682     ]),
8683     includes = [
8684         "include",
8685         "lib/Conversion/ArithToEmitC",
8686     ],
8687     deps = [
8688         ":ArithDialect",
8689         ":ConversionPassIncGen",
8690         ":EmitCDialect",
8691         ":EmitCTransforms",
8692         ":IR",
8693         ":Pass",
8694         ":Support",
8695         ":TransformUtils",
8696     ],
8699 cc_library(
8700     name = "ArithToLLVM",
8701     srcs = glob(["lib/Conversion/ArithToLLVM/*.cpp"]),
8702     hdrs = glob(["include/mlir/Conversion/ArithToLLVM/*.h"]),
8703     includes = ["include"],
8704     deps = [
8705         ":ArithAttrToLLVMConversion",
8706         ":ArithDialect",
8707         ":ConversionPassIncGen",
8708         ":ConvertToLLVMInterface",
8709         ":IR",
8710         ":LLVMCommonConversion",
8711         ":LLVMDialect",
8712         ":Pass",
8713     ],
8716 cc_library(
8717     name = "ArithToSPIRV",
8718     srcs = glob(["lib/Conversion/ArithToSPIRV/*.cpp"]),
8719     hdrs = glob(["include/mlir/Conversion/ArithToSPIRV/*.h"]),
8720     includes = ["include"],
8721     deps = [
8722         ":ArithDialect",
8723         ":ConversionPassIncGen",
8724         ":IR",
8725         ":Pass",
8726         ":SPIRVCommonConversion",
8727         ":SPIRVConversion",
8728         ":SPIRVDialect",
8729         "//llvm:Support",
8730     ],
8733 cc_library(
8734     name = "MathToLLVM",
8735     srcs = glob(["lib/Conversion/MathToLLVM/*.cpp"]),
8736     hdrs = glob(["include/mlir/Conversion/MathToLLVM/*.h"]),
8737     includes = ["include"],
8738     deps = [
8739         ":ArithAttrToLLVMConversion",
8740         ":ConversionPassIncGen",
8741         ":ConvertToLLVMInterface",
8742         ":IR",
8743         ":LLVMCommonConversion",
8744         ":LLVMDialect",
8745         ":MathDialect",
8746         ":Pass",
8747     ],
8750 cc_library(
8751     name = "MathToFuncs",
8752     srcs = glob(["lib/Conversion/MathToFuncs/*.cpp"]),
8753     hdrs = glob(["include/mlir/Conversion/MathToFuncs/*.h"]),
8754     includes = ["include"],
8755     deps = [
8756         ":ArithDialect",
8757         ":ControlFlowDialect",
8758         ":ConversionPassIncGen",
8759         ":DialectUtils",
8760         ":FuncDialect",
8761         ":IR",
8762         ":LLVMDialect",
8763         ":MathDialect",
8764         ":Pass",
8765         ":SCFDialect",
8766         ":TransformUtils",
8767         ":VectorDialect",
8768         ":VectorUtils",
8769         "//llvm:Support",
8770     ],
8773 gentbl_cc_library(
8774     name = "BytecodeOpInterfaceIncGen",
8775     tbl_outs = [
8776         (
8777             ["-gen-op-interface-decls"],
8778             "include/mlir/Bytecode/BytecodeOpInterface.h.inc",
8779         ),
8780         (
8781             ["-gen-op-interface-defs"],
8782             "include/mlir/Bytecode/BytecodeOpInterface.cpp.inc",
8783         ),
8784     ],
8785     tblgen = ":mlir-tblgen",
8786     td_file = "include/mlir/Bytecode/BytecodeOpInterface.td",
8787     deps = [":BytecodeOpInterfaceTdFiles"],
8790 cc_library(
8791     name = "BytecodeOpInterface",
8792     srcs = ["lib/Bytecode/BytecodeOpInterface.cpp"],
8793     hdrs = [
8794         "include/mlir/Bytecode/BytecodeImplementation.h",
8795         "include/mlir/Bytecode/BytecodeOpInterface.h",
8796         "include/mlir/Bytecode/Encoding.h",
8797     ],
8798     includes = ["include"],
8799     deps = [
8800         ":BytecodeOpInterfaceIncGen",
8801         ":IR",
8802         ":Support",
8803         "//llvm:Support",
8804     ],
8807 gentbl_cc_library(
8808     name = "CallOpInterfacesIncGen",
8809     tbl_outs = [
8810         (
8811             ["-gen-op-interface-decls"],
8812             "include/mlir/Interfaces/CallInterfaces.h.inc",
8813         ),
8814         (
8815             ["-gen-op-interface-defs"],
8816             "include/mlir/Interfaces/CallInterfaces.cpp.inc",
8817         ),
8818     ],
8819     tblgen = ":mlir-tblgen",
8820     td_file = "include/mlir/Interfaces/CallInterfaces.td",
8821     deps = [":CallInterfacesTdFiles"],
8824 cc_library(
8825     name = "CallOpInterfaces",
8826     srcs = ["lib/Interfaces/CallInterfaces.cpp"],
8827     hdrs = ["include/mlir/Interfaces/CallInterfaces.h"],
8828     includes = ["include"],
8829     deps = [
8830         ":CallOpInterfacesIncGen",
8831         ":IR",
8832         "//llvm:Support",
8833     ],
8836 gentbl_cc_library(
8837     name = "CastInterfacesIncGen",
8838     tbl_outs = [
8839         (
8840             ["-gen-op-interface-decls"],
8841             "include/mlir/Interfaces/CastInterfaces.h.inc",
8842         ),
8843         (
8844             ["-gen-op-interface-defs"],
8845             "include/mlir/Interfaces/CastInterfaces.cpp.inc",
8846         ),
8847     ],
8848     tblgen = ":mlir-tblgen",
8849     td_file = "include/mlir/Interfaces/CastInterfaces.td",
8850     deps = [":CastInterfacesTdFiles"],
8853 cc_library(
8854     name = "CastInterfaces",
8855     srcs = ["lib/Interfaces/CastInterfaces.cpp"],
8856     hdrs = ["include/mlir/Interfaces/CastInterfaces.h"],
8857     includes = ["include"],
8858     deps = [
8859         ":CastInterfacesIncGen",
8860         ":IR",
8861     ],
8864 gentbl_cc_library(
8865     name = "ControlFlowInterfacesIncGen",
8866     tbl_outs = [
8867         (
8868             ["-gen-op-interface-decls"],
8869             "include/mlir/Interfaces/ControlFlowInterfaces.h.inc",
8870         ),
8871         (
8872             ["-gen-op-interface-defs"],
8873             "include/mlir/Interfaces/ControlFlowInterfaces.cpp.inc",
8874         ),
8875     ],
8876     tblgen = ":mlir-tblgen",
8877     td_file = "include/mlir/Interfaces/ControlFlowInterfaces.td",
8878     deps = [":ControlFlowInterfacesTdFiles"],
8881 cc_library(
8882     name = "ControlFlowInterfaces",
8883     srcs = ["lib/Interfaces/ControlFlowInterfaces.cpp"],
8884     hdrs = ["include/mlir/Interfaces/ControlFlowInterfaces.h"],
8885     includes = ["include"],
8886     deps = [
8887         ":ControlFlowInterfacesIncGen",
8888         ":IR",
8889         "//llvm:Support",
8890     ],
8893 gentbl_cc_library(
8894     name = "InferTypeOpInterfaceIncGen",
8895     tbl_outs = [
8896         (
8897             ["-gen-op-interface-decls"],
8898             "include/mlir/Interfaces/InferTypeOpInterface.h.inc",
8899         ),
8900         (
8901             ["-gen-op-interface-defs"],
8902             "include/mlir/Interfaces/InferTypeOpInterface.cpp.inc",
8903         ),
8904     ],
8905     tblgen = ":mlir-tblgen",
8906     td_file = "include/mlir/Interfaces/InferTypeOpInterface.td",
8907     deps = [":InferTypeOpInterfaceTdFiles"],
8910 cc_library(
8911     name = "InferTypeOpInterface",
8912     srcs = ["lib/Interfaces/InferTypeOpInterface.cpp"],
8913     hdrs = ["include/mlir/Interfaces/InferTypeOpInterface.h"],
8914     includes = ["include"],
8915     deps = [
8916         ":IR",
8917         ":InferTypeOpInterfaceIncGen",
8918         ":Support",
8919         "//llvm:Support",
8920     ],
8923 gentbl_cc_library(
8924     name = "SideEffectInterfacesIncGen",
8925     tbl_outs = [
8926         (
8927             ["-gen-op-interface-decls"],
8928             "include/mlir/Interfaces/SideEffectInterfaces.h.inc",
8929         ),
8930         (
8931             ["-gen-op-interface-defs"],
8932             "include/mlir/Interfaces/SideEffectInterfaces.cpp.inc",
8933         ),
8934     ],
8935     tblgen = ":mlir-tblgen",
8936     td_file = "include/mlir/Interfaces/SideEffectInterfaces.td",
8937     deps = [":SideEffectInterfacesTdFiles"],
8940 cc_library(
8941     name = "SideEffectInterfaces",
8942     srcs = ["lib/Interfaces/SideEffectInterfaces.cpp"],
8943     hdrs = ["include/mlir/Interfaces/SideEffectInterfaces.h"],
8944     includes = ["include"],
8945     deps = [
8946         ":IR",
8947         ":SideEffectInterfacesIncGen",
8948         "//llvm:Support",
8949     ],
8952 gentbl_cc_library(
8953     name = "TilingInterfaceIncGen",
8954     tbl_outs = [
8955         (
8956             ["-gen-op-interface-decls"],
8957             "include/mlir/Interfaces/TilingInterface.h.inc",
8958         ),
8959         (
8960             ["-gen-op-interface-defs"],
8961             "include/mlir/Interfaces/TilingInterface.cpp.inc",
8962         ),
8963     ],
8964     tblgen = ":mlir-tblgen",
8965     td_file = "include/mlir/Interfaces/TilingInterface.td",
8966     deps = [":TilingInterfaceTdFiles"],
8969 cc_library(
8970     name = "Analysis",
8971     srcs = glob(
8972         [
8973             "lib/Analysis/*.cpp",
8974             "lib/Analysis/*/*.cpp",
8975         ],
8976     ),
8977     hdrs = glob(
8978         [
8979             "include/mlir/Analysis/*.h",
8980             "include/mlir/Analysis/*/*.h",
8981         ],
8982     ),
8983     copts = [
8984         "$(STACK_FRAME_UNLIMITED)",
8985     ],
8986     includes = ["include"],
8987     deps = [
8988         ":ArithDialect",
8989         ":CallOpInterfaces",
8990         ":ControlFlowInterfaces",
8991         ":DataLayoutInterfaces",
8992         ":FunctionInterfaces",
8993         ":IR",
8994         ":InferIntRangeInterface",
8995         ":LoopLikeInterface",
8996         ":Pass",
8997         ":SideEffectInterfaces",
8998         ":Support",
8999         ":ViewLikeInterface",
9000         "//llvm:Support",
9001         "//llvm:config",
9002     ],
9005 cc_library(
9006     name = "ParseUtilities",
9007     hdrs = ["include/mlir/Tools/ParseUtilities.h"],
9008     includes = ["include"],
9009     deps = [
9010         ":IR",
9011         ":Parser",
9012     ],
9015 cc_library(
9016     name = "TranslateLib",
9017     srcs = glob([
9018         "lib/Tools/mlir-translate/*.cpp",
9019     ]),
9020     hdrs = glob(["include/mlir/Tools/mlir-translate/*.h"]),
9021     includes = ["include"],
9022     deps = [
9023         ":IR",
9024         ":ParseUtilities",
9025         ":Parser",
9026         ":Support",
9027         "//llvm:Support",
9028     ],
9031 cc_library(
9032     name = "ToLLVMIRTranslation",
9033     srcs = [
9034         "lib/Target/LLVMIR/AttrKindDetail.h",
9035         "lib/Target/LLVMIR/DebugTranslation.cpp",
9036         "lib/Target/LLVMIR/DebugTranslation.h",
9037         "lib/Target/LLVMIR/LoopAnnotationTranslation.cpp",
9038         "lib/Target/LLVMIR/LoopAnnotationTranslation.h",
9039         "lib/Target/LLVMIR/ModuleTranslation.cpp",
9040         "lib/Target/LLVMIR/TypeToLLVM.cpp",
9041     ],
9042     hdrs = [
9043         "include/mlir/Target/LLVMIR/Export.h",
9044         "include/mlir/Target/LLVMIR/LLVMTranslationInterface.h",
9045         "include/mlir/Target/LLVMIR/ModuleTranslation.h",
9046         "include/mlir/Target/LLVMIR/TypeToLLVM.h",
9047     ],
9048     includes = ["include"],
9049     deps = [
9050         ":Analysis",
9051         ":DLTIDialect",
9052         ":IR",
9053         ":LLVMConversionIncGen",
9054         ":LLVMDialect",
9055         ":LLVMIRTransforms",
9056         ":LLVMIntrinsicConversionIncGen",
9057         ":OpenMPDialect",
9058         ":Support",
9059         ":TransformUtils",
9060         "//llvm:Core",
9061         "//llvm:FrontendOpenMP",
9062         "//llvm:Support",
9063         "//llvm:TransformUtils",
9064     ],
9067 cc_library(
9068     name = "AMXToLLVMIRTranslation",
9069     srcs = glob(["lib/Target/LLVMIR/Dialect/AMX/*.cpp"]),
9070     hdrs = glob(["include/mlir/Target/LLVMIR/Dialect/AMX/*.h"]),
9071     includes = ["include"],
9072     deps = [
9073         ":AMXConversionIncGen",
9074         ":AMXDialect",
9075         ":IR",
9076         ":ToLLVMIRTranslation",
9077         "//llvm:Core",
9078         "//llvm:Support",
9079     ],
9082 cc_library(
9083     name = "X86VectorToLLVMIRTranslation",
9084     srcs = glob(["lib/Target/LLVMIR/Dialect/X86Vector/*.cpp"]),
9085     hdrs = glob(["include/mlir/Target/LLVMIR/Dialect/X86Vector/*.h"]),
9086     includes = ["include"],
9087     deps = [
9088         ":IR",
9089         ":ToLLVMIRTranslation",
9090         ":X86VectorConversionIncGen",
9091         ":X86VectorDialect",
9092         "//llvm:Core",
9093         "//llvm:Support",
9094     ],
9097 cc_library(
9098     name = "ArmNeonToLLVMIRTranslation",
9099     srcs = glob(["lib/Target/LLVMIR/Dialect/ArmNeon/*.cpp"]),
9100     hdrs = glob(["include/mlir/Target/LLVMIR/Dialect/ArmNeon/*.h"]),
9101     includes = ["include"],
9102     deps = [
9103         ":ArmNeonConversionIncGen",
9104         ":ArmNeonDialect",
9105         ":ArmNeonIncGen",
9106         ":IR",
9107         ":ToLLVMIRTranslation",
9108         "//llvm:Core",
9109         "//llvm:Support",
9110     ],
9113 cc_library(
9114     name = "ArmSMEToLLVMIRTranslation",
9115     srcs = glob(["lib/Target/LLVMIR/Dialect/ArmSME/*.cpp"]),
9116     hdrs = glob(["include/mlir/Target/LLVMIR/Dialect/ArmSME/*.h"]),
9117     includes = ["include"],
9118     deps = [
9119         ":ArmSMEConversionIncGen",
9120         ":ArmSMEDialect",
9121         ":ArmSMEIntrinsicOpsIncGen",
9122         ":IR",
9123         ":ToLLVMIRTranslation",
9124         "//llvm:Core",
9125         "//llvm:Support",
9126     ],
9129 cc_library(
9130     name = "ArmSVEToLLVMIRTranslation",
9131     srcs = glob(["lib/Target/LLVMIR/Dialect/ArmSVE/*.cpp"]),
9132     hdrs = glob(["include/mlir/Target/LLVMIR/Dialect/ArmSVE/*.h"]),
9133     includes = ["include"],
9134     deps = [
9135         ":ArmSVEConversionIncGen",
9136         ":ArmSVEDialect",
9137         ":IR",
9138         ":ToLLVMIRTranslation",
9139         "//llvm:Core",
9140         "//llvm:Support",
9141     ],
9144 cc_library(
9145     name = "NVVMToLLVMIRTranslation",
9146     srcs = ["lib/Target/LLVMIR/Dialect/NVVM/NVVMToLLVMIRTranslation.cpp"],
9147     hdrs = ["include/mlir/Target/LLVMIR/Dialect/NVVM/NVVMToLLVMIRTranslation.h"],
9148     includes = ["include"],
9149     deps = [
9150         ":DialectUtils",
9151         ":IR",
9152         ":NVVMConversionIncGen",
9153         ":NVVMDialect",
9154         ":Support",
9155         ":ToLLVMIRTranslation",
9156         "//llvm:Core",
9157         "//llvm:Support",
9158     ],
9161 cc_library(
9162     name = "ROCDLToLLVMIRTranslation",
9163     srcs = glob(["lib/Target/LLVMIR/Dialect/ROCDL/*.cpp"]),
9164     hdrs = glob(["include/mlir/Target/LLVMIR/Dialect/ROCDL/*.h"]),
9165     includes = ["include"],
9166     deps = [
9167         ":IR",
9168         ":ROCDLConversionIncGen",
9169         ":ROCDLDialect",
9170         ":ToLLVMIRTranslation",
9171         "//llvm:Core",
9172         "//llvm:Support",
9173     ],
9176 cc_library(
9177     name = "SPIRVToLLVMIRTranslation",
9178     srcs = glob(["lib/Target/LLVMIR/Dialect/SPIRV/*.cpp"]),
9179     hdrs = glob(["include/mlir/Target/LLVMIR/Dialect/SPIRV/*.h"]),
9180     includes = ["include"],
9181     deps = [
9182         ":IR",
9183         ":SPIRVDialect",
9184         ":ToLLVMIRTranslation",
9185     ],
9188 cc_library(
9189     name = "GPUToLLVMIRTranslation",
9190     srcs = [
9191         "lib/Target/LLVMIR/Dialect/GPU/GPUToLLVMIRTranslation.cpp",
9192         "lib/Target/LLVMIR/Dialect/GPU/SelectObjectAttr.cpp",
9193     ],
9194     hdrs = ["include/mlir/Target/LLVMIR/Dialect/GPU/GPUToLLVMIRTranslation.h"],
9195     includes = ["include"],
9196     deps = [
9197         ":GPUDialect",
9198         ":IR",
9199         ":ToLLVMIRTranslation",
9200         "//llvm:Core",
9201         "//llvm:Support",
9202     ],
9205 cc_library(
9206     name = "BuiltinToLLVMIRTranslation",
9207     srcs = ["lib/Target/LLVMIR/Dialect/Builtin/BuiltinToLLVMIRTranslation.cpp"],
9208     hdrs = ["include/mlir/Target/LLVMIR/Dialect/Builtin/BuiltinToLLVMIRTranslation.h"],
9209     includes = ["include"],
9210     deps = [
9211         ":IR",
9212         ":ToLLVMIRTranslation",
9213     ],
9216 cc_library(
9217     name = "LLVMToLLVMIRTranslation",
9218     srcs = ["lib/Target/LLVMIR/Dialect/LLVMIR/LLVMToLLVMIRTranslation.cpp"],
9219     hdrs = ["include/mlir/Target/LLVMIR/Dialect/LLVMIR/LLVMToLLVMIRTranslation.h"],
9220     includes = ["include"],
9221     deps = [
9222         ":IR",
9223         ":LLVMConversionIncGen",
9224         ":LLVMDialect",
9225         ":LLVMIntrinsicConversionIncGen",
9226         ":Support",
9227         ":ToLLVMIRTranslation",
9228         "//llvm:Core",
9229         "//llvm:Support",
9230     ],
9233 cc_library(
9234     name = "OpenMPCommon",
9235     srcs = ["lib/Target/LLVMIR/Dialect/OpenMPCommon.cpp"],
9236     hdrs = ["include/mlir/Target/LLVMIR/Dialect/OpenMPCommon.h"],
9237     includes = ["include"],
9238     deps = [
9239         ":IR",
9240         ":Support",
9241         "//llvm:Core",
9242         "//llvm:FrontendOpenMP",
9243     ],
9246 cc_library(
9247     name = "LLVMIRToLLVMTranslation",
9248     srcs = ["lib/Target/LLVMIR/Dialect/LLVMIR/LLVMIRToLLVMTranslation.cpp"],
9249     hdrs = ["include/mlir/Target/LLVMIR/Dialect/LLVMIR/LLVMIRToLLVMTranslation.h"],
9250     includes = ["include"],
9251     deps = [
9252         ":FromLLVMIRTranslation",
9253         ":LLVMConversionIncGen",
9254         ":LLVMDialect",
9255         ":LLVMIntrinsicConversionIncGen",
9256         ":Support",
9257         "//llvm:Core",
9258         "//llvm:Support",
9259     ],
9262 cc_library(
9263     name = "LLVMIRToNVVMTranslation",
9264     srcs = ["lib/Target/LLVMIR/Dialect/NVVM/LLVMIRToNVVMTranslation.cpp"],
9265     hdrs = ["include/mlir/Target/LLVMIR/Dialect/NVVM/LLVMIRToNVVMTranslation.h"],
9266     includes = ["include"],
9267     deps = [
9268         ":FromLLVMIRTranslation",
9269         ":IR",
9270         ":NVVMConvertibleLLVMIRIntrinsicsIncGen",
9271         ":NVVMDialect",
9272         ":NVVMFromLLVMIRConversionsIncGen",
9273         ":Support",
9274         "//llvm:Core",
9275         "//llvm:Support",
9276     ],
9279 cc_library(
9280     name = "OpenACCToLLVMIRTranslation",
9281     srcs = glob(["lib/Target/LLVMIR/Dialect/OpenACC/*.cpp"]),
9282     hdrs = glob(["include/mlir/Target/LLVMIR/Dialect/OpenACC/*.h"]),
9283     includes = ["include"],
9284     deps = [
9285         ":Analysis",
9286         ":IR",
9287         ":LLVMDialect",
9288         ":OpenACCDialect",
9289         ":OpenMPCommon",
9290         ":Support",
9291         ":ToLLVMIRTranslation",
9292         ":TransformUtils",
9293         "//llvm:Core",
9294         "//llvm:FrontendOpenMP",
9295         "//llvm:Support",
9296     ],
9299 cc_library(
9300     name = "OpenMPToLLVMIRTranslation",
9301     srcs = glob(["lib/Target/LLVMIR/Dialect/OpenMP/*.cpp"]),
9302     hdrs = glob(["include/mlir/Target/LLVMIR/Dialect/OpenMP/*.h"]),
9303     includes = ["include"],
9304     deps = [
9305         ":Analysis",
9306         ":IR",
9307         ":LLVMDialect",
9308         ":OpenMPCommon",
9309         ":OpenMPDialect",
9310         ":Support",
9311         ":ToLLVMIRTranslation",
9312         ":TransformUtils",
9313         ":Transforms",
9314         "//llvm:Core",
9315         "//llvm:FrontendOpenMP",
9316         "//llvm:Support",
9317         "//llvm:TargetParser",
9318         "//llvm:TransformUtils",
9319     ],
9322 cc_library(
9323     name = "AllToLLVMIRTranslations",
9324     hdrs = ["include/mlir/Target/LLVMIR/Dialect/All.h"],
9325     includes = ["include"],
9326     deps = [
9327         ":AMXToLLVMIRTranslation",
9328         ":ArmNeonToLLVMIRTranslation",
9329         ":ArmSMEToLLVMIRTranslation",
9330         ":ArmSVEToLLVMIRTranslation",
9331         ":BuiltinToLLVMIRTranslation",
9332         ":GPUToLLVMIRTranslation",
9333         ":LLVMIRToLLVMTranslation",
9334         ":LLVMIRToNVVMTranslation",
9335         ":LLVMToLLVMIRTranslation",
9336         ":NVVMTarget",
9337         ":NVVMToLLVMIRTranslation",
9338         ":OpenACCToLLVMIRTranslation",
9339         ":OpenMPToLLVMIRTranslation",
9340         ":ROCDLTarget",
9341         ":ROCDLToLLVMIRTranslation",
9342         ":SPIRVToLLVMIRTranslation",
9343         ":VCIXToLLVMIRTranslation",
9344         ":X86VectorToLLVMIRTranslation",
9345     ],
9348 cc_library(
9349     name = "ToLLVMIRTranslationRegistration",
9350     srcs = ["lib/Target/LLVMIR/ConvertToLLVMIR.cpp"],
9351     includes = ["include"],
9352     deps = [
9353         ":AllToLLVMIRTranslations",
9354         ":DLTIDialect",
9355         ":FuncDialect",
9356         ":IR",
9357         ":NVVMTarget",
9358         ":ROCDLTarget",
9359         ":ToLLVMIRTranslation",
9360         ":TranslateLib",
9361         "//llvm:Core",
9362         "//llvm:Support",
9363     ],
9366 cc_library(
9367     name = "FromLLVMIRTranslation",
9368     srcs = [
9369         "lib/Target/LLVMIR/AttrKindDetail.h",
9370         "lib/Target/LLVMIR/DataLayoutImporter.cpp",
9371         "lib/Target/LLVMIR/DataLayoutImporter.h",
9372         "lib/Target/LLVMIR/DebugImporter.cpp",
9373         "lib/Target/LLVMIR/DebugImporter.h",
9374         "lib/Target/LLVMIR/LoopAnnotationImporter.cpp",
9375         "lib/Target/LLVMIR/LoopAnnotationImporter.h",
9376         "lib/Target/LLVMIR/ModuleImport.cpp",
9377         "lib/Target/LLVMIR/TypeFromLLVM.cpp",
9378     ],
9379     hdrs = [
9380         "include/mlir/Target/LLVMIR/Import.h",
9381         "include/mlir/Target/LLVMIR/LLVMImportInterface.h",
9382         "include/mlir/Target/LLVMIR/ModuleImport.h",
9383         "include/mlir/Target/LLVMIR/TypeFromLLVM.h",
9384     ],
9385     includes = ["include"],
9386     deps = [
9387         ":DLTIDialect",
9388         ":DataLayoutInterfaces",
9389         ":IR",
9390         ":LLVMConversionIncGen",
9391         ":LLVMDialect",
9392         ":LLVMIntrinsicConversionIncGen",
9393         ":Support",
9394         ":TranslateLib",
9395         "//llvm:BinaryFormat",
9396         "//llvm:Core",
9397         "//llvm:IRPrinter",
9398         "//llvm:IRReader",
9399         "//llvm:Support",
9400     ],
9403 cc_library(
9404     name = "FromLLVMIRTranslationRegistration",
9405     srcs = [
9406         "lib/Target/LLVMIR/ConvertFromLLVMIR.cpp",
9407     ],
9408     deps = [
9409         ":AllToLLVMIRTranslations",
9410         ":DLTIDialect",
9411         ":FromLLVMIRTranslation",
9412         ":IR",
9413         ":TranslateLib",
9414         "//llvm:Core",
9415         "//llvm:IRReader",
9416         "//llvm:Support",
9417     ],
9420 cc_library(
9421     name = "ExecutionEngine",
9422     srcs = [
9423         "include/mlir/ExecutionEngine/CRunnerUtils.h",
9424         "lib/ExecutionEngine/ExecutionEngine.cpp",
9425     ],
9426     hdrs = [
9427         "include/mlir/ExecutionEngine/ExecutionEngine.h",
9428         "include/mlir/ExecutionEngine/MemRefUtils.h",
9429     ],
9430     includes = ["include"],
9431     deps = [
9432         ":AllToLLVMIRTranslations",
9433         ":IR",
9434         ":LLVMDialect",
9435         ":Support",
9436         ":ToLLVMIRTranslation",
9437         "//llvm:AllTargetsAsmParsers",
9438         "//llvm:BitWriter",
9439         "//llvm:Core",
9440         "//llvm:ExecutionEngine",
9441         "//llvm:MC",
9442         "//llvm:OrcJIT",
9443         "//llvm:Support",
9444         "//llvm:Target",  # fixdeps: keep
9445         "//llvm:TargetParser",
9446         "//llvm:TransformUtils",
9447         "//llvm:X86CodeGen",  # fixdeps: keep
9448         "//llvm:X86Disassembler",  # fixdeps: keep
9449     ],
9452 cc_library(
9453     name = "ExecutionEngineUtils",
9454     srcs = ["lib/ExecutionEngine/OptUtils.cpp"],
9455     hdrs = ["include/mlir/ExecutionEngine/OptUtils.h"],
9456     includes = ["include"],
9457     deps = [
9458         "//llvm:Analysis",
9459         "//llvm:Core",
9460         "//llvm:Coroutines",
9461         "//llvm:IPO",
9462         "//llvm:Passes",
9463         "//llvm:Support",
9464         "//llvm:Target",
9465         "//llvm:common_transforms",
9466     ],
9469 cc_library(
9470     name = "PluginsLib",
9471     srcs = [
9472         "lib/Tools/Plugins/DialectPlugin.cpp",
9473         "lib/Tools/Plugins/PassPlugin.cpp",
9474     ],
9475     hdrs = [
9476         "include/mlir/Tools/Plugins/DialectPlugin.h",
9477         "include/mlir/Tools/Plugins/PassPlugin.h",
9478     ],
9479     includes = ["include"],
9480     deps = [
9481         ":IR",
9482         ":Support",
9483         "//llvm:Support",
9484     ],
9487 cc_library(
9488     name = "MlirOptLib",
9489     srcs = ["lib/Tools/mlir-opt/MlirOptMain.cpp"],
9490     hdrs = ["include/mlir/Tools/mlir-opt/MlirOptMain.h"],
9491     includes = ["include"],
9492     deps = [
9493         ":BytecodeWriter",
9494         ":Debug",
9495         ":IR",
9496         ":IRDLDialect",
9497         ":ParseUtilities",
9498         ":Parser",
9499         ":Pass",
9500         ":PluginsLib",
9501         ":Support",
9502         "//llvm:Support",
9503     ],
9506 cc_library(
9507     name = "AllTranslations",
9508     hdrs = ["include/mlir/InitAllTranslations.h"],
9509     deps = [
9510         ":FromLLVMIRTranslationRegistration",
9511         ":SPIRVTranslateRegistration",
9512         ":TargetCpp",
9513         ":ToLLVMIRTranslationRegistration",
9514     ],
9517 cc_library(
9518     name = "MlirTranslateMain",
9519     srcs = ["tools/mlir-translate/mlir-translate.cpp"],
9520     local_defines = ["MLIR_INCLUDE_TESTS"],
9521     deps = [
9522         ":AllPassesAndDialects",
9523         ":AllTranslations",
9524         ":Support",
9525         ":TranslateLib",
9526         "//llvm:Support",
9527         "//mlir/test:TestToLLVMIRTranslation",
9528     ],
9531 cc_binary(
9532     name = "mlir-translate",
9533     deps = [":MlirTranslateMain"],
9536 cc_library(
9537     name = "AllPassesAndDialects",
9538     hdrs = [
9539         "include/mlir/InitAllDialects.h",
9540         "include/mlir/InitAllPasses.h",
9541     ],
9542     deps = [
9543         ":AMDGPUDialect",
9544         ":AMDGPUToROCDL",
9545         ":AMDGPUTransforms",
9546         ":AMXDialect",
9547         ":AMXTransforms",
9548         ":AffineDialect",
9549         ":AffinePassIncGen",
9550         ":AffineToStandard",
9551         ":AffineTransformOps",
9552         ":AffineTransforms",
9553         ":ArithDialect",
9554         ":ArithToAMDGPU",
9555         ":ArithToLLVM",
9556         ":ArithToSPIRV",
9557         ":ArithTransforms",
9558         ":ArithValueBoundsOpInterfaceImpl",
9559         ":ArmNeonDialect",
9560         ":ArmSMEDialect",
9561         ":ArmSMETransforms",
9562         ":ArmSVEDialect",
9563         ":ArmSVETransforms",
9564         ":AsyncDialect",
9565         ":AsyncPassIncGen",
9566         ":AsyncToLLVM",
9567         ":AsyncTransforms",
9568         ":BufferizationDialect",
9569         ":BufferizationPipelines",
9570         ":BufferizationTransformOps",
9571         ":BufferizationTransforms",
9572         ":CastInterfaces",
9573         ":ComplexDialect",
9574         ":ComplexToLLVM",
9575         ":ComplexToLibm",
9576         ":ComplexToSPIRV",
9577         ":ControlFlowDialect",
9578         ":ControlFlowTransforms",
9579         ":ConversionPasses",
9580         ":ConvertToLLVM",
9581         ":DLTIDialect",
9582         ":EmitCDialect",
9583         ":EmitCTransforms",
9584         ":FuncDialect",
9585         ":FuncToLLVM",
9586         ":FuncToSPIRV",
9587         ":FuncTransformOps",
9588         ":FuncTransforms",
9589         ":FuncTransformsPassIncGen",
9590         ":GPUDialect",
9591         ":GPUPassIncGen",
9592         ":GPUPipelines",
9593         ":GPUToGPURuntimeTransforms",
9594         ":GPUToNVVMTransforms",
9595         ":GPUToROCDLTransforms",
9596         ":GPUToSPIRV",
9597         ":GPUToVulkanTransforms",
9598         ":GPUTransformOps",
9599         ":GPUTransforms",
9600         ":IR",
9601         ":IRDLDialect",
9602         ":IndexDialect",
9603         ":LLVMDialect",
9604         ":LLVMIRTransforms",
9605         ":LLVMPassIncGen",
9606         ":LinalgDialect",
9607         ":LinalgPassIncGen",
9608         ":LinalgToStandard",
9609         ":LinalgTransformOps",
9610         ":LinalgTransforms",
9611         ":MLProgramDialect",
9612         ":MLProgramTransforms",
9613         ":MPIDialect",
9614         ":MathDialect",
9615         ":MathToFuncs",
9616         ":MathToLLVM",
9617         ":MathToLibm",
9618         ":MathToSPIRV",
9619         ":MathTransforms",
9620         ":MemRefDialect",
9621         ":MemRefToLLVM",
9622         ":MemRefToSPIRV",
9623         ":MemRefTransformOps",
9624         ":MemRefTransforms",
9625         ":MeshDialect",
9626         ":MeshTransforms",
9627         ":NVGPUDialect",
9628         ":NVGPUPassIncGen",
9629         ":NVGPUToNVVM",
9630         ":NVGPUTransformOps",
9631         ":NVGPUTransforms",
9632         ":NVVMDialect",
9633         ":NVVMTarget",
9634         ":OpenACCDialect",
9635         ":OpenACCTransforms",
9636         ":OpenMPDialect",
9637         ":OpenMPToLLVM",
9638         ":PDLDialect",
9639         ":PDLInterpDialect",
9640         ":PDLToPDLInterp",
9641         ":PolynomialDialect",
9642         ":PtrDialect",
9643         ":QuantOps",
9644         ":QuantTransforms",
9645         ":ROCDLDialect",
9646         ":ROCDLTarget",
9647         ":ReconcileUnrealizedCasts",
9648         ":SCFDialect",
9649         ":SCFPassIncGen",
9650         ":SCFToControlFlow",
9651         ":SCFToGPU",
9652         ":SCFTransformOps",
9653         ":SCFTransforms",
9654         ":SPIRVDialect",
9655         ":SPIRVPassIncGen",
9656         ":SPIRVTarget",
9657         ":SPIRVToLLVM",
9658         ":SPIRVTransforms",
9659         ":ShapeDialect",
9660         ":ShapeToStandard",
9661         ":ShapeTransforms",
9662         ":ShapeTransformsPassIncGen",
9663         ":SparseTensorDialect",
9664         ":SparseTensorPipelines",
9665         ":SparseTensorTransformOps",
9666         ":SparseTensorTransforms",
9667         ":TensorDialect",
9668         ":TensorInferTypeOpInterfaceImpl",
9669         ":TensorTilingInterfaceImpl",
9670         ":TensorTransformOps",
9671         ":TensorTransforms",
9672         ":TosaDialect",
9673         ":TosaToLinalg",
9674         ":TransformDebugExtension",
9675         ":TransformDialect",
9676         ":TransformDialectTransforms",
9677         ":TransformLoopExtension",
9678         ":TransformPDLExtension",
9679         ":Transforms",
9680         ":TransformsPassIncGen",
9681         ":UBDialect",
9682         ":VectorDialect",
9683         ":VectorToLLVM",
9684         ":VectorToSCF",
9685         ":VectorToSPIRV",
9686         ":VectorTransformOps",
9687         ":VectorTransforms",
9688         ":X86VectorDialect",
9689         ":X86VectorTransforms",
9690         ":XeGPUDialect",
9691         ":XeGPUTransforms",
9692     ],
9695 cc_binary(
9696     name = "mlir-lsp-server",
9697     srcs = ["tools/mlir-lsp-server/mlir-lsp-server.cpp"],
9698     includes = ["include"],
9699     deps = [
9700         ":AllExtensions",
9701         ":AllPassesAndDialects",
9702         ":BytecodeWriter",
9703         ":IR",
9704         ":MlirLspServerLib",
9705         ":Parser",
9706     ],
9709 cc_binary(
9710     name = "mlir-opt",
9711     srcs = ["tools/mlir-opt/mlir-opt.cpp"],
9712     local_defines = ["MLIR_INCLUDE_TESTS"],
9713     deps = [
9714         ":AllExtensions",
9715         ":AllPassesAndDialects",
9716         ":AllToLLVMIRTranslations",
9717         ":Analysis",
9718         ":IR",
9719         ":MlirOptLib",
9720         ":OpenMPDialect",
9721         ":Pass",
9722         ":QuantOps",
9723         ":SCFToGPU",
9724         ":Support",
9725         ":Transforms",
9726         ":config",
9727         "//llvm:AllTargetsCodeGens",
9728         "//llvm:Support",
9729         "//mlir/test:TestAffine",
9730         "//mlir/test:TestAnalysis",
9731         "//mlir/test:TestArith",
9732         "//mlir/test:TestArmNeon",
9733         "//mlir/test:TestArmSME",
9734         "//mlir/test:TestBufferization",
9735         "//mlir/test:TestControlFlow",
9736         "//mlir/test:TestConvertToSPIRV",
9737         "//mlir/test:TestDLTI",
9738         "//mlir/test:TestDialect",
9739         "//mlir/test:TestFunc",
9740         "//mlir/test:TestFuncToLLVM",
9741         "//mlir/test:TestGPU",
9742         "//mlir/test:TestIR",
9743         "//mlir/test:TestLLVM",
9744         "//mlir/test:TestLinalg",
9745         "//mlir/test:TestLoopLikeInterface",
9746         "//mlir/test:TestMath",
9747         "//mlir/test:TestMathToVCIX",
9748         "//mlir/test:TestMemRef",
9749         "//mlir/test:TestMesh",
9750         "//mlir/test:TestNVGPU",
9751         "//mlir/test:TestOneToNTypeConversion",
9752         "//mlir/test:TestPDLL",
9753         "//mlir/test:TestPass",
9754         "//mlir/test:TestReducer",
9755         "//mlir/test:TestRewrite",
9756         "//mlir/test:TestSCF",
9757         "//mlir/test:TestSPIRV",
9758         "//mlir/test:TestShapeDialect",
9759         "//mlir/test:TestTensor",
9760         "//mlir/test:TestTestDynDialect",
9761         "//mlir/test:TestTilingInterface",
9762         "//mlir/test:TestTosaDialect",
9763         "//mlir/test:TestTransformDialect",
9764         "//mlir/test:TestTransforms",
9765         "//mlir/test:TestVector",
9766         "//mlir/test:TestVectorToSPIRV",
9767     ],
9770 cc_binary(
9771     name = "mlir-rewrite",
9772     srcs = ["tools/mlir-rewrite/mlir-rewrite.cpp"],
9773     deps = [
9774         ":AffineAnalysis",
9775         ":AllExtensions",
9776         ":AllPassesAndDialects",
9777         ":Analysis",
9778         ":AsmParser",
9779         ":CastInterfaces",
9780         ":Dialect",
9781         ":IR",
9782         ":ParseUtilities",
9783         ":Parser",
9784         ":Pass",
9785         ":Support",
9786         ":TransformUtils",
9787         ":Transforms",
9788         "//llvm:Support",
9789     ],
9792 cc_library(
9793     name = "MlirJitRunner",
9794     srcs = ["lib/ExecutionEngine/JitRunner.cpp"],
9795     hdrs = ["include/mlir/ExecutionEngine/JitRunner.h"],
9796     includes = ["include"],
9797     deps = [
9798         ":AllPassesAndDialects",
9799         ":ExecutionEngine",
9800         ":ExecutionEngineUtils",
9801         ":IR",
9802         ":LLVMDialect",
9803         ":LLVMToLLVMIRTranslation",
9804         ":OpenACCToLLVMIRTranslation",
9805         ":OpenMPToLLVMIRTranslation",
9806         ":ParseUtilities",
9807         ":Parser",
9808         ":SCFToControlFlow",
9809         ":Support",
9810         "//llvm:Core",
9811         "//llvm:OrcJIT",
9812         "//llvm:Support",
9813     ],
9816 cc_library(
9817     name = "mlir_async_runtime_api",
9818     hdrs = ["include/mlir/ExecutionEngine/AsyncRuntime.h"],
9819     includes = ["include"],
9822 cc_library(
9823     name = "_mlir_async_runtime",
9824     srcs = ["lib/ExecutionEngine/AsyncRuntime.cpp"],
9825     copts = ["-Dmlir_async_runtime_EXPORTS"],
9826     deps = [
9827         ":mlir_async_runtime_api",
9828         "//llvm:Support",
9829     ],
9832 # Indirection to avoid 'libmlir_async_runtime.so' filename clash.
9833 alias(
9834     name = "mlir_async_runtime",
9835     actual = "_mlir_async_runtime",
9838 cc_binary(
9839     name = "libmlir_async_runtime.so",
9840     linkshared = True,
9841     linkstatic = False,
9842     deps = [":mlir_async_runtime"],
9845 cc_library(
9846     name = "_mlir_float16_utils",
9847     srcs = ["lib/ExecutionEngine/Float16bits.cpp"],
9848     hdrs = ["include/mlir/ExecutionEngine/Float16bits.h"],
9849     copts = ["-Dmlir_float16_utils_EXPORTS"],
9850     includes = ["include"],
9853 # Indirection to avoid 'libmlir_float16_utils.so' filename clash.
9854 alias(
9855     name = "mlir_float16_utils",
9856     actual = "_mlir_float16_utils",
9859 cc_binary(
9860     name = "libmlir_float16_utils.so",
9861     linkshared = True,
9862     linkstatic = False,
9863     deps = [":mlir_float16_utils"],
9866 # Unlike mlir_float16_utils, mlir_c_runner_utils, etc, we do *not* make
9867 # this a shared library: because on the CMake side, doing so causes issues
9868 # when building on Windows.  In particular, various functions take/return
9869 # `std::vector` but that class is not designed with dllimport/dllexport
9870 # pragma, therefore it cannot be safely/correctly used across DLL boundaries.
9871 # Consequently, we avoid using the "mlir_xxx_utils" naming scheme,
9872 # since that is reserved/intended for shared libraries only.
9873 cc_library(
9874     name = "SparseTensorRuntime",
9875     srcs = [
9876         "lib/ExecutionEngine/SparseTensor/File.cpp",
9877         "lib/ExecutionEngine/SparseTensor/MapRef.cpp",
9878         "lib/ExecutionEngine/SparseTensor/Storage.cpp",
9879     ],
9880     hdrs = [
9881         "include/mlir/ExecutionEngine/SparseTensor/ArithmeticUtils.h",
9882         "include/mlir/ExecutionEngine/SparseTensor/COO.h",
9883         "include/mlir/ExecutionEngine/SparseTensor/File.h",
9884         "include/mlir/ExecutionEngine/SparseTensor/MapRef.h",
9885         "include/mlir/ExecutionEngine/SparseTensor/Storage.h",
9886     ],
9887     includes = ["include"],
9888     deps = [
9889         ":SparseTensorEnums",
9890         ":mlir_float16_utils",
9891     ],
9894 cc_library(
9895     name = "_mlir_c_runner_utils",
9896     srcs = [
9897         "lib/ExecutionEngine/CRunnerUtils.cpp",
9898         "lib/ExecutionEngine/SparseTensorRuntime.cpp",
9899     ],
9900     hdrs = [
9901         "include/mlir/ExecutionEngine/CRunnerUtils.h",
9902         "include/mlir/ExecutionEngine/Msan.h",
9903         "include/mlir/ExecutionEngine/SparseTensorRuntime.h",
9904     ],
9905     includes = ["include"],
9906     deps = [
9907         ":SparseTensorEnums",
9908         ":SparseTensorRuntime",
9909         ":mlir_float16_utils",
9910         "//llvm:Support",
9911     ],
9914 # Indirection to avoid 'libmlir_c_runner_utils.so' filename clash.
9915 alias(
9916     name = "mlir_c_runner_utils",
9917     actual = "_mlir_c_runner_utils",
9920 cc_headers_only(
9921     name = "mlir_c_runner_utils_hdrs",
9922     src = ":mlir_c_runner_utils",
9925 cc_binary(
9926     name = "libmlir_c_runner_utils.so",
9927     linkshared = True,
9928     linkstatic = False,
9929     deps = [":mlir_c_runner_utils"],
9932 cc_library(
9933     name = "_mlir_runner_utils",
9934     srcs = ["lib/ExecutionEngine/RunnerUtils.cpp"],
9935     hdrs = ["include/mlir/ExecutionEngine/RunnerUtils.h"],
9936     includes = ["include"],
9937     deps = [
9938         ":mlir_c_runner_utils",
9939         ":mlir_float16_utils",
9940     ],
9943 # Indirection to avoid 'libmlir_runner_utils.so' filename clash.
9944 alias(
9945     name = "mlir_runner_utils",
9946     actual = "_mlir_runner_utils",
9949 cc_headers_only(
9950     name = "mlir_runner_utils_hdrs",
9951     src = ":mlir_runner_utils",
9954 cc_binary(
9955     name = "libmlir_runner_utils.so",
9956     linkshared = True,
9957     linkstatic = False,
9958     deps = [":mlir_runner_utils"],
9961 cc_binary(
9962     name = "mlir-cpu-runner",
9963     srcs = ["tools/mlir-cpu-runner/mlir-cpu-runner.cpp"],
9964     deps = [
9965         ":AllToLLVMIRTranslations",
9966         ":BuiltinToLLVMIRTranslation",
9967         ":ExecutionEngineUtils",
9968         ":IR",
9969         ":LLVMDialect",
9970         ":LLVMToLLVMIRTranslation",
9971         ":MlirJitRunner",
9972         ":OpenACCToLLVMIRTranslation",
9973         ":OpenMPToLLVMIRTranslation",
9974         ":ToLLVMIRTranslation",
9975         "//llvm:AsmParser",
9976         "//llvm:Core",
9977         "//llvm:Linker",
9978         "//llvm:Support",
9979         "//llvm:X86AsmParser",
9980     ],
9983 # This target provides the headers from LLVM's Support target without any of
9984 # the symbols. In particular, it does not contain the static registration code
9985 # which may be executed by at most one shared library loaded by ORCJit. Direct
9986 # dependencies need to avoid requiring symbols from LLVMSupport by adding
9987 # copts = ["-DLLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING=1"].
9989 # Bazel links the dependencies' object files instead of the archives, which
9990 # means that symbols are linked in even if none are used. The LLVM cmake build
9991 # on the other hand links archives (or shared libraries, depending on
9992 # BUILD_SHARED_LIBS), skipping them if none of the symbols are used.
9993 # See also https://reviews.llvm.org/D95613.
9994 cc_headers_only(
9995     name = "LLVMSupportHeaders",
9996     src = "//llvm:Support",
9999 cc_library(
10000     name = "_mlir_cuda_runtime",
10001     srcs = ["lib/ExecutionEngine/CudaRuntimeWrappers.cpp"],
10002     # Prevent needing EnableABIBreakingChecks symbol from LLVMSupport.
10003     copts = ["-DLLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING=1"],
10004     # Here:
10005     #   MLIR_ENABLE_CUDA_CUSPARSE   : enables cuSPARSE
10006     #   MLIR_ENABLE_CUDA_CUSPARSELT : enables cuSPARSElt
10007     local_defines = ["MLIR_ENABLE_CUDA_CUSPARSE"],
10008     tags = [
10009         "manual",  # External dependency
10010         "nobuildkite",  # TODO(gcmn): Add support for this target
10011     ],
10012     deps = [
10013         ":LLVMSupportHeaders",
10014         ":mlir_c_runner_utils_hdrs",
10015         "@cuda//:cuda_headers",
10016         "@cuda//:cusparse_static",
10017         "@cuda//:libcuda",
10018     ],
10021 # Indirection to avoid 'libmlir_cuda_runtime.so' filename clash.
10022 alias(
10023     name = "mlir_cuda_runtime",
10024     actual = "_mlir_cuda_runtime",
10025     tags = [
10026         "manual",  # External dependency
10027         "nobuildkite",  # TODO(gcmn): Add support for this target
10028     ],
10031 cc_binary(
10032     name = "libmlir_cuda_runtime.so",
10033     linkshared = True,
10034     linkstatic = False,
10035     tags = [
10036         "manual",  # External dependency
10037         "nobuildkite",  # TODO(gcmn): Add support for this target
10038     ],
10039     deps = [":mlir_cuda_runtime"],
10042 cc_library(
10043     name = "VulkanRuntime",
10044     srcs = ["tools/mlir-vulkan-runner/VulkanRuntime.cpp"],
10045     hdrs = ["tools/mlir-vulkan-runner/VulkanRuntime.h"],
10046     tags = [
10047         "manual",  # External dependency
10048     ],
10049     deps = [
10050         ":Support",
10051         "@vulkan_headers",
10052         "@vulkan_sdk//:sdk",
10053     ],
10056 cc_binary(
10057     name = "libvulkan-runtime-wrappers.so",
10058     srcs = ["tools/mlir-vulkan-runner/vulkan-runtime-wrappers.cpp"],
10059     linkshared = True,
10060     linkstatic = False,
10061     tags = [
10062         "manual",  # External dependency
10063     ],
10064     deps = [":VulkanRuntime"],
10067 cc_binary(
10068     name = "mlir-vulkan-runner",
10069     srcs = ["tools/mlir-vulkan-runner/mlir-vulkan-runner.cpp"],
10070     deps = [
10071         ":ArithDialect",
10072         ":BuiltinToLLVMIRTranslation",
10073         ":ConvertToSPIRV",
10074         ":ExecutionEngineUtils",
10075         ":FuncDialect",
10076         ":FuncToLLVM",
10077         ":FuncToSPIRV",
10078         ":GPUDialect",
10079         ":GPUToSPIRV",
10080         ":GPUToVulkanTransforms",
10081         ":GPUTransforms",
10082         ":LLVMCommonConversion",
10083         ":LLVMDialect",
10084         ":LLVMIRTransforms",
10085         ":LLVMToLLVMIRTranslation",
10086         ":MemRefDialect",
10087         ":MemRefToLLVM",
10088         ":MemRefTransforms",
10089         ":MlirJitRunner",
10090         ":Pass",
10091         ":ReconcileUnrealizedCasts",
10092         ":SCFDialect",
10093         ":SPIRVDialect",
10094         ":SPIRVTransforms",
10095         ":ToLLVMIRTranslation",
10096         ":VectorDialect",
10097         ":VectorToLLVM",
10098         "//llvm:Support",
10099     ],
10102 cc_library(
10103     name = "TableGen",
10104     srcs = glob(["lib/TableGen/*.cpp"]),
10105     hdrs = glob(["include/mlir/TableGen/*.h"]),
10106     includes = ["include"],
10107     deps = [
10108         ":Support",
10109         "//llvm:Support",
10110         "//llvm:TableGen",
10111         "//llvm:TargetParser",
10112     ],
10115 cc_library(
10116     name = "MlirTableGenMain",
10117     srcs = glob(["lib/Tools/mlir-tblgen/*.cpp"]),
10118     hdrs = glob(["include/mlir/Tools/mlir-tblgen/*.h"]),
10119     includes = ["include"],
10120     deps = [
10121         ":TableGen",
10122         "//llvm:Support",
10123         "//llvm:TableGen",
10124         "//llvm:TargetParser",
10125         "//llvm:config",
10126     ],
10129 cc_binary(
10130     name = "mlir-tblgen",
10131     srcs = glob([
10132         "tools/mlir-tblgen/*.h",
10133         "tools/mlir-tblgen/*.cpp",
10134     ]),
10135     deps = [
10136         ":MlirTableGenMain",
10137         ":Support",
10138         ":TableGen",
10139         "//llvm:CodeGenTypes",
10140         "//llvm:Support",
10141         "//llvm:TableGen",
10142         "//llvm:TargetParser",
10143         "//llvm:config",
10144     ],
10147 cc_binary(
10148     name = "mlir-src-sharder",
10149     srcs = ["tools/mlir-src-sharder/mlir-src-sharder.cpp"],
10150     deps = [
10151         ":Support",
10152         "//llvm:Support",
10153     ],
10156 cc_binary(
10157     name = "mlir-linalg-ods-yaml-gen",
10158     srcs = [
10159         "tools/mlir-linalg-ods-gen/mlir-linalg-ods-yaml-gen.cpp",
10160     ],
10161     deps = [
10162         ":AsmParser",
10163         ":IR",
10164         ":Support",
10165         "//llvm:Support",
10166         "//llvm:TableGen",
10167         "//llvm:config",
10168     ],
10171 ## OpenMP / OpenACC common
10173 td_library(
10174     name = "AtomicInterfacesTdFiles",
10175     srcs = ["include/mlir/Dialect/OpenACCMPCommon/Interfaces/AtomicInterfaces.td"],
10176     includes = ["include"],
10177     deps = [
10178         ":ControlFlowInterfacesTdFiles",
10179         ":OpBaseTdFiles",
10180     ],
10183 gentbl_cc_library(
10184     name = "AtomicInterfacesIncGen",
10185     tbl_outs = [
10186         (
10187             ["-gen-op-interface-decls"],
10188             "include/mlir/Dialect/OpenACCMPCommon/Interfaces/AtomicInterfaces.h.inc",
10189         ),
10190         (
10191             ["-gen-op-interface-defs"],
10192             "include/mlir/Dialect/OpenACCMPCommon/Interfaces/AtomicInterfaces.cpp.inc",
10193         ),
10194     ],
10195     tblgen = ":mlir-tblgen",
10196     td_file = "include/mlir/Dialect/OpenACCMPCommon/Interfaces/AtomicInterfaces.td",
10197     deps = [
10198         ":AtomicInterfacesTdFiles",
10199         ":ControlFlowInterfacesTdFiles",
10200     ],
10203 cc_library(
10204     name = "AtomicInterfaces",
10205     srcs = ["lib/Dialect/OpenACCMPCommon/Interfaces/AtomicInterfaces.cpp"],
10206     hdrs = ["include/mlir/Dialect/OpenACCMPCommon/Interfaces/AtomicInterfaces.h"],
10207     includes = ["include"],
10208     deps = [
10209         ":AtomicInterfacesIncGen",
10210         ":ControlFlowInterfaces",
10211         ":IR",
10212     ],
10215 ## OpenACC dialect
10217 # TODO(gcmn): This is sticking td files in a cc_library
10218 gentbl_cc_library(
10219     name = "AccCommonGen",
10220     includes = ["/llvm/include"],
10221     tbl_outs = [
10222         (
10223             [
10224                 "-gen-directive-decl",
10225                 "-directives-dialect=OpenACC",
10226             ],
10227             "include/mlir/Dialect/OpenACC/AccCommon.td",
10228         ),
10229     ],
10230     tblgen = ":mlir-tblgen",
10231     td_file = "//llvm:include/llvm/Frontend/OpenACC/ACC.td",
10232     deps = ["//llvm:acc_td_files"],
10235 td_library(
10236     name = "OpenAccOpsTdFiles",
10237     srcs = [
10238         "include/mlir/Dialect/OpenACC/AccCommon.td",
10239         "include/mlir/Dialect/OpenACC/OpenACCBase.td",
10240         "include/mlir/Dialect/OpenACC/OpenACCOps.td",
10241         "include/mlir/Dialect/OpenACC/OpenACCOpsInterfaces.td",
10242         "include/mlir/Dialect/OpenACC/OpenACCOpsTypes.td",
10243         "include/mlir/Dialect/OpenACC/OpenACCTypeInterfaces.td",
10244         "include/mlir/Dialect/OpenACCMPCommon/Interfaces/AtomicInterfaces.td",
10245         "include/mlir/Dialect/OpenACCMPCommon/Interfaces/OpenACCMPOpsInterfaces.td",
10246     ],
10247     includes = ["include"],
10248     deps = [
10249         ":AtomicInterfacesTdFiles",
10250         ":LoopLikeInterfaceTdFiles",
10251         ":OpBaseTdFiles",
10252     ],
10255 gentbl_cc_library(
10256     name = "OpenACCOpsInterfacesIncGen",
10257     tbl_outs = [
10258         (
10259             ["-gen-op-interface-decls"],
10260             "include/mlir/Dialect/OpenACC/OpenACCOpsInterfaces.h.inc",
10261         ),
10262         (
10263             ["-gen-op-interface-defs"],
10264             "include/mlir/Dialect/OpenACC/OpenACCOpsInterfaces.cpp.inc",
10265         ),
10266     ],
10267     tblgen = ":mlir-tblgen",
10268     td_file = "include/mlir/Dialect/OpenACC/OpenACCOpsInterfaces.td",
10269     deps = [":OpenAccOpsTdFiles"],
10272 gentbl_cc_library(
10273     name = "OpenACCMPOpsInterfacesIncGen",
10274     tbl_outs = [
10275         (
10276             ["-gen-op-interface-decls"],
10277             "include/mlir/Dialect/OpenACCMPCommon/Interfaces/OpenACCMPOpsInterfaces.h.inc",
10278         ),
10279         (
10280             ["-gen-op-interface-defs"],
10281             "include/mlir/Dialect/OpenACCMPCommon/Interfaces/OpenACCMPOpsInterfaces.cpp.inc",
10282         ),
10283     ],
10284     tblgen = ":mlir-tblgen",
10285     td_file = "include/mlir/Dialect/OpenACCMPCommon/Interfaces/OpenACCMPOpsInterfaces.td",
10286     deps = [":OpenAccOpsTdFiles"],
10289 gentbl_cc_library(
10290     name = "OpenACCOpsIncGen",
10291     tbl_outs = [
10292         (
10293             [
10294                 "-gen-dialect-decls",
10295                 "-dialect=acc",
10296             ],
10297             "include/mlir/Dialect/OpenACC/OpenACCOpsDialect.h.inc",
10298         ),
10299         (
10300             [
10301                 "-gen-dialect-defs",
10302                 "-dialect=acc",
10303             ],
10304             "include/mlir/Dialect/OpenACC/OpenACCOpsDialect.cpp.inc",
10305         ),
10306         (
10307             ["-gen-op-decls"],
10308             "include/mlir/Dialect/OpenACC/OpenACCOps.h.inc",
10309         ),
10310         (
10311             ["-gen-op-defs"],
10312             "include/mlir/Dialect/OpenACC/OpenACCOps.cpp.inc",
10313         ),
10314         (
10315             ["-gen-enum-decls"],
10316             "include/mlir/Dialect/OpenACC/OpenACCOpsEnums.h.inc",
10317         ),
10318         (
10319             ["-gen-enum-defs"],
10320             "include/mlir/Dialect/OpenACC/OpenACCOpsEnums.cpp.inc",
10321         ),
10322         (
10323             [
10324                 "-gen-attrdef-decls",
10325                 "-attrdefs-dialect=acc",
10326             ],
10327             "include/mlir/Dialect/OpenACC/OpenACCOpsAttributes.h.inc",
10328         ),
10329         (
10330             [
10331                 "-gen-attrdef-defs",
10332                 "-attrdefs-dialect=acc",
10333             ],
10334             "include/mlir/Dialect/OpenACC/OpenACCOpsAttributes.cpp.inc",
10335         ),
10336         (
10337             ["-gen-op-doc"],
10338             "g3doc/Dialects/OpenACC/OpenACCOps.md",
10339         ),
10340     ],
10341     tblgen = ":mlir-tblgen",
10342     td_file = "include/mlir/Dialect/OpenACC/OpenACCOps.td",
10343     deps = [
10344         ":BuiltinDialectTdFiles",
10345         ":ControlFlowInterfacesTdFiles",
10346         ":OpenAccOpsTdFiles",
10347         ":SideEffectInterfacesTdFiles",
10348     ],
10351 gentbl_cc_library(
10352     name = "OpenACCTypesIncGen",
10353     tbl_outs = [
10354         (
10355             [
10356                 "--gen-typedef-decls",
10357                 "-typedefs-dialect=acc",
10358             ],
10359             "include/mlir/Dialect/OpenACC/OpenACCOpsTypes.h.inc",
10360         ),
10361         (
10362             [
10363                 "--gen-typedef-defs",
10364                 "-typedefs-dialect=acc",
10365             ],
10366             "include/mlir/Dialect/OpenACC/OpenACCOpsTypes.cpp.inc",
10367         ),
10368     ],
10369     tblgen = ":mlir-tblgen",
10370     td_file = "include/mlir/Dialect/OpenACC/OpenACCOpsTypes.td",
10371     deps = [":OpenAccOpsTdFiles"],
10374 gentbl_cc_library(
10375     name = "OpenACCTypeInterfacesIncGen",
10376     tbl_outs = [
10377         (
10378             ["-gen-type-interface-decls"],
10379             "include/mlir/Dialect/OpenACC/OpenACCTypeInterfaces.h.inc",
10380         ),
10381         (
10382             ["-gen-type-interface-defs"],
10383             "include/mlir/Dialect/OpenACC/OpenACCTypeInterfaces.cpp.inc",
10384         ),
10385     ],
10386     tblgen = ":mlir-tblgen",
10387     td_file = "include/mlir/Dialect/OpenACC/OpenACCTypeInterfaces.td",
10388     deps = [":OpenAccOpsTdFiles"],
10391 cc_library(
10392     name = "OpenACCDialect",
10393     srcs = glob(["lib/Dialect/OpenACC/IR/*.cpp"]),
10394     hdrs = glob(
10395         include = ["include/mlir/Dialect/OpenACC/*.h"],
10396         exclude = ["include/mlir/Dialect/OpenACCMPCommon/Interfaces/AtomicInterfaces.h"],
10397     ) + [
10398         "include/mlir/Dialect/OpenACCMPCommon/Interfaces/OpenACCMPOpsInterfaces.h",
10399     ],
10400     includes = ["include"],
10401     textual_hdrs = [
10402         "include/mlir/Dialect/OpenACCMPCommon/Interfaces/AtomicInterfaces.h",
10403     ],
10404     deps = [
10405         ":AtomicInterfaces",
10406         ":AtomicInterfacesIncGen",
10407         ":BytecodeOpInterface",
10408         ":ControlFlowInterfaces",
10409         ":IR",
10410         ":LLVMDialect",
10411         ":LoopLikeInterface",
10412         ":MemRefDialect",
10413         ":OpenACCMPOpsInterfacesIncGen",
10414         ":OpenACCOpsIncGen",
10415         ":OpenACCOpsInterfacesIncGen",
10416         ":OpenACCTypeInterfacesIncGen",
10417         ":OpenACCTypesIncGen",
10418         ":SideEffectInterfaces",
10419         ":TransformUtils",
10420         "//llvm:Support",
10421     ],
10424 gentbl_cc_library(
10425     name = "OpenACCPassIncGen",
10426     tbl_outs = [
10427         (
10428             [
10429                 "-gen-pass-decls",
10430                 "-name=OpenACC",
10431             ],
10432             "include/mlir/Dialect/OpenACC/Transforms/Passes.h.inc",
10433         ),
10434     ],
10435     tblgen = ":mlir-tblgen",
10436     td_file = "include/mlir/Dialect/OpenACC/Transforms/Passes.td",
10437     deps = [":PassBaseTdFiles"],
10440 cc_library(
10441     name = "OpenACCTransforms",
10442     srcs = glob(
10443         [
10444             "lib/Dialect/OpenACC/Transforms/*.cpp",
10445         ],
10446     ),
10447     hdrs = glob(["include/mlir/Dialect/OpenACC/Transforms/*.h"]),
10448     includes = ["include"],
10449     deps = [
10450         ":FuncDialect",
10451         ":OpenACCDialect",
10452         ":OpenACCPassIncGen",
10453         ":Pass",
10454         ":TransformUtils",
10455         "//llvm:Support",
10456     ],
10459 ## OpenMP dialect
10461 # TODO(gcmn): This is sticking td files in a cc_library
10462 gentbl_cc_library(
10463     name = "OmpCommonTdGen",
10464     includes = ["/llvm/include"],
10465     tbl_outs = [
10466         (
10467             [
10468                 "-gen-directive-decl",
10469                 "-directives-dialect=OpenMP",
10470             ],
10471             "include/mlir/Dialect/OpenMP/OmpCommon.td",
10472         ),
10473     ],
10474     tblgen = ":mlir-tblgen",
10475     td_file = "//llvm:include/llvm/Frontend/OpenMP/OMP.td",
10476     deps = [
10477         ":OpBaseTdFiles",
10478         "//llvm:omp_td_files",
10479     ],
10482 td_library(
10483     name = "OpenMPOpsTdFiles",
10484     srcs = [
10485         "include/mlir/Dialect/OpenACCMPCommon/Interfaces/AtomicInterfaces.td",
10486         "include/mlir/Dialect/OpenACCMPCommon/Interfaces/OpenACCMPOpsInterfaces.td",
10487         "include/mlir/Dialect/OpenMP/OmpCommon.td",
10488         "include/mlir/Dialect/OpenMP/OpenMPAttrDefs.td",
10489         "include/mlir/Dialect/OpenMP/OpenMPClauses.td",
10490         "include/mlir/Dialect/OpenMP/OpenMPDialect.td",
10491         "include/mlir/Dialect/OpenMP/OpenMPEnums.td",
10492         "include/mlir/Dialect/OpenMP/OpenMPOpBase.td",
10493         "include/mlir/Dialect/OpenMP/OpenMPOps.td",
10494         "include/mlir/Dialect/OpenMP/OpenMPOpsInterfaces.td",
10495         "include/mlir/Dialect/OpenMP/OpenMPTypeInterfaces.td",
10496     ],
10497     deps = [
10498         ":AtomicInterfacesTdFiles",
10499         ":LLVMOpsTdFiles",
10500         ":OpBaseTdFiles",
10501     ],
10504 gentbl_cc_library(
10505     name = "OpenMPOpsIncGen",
10506     tbl_outs = [
10507         (
10508             [
10509                 "-gen-typedef-decls",
10510                 "-typedefs-dialect=omp",
10511             ],
10512             "include/mlir/Dialect/OpenMP/OpenMPOpsTypes.h.inc",
10513         ),
10514         (
10515             [
10516                 "-gen-typedef-defs",
10517                 "-typedefs-dialect=omp",
10518             ],
10519             "include/mlir/Dialect/OpenMP/OpenMPOpsTypes.cpp.inc",
10520         ),
10521         (
10522             ["-gen-op-decls"],
10523             "include/mlir/Dialect/OpenMP/OpenMPOps.h.inc",
10524         ),
10525         (
10526             ["-gen-op-defs"],
10527             "include/mlir/Dialect/OpenMP/OpenMPOps.cpp.inc",
10528         ),
10529         (
10530             ["-gen-enum-decls"],
10531             "include/mlir/Dialect/OpenMP/OpenMPOpsEnums.h.inc",
10532         ),
10533         (
10534             ["-gen-enum-defs"],
10535             "include/mlir/Dialect/OpenMP/OpenMPOpsEnums.cpp.inc",
10536         ),
10537         (
10538             [
10539                 "-gen-dialect-decls",
10540                 "-dialect=omp",
10541             ],
10542             "include/mlir/Dialect/OpenMP/OpenMPOpsDialect.h.inc",
10543         ),
10544         (
10545             [
10546                 "-gen-dialect-defs",
10547                 "-dialect=omp",
10548             ],
10549             "include/mlir/Dialect/OpenMP/OpenMPOpsDialect.cpp.inc",
10550         ),
10551         (
10552             [
10553                 "-gen-attrdef-decls",
10554                 "-attrdefs-dialect=omp",
10555             ],
10556             "include/mlir/Dialect/OpenMP/OpenMPOpsAttributes.h.inc",
10557         ),
10558         (
10559             [
10560                 "-gen-attrdef-defs",
10561                 "-attrdefs-dialect=omp",
10562             ],
10563             "include/mlir/Dialect/OpenMP/OpenMPOpsAttributes.cpp.inc",
10564         ),
10565         (
10566             ["-gen-op-doc"],
10567             "g3doc/Dialects/OpenMP/OpenMPOps.md",
10568         ),
10569         (
10570             ["-gen-openmp-clause-ops"],
10571             "include/mlir/Dialect/OpenMP/OpenMPClauseOps.h.inc",
10572         ),
10573     ],
10574     tblgen = ":mlir-tblgen",
10575     td_file = "include/mlir/Dialect/OpenMP/OpenMPOps.td",
10576     deps = [":OpenMPOpsTdFiles"],
10579 gentbl_cc_library(
10580     name = "OpenMPTypeInterfacesIncGen",
10581     tbl_outs = [
10582         (
10583             ["-gen-type-interface-decls"],
10584             "include/mlir/Dialect/OpenMP/OpenMPTypeInterfaces.h.inc",
10585         ),
10586         (
10587             ["-gen-type-interface-defs"],
10588             "include/mlir/Dialect/OpenMP/OpenMPTypeInterfaces.cpp.inc",
10589         ),
10590     ],
10591     tblgen = ":mlir-tblgen",
10592     td_file = "include/mlir/Dialect/OpenMP/OpenMPTypeInterfaces.td",
10593     deps = [":OpenMPOpsTdFiles"],
10596 gentbl_cc_library(
10597     name = "OpenMPInterfacesIncGen",
10598     tbl_outs = [
10599         (
10600             ["-gen-op-interface-decls"],
10601             "include/mlir/Dialect/OpenMP/OpenMPOpsInterfaces.h.inc",
10602         ),
10603         (
10604             ["-gen-op-interface-defs"],
10605             "include/mlir/Dialect/OpenMP/OpenMPOpsInterfaces.cpp.inc",
10606         ),
10607     ],
10608     tblgen = ":mlir-tblgen",
10609     td_file = "include/mlir/Dialect/OpenMP/OpenMPOpsInterfaces.td",
10610     deps = [":OpenMPOpsTdFiles"],
10613 cc_library(
10614     name = "OpenMPDialect",
10615     srcs = glob(["lib/Dialect/OpenMP/IR/*.cpp"]),
10616     hdrs = glob(
10617         include = ["include/mlir/Dialect/OpenMP/*.h"],
10618         exclude = ["include/mlir/Dialect/OpenMP/OpenMPInterfaces.h"],
10619     ) + [
10620         "include/mlir/Dialect/OpenACCMPCommon/Interfaces/OpenACCMPOpsInterfaces.h",
10621     ],
10622     includes = ["include"],
10623     textual_hdrs = [
10624         "include/mlir/Dialect/OpenMP/OpenMPInterfaces.h",
10625     ],
10626     deps = [
10627         ":AtomicInterfaces",
10628         ":AtomicInterfacesIncGen",
10629         ":ControlFlowInterfaces",
10630         ":ConvertToLLVMInterface",
10631         ":FuncDialect",
10632         ":IR",
10633         ":LLVMDialect",
10634         ":OpenACCMPOpsInterfacesIncGen",
10635         ":OpenMPInterfacesIncGen",
10636         ":OpenMPOpsIncGen",
10637         ":OpenMPTypeInterfacesIncGen",
10638         ":SideEffectInterfaces",
10639         ":Support",
10640         "//llvm:FrontendOpenMP",
10641         "//llvm:Support",
10642     ],
10645 cc_library(
10646     name = "OpenACCToSCF",
10647     srcs = glob([
10648         "lib/Conversion/OpenACCToSCF/*.cpp",
10649     ]),
10650     hdrs = glob([
10651         "include/mlir/Conversion/OpenACCToSCF/*.h",
10652     ]),
10653     includes = ["include"],
10654     deps = [
10655         ":ArithDialect",
10656         ":ConversionPassIncGen",
10657         ":IR",
10658         ":OpenACCDialect",
10659         ":Pass",
10660         ":SCFDialect",
10661         ":TransformUtils",
10662     ],
10665 cc_library(
10666     name = "OpenMPToLLVM",
10667     srcs = glob([
10668         "lib/Conversion/OpenMPToLLVM/*.cpp",
10669     ]),
10670     hdrs = glob([
10671         "include/mlir/Conversion/OpenMPToLLVM/*.h",
10672     ]),
10673     includes = ["include"],
10674     deps = [
10675         ":ArithToLLVM",
10676         ":ControlFlowToLLVM",
10677         ":ConversionPassIncGen",
10678         ":ConvertToLLVMInterface",
10679         ":FuncToLLVM",
10680         ":LLVMCommonConversion",
10681         ":LLVMDialect",
10682         ":MemRefToLLVM",
10683         ":OpenMPDialect",
10684         ":Pass",
10685     ],
10688 td_library(
10689     name = "QuantizationOpsTdFiles",
10690     srcs = [
10691         "include/mlir/Dialect/Quant/IR/QuantBase.td",
10692         "include/mlir/Dialect/Quant/IR/QuantOps.td",
10693     ],
10694     includes = ["include"],
10695     deps = [
10696         ":InferTypeOpInterfaceTdFiles",
10697         ":OpBaseTdFiles",
10698         ":SideEffectInterfacesTdFiles",
10699     ],
10702 gentbl_cc_library(
10703     name = "QuantOpsIncGen",
10704     tbl_outs = [
10705         (
10706             ["-gen-op-decls"],
10707             "include/mlir/Dialect/Quant/IR/QuantOps.h.inc",
10708         ),
10709         (
10710             ["-gen-op-defs"],
10711             "include/mlir/Dialect/Quant/IR/QuantOps.cpp.inc",
10712         ),
10713         (
10714             ["-gen-dialect-decls"],
10715             "include/mlir/Dialect/Quant/IR/QuantOpsDialect.h.inc",
10716         ),
10717         (
10718             ["-gen-dialect-defs"],
10719             "include/mlir/Dialect/Quant/IR/QuantOpsDialect.cpp.inc",
10720         ),
10721         (
10722             ["-gen-op-doc"],
10723             "g3doc/Dialects/QuantOps/QuantOps.md",
10724         ),
10725     ],
10726     tblgen = ":mlir-tblgen",
10727     td_file = "include/mlir/Dialect/Quant/IR/QuantOps.td",
10728     deps = [":QuantizationOpsTdFiles"],
10731 gentbl_cc_library(
10732     name = "QuantDialectBytecodeGen",
10733     tbl_outs = [
10734         (
10735             [
10736                 "-gen-bytecode",
10737                 "-bytecode-dialect=Quant",
10738             ],
10739             "include/mlir/Dialect/Quant/IR/QuantDialectBytecode.cpp.inc",
10740         ),
10741     ],
10742     tblgen = ":mlir-tblgen",
10743     td_file = "include/mlir/Dialect/Quant/IR/QuantDialectBytecode.td",
10744     deps = [
10745         ":BytecodeTdFiles",
10746     ],
10749 cc_library(
10750     name = "QuantOps",
10751     srcs = [
10752         "lib/Dialect/Quant/IR/QuantDialectBytecode.cpp",
10753         "lib/Dialect/Quant/IR/QuantDialectBytecode.h",
10754         "lib/Dialect/Quant/IR/QuantOps.cpp",
10755         "lib/Dialect/Quant/IR/QuantTypes.cpp",
10756         "lib/Dialect/Quant/IR/TypeDetail.h",
10757         "lib/Dialect/Quant/IR/TypeParser.cpp",
10758         "lib/Dialect/Quant/Utils/FakeQuantSupport.cpp",
10759         "lib/Dialect/Quant/Utils/UniformSupport.cpp",
10760     ],
10761     hdrs = [
10762         "include/mlir/Dialect/Quant/IR/Quant.h",
10763         "include/mlir/Dialect/Quant/IR/QuantTypes.h",
10764         "include/mlir/Dialect/Quant/Utils/FakeQuantSupport.h",
10765         "include/mlir/Dialect/Quant/Utils/UniformSupport.h",
10766     ],
10767     includes = ["include"],
10768     deps = [
10769         ":BytecodeOpInterface",
10770         ":IR",
10771         ":InferTypeOpInterface",
10772         ":QuantDialectBytecodeGen",
10773         ":QuantOpsIncGen",
10774         ":SideEffectInterfaces",
10775         ":Support",
10776         "//llvm:Support",
10777     ],
10780 td_library(
10781     name = "IndexOpsTdFiles",
10782     srcs = [
10783         "include/mlir/Dialect/Index/IR/IndexDialect.td",
10784         "include/mlir/Dialect/Index/IR/IndexEnums.td",
10785         "include/mlir/Dialect/Index/IR/IndexOps.td",
10786     ],
10787     includes = ["include"],
10788     deps = [
10789         ":CastInterfacesTdFiles",
10790         ":InferIntRangeInterfaceTdFiles",
10791         ":InferTypeOpInterfaceTdFiles",
10792         ":OpBaseTdFiles",
10793         ":SideEffectInterfacesTdFiles",
10794     ],
10797 gentbl_cc_library(
10798     name = "IndexOpsIncGen",
10799     tbl_outs = [
10800         (
10801             ["-gen-op-decls"],
10802             "include/mlir/Dialect/Index/IR/IndexOps.h.inc",
10803         ),
10804         (
10805             ["-gen-op-defs"],
10806             "include/mlir/Dialect/Index/IR/IndexOps.cpp.inc",
10807         ),
10808         (
10809             [
10810                 "-gen-dialect-decls",
10811                 "-dialect=index",
10812             ],
10813             "include/mlir/Dialect/Index/IR/IndexOpsDialect.h.inc",
10814         ),
10815         (
10816             [
10817                 "-gen-dialect-defs",
10818                 "-dialect=index",
10819             ],
10820             "include/mlir/Dialect/Index/IR/IndexOpsDialect.cpp.inc",
10821         ),
10822         (
10823             ["-gen-attrdef-decls"],
10824             "include/mlir/Dialect/Index/IR/IndexOpsAttrDefs.h.inc",
10825         ),
10826         (
10827             ["-gen-attrdef-defs"],
10828             "include/mlir/Dialect/Index/IR/IndexOpsAttrDefs.cpp.inc",
10829         ),
10830     ],
10831     tblgen = ":mlir-tblgen",
10832     td_file = "include/mlir/Dialect/Index/IR/IndexOps.td",
10833     deps = [":IndexOpsTdFiles"],
10836 gentbl_cc_library(
10837     name = "IndexEnumsIncGen",
10838     tbl_outs = [
10839         (
10840             ["-gen-enum-decls"],
10841             "include/mlir/Dialect/Index/IR/IndexEnums.h.inc",
10842         ),
10843         (
10844             ["-gen-enum-defs"],
10845             "include/mlir/Dialect/Index/IR/IndexEnums.cpp.inc",
10846         ),
10847         (
10848             [
10849                 "-gen-attrdef-decls",
10850                 "-attrdefs-dialect=index",
10851             ],
10852             "include/mlir/Dialect/Index/IR/IndexAttrs.h.inc",
10853         ),
10854         (
10855             [
10856                 "-gen-attrdef-defs",
10857                 "-attrdefs-dialect=index",
10858             ],
10859             "include/mlir/Dialect/Index/IR/IndexAttrs.cpp.inc",
10860         ),
10861     ],
10862     tblgen = ":mlir-tblgen",
10863     td_file = "include/mlir/Dialect/Index/IR/IndexEnums.td",
10864     deps = [":IndexOpsTdFiles"],
10867 cc_library(
10868     name = "IndexToLLVM",
10869     srcs = glob([
10870         "lib/Conversion/IndexToLLVM/*.cpp",
10871     ]),
10872     hdrs = glob([
10873         "include/mlir/Conversion/IndexToLLVM/*.h",
10874     ]),
10875     includes = ["include"],
10876     deps = [
10877         ":ConversionPassIncGen",
10878         ":ConvertToLLVMInterface",
10879         ":IndexDialect",
10880         ":LLVMCommonConversion",
10881         ":LLVMDialect",
10882         ":Pass",
10883     ],
10886 cc_library(
10887     name = "IndexToSPIRV",
10888     srcs = glob([
10889         "lib/Conversion/IndexToSPIRV/*.cpp",
10890     ]),
10891     hdrs = glob([
10892         "include/mlir/Conversion/IndexToSPIRV/*.h",
10893     ]),
10894     includes = ["include"],
10895     deps = [
10896         ":ConversionPassIncGen",
10897         ":IndexDialect",
10898         ":Pass",
10899         ":SPIRVCommonConversion",
10900         ":SPIRVConversion",
10901         ":SPIRVDialect",
10902     ],
10905 cc_library(
10906     name = "IndexDialect",
10907     srcs = glob(["lib/Dialect/Index/IR/*.cpp"]),
10908     hdrs = glob(["include/mlir/Dialect/Index/IR/*.h"]),
10909     includes = ["include"],
10910     deps = [
10911         ":BytecodeOpInterface",
10912         ":CastInterfaces",
10913         ":ConvertToLLVMInterface",
10914         ":IR",
10915         ":IndexEnumsIncGen",
10916         ":IndexOpsIncGen",
10917         ":InferIntRangeCommon",
10918         ":InferIntRangeInterface",
10919         ":InferTypeOpInterface",
10920         ":SideEffectInterfaces",
10921         "//llvm:Support",
10922     ],
10925 td_library(
10926     name = "LinalgOpsTdFiles",
10927     srcs = [
10928         "include/mlir/Dialect/Linalg/IR/LinalgBase.td",
10929         "include/mlir/Dialect/Linalg/IR/LinalgEnums.td",
10930         "include/mlir/Dialect/Linalg/IR/LinalgInterfaces.td",
10931         "include/mlir/Dialect/Linalg/IR/LinalgOps.td",
10932     ],
10933     includes = ["include"],
10934     deps = [
10935         ":ControlFlowInterfacesTdFiles",
10936         ":DestinationStyleOpInterfaceTdFiles",
10937         ":DialectUtilsTdFiles",
10938         ":InferTypeOpInterfaceTdFiles",
10939         ":LoopLikeInterfaceTdFiles",
10940         ":OpBaseTdFiles",
10941         ":SideEffectInterfacesTdFiles",
10942         ":TilingInterfaceTdFiles",
10943         ":ViewLikeInterfaceTdFiles",
10944     ],
10947 td_library(
10948     name = "LinalgTransformOpsTdFiles",
10949     srcs = glob([
10950         "include/mlir/Dialect/Linalg/TransformOps/*.td",
10951     ]),
10952     includes = ["include"],
10953     deps = [
10954         ":SCFTdFiles",
10955         ":TransformDialectTdFiles",
10956     ],
10959 gentbl_cc_library(
10960     name = "LinalgOpsIncGen",
10961     tbl_outs = [
10962         (
10963             ["-gen-op-decls"],
10964             "include/mlir/Dialect/Linalg/IR/LinalgOps.h.inc",
10965         ),
10966         (
10967             ["-gen-op-defs"],
10968             "include/mlir/Dialect/Linalg/IR/LinalgOps.cpp.inc",
10969         ),
10970         (
10971             [
10972                 "-gen-dialect-decls",
10973                 "-dialect=linalg",
10974             ],
10975             "include/mlir/Dialect/Linalg/IR/LinalgOpsDialect.h.inc",
10976         ),
10977         (
10978             [
10979                 "-gen-dialect-defs",
10980                 "-dialect=linalg",
10981             ],
10982             "include/mlir/Dialect/Linalg/IR/LinalgOpsDialect.cpp.inc",
10983         ),
10984         (
10985             ["-gen-attrdef-decls"],
10986             "include/mlir/Dialect/Linalg/IR/LinalgOpsAttrDefs.h.inc",
10987         ),
10988         (
10989             ["-gen-attrdef-defs"],
10990             "include/mlir/Dialect/Linalg/IR/LinalgOpsAttrDefs.cpp.inc",
10991         ),
10992     ],
10993     tblgen = ":mlir-tblgen",
10994     td_file = "include/mlir/Dialect/Linalg/IR/LinalgOps.td",
10995     deps = [":LinalgOpsTdFiles"],
10998 gentbl_cc_library(
10999     name = "LinalgEnumsIncGen",
11000     tbl_outs = [
11001         (
11002             ["-gen-enum-decls"],
11003             "include/mlir/Dialect/Linalg/IR/LinalgOpsEnums.h.inc",
11004         ),
11005         (
11006             ["-gen-enum-defs"],
11007             "include/mlir/Dialect/Linalg/IR/LinalgOpsEnums.cpp.inc",
11008         ),
11009     ],
11010     tblgen = ":mlir-tblgen",
11011     td_file = "include/mlir/Dialect/Linalg/IR/LinalgEnums.td",
11012     deps = [":LinalgOpsTdFiles"],
11015 gentbl_cc_library(
11016     name = "LinalgMatchOpsIncGen",
11017     tbl_outs = [
11018         (
11019             ["-gen-op-decls"],
11020             "include/mlir/Dialect/Linalg/TransformOps/LinalgMatchOps.h.inc",
11021         ),
11022         (
11023             ["-gen-op-defs"],
11024             "include/mlir/Dialect/Linalg/TransformOps/LinalgMatchOps.cpp.inc",
11025         ),
11026     ],
11027     tblgen = ":mlir-tblgen",
11028     td_file = "include/mlir/Dialect/Linalg/TransformOps/LinalgMatchOps.td",
11029     deps = [
11030         ":LinalgTransformEnumsIncGen",
11031         ":LinalgTransformOpsIncGen",
11032         ":LinalgTransformOpsTdFiles",
11033         ":SCFDeviceMappingInterfacesIncGen",
11034     ],
11037 gentbl_cc_library(
11038     name = "LinalgTransformEnumsIncGen",
11039     tbl_outs = [
11040         (
11041             ["-gen-enum-decls"],
11042             "include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOpsEnums.h.inc",
11043         ),
11044         (
11045             ["-gen-enum-defs"],
11046             "include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOpsEnums.cpp.inc",
11047         ),
11048     ],
11049     tblgen = ":mlir-tblgen",
11050     td_file = "include/mlir/Dialect/Linalg/TransformOps/LinalgTransformEnums.td",
11051     deps = [
11052         ":LinalgTransformOpsTdFiles",
11053         ":SCFDeviceMappingInterfacesIncGen",
11054     ],
11057 gentbl_cc_library(
11058     name = "LinalgTransformOpsIncGen",
11059     tbl_outs = [
11060         (
11061             ["-gen-op-decls"],
11062             "include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.h.inc",
11063         ),
11064         (
11065             ["-gen-op-defs"],
11066             "include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp.inc",
11067         ),
11068     ],
11069     tblgen = ":mlir-tblgen",
11070     td_file = "include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.td",
11071     deps = [
11072         ":LinalgTransformEnumsIncGen",
11073         ":LinalgTransformOpsTdFiles",
11074         ":SCFDeviceMappingInterfacesIncGen",
11075     ],
11078 genlinalg(
11079     name = "LinalgNamedStructuredOpsYamlIncGen",
11080     src = "include/mlir/Dialect/Linalg/IR/LinalgNamedStructuredOps.yaml",
11081     linalg_outs = [
11082         (
11083             "-o-impl=$@",
11084             "include/mlir/Dialect/Linalg/IR/LinalgNamedStructuredOps.yamlgen.cpp.inc",
11085         ),
11086         (
11087             "-o-ods-decl=$@",
11088             "include/mlir/Dialect/Linalg/IR/LinalgNamedStructuredOps.yamlgen.td",
11089         ),
11090     ],
11091     linalggen = ":mlir-linalg-ods-yaml-gen",
11094 td_library(
11095     name = "LinalgStructuredOpsTdFiles",
11096     srcs = [
11097         "include/mlir/Dialect/Linalg/IR/LinalgInterfaces.td",
11098         "include/mlir/Dialect/Linalg/IR/LinalgNamedStructuredOps.yamlgen.td",
11099         "include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td",
11100     ],
11101     includes = ["include"],
11102     deps = [
11103         ":CopyOpInterfaceTdFiles",
11104         ":DestinationStyleOpInterface",
11105         ":LinalgOpsTdFiles",
11106         ":OpBaseTdFiles",
11107         ":SideEffectInterfacesTdFiles",
11108     ],
11111 gentbl_cc_library(
11112     name = "LinalgStructuredOpsIncGen",
11113     tbl_outs = [
11114         (
11115             ["-gen-op-decls"],
11116             "include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.h.inc",
11117         ),
11118         (
11119             ["-gen-op-defs"],
11120             "include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.cpp.inc",
11121         ),
11122     ],
11123     tblgen = ":mlir-tblgen",
11124     td_file = "include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td",
11125     deps = [":LinalgStructuredOpsTdFiles"],
11128 gentbl_cc_library(
11129     name = "LinalgInterfacesIncGen",
11130     tbl_outs = [
11131         (
11132             ["-gen-op-interface-decls"],
11133             "include/mlir/Dialect/Linalg/IR/LinalgInterfaces.h.inc",
11134         ),
11135         (
11136             ["-gen-op-interface-defs"],
11137             "include/mlir/Dialect/Linalg/IR/LinalgInterfaces.cpp.inc",
11138         ),
11139     ],
11140     tblgen = ":mlir-tblgen",
11141     td_file = "include/mlir/Dialect/Linalg/IR/LinalgInterfaces.td",
11142     deps = [":LinalgStructuredOpsTdFiles"],
11145 td_library(
11146     name = "BufferizableOpInterfaceTdFiles",
11147     srcs = [
11148         "include/mlir/Dialect/Bufferization/IR/BufferizableOpInterface.td",
11149     ],
11150     includes = ["include"],
11151     deps = [
11152         ":OpBaseTdFiles",
11153     ],
11156 gentbl_cc_library(
11157     name = "BufferizableOpInterfaceIncGen",
11158     tbl_outs = [
11159         (
11160             ["-gen-op-interface-decls"],
11161             "include/mlir/Dialect/Bufferization/IR/BufferizableOpInterface.h.inc",
11162         ),
11163         (
11164             ["-gen-op-interface-defs"],
11165             "include/mlir/Dialect/Bufferization/IR/BufferizableOpInterface.cpp.inc",
11166         ),
11167     ],
11168     tblgen = ":mlir-tblgen",
11169     td_file = "include/mlir/Dialect/Bufferization/IR/BufferizableOpInterface.td",
11170     deps = [
11171         ":BufferizableOpInterfaceTdFiles",
11172     ],
11175 td_library(
11176     name = "BufferDeallocationOpInterfaceTdFiles",
11177     srcs = [
11178         "include/mlir/Dialect/Bufferization/IR/BufferDeallocationOpInterface.td",
11179     ],
11180     includes = ["include"],
11181     deps = [
11182         ":OpBaseTdFiles",
11183     ],
11186 gentbl_cc_library(
11187     name = "BufferDeallocationOpInterfaceIncGen",
11188     tbl_outs = [
11189         (
11190             ["-gen-op-interface-decls"],
11191             "include/mlir/Dialect/Bufferization/IR/BufferDeallocationOpInterface.h.inc",
11192         ),
11193         (
11194             ["-gen-op-interface-defs"],
11195             "include/mlir/Dialect/Bufferization/IR/BufferDeallocationOpInterface.cpp.inc",
11196         ),
11197     ],
11198     tblgen = ":mlir-tblgen",
11199     td_file = "include/mlir/Dialect/Bufferization/IR/BufferDeallocationOpInterface.td",
11200     deps = [
11201         ":BufferDeallocationOpInterfaceTdFiles",
11202     ],
11205 td_library(
11206     name = "BufferViewFlowOpInterfaceTdFiles",
11207     srcs = [
11208         "include/mlir/Dialect/Bufferization/IR/BufferViewFlowOpInterface.td",
11209     ],
11210     includes = ["include"],
11211     deps = [
11212         ":OpBaseTdFiles",
11213     ],
11216 gentbl_cc_library(
11217     name = "BufferViewFlowOpInterfaceIncGen",
11218     tbl_outs = [
11219         (
11220             ["-gen-op-interface-decls"],
11221             "include/mlir/Dialect/Bufferization/IR/BufferViewFlowOpInterface.h.inc",
11222         ),
11223         (
11224             ["-gen-op-interface-defs"],
11225             "include/mlir/Dialect/Bufferization/IR/BufferViewFlowOpInterface.cpp.inc",
11226         ),
11227     ],
11228     tblgen = ":mlir-tblgen",
11229     td_file = "include/mlir/Dialect/Bufferization/IR/BufferViewFlowOpInterface.td",
11230     deps = [
11231         ":BufferViewFlowOpInterfaceTdFiles",
11232     ],
11235 td_library(
11236     name = "SubsetOpInterfaceTdFiles",
11237     srcs = [
11238         "include/mlir/Interfaces/SubsetOpInterface.td",
11239     ],
11240     includes = ["include"],
11241     deps = [
11242         ":OpBaseTdFiles",
11243     ],
11246 gentbl_cc_library(
11247     name = "SubsetOpInterfaceIncGen",
11248     tbl_outs = [
11249         (
11250             ["-gen-op-interface-decls"],
11251             "include/mlir/Interfaces/SubsetOpInterface.h.inc",
11252         ),
11253         (
11254             ["-gen-op-interface-defs"],
11255             "include/mlir/Interfaces/SubsetOpInterface.cpp.inc",
11256         ),
11257     ],
11258     tblgen = ":mlir-tblgen",
11259     td_file = "include/mlir/Interfaces/SubsetOpInterface.td",
11260     deps = [
11261         ":SubsetOpInterfaceTdFiles",
11262     ],
11265 cc_library(
11266     name = "SubsetOpInterface",
11267     srcs = ["lib/Interfaces/SubsetOpInterface.cpp"],
11268     hdrs = ["include/mlir/Interfaces/SubsetOpInterface.h"],
11269     includes = ["include"],
11270     deps = [
11271         ":DestinationStyleOpInterface",
11272         ":IR",
11273         ":SubsetOpInterfaceIncGen",
11274         ":ValueBoundsOpInterface",
11275     ],
11278 td_library(
11279     name = "LinalgDocTdFiles",
11280     srcs = ["include/mlir/Dialect/Linalg/IR/LinalgDoc.td"],
11281     includes = ["include"],
11282     deps = [
11283         ":LinalgOpsTdFiles",
11284         ":LinalgStructuredOpsTdFiles",
11285     ],
11288 gentbl_cc_library(
11289     name = "LinalgDocIncGen",
11290     tbl_outs = [
11291         (
11292             ["-gen-op-doc"],
11293             "g3doc/Dialects/Linalg/LinalgOps.md",
11294         ),
11295     ],
11296     tblgen = ":mlir-tblgen",
11297     td_file = "include/mlir/Dialect/Linalg/IR/LinalgDoc.td",
11298     deps = [":LinalgDocTdFiles"],
11301 cc_library(
11302     name = "LinalgToStandard",
11303     srcs = glob([
11304         "lib/Conversion/LinalgToStandard/*.cpp",
11305     ]),
11306     hdrs = glob([
11307         "include/mlir/Conversion/LinalgToStandard/*.h",
11308     ]),
11309     includes = ["include"],
11310     deps = [
11311         ":AffineDialect",
11312         ":ConversionPassIncGen",
11313         ":FuncDialect",
11314         ":LLVMDialect",
11315         ":LinalgDialect",
11316         ":LinalgTransforms",
11317         ":MemRefDialect",
11318         ":Pass",
11319         ":SCFDialect",
11320         ":TransformUtils",
11321     ],
11324 cc_library(
11325     name = "LinalgDialect",
11326     srcs = glob(["lib/Dialect/Linalg/IR/*.cpp"]),
11327     hdrs = glob(["include/mlir/Dialect/Linalg/IR/*.h"]),
11328     includes = ["include"],
11329     deps = [
11330         ":AffineDialect",
11331         ":ArithDialect",
11332         ":ArithUtils",
11333         ":AsmParser",
11334         ":BufferizationInterfaces",
11335         ":BytecodeOpInterface",
11336         ":ComplexDialect",
11337         ":ControlFlowInterfaces",
11338         ":CopyOpInterface",
11339         ":DestinationStyleOpInterface",
11340         ":DialectUtils",
11341         ":FunctionInterfaces",
11342         ":IR",
11343         ":InferTypeOpInterface",
11344         ":InliningUtils",
11345         ":LinalgEnumsIncGen",
11346         ":LinalgInterfacesIncGen",
11347         ":LinalgNamedStructuredOpsYamlIncGen",
11348         ":LinalgOpsIncGen",
11349         ":LinalgStructuredOpsIncGen",
11350         ":MathDialect",
11351         ":MemRefDialect",
11352         ":MeshShardingInterface",
11353         ":Parser",
11354         ":SCFDialect",
11355         ":SideEffectInterfaces",
11356         ":SparseTensorDialect",
11357         ":SubsetOpInterface",
11358         ":Support",
11359         ":TensorDialect",
11360         ":TilingInterface",
11361         ":ValueBoundsOpInterface",
11362         ":ViewLikeInterface",
11363         "//llvm:Support",
11364     ],
11367 cc_library(
11368     name = "LinalgTransformOps",
11369     srcs = glob([
11370         "lib/Dialect/Linalg/TransformOps/*.cpp",
11371     ]),
11372     hdrs = glob([
11373         "include/mlir/Dialect/Linalg/TransformOps/*.h",
11374     ]),
11375     includes = ["include"],
11376     deps = [
11377         ":AffineDialect",
11378         ":Analysis",
11379         ":ArithDialect",
11380         ":ArithUtils",
11381         ":AsmParser",
11382         ":BufferizationDialect",
11383         ":BufferizationTransforms",
11384         ":DialectUtils",
11385         ":FuncDialect",
11386         ":FunctionInterfaces",
11387         ":GPUDialect",
11388         ":IR",
11389         ":IndexDialect",
11390         ":LinalgDialect",
11391         ":LinalgMatchOpsIncGen",
11392         ":LinalgTransformEnumsIncGen",
11393         ":LinalgTransformOpsIncGen",
11394         ":LinalgTransforms",
11395         ":LinalgUtils",
11396         ":SCFDialect",
11397         ":SCFTransforms",
11398         ":Support",
11399         ":TensorDialect",
11400         ":TensorUtils",
11401         ":TilingInterface",
11402         ":TransformDialect",
11403         ":TransformDialectInterfaces",
11404         ":TransformDialectUtils",
11405         ":TransformUtils",
11406         ":VectorDialect",
11407         ":VectorTransforms",
11408         "//llvm:Support",
11409     ],
11412 gentbl_cc_library(
11413     name = "LinalgPassIncGen",
11414     tbl_outs = [
11415         (
11416             [
11417                 "-gen-pass-decls",
11418                 "-name=Linalg",
11419             ],
11420             "include/mlir/Dialect/Linalg/Passes.h.inc",
11421         ),
11422         (
11423             [
11424                 "-gen-pass-capi-header",
11425                 "--prefix=Linalg",
11426             ],
11427             "include/mlir/Dialect/Linalg/Passes.capi.h.inc",
11428         ),
11429         (
11430             [
11431                 "-gen-pass-capi-impl",
11432                 "--prefix=Linalg",
11433             ],
11434             "include/mlir/Dialect/Linalg/Passes.capi.cpp.inc",
11435         ),
11436     ],
11437     tblgen = ":mlir-tblgen",
11438     td_file = "include/mlir/Dialect/Linalg/Passes.td",
11439     deps = [":PassBaseTdFiles"],
11442 cc_library(
11443     name = "LinalgUtils",
11444     srcs = glob([
11445         "lib/Dialect/Linalg/Utils/*.cpp",
11446     ]),
11447     hdrs = glob([
11448         "include/mlir/Dialect/Linalg/Utils/*.h",
11449     ]),
11450     deps = [
11451         ":AffineAnalysis",
11452         ":AffineDialect",
11453         ":AffineUtils",
11454         ":Analysis",
11455         ":ArithDialect",
11456         ":ArithUtils",
11457         ":DialectUtils",
11458         ":FuncDialect",
11459         ":IR",
11460         ":LinalgDialect",
11461         ":MemRefDialect",
11462         ":Pass",
11463         ":SCFDialect",
11464         ":TensorDialect",
11465         ":TensorUtils",
11466         "//llvm:Support",
11467     ],
11470 cc_library(
11471     name = "LinalgTransforms",
11472     srcs = glob([
11473         "lib/Dialect/Linalg/Transforms/*.cpp",
11474     ]),
11475     hdrs = [
11476         "include/mlir/Dialect/Linalg/Passes.h",
11477     ] + glob([
11478         "include/mlir/Dialect/Linalg/Transforms/*.h",
11479     ]),
11480     includes = ["include"],
11481     deps = [
11482         ":AffineAnalysis",
11483         ":AffineDialect",
11484         ":AffineTransforms",
11485         ":AffineUtils",
11486         ":Analysis",
11487         ":ArithDialect",
11488         ":ArithUtils",
11489         ":BufferizationDialect",
11490         ":BufferizationInterfaces",
11491         ":BufferizationTransforms",
11492         ":ComplexDialect",
11493         ":ControlFlowDialect",
11494         ":DestinationStyleOpInterface",
11495         ":DialectUtils",
11496         ":FuncDialect",
11497         ":FuncTransforms",
11498         ":GPUDialect",
11499         ":IR",
11500         ":IndexDialect",
11501         ":LinalgDialect",
11502         ":LinalgPassIncGen",
11503         ":LinalgStructuredOpsIncGen",
11504         ":LinalgUtils",
11505         ":MaskableOpInterface",
11506         ":MathDialect",
11507         ":MemRefDialect",
11508         ":MemRefTransforms",
11509         ":MeshDialect",
11510         ":MeshShardingInterface",
11511         ":MeshTransforms",
11512         ":Pass",
11513         ":RuntimeVerifiableOpInterface",
11514         ":SCFDialect",
11515         ":SCFTransforms",
11516         ":SCFUtils",
11517         ":SparseTensorDialect",
11518         ":SubsetOpInterface",
11519         ":Support",
11520         ":TensorDialect",
11521         ":TensorTilingInterfaceImpl",
11522         ":TensorTransforms",
11523         ":TensorUtils",
11524         ":TilingInterface",
11525         ":TransformUtils",
11526         ":ValueBoundsOpInterface",
11527         ":VectorDialect",
11528         ":VectorToSCF",
11529         ":VectorTransforms",
11530         ":VectorUtils",
11531         ":X86VectorTransforms",
11532         "//llvm:Support",
11533     ],
11536 td_library(
11537     name = "ValueBoundsOpInterfaceTdFiles",
11538     srcs = [
11539         "include/mlir/Interfaces/ValueBoundsOpInterface.td",
11540     ],
11541     includes = ["include"],
11542     deps = [
11543         ":OpBaseTdFiles",
11544     ],
11547 gentbl_cc_library(
11548     name = "ValueBoundsOpInterfaceIncGen",
11549     tbl_outs = [
11550         (
11551             ["-gen-op-interface-decls"],
11552             "include/mlir/Interfaces/ValueBoundsOpInterface.h.inc",
11553         ),
11554         (
11555             ["-gen-op-interface-defs"],
11556             "include/mlir/Interfaces/ValueBoundsOpInterface.cpp.inc",
11557         ),
11558     ],
11559     tblgen = ":mlir-tblgen",
11560     td_file = "include/mlir/Interfaces/ValueBoundsOpInterface.td",
11561     deps = [
11562         ":ValueBoundsOpInterfaceTdFiles",
11563     ],
11566 cc_library(
11567     name = "ValueBoundsOpInterface",
11568     srcs = ["lib/Interfaces/ValueBoundsOpInterface.cpp"],
11569     hdrs = ["include/mlir/Interfaces/ValueBoundsOpInterface.h"],
11570     includes = ["include"],
11571     deps = [
11572         ":Analysis",
11573         ":DestinationStyleOpInterface",
11574         ":IR",
11575         ":ValueBoundsOpInterfaceIncGen",
11576         ":ViewLikeInterface",
11577         "//llvm:Support",
11578     ],
11581 cc_library(
11582     name = "ArithValueBoundsOpInterfaceImpl",
11583     srcs = ["lib/Dialect/Arith/IR/ValueBoundsOpInterfaceImpl.cpp"],
11584     hdrs = ["include/mlir/Dialect/Arith/IR/ValueBoundsOpInterfaceImpl.h"],
11585     includes = ["include"],
11586     deps = [
11587         ":ArithDialect",
11588         ":ValueBoundsOpInterface",
11589     ],
11592 cc_library(
11593     name = "TilingInterface",
11594     srcs = ["lib/Interfaces/TilingInterface.cpp"],
11595     hdrs = ["include/mlir/Interfaces/TilingInterface.h"],
11596     includes = ["include"],
11597     deps = [
11598         ":DialectUtils",
11599         ":IR",
11600         ":Support",
11601         ":TilingInterfaceIncGen",
11602         ":ViewLikeInterface",
11603     ],
11606 ##---------------------------------------------------------------------------##
11607 # Vector dialect.
11608 ##---------------------------------------------------------------------------##
11610 td_library(
11611     name = "MaskingOpInterfaceTdFiles",
11612     srcs = ["include/mlir/Dialect/Vector/Interfaces/MaskingOpInterface.td"],
11613     includes = ["include"],
11614     deps = [":OpBaseTdFiles"],
11617 td_library(
11618     name = "MaskableOpInterfaceTdFiles",
11619     srcs = ["include/mlir/Dialect/Vector/Interfaces/MaskableOpInterface.td"],
11620     includes = ["include"],
11621     deps = [":OpBaseTdFiles"],
11624 td_library(
11625     name = "VectorOpsTdFiles",
11626     srcs = [
11627         "include/mlir/Dialect/Vector/IR/Vector.td",
11628         "include/mlir/Dialect/Vector/IR/VectorAttributes.td",
11629         "include/mlir/Dialect/Vector/IR/VectorOps.td",
11630     ],
11631     includes = ["include"],
11632     deps = [
11633         ":ControlFlowInterfacesTdFiles",
11634         ":DestinationStyleOpInterfaceTdFiles",
11635         ":InferTypeOpInterfaceTdFiles",
11636         ":MaskableOpInterfaceTdFiles",
11637         ":MaskingOpInterfaceTdFiles",
11638         ":OpBaseTdFiles",
11639         ":SideEffectInterfacesTdFiles",
11640         ":VectorInterfacesTdFiles",
11641         ":ViewLikeInterfaceTdFiles",
11642     ],
11645 td_library(
11646     name = "VectorTransformOpsTdFiles",
11647     srcs = [
11648         "include/mlir/Dialect/Vector/TransformOps/VectorTransformOps.td",
11649     ],
11650     includes = ["include"],
11651     deps = [
11652         ":PDLDialectTdFiles",
11653         ":SCFTdFiles",
11654         ":TransformDialectTdFiles",
11655         ":VectorTransformsTdFiles",
11656     ],
11659 gentbl_cc_library(
11660     name = "MaskableOpInterfaceIncGen",
11661     tbl_outs = [
11662         (
11663             ["-gen-op-interface-decls"],
11664             "include/mlir/Dialect/Vector/Interfaces/MaskableOpInterface.h.inc",
11665         ),
11666         (
11667             ["-gen-op-interface-defs"],
11668             "include/mlir/Dialect/Vector/Interfaces/MaskableOpInterface.cpp.inc",
11669         ),
11670     ],
11671     tblgen = ":mlir-tblgen",
11672     td_file = "include/mlir/Dialect/Vector/Interfaces/MaskableOpInterface.td",
11673     deps = [":MaskableOpInterfaceTdFiles"],
11676 gentbl_cc_library(
11677     name = "MaskingOpInterfaceIncGen",
11678     tbl_outs = [
11679         (
11680             ["-gen-op-interface-decls"],
11681             "include/mlir/Dialect/Vector/Interfaces/MaskingOpInterface.h.inc",
11682         ),
11683         (
11684             ["-gen-op-interface-defs"],
11685             "include/mlir/Dialect/Vector/Interfaces/MaskingOpInterface.cpp.inc",
11686         ),
11687     ],
11688     tblgen = ":mlir-tblgen",
11689     td_file = "include/mlir/Dialect/Vector/Interfaces/MaskingOpInterface.td",
11690     deps = [":MaskingOpInterfaceTdFiles"],
11693 gentbl_cc_library(
11694     name = "VectorDialectIncGen",
11695     tbl_outs = [
11696         (
11697             [
11698                 "-gen-dialect-decls",
11699                 "-dialect=vector",
11700             ],
11701             "include/mlir/Dialect/Vector/IR/VectorDialect.h.inc",
11702         ),
11703         (
11704             [
11705                 "-gen-dialect-defs",
11706                 "-dialect=vector",
11707             ],
11708             "include/mlir/Dialect/Vector/IR/VectorDialect.cpp.inc",
11709         ),
11710         (
11711             ["-gen-op-doc"],
11712             "g3doc/Dialects/Vector/Vector.md",
11713         ),
11714     ],
11715     tblgen = ":mlir-tblgen",
11716     td_file = "include/mlir/Dialect/Vector/IR/Vector.td",
11717     deps = [
11718         ":ArithOpsTdFiles",
11719         ":VectorOpsTdFiles",
11720     ],
11723 gentbl_cc_library(
11724     name = "VectorOpsIncGen",
11725     tbl_outs = [
11726         (
11727             ["-gen-op-decls"],
11728             "include/mlir/Dialect/Vector/IR/VectorOps.h.inc",
11729         ),
11730         (
11731             ["-gen-op-defs"],
11732             "include/mlir/Dialect/Vector/IR/VectorOps.cpp.inc",
11733         ),
11734     ],
11735     tblgen = ":mlir-tblgen",
11736     td_file = "include/mlir/Dialect/Vector/IR/VectorOps.td",
11737     deps = [
11738         ":ArithOpsTdFiles",
11739         ":VectorOpsTdFiles",
11740     ],
11743 gentbl_cc_library(
11744     name = "VectorAttributesIncGen",
11745     tbl_outs = [
11746         (
11747             ["-gen-enum-decls"],
11748             "include/mlir/Dialect/Vector/IR/VectorEnums.h.inc",
11749         ),
11750         (
11751             ["-gen-enum-defs"],
11752             "include/mlir/Dialect/Vector/IR/VectorEnums.cpp.inc",
11753         ),
11754         (
11755             ["-gen-attrdef-decls"],
11756             "include/mlir/Dialect/Vector/IR/VectorAttributes.h.inc",
11757         ),
11758         (
11759             ["-gen-attrdef-defs"],
11760             "include/mlir/Dialect/Vector/IR/VectorAttributes.cpp.inc",
11761         ),
11762     ],
11763     tblgen = ":mlir-tblgen",
11764     td_file = "include/mlir/Dialect/Vector/IR/VectorAttributes.td",
11765     deps = [
11766         ":ArithOpsTdFiles",
11767         ":VectorOpsTdFiles",
11768     ],
11771 gentbl_cc_library(
11772     name = "VectorTransformOpsIncGen",
11773     tbl_outs = [
11774         (
11775             ["-gen-op-decls"],
11776             "include/mlir/Dialect/Vector/TransformOps/VectorTransformOps.h.inc",
11777         ),
11778         (
11779             ["-gen-op-defs"],
11780             "include/mlir/Dialect/Vector/TransformOps/VectorTransformOps.cpp.inc",
11781         ),
11782     ],
11783     tblgen = ":mlir-tblgen",
11784     td_file = "include/mlir/Dialect/Vector/TransformOps/VectorTransformOps.td",
11785     deps = [
11786         ":VectorTransformOpsTdFiles",
11787     ],
11790 cc_library(
11791     name = "MaskableOpInterface",
11792     srcs = ["lib/Dialect/Vector/Interfaces/MaskableOpInterface.cpp"],
11793     hdrs = ["include/mlir/Dialect/Vector/Interfaces/MaskableOpInterface.h"],
11794     includes = ["include"],
11795     deps = [
11796         ":IR",
11797         ":MaskableOpInterfaceIncGen",
11798         ":MaskingOpInterface",
11799     ],
11802 cc_library(
11803     name = "MaskingOpInterface",
11804     srcs = ["lib/Dialect/Vector/Interfaces/MaskingOpInterface.cpp"],
11805     hdrs = ["include/mlir/Dialect/Vector/Interfaces/MaskingOpInterface.h"],
11806     includes = ["include"],
11807     deps = [
11808         ":IR",
11809         ":MaskingOpInterfaceIncGen",
11810     ],
11813 cc_library(
11814     name = "VectorToLLVM",
11815     srcs = glob([
11816         "lib/Conversion/VectorToLLVM/*.cpp",
11817     ]),
11818     hdrs = glob([
11819         "include/mlir/Conversion/VectorToLLVM/*.h",
11820     ]),
11821     includes = ["include"],
11822     deps = [
11823         ":AMXDialect",
11824         ":AMXTransforms",
11825         ":ArithAttrToLLVMConversion",
11826         ":ArithDialect",
11827         ":ArithUtils",
11828         ":ArmNeonDialect",
11829         ":ArmSVEDialect",
11830         ":ArmSVETransforms",
11831         ":ConversionPassIncGen",
11832         ":FuncDialect",
11833         ":IR",
11834         ":LLVMCommonConversion",
11835         ":LLVMDialect",
11836         ":MaskableOpInterface",
11837         ":MemRefDialect",
11838         ":Pass",
11839         ":TensorDialect",
11840         ":ToLLVMIRTranslation",
11841         ":TransformUtils",
11842         ":VectorDialect",
11843         ":VectorTransforms",
11844         ":X86VectorDialect",
11845         ":X86VectorTransforms",
11846         "//llvm:Support",
11847     ],
11850 cc_library(
11851     name = "VectorToArmSME",
11852     srcs = glob([
11853         "lib/Conversion/VectorToArmSME/*.cpp",
11854     ]),
11855     hdrs = glob([
11856         "include/mlir/Conversion/VectorToArmSME/*.h",
11857     ]),
11858     includes = ["include"],
11859     deps = [
11860         ":ArmSMEDialect",
11861         ":ArmSVEDialect",
11862         ":ConversionPassIncGen",
11863         ":IR",
11864         ":MemRefDialect",
11865         ":Pass",
11866         ":TransformUtils",
11867         "//llvm:Support",
11868     ],
11871 cc_library(
11872     name = "VectorToGPU",
11873     srcs = glob([
11874         "lib/Conversion/VectorToGPU/*.cpp",
11875     ]),
11876     hdrs = glob([
11877         "include/mlir/Conversion/VectorToGPU/*.h",
11878     ]),
11879     includes = ["include"],
11880     deps = [
11881         ":AffineDialect",
11882         ":Analysis",
11883         ":ArithDialect",
11884         ":ConversionPassIncGen",
11885         ":DialectUtils",
11886         ":GPUDialect",
11887         ":IR",
11888         ":MemRefDialect",
11889         ":NVGPUDialect",
11890         ":NVGPUUtils",
11891         ":Pass",
11892         ":SCFDialect",
11893         ":Support",
11894         ":TransformUtils",
11895         ":Transforms",
11896         ":VectorDialect",
11897         ":VectorTransforms",
11898         ":VectorUtils",
11899         "//llvm:Support",
11900     ],
11903 cc_library(
11904     name = "VectorToSCF",
11905     srcs = glob([
11906         "lib/Conversion/VectorToSCF/*.cpp",
11907     ]),
11908     hdrs = glob([
11909         "include/mlir/Conversion/VectorToSCF/*.h",
11910     ]),
11911     includes = ["include"],
11912     deps = [
11913         ":AffineDialect",
11914         ":ArithDialect",
11915         ":ConversionPassIncGen",
11916         ":IR",
11917         ":LLVMDialect",
11918         ":MemRefDialect",
11919         ":Pass",
11920         ":SCFDialect",
11921         ":TensorDialect",
11922         ":TransformUtils",
11923         ":Transforms",
11924         ":VectorDialect",
11925         ":VectorTransforms",
11926         ":VectorUtils",
11927     ],
11930 td_library(
11931     name = "TosaDialectTdFiles",
11932     srcs = glob(["include/mlir/Dialect/Tosa/IR/*.td"]),
11933     deps = [
11934         ":InferTypeOpInterfaceTdFiles",
11935         ":LoopLikeInterfaceTdFiles",
11936         ":OpBaseTdFiles",
11937         ":SideEffectInterfacesTdFiles",
11938         ":VectorInterfacesTdFiles",
11939     ],
11942 gentbl_cc_library(
11943     name = "TosaDialectIncGen",
11944     tbl_outs = [
11945         (
11946             ["-gen-op-decls"],
11947             "include/mlir/Dialect/Tosa/IR/TosaOps.h.inc",
11948         ),
11949         (
11950             ["-gen-op-defs"],
11951             "include/mlir/Dialect/Tosa/IR/TosaOps.cpp.inc",
11952         ),
11953         (
11954             ["-gen-dialect-decls"],
11955             "include/mlir/Dialect/Tosa/IR/TosaOpsDialect.h.inc",
11956         ),
11957         (
11958             ["-gen-dialect-defs"],
11959             "include/mlir/Dialect/Tosa/IR/TosaOpsDialect.cpp.inc",
11960         ),
11961         (
11962             ["-gen-attrdef-decls"],
11963             "include/mlir/Dialect/Tosa/IR/TosaAttributes.h.inc",
11964         ),
11965         (
11966             ["-gen-attrdef-defs"],
11967             "include/mlir/Dialect/Tosa/IR/TosaAttributes.cpp.inc",
11968         ),
11969         (
11970             ["-gen-op-doc"],
11971             "g3doc/Dialects/Tosa/TosaOps.md",
11972         ),
11973     ],
11974     tblgen = ":mlir-tblgen",
11975     td_file = "include/mlir/Dialect/Tosa/IR/TosaOps.td",
11976     deps = [":TosaDialectTdFiles"],
11979 gentbl_cc_library(
11980     name = "TosaDialectBytecodeGen",
11981     strip_include_prefix = "include",
11982     tbl_outs = [
11983         (
11984             [
11985                 "-gen-bytecode",
11986                 "-bytecode-dialect=Tosa",
11987             ],
11988             "include/mlir/Dialect/Tosa/IR/TosaDialectBytecode.cpp.inc",
11989         ),
11990     ],
11991     tblgen = ":mlir-tblgen",
11992     td_file = "include/mlir/Dialect/Tosa/IR/TosaDialectBytecode.td",
11993     deps = [
11994         ":BytecodeTdFiles",
11995     ],
11998 gentbl_cc_library(
11999     name = "TosaInterfacesIncGen",
12000     tbl_outs = [
12001         (
12002             ["-gen-op-interface-decls"],
12003             "include/mlir/Dialect/Tosa/IR/TosaInterfaces.h.inc",
12004         ),
12005         (
12006             ["-gen-op-interface-defs"],
12007             "include/mlir/Dialect/Tosa/IR/TosaInterfaces.cpp.inc",
12008         ),
12009     ],
12010     tblgen = ":mlir-tblgen",
12011     td_file = "include/mlir/Dialect/Tosa/IR/TosaInterfaces.td",
12012     deps = [":TosaDialectTdFiles"],
12015 gentbl_cc_library(
12016     name = "TosaPassIncGen",
12017     tbl_outs = [
12018         (
12019             [
12020                 "-gen-pass-decls",
12021                 "-name=TosaOpt",
12022             ],
12023             "include/mlir/Dialect/Tosa/Transforms/Passes.h.inc",
12024         ),
12025         (
12026             [
12027                 "-gen-enum-decls",
12028                 "-name=TosaOpt",
12029             ],
12030             "include/mlir/Dialect/Tosa/Transforms/PassesEnums.h.inc",
12031         ),
12032         (
12033             [
12034                 "-gen-enum-defs",
12035                 "-name=TosaOpt",
12036             ],
12037             "include/mlir/Dialect/Tosa/Transforms/PassesEnums.cpp.inc",
12038         ),
12039     ],
12040     tblgen = ":mlir-tblgen",
12041     td_file = "include/mlir/Dialect/Tosa/Transforms/Passes.td",
12042     deps = [
12043         ":OpBaseTdFiles",
12044         ":PassBaseTdFiles",
12045     ],
12048 cc_library(
12049     name = "TosaDialect",
12050     srcs = glob([
12051         "lib/Dialect/Tosa/IR/*.cpp",
12052         "lib/Dialect/Tosa/Utils/*.cpp",
12053         "lib/Dialect/Tosa/Transforms/*.cpp",
12054     ]),
12055     hdrs = glob([
12056         "include/mlir/Dialect/Tosa/IR/*.h",
12057         "include/mlir/Dialect/Tosa/Utils/*.h",
12058         "include/mlir/Dialect/Tosa/Transforms/*.h",
12059     ]),
12060     includes = ["include"],
12061     deps = [
12062         ":ArithDialect",
12063         ":BytecodeOpInterface",
12064         ":Dialect",
12065         ":DialectUtils",
12066         ":FuncDialect",
12067         ":IR",
12068         ":InferTypeOpInterface",
12069         ":InliningUtils",
12070         ":LoopLikeInterface",
12071         ":MeshDialect",
12072         ":MeshShardingInterface",
12073         ":Pass",
12074         ":QuantOps",
12075         ":SideEffectInterfaces",
12076         ":Support",
12077         ":TensorDialect",
12078         ":TosaDialectBytecodeGen",
12079         ":TosaDialectIncGen",
12080         ":TosaInterfacesIncGen",
12081         ":TosaPassIncGen",
12082         ":TransformUtils",
12083         ":VectorInterfaces",
12084         "//llvm:Support",
12085     ],
12088 cc_library(
12089     name = "TosaToArith",
12090     srcs = glob([
12091         "lib/Conversion/TosaToArith/*.cpp",
12092     ]),
12093     hdrs = glob([
12094         "include/mlir/Conversion/TosaToArith/*.h",
12095     ]),
12096     includes = [
12097         "include",
12098         "lib/Conversion/TosaToArith",
12099     ],
12100     deps = [
12101         ":ArithDialect",
12102         ":ConversionPassIncGen",
12103         ":IR",
12104         ":Pass",
12105         ":TosaDialect",
12106         ":TransformUtils",
12107     ],
12110 cc_library(
12111     name = "TosaToLinalg",
12112     srcs = glob([
12113         "lib/Conversion/TosaToLinalg/*.cpp",
12114     ]),
12115     hdrs = glob([
12116         "include/mlir/Conversion/TosaToLinalg/*.h",
12117     ]),
12118     includes = [
12119         "include",
12120         "lib/Conversion/TosaToLinalg",
12121     ],
12122     deps = [
12123         ":ArithDialect",
12124         ":ArithUtils",
12125         ":ConversionPassIncGen",
12126         ":DialectUtils",
12127         ":FuncDialect",
12128         ":IR",
12129         ":IndexDialect",
12130         ":InferTypeOpInterface",
12131         ":LinalgDialect",
12132         ":MathDialect",
12133         ":Pass",
12134         ":SCFDialect",
12135         ":TensorDialect",
12136         ":TensorUtils",
12137         ":TosaDialect",
12138         ":TransformUtils",
12139         ":Transforms",
12140         "//llvm:Support",
12141     ],
12144 cc_library(
12145     name = "TosaToMLProgram",
12146     srcs = glob([
12147         "lib/Conversion/TosaToMLProgram/*.cpp",
12148     ]),
12149     hdrs = glob([
12150         "include/mlir/Conversion/TosaToMLProgram/*.h",
12151     ]),
12152     includes = [
12153         "include",
12154         "lib/Conversion/TosaToMLProgram",
12155     ],
12156     deps = [
12157         ":ConversionPassIncGen",
12158         ":IR",
12159         ":MLProgramDialect",
12160         ":Pass",
12161         ":TosaDialect",
12162         ":TransformUtils",
12163     ],
12166 cc_library(
12167     name = "TosaToSCF",
12168     srcs = glob([
12169         "lib/Conversion/TosaToSCF/*.cpp",
12170     ]),
12171     hdrs = glob([
12172         "include/mlir/Conversion/TosaToSCF/*.h",
12173     ]),
12174     includes = [
12175         "include",
12176         "lib/Conversion/TosaToSCF",
12177     ],
12178     deps = [
12179         ":ConversionPassIncGen",
12180         ":FuncDialect",
12181         ":IR",
12182         ":Pass",
12183         ":SCFDialect",
12184         ":TensorDialect",
12185         ":TosaDialect",
12186         ":TransformUtils",
12187     ],
12190 cc_library(
12191     name = "TosaToTensor",
12192     srcs = glob([
12193         "lib/Conversion/TosaToTensor/*.cpp",
12194     ]),
12195     hdrs = glob([
12196         "include/mlir/Conversion/TosaToTensor/*.h",
12197     ]),
12198     includes = [
12199         "include",
12200         "lib/Conversion/TosaToTensor",
12201     ],
12202     deps = [
12203         ":ArithDialect",
12204         ":ArithUtils",
12205         ":ConversionPassIncGen",
12206         ":IR",
12207         ":Pass",
12208         ":TensorDialect",
12209         ":TensorUtils",
12210         ":TosaDialect",
12211         ":TransformUtils",
12212     ],
12215 td_library(
12216     name = "TransformInterfacesTdFiles",
12217     srcs = glob(["include/mlir/Dialect/Transform/Interfaces/*.td"]),
12218     deps = [
12219         ":OpBaseTdFiles",
12220         ":SideEffectInterfacesTdFiles",
12221     ],
12224 td_library(
12225     name = "TransformDialectTdFiles",
12226     srcs = glob(["include/mlir/Dialect/Transform/IR/*.td"]),
12227     deps = [
12228         ":CastInterfacesTdFiles",
12229         ":ControlFlowInterfacesTdFiles",
12230         ":InferTypeOpInterfaceTdFiles",
12231         ":OpBaseTdFiles",
12232         ":SideEffectInterfacesTdFiles",
12233         ":TransformInterfacesTdFiles",
12234     ],
12237 gentbl_cc_library(
12238     name = "TransformDialectEnumsIncGen",
12239     tbl_outs = [
12240         (
12241             [
12242                 "-gen-enum-decls",
12243             ],
12244             "include/mlir/Dialect/Transform/IR/TransformDialectEnums.h.inc",
12245         ),
12246         (
12247             [
12248                 "-gen-enum-defs",
12249             ],
12250             "include/mlir/Dialect/Transform/IR/TransformDialectEnums.cpp.inc",
12251         ),
12252     ],
12253     tblgen = ":mlir-tblgen",
12254     td_file = "include/mlir/Dialect/Transform/IR/TransformAttrs.td",
12255     deps = [":TransformDialectTdFiles"],
12258 gentbl_cc_library(
12259     name = "TransformDialectMatchInterfacesIncGen",
12260     tbl_outs = [
12261         (
12262             [
12263                 "-gen-op-interface-decls",
12264             ],
12265             "include/mlir/Dialect/Transform/Interfaces/MatchInterfaces.h.inc",
12266         ),
12267         (
12268             [
12269                 "-gen-op-interface-defs",
12270             ],
12271             "include/mlir/Dialect/Transform/Interfaces/MatchInterfaces.cpp.inc",
12272         ),
12273     ],
12274     tblgen = ":mlir-tblgen",
12275     td_file = "include/mlir/Dialect/Transform/Interfaces/MatchInterfaces.td",
12276     deps = [
12277         ":TransformDialectInterfacesIncGen",
12278         ":TransformDialectTdFiles",
12279     ],
12282 gentbl_cc_library(
12283     name = "TransformDialectInterfacesIncGen",
12284     tbl_outs = [
12285         (
12286             [
12287                 "-gen-op-interface-decls",
12288             ],
12289             "include/mlir/Dialect/Transform/Interfaces/TransformInterfaces.h.inc",
12290         ),
12291         (
12292             [
12293                 "-gen-op-interface-defs",
12294             ],
12295             "include/mlir/Dialect/Transform/Interfaces/TransformInterfaces.cpp.inc",
12296         ),
12297         (
12298             [
12299                 "-gen-type-interface-decls",
12300             ],
12301             "include/mlir/Dialect/Transform/Interfaces/TransformTypeInterfaces.h.inc",
12302         ),
12303         (
12304             [
12305                 "-gen-type-interface-defs",
12306             ],
12307             "include/mlir/Dialect/Transform/Interfaces/TransformTypeInterfaces.cpp.inc",
12308         ),
12309     ],
12310     tblgen = ":mlir-tblgen",
12311     td_file = "include/mlir/Dialect/Transform/Interfaces/TransformInterfaces.td",
12312     deps = [":TransformDialectTdFiles"],
12315 gentbl_cc_library(
12316     name = "TransformDialectIncGen",
12317     tbl_outs = [
12318         (
12319             [
12320                 "-gen-dialect-decls",
12321             ],
12322             "include/mlir/Dialect/Transform/IR/TransformDialect.h.inc",
12323         ),
12324         (
12325             [
12326                 "-gen-dialect-defs",
12327             ],
12328             "include/mlir/Dialect/Transform/IR/TransformDialect.cpp.inc",
12329         ),
12330     ],
12331     tblgen = ":mlir-tblgen",
12332     td_file = "include/mlir/Dialect/Transform/IR/TransformDialect.td",
12333     deps = [":TransformDialectTdFiles"],
12336 gentbl_cc_library(
12337     name = "TransformOpsIncGen",
12338     tbl_outs = [
12339         (
12340             ["-gen-op-decls"],
12341             "include/mlir/Dialect/Transform/IR/TransformOps.h.inc",
12342         ),
12343         (
12344             ["-gen-op-defs"],
12345             "include/mlir/Dialect/Transform/IR/TransformOps.cpp.inc",
12346         ),
12347     ],
12348     tblgen = ":mlir-tblgen",
12349     td_file = "include/mlir/Dialect/Transform/IR/TransformOps.td",
12350     deps = [
12351         ":CallInterfacesTdFiles",
12352         ":FunctionInterfacesTdFiles",
12353         ":TransformDialectTdFiles",
12354     ],
12357 gentbl_cc_library(
12358     name = "TransformTypesIncGen",
12359     tbl_outs = [
12360         (
12361             ["-gen-typedef-decls"],
12362             "include/mlir/Dialect/Transform/IR/TransformTypes.h.inc",
12363         ),
12364         (
12365             ["-gen-typedef-defs"],
12366             "include/mlir/Dialect/Transform/IR/TransformTypes.cpp.inc",
12367         ),
12368     ],
12369     tblgen = ":mlir-tblgen",
12370     td_file = "include/mlir/Dialect/Transform/IR/TransformTypes.td",
12371     deps = [":TransformDialectTdFiles"],
12374 cc_library(
12375     name = "TransformDialectInterfaces",
12376     srcs = glob(["lib/Dialect/Transform/Interfaces/*.cpp"]),
12377     hdrs = glob(["include/mlir/Dialect/Transform/Interfaces/*.h"]),
12378     deps = [
12379         ":CastInterfaces",
12380         ":IR",
12381         ":Rewrite",
12382         ":SideEffectInterfaces",
12383         ":Support",
12384         ":TransformDialectInterfacesIncGen",
12385         ":TransformDialectMatchInterfacesIncGen",
12386         ":TransformDialectUtils",
12387         ":TransformUtils",
12388         ":Transforms",
12389         "//llvm:Support",
12390     ],
12393 cc_library(
12394     name = "TransformDialect",
12395     srcs = glob(["lib/Dialect/Transform/IR/*.cpp"]),
12396     hdrs = glob(["include/mlir/Dialect/Transform/IR/*.h"]),
12397     deps = [
12398         ":Analysis",
12399         ":BytecodeOpInterface",
12400         ":CallOpInterfaces",
12401         ":CastInterfaces",
12402         ":ControlFlowInterfaces",
12403         ":ConvertToLLVMInterface",
12404         ":FunctionInterfaces",
12405         ":IR",
12406         ":LLVMCommonConversion",
12407         ":LLVMDialect",
12408         ":LoopLikeInterface",
12409         ":Pass",
12410         ":Rewrite",
12411         ":SideEffectInterfaces",
12412         ":Support",
12413         ":TransformDialectEnumsIncGen",
12414         ":TransformDialectIncGen",
12415         ":TransformDialectInterfaces",
12416         ":TransformDialectUtils",
12417         ":TransformOpsIncGen",
12418         ":TransformTypesIncGen",
12419         ":TransformUtils",
12420         ":Transforms",
12421         "//llvm:Support",
12422     ],
12425 td_library(
12426     name = "TransformPDLExtensionTdFiles",
12427     srcs = glob(["include/mlir/Dialect/Transform/PDLExtension/*.td"]),
12428     deps = [
12429         ":PDLDialectTdFiles",
12430         ":TransformDialectTdFiles",
12431     ],
12434 gentbl_cc_library(
12435     name = "TransformPDLExtensionOpsIncGen",
12436     tbl_outs = [
12437         (
12438             [
12439                 "-gen-op-decls",
12440             ],
12441             "include/mlir/Dialect/Transform/PDLExtension/PDLExtensionOps.h.inc",
12442         ),
12443         (
12444             [
12445                 "-gen-op-defs",
12446             ],
12447             "include/mlir/Dialect/Transform/PDLExtension/PDLExtensionOps.cpp.inc",
12448         ),
12449     ],
12450     tblgen = ":mlir-tblgen",
12451     td_file = "include/mlir/Dialect/Transform/PDLExtension/PDLExtensionOps.td",
12452     deps = [":TransformPDLExtensionTdFiles"],
12455 cc_library(
12456     name = "TransformPDLExtension",
12457     srcs = glob(["lib/Dialect/Transform/PDLExtension/*.cpp"]),
12458     hdrs = glob(["include/mlir/Dialect/Transform/PDLExtension/*.h"]),
12459     deps = [
12460         ":IR",
12461         ":PDLDialect",
12462         ":PDLInterpDialect",
12463         ":Rewrite",
12464         ":SideEffectInterfaces",
12465         ":Support",
12466         ":TransformDialect",
12467         ":TransformDialectInterfaces",
12468         ":TransformPDLExtensionOpsIncGen",
12469         "//llvm:Support",
12470     ],
12473 gentbl_cc_library(
12474     name = "TransformIRDLExtensionOpsIncGen",
12475     tbl_outs = [
12476         (
12477             [
12478                 "-gen-op-decls",
12479             ],
12480             "include/mlir/Dialect/Transform/IRDLExtension/IRDLExtensionOps.h.inc",
12481         ),
12482         (
12483             [
12484                 "-gen-op-defs",
12485             ],
12486             "include/mlir/Dialect/Transform/IRDLExtension/IRDLExtensionOps.cpp.inc",
12487         ),
12488     ],
12489     tblgen = ":mlir-tblgen",
12490     td_file = "include/mlir/Dialect/Transform/IRDLExtension/IRDLExtensionOps.td",
12491     deps = [":TransformPDLExtensionTdFiles"],
12494 cc_library(
12495     name = "TransformIRDLExtension",
12496     srcs = glob(["lib/Dialect/Transform/IRDLExtension/*.cpp"]),
12497     hdrs = glob(["include/mlir/Dialect/Transform/IRDLExtension/*.h"]),
12498     deps = [
12499         ":IR",
12500         ":IRDLDialect",
12501         ":IRDLInterfacesIncGen",
12502         ":Rewrite",
12503         ":SideEffectInterfaces",
12504         ":Support",
12505         ":TransformDialect",
12506         ":TransformDialectInterfaces",
12507         ":TransformIRDLExtensionOpsIncGen",
12508         "//llvm:Support",
12509     ],
12512 td_library(
12513     name = "TransformDebugExtensionTdFiles",
12514     srcs = glob(["include/mlir/Dialect/Transform/DebugExtension/*.td"]),
12515     deps = [
12516         ":TransformDialectTdFiles",
12517     ],
12520 gentbl_cc_library(
12521     name = "TransformDebugExtensionOpsIncGen",
12522     tbl_outs = [
12523         (
12524             [
12525                 "-gen-op-decls",
12526             ],
12527             "include/mlir/Dialect/Transform/DebugExtension/DebugExtensionOps.h.inc",
12528         ),
12529         (
12530             [
12531                 "-gen-op-defs",
12532             ],
12533             "include/mlir/Dialect/Transform/DebugExtension/DebugExtensionOps.cpp.inc",
12534         ),
12535     ],
12536     tblgen = ":mlir-tblgen",
12537     td_file = "include/mlir/Dialect/Transform/DebugExtension/DebugExtensionOps.td",
12538     deps = [":TransformDebugExtensionTdFiles"],
12541 cc_library(
12542     name = "TransformDebugExtension",
12543     srcs = glob(["lib/Dialect/Transform/DebugExtension/*.cpp"]),
12544     hdrs = glob(["include/mlir/Dialect/Transform/DebugExtension/*.h"]),
12545     deps = [
12546         ":IR",
12547         ":Support",
12548         ":TransformDebugExtensionOpsIncGen",
12549         ":TransformDialect",
12550         ":TransformDialectInterfaces",
12551         "//llvm:Support",
12552     ],
12555 td_library(
12556     name = "TransformLoopExtensionTdFiles",
12557     srcs = glob(["include/mlir/Dialect/Transform/LoopExtension/*.td"]),
12558     deps = [
12559         ":TransformDialectTdFiles",
12560     ],
12563 gentbl_cc_library(
12564     name = "TransformLoopExtensionOpsIncGen",
12565     tbl_outs = [
12566         (
12567             [
12568                 "-gen-op-decls",
12569             ],
12570             "include/mlir/Dialect/Transform/LoopExtension/LoopExtensionOps.h.inc",
12571         ),
12572         (
12573             [
12574                 "-gen-op-defs",
12575             ],
12576             "include/mlir/Dialect/Transform/LoopExtension/LoopExtensionOps.cpp.inc",
12577         ),
12578     ],
12579     tblgen = ":mlir-tblgen",
12580     td_file = "include/mlir/Dialect/Transform/LoopExtension/LoopExtensionOps.td",
12581     deps = [":TransformLoopExtensionTdFiles"],
12584 cc_library(
12585     name = "TransformLoopExtension",
12586     srcs = glob(["lib/Dialect/Transform/LoopExtension/*.cpp"]),
12587     hdrs = glob(["include/mlir/Dialect/Transform/LoopExtension/*.h"]),
12588     deps = [
12589         ":IR",
12590         ":LoopLikeInterface",
12591         ":Rewrite",
12592         ":SideEffectInterfaces",
12593         ":Support",
12594         ":TransformDialect",
12595         ":TransformDialectInterfaces",
12596         ":TransformLoopExtensionOpsIncGen",
12597         ":TransformUtils",
12598         ":Transforms",
12599         "//llvm:Support",
12600     ],
12603 td_library(
12604     name = "TransformDialectTransformsTdFiles",
12605     srcs = glob(["include/mlir/Dialect/Transform/Transforms/*.td"]),
12606     deps = [
12607         ":PassBaseTdFiles",
12608         ":TransformDialectTdFiles",
12609     ],
12612 gentbl_cc_library(
12613     name = "TransformDialectTransformsIncGen",
12614     tbl_outs = [
12615         (
12616             [
12617                 "-gen-pass-decls",
12618                 "-name=Transform",
12619             ],
12620             "include/mlir/Dialect/Transform/Transforms/Passes.h.inc",
12621         ),
12622     ],
12623     tblgen = ":mlir-tblgen",
12624     td_file = "include/mlir/Dialect/Transform/Transforms/Passes.td",
12625     deps = [":TransformDialectTransformsTdFiles"],
12628 cc_library(
12629     name = "TransformDialectTransforms",
12630     srcs = glob(["lib/Dialect/Transform/Transforms/*.cpp"]),
12631     hdrs = glob(["include/mlir/Dialect/Transform/Transforms/*.h"]),
12632     deps = [
12633         ":Analysis",
12634         ":FunctionInterfaces",
12635         ":IR",
12636         ":Parser",
12637         ":Pass",
12638         ":SideEffectInterfaces",
12639         ":Support",
12640         ":TransformDialect",
12641         ":TransformDialectInterfaces",
12642         ":TransformDialectTransformsIncGen",
12643         "//llvm:Support",
12644     ],
12647 cc_library(
12648     name = "TransformDialectUtils",
12649     srcs = glob(["lib/Dialect/Transform/Utils/*cpp"]),
12650     hdrs = glob(["include/mlir/Dialect/Transform/Utils/*.h"]),
12651     includes = ["include"],
12652     deps = [
12653         ":IR",
12654         ":Support",
12655         ":ViewLikeInterface",
12656         "//llvm:Support",
12657     ],
12660 td_library(
12661     name = "ComplexOpsTdFiles",
12662     srcs = [
12663         "include/mlir/Dialect/Complex/IR/ComplexBase.td",
12664         "include/mlir/Dialect/Complex/IR/ComplexOps.td",
12665     ],
12666     includes = ["include"],
12667     deps = [
12668         ":ArithOpsInterfacesTdFiles",
12669         ":ArithOpsTdFiles",
12670         ":BuiltinDialectTdFiles",
12671         ":InferTypeOpInterfaceTdFiles",
12672         ":OpBaseTdFiles",
12673         ":SideEffectInterfacesTdFiles",
12674     ],
12677 gentbl_cc_library(
12678     name = "ComplexAttributesIncGen",
12679     tbl_outs = [
12680         (
12681             ["-gen-attrdef-decls"],
12682             "include/mlir/Dialect/Complex/IR/ComplexAttributes.h.inc",
12683         ),
12684         (
12685             ["-gen-attrdef-defs"],
12686             "include/mlir/Dialect/Complex/IR/ComplexAttributes.cpp.inc",
12687         ),
12688     ],
12689     tblgen = ":mlir-tblgen",
12690     td_file = "include/mlir/Dialect/Complex/IR/ComplexAttributes.td",
12691     deps = [":ComplexOpsTdFiles"],
12694 gentbl_cc_library(
12695     name = "ComplexBaseIncGen",
12696     tbl_outs = [
12697         (
12698             [
12699                 "-gen-dialect-decls",
12700                 "-dialect=complex",
12701             ],
12702             "include/mlir/Dialect/Complex/IR/ComplexOpsDialect.h.inc",
12703         ),
12704         (
12705             [
12706                 "-gen-dialect-defs",
12707                 "-dialect=complex",
12708             ],
12709             "include/mlir/Dialect/Complex/IR/ComplexOpsDialect.cpp.inc",
12710         ),
12711     ],
12712     tblgen = ":mlir-tblgen",
12713     td_file = "include/mlir/Dialect/Complex/IR/ComplexBase.td",
12714     deps = [":ComplexOpsTdFiles"],
12717 gentbl_cc_library(
12718     name = "ComplexOpsIncGen",
12719     tbl_outs = [
12720         (
12721             ["-gen-op-decls"],
12722             "include/mlir/Dialect/Complex/IR/ComplexOps.h.inc",
12723         ),
12724         (
12725             ["-gen-op-defs"],
12726             "include/mlir/Dialect/Complex/IR/ComplexOps.cpp.inc",
12727         ),
12728     ],
12729     tblgen = ":mlir-tblgen",
12730     td_file = "include/mlir/Dialect/Complex/IR/ComplexOps.td",
12731     deps = [":ComplexOpsTdFiles"],
12734 cc_library(
12735     name = "ComplexDialect",
12736     srcs = glob(
12737         [
12738             "lib/Dialect/Complex/IR/*.cpp",
12739         ],
12740     ),
12741     hdrs = ["include/mlir/Dialect/Complex/IR/Complex.h"],
12742     includes = ["include"],
12743     deps = [
12744         ":ArithDialect",
12745         ":BytecodeOpInterface",
12746         ":ComplexAttributesIncGen",
12747         ":ComplexBaseIncGen",
12748         ":ComplexOpsIncGen",
12749         ":ConvertToLLVMInterface",
12750         ":IR",
12751         ":InferTypeOpInterface",
12752         ":InliningUtils",
12753         ":SideEffectInterfaces",
12754         "//llvm:Support",
12755     ],
12758 cc_library(
12759     name = "ComplexToLLVM",
12760     srcs = glob([
12761         "lib/Conversion/ComplexToLLVM/*.cpp",
12762     ]),
12763     hdrs = glob([
12764         "include/mlir/Conversion/ComplexToLLVM/*.h",
12765     ]),
12766     includes = ["include"],
12767     deps = [
12768         ":ArithAttrToLLVMConversion",
12769         ":ArithDialect",
12770         ":ComplexDialect",
12771         ":ConversionPassIncGen",
12772         ":ConvertToLLVMInterface",
12773         ":LLVMCommonConversion",
12774         ":LLVMDialect",
12775         ":Pass",
12776     ],
12779 cc_library(
12780     name = "ComplexToLibm",
12781     srcs = glob([
12782         "lib/Conversion/ComplexToLibm/*.cpp",
12783     ]),
12784     hdrs = glob([
12785         "include/mlir/Conversion/ComplexToLibm/*.h",
12786     ]),
12787     includes = ["include"],
12788     deps = [
12789         ":ComplexDialect",
12790         ":ConversionPassIncGen",
12791         ":FuncDialect",
12792         ":IR",
12793         ":Pass",
12794         ":TransformUtils",
12795     ],
12798 cc_library(
12799     name = "ComplexToSPIRV",
12800     srcs = glob([
12801         "lib/Conversion/ComplexToSPIRV/*.cpp",
12802     ]),
12803     hdrs = glob([
12804         "include/mlir/Conversion/ComplexToSPIRV/*.h",
12805     ]),
12806     includes = ["include"],
12807     deps = [
12808         ":ComplexDialect",
12809         ":ConversionPassIncGen",
12810         ":Pass",
12811         ":SPIRVConversion",
12812         ":SPIRVDialect",
12813         ":TransformUtils",
12814         "//llvm:Support",
12815     ],
12818 cc_library(
12819     name = "ComplexToStandard",
12820     srcs = glob([
12821         "lib/Conversion/ComplexToStandard/*.cpp",
12822     ]),
12823     hdrs = glob([
12824         "include/mlir/Conversion/ComplexToStandard/*.h",
12825     ]),
12826     includes = ["include"],
12827     deps = [
12828         ":ArithDialect",
12829         ":ComplexDialect",
12830         ":ConversionPassIncGen",
12831         ":IR",
12832         ":MathDialect",
12833         ":Pass",
12834         ":TransformUtils",
12835     ],
12838 exports_files([
12839     "include/mlir/Interfaces/CallInterfaces.h",
12840     "include/mlir/Interfaces/CastInterfaces.h",
12841     "include/mlir/Interfaces/ControlFlowInterfaces.h",
12842     "include/mlir/Transforms/InliningUtils.h",
12845 td_library(
12846     name = "ArithOpsTdFiles",
12847     srcs = [
12848         "include/mlir/Dialect/Arith/IR/ArithBase.td",
12849         "include/mlir/Dialect/Arith/IR/ArithOps.td",
12850     ],
12851     includes = ["include"],
12852     deps = [
12853         ":ArithOpsInterfacesTdFiles",
12854         ":BuiltinDialectTdFiles",
12855         ":CastInterfacesTdFiles",
12856         ":ControlFlowInterfacesTdFiles",
12857         ":InferIntRangeInterfaceTdFiles",
12858         ":InferTypeOpInterfaceTdFiles",
12859         ":OpBaseTdFiles",
12860         ":SideEffectInterfacesTdFiles",
12861         ":VectorInterfacesTdFiles",
12862     ],
12865 td_library(
12866     name = "ArithOpsInterfacesTdFiles",
12867     srcs = [
12868         "include/mlir/Dialect/Arith/IR/ArithOpsInterfaces.td",
12869     ],
12870     includes = ["include"],
12871     deps = [
12872         ":OpBaseTdFiles",
12873     ],
12876 gentbl_cc_library(
12877     name = "ArithBaseIncGen",
12878     tbl_outs = [
12879         (
12880             [
12881                 "-gen-dialect-decls",
12882                 "-dialect=arith",
12883             ],
12884             "include/mlir/Dialect/Arith/IR/ArithOpsDialect.h.inc",
12885         ),
12886         (
12887             [
12888                 "-gen-dialect-defs",
12889                 "-dialect=arith",
12890             ],
12891             "include/mlir/Dialect/Arith/IR/ArithOpsDialect.cpp.inc",
12892         ),
12893         (
12894             ["-gen-enum-decls"],
12895             "include/mlir/Dialect/Arith/IR/ArithOpsEnums.h.inc",
12896         ),
12897         (
12898             ["-gen-enum-defs"],
12899             "include/mlir/Dialect/Arith/IR/ArithOpsEnums.cpp.inc",
12900         ),
12901     ],
12902     tblgen = ":mlir-tblgen",
12903     td_file = "include/mlir/Dialect/Arith/IR/ArithBase.td",
12904     deps = [":ArithOpsTdFiles"],
12907 gentbl_cc_library(
12908     name = "ArithOpsIncGen",
12909     tbl_outs = [
12910         (
12911             ["-gen-op-decls"],
12912             "include/mlir/Dialect/Arith/IR/ArithOps.h.inc",
12913         ),
12914         (
12915             ["-gen-op-defs"],
12916             "include/mlir/Dialect/Arith/IR/ArithOps.cpp.inc",
12917         ),
12918         (
12919             [
12920                 "-gen-attrdef-decls",
12921                 "-attrdefs-dialect=arith",
12922             ],
12923             "include/mlir/Dialect/Arith/IR/ArithOpsAttributes.h.inc",
12924         ),
12925         (
12926             [
12927                 "-gen-attrdef-defs",
12928                 "-attrdefs-dialect=arith",
12929             ],
12930             "include/mlir/Dialect/Arith/IR/ArithOpsAttributes.cpp.inc",
12931         ),
12932     ],
12933     tblgen = ":mlir-tblgen",
12934     td_file = "include/mlir/Dialect/Arith/IR/ArithOps.td",
12935     deps = [
12936         ":ArithOpsTdFiles",
12937     ],
12940 gentbl_cc_library(
12941     name = "ArithOpsInterfacesIncGen",
12942     tbl_outs = [
12943         (
12944             ["-gen-op-interface-decls"],
12945             "include/mlir/Dialect/Arith/IR/ArithOpsInterfaces.h.inc",
12946         ),
12947         (
12948             ["-gen-op-interface-defs"],
12949             "include/mlir/Dialect/Arith/IR/ArithOpsInterfaces.cpp.inc",
12950         ),
12951     ],
12952     tblgen = ":mlir-tblgen",
12953     td_file = "include/mlir/Dialect/Arith/IR/ArithOpsInterfaces.td",
12954     deps = [
12955         ":ArithOpsInterfacesTdFiles",
12956     ],
12959 gentbl_cc_library(
12960     name = "ArithCanonicalizationIncGen",
12961     strip_include_prefix = "include/mlir/Dialect/Arith/IR",
12962     tbl_outs = [
12963         (
12964             ["-gen-rewriters"],
12965             "include/mlir/Dialect/Arith/IR/ArithCanonicalization.inc",
12966         ),
12967     ],
12968     tblgen = ":mlir-tblgen",
12969     td_file = "lib/Dialect/Arith/IR/ArithCanonicalization.td",
12970     deps = [
12971         ":ArithOpsTdFiles",
12972         ":CastInterfacesTdFiles",
12973         ":FuncTdFiles",
12974     ],
12977 cc_library(
12978     name = "ArithDialect",
12979     srcs = [
12980         "include/mlir/Interfaces/ValueBoundsOpInterface.h",
12981         "lib/Dialect/Arith/IR/ArithDialect.cpp",
12982         "lib/Dialect/Arith/IR/ArithOps.cpp",
12983         "lib/Dialect/Arith/IR/InferIntRangeInterfaceImpls.cpp",
12984     ] + glob([
12985         "include/mlir/Analysis/**/*.h",
12986     ]),
12987     hdrs = [
12988         "include/mlir/Dialect/Arith/IR/Arith.h",
12989     ],
12990     includes = ["include"],
12991     deps = [
12992         ":ArithBaseIncGen",
12993         ":ArithCanonicalizationIncGen",
12994         ":ArithOpsIncGen",
12995         ":ArithOpsInterfacesIncGen",
12996         ":BufferizationInterfaces",
12997         ":BytecodeOpInterface",
12998         ":CallOpInterfaces",
12999         ":CastInterfaces",
13000         ":CommonFolders",
13001         ":ControlFlowInterfaces",
13002         ":ConvertToLLVMInterface",
13003         ":DestinationStyleOpInterface",
13004         ":FunctionInterfaces",
13005         ":IR",
13006         ":InferIntRangeCommon",
13007         ":InferIntRangeInterface",
13008         ":InferTypeOpInterface",
13009         ":InliningUtils",
13010         ":Pass",
13011         ":SideEffectInterfaces",
13012         ":Support",
13013         ":UBDialect",
13014         ":ValueBoundsOpInterfaceIncGen",
13015         ":VectorInterfaces",
13016         "//llvm:Support",
13017     ],
13020 gentbl_cc_library(
13021     name = "ArithPassIncGen",
13022     tbl_outs = [
13023         (
13024             [
13025                 "-gen-pass-decls",
13026                 "-name=Arith",
13027             ],
13028             "include/mlir/Dialect/Arith/Transforms/Passes.h.inc",
13029         ),
13030     ],
13031     tblgen = ":mlir-tblgen",
13032     td_file = "include/mlir/Dialect/Arith/Transforms/Passes.td",
13033     deps = [":PassBaseTdFiles"],
13036 cc_library(
13037     name = "ArithTransforms",
13038     srcs = glob([
13039         "lib/Dialect/Arith/Transforms/*.cpp",
13040     ]),
13041     hdrs = glob([
13042         "include/mlir/Dialect/Arith/Transforms/*.h",
13043     ]),
13044     includes = ["include"],
13045     deps = [
13046         ":Analysis",
13047         ":ArithDialect",
13048         ":ArithPassIncGen",
13049         ":ArithUtils",
13050         ":BufferizationInterfaces",
13051         ":BufferizationTransforms",
13052         ":DialectUtils",
13053         ":FuncDialect",
13054         ":FuncTransforms",
13055         ":IR",
13056         ":MemRefDialect",
13057         ":Pass",
13058         ":SideEffectInterfaces",
13059         ":Support",
13060         ":TensorDialect",
13061         ":TransformUtils",
13062         ":ValueBoundsOpInterface",
13063         ":VectorDialect",
13064         "//llvm:Support",
13065     ],
13068 cc_library(
13069     name = "ArithUtils",
13070     srcs = glob([
13071         "lib/Dialect/Arith/Utils/*.cpp",
13072     ]),
13073     hdrs = ["include/mlir/Dialect/Arith/Utils/Utils.h"],
13074     includes = ["include"],
13075     deps = [
13076         ":ArithDialect",
13077         ":ComplexDialect",
13078         ":DialectUtils",
13079         ":IR",
13080         "//llvm:Support",
13081     ],
13084 td_library(
13085     name = "MathOpsTdFiles",
13086     srcs = [
13087         "include/mlir/Dialect/Math/IR/MathBase.td",
13088         "include/mlir/Dialect/Math/IR/MathOps.td",
13089     ],
13090     includes = ["include"],
13091     deps = [
13092         ":ArithOpsTdFiles",
13093         ":InferTypeOpInterfaceTdFiles",
13094         ":OpBaseTdFiles",
13095         ":SideEffectInterfacesTdFiles",
13096         ":VectorInterfacesTdFiles",
13097     ],
13100 gentbl_cc_library(
13101     name = "MathBaseIncGen",
13102     tbl_outs = [
13103         (
13104             [
13105                 "-gen-dialect-decls",
13106                 "-dialect=math",
13107             ],
13108             "include/mlir/Dialect/Math/IR/MathOpsDialect.h.inc",
13109         ),
13110         (
13111             [
13112                 "-gen-dialect-defs",
13113                 "-dialect=math",
13114             ],
13115             "include/mlir/Dialect/Math/IR/MathOpsDialect.cpp.inc",
13116         ),
13117     ],
13118     tblgen = ":mlir-tblgen",
13119     td_file = "include/mlir/Dialect/Math/IR/MathBase.td",
13120     deps = [":MathOpsTdFiles"],
13123 gentbl_cc_library(
13124     name = "MathOpsIncGen",
13125     tbl_outs = [
13126         (
13127             ["-gen-op-decls"],
13128             "include/mlir/Dialect/Math/IR/MathOps.h.inc",
13129         ),
13130         (
13131             ["-gen-op-defs"],
13132             "include/mlir/Dialect/Math/IR/MathOps.cpp.inc",
13133         ),
13134     ],
13135     tblgen = ":mlir-tblgen",
13136     td_file = "include/mlir/Dialect/Math/IR/MathOps.td",
13137     deps = [":MathOpsTdFiles"],
13140 gentbl_cc_library(
13141     name = "MathPassIncGen",
13142     tbl_outs = [
13143         (
13144             [
13145                 "-gen-pass-decls",
13146                 "-name=Math",
13147             ],
13148             "include/mlir/Dialect/Math/Transforms/Passes.h.inc",
13149         ),
13150     ],
13151     tblgen = ":mlir-tblgen",
13152     td_file = "include/mlir/Dialect/Math/Transforms/Passes.td",
13153     deps = [":PassBaseTdFiles"],
13156 cc_library(
13157     name = "MathDialect",
13158     srcs = glob(
13159         [
13160             "lib/Dialect/Math/IR/*.cpp",
13161         ],
13162     ),
13163     hdrs = [
13164         "include/mlir/Dialect/Math/IR/Math.h",
13165     ],
13166     includes = ["include"],
13167     deps = [
13168         ":ArithDialect",
13169         ":BytecodeOpInterface",
13170         ":CommonFolders",
13171         ":ConvertToLLVMInterface",
13172         ":IR",
13173         ":InferTypeOpInterface",
13174         ":InliningUtils",
13175         ":MathBaseIncGen",
13176         ":MathOpsIncGen",
13177         ":SideEffectInterfaces",
13178         ":UBDialect",
13179         ":VectorInterfaces",
13180     ],
13183 cc_library(
13184     name = "MathTransforms",
13185     srcs = glob([
13186         "lib/Dialect/Math/Transforms/*.cpp",
13187     ]),
13188     hdrs = glob(["include/mlir/Dialect/Math/Transforms/*.h"]),
13189     includes = ["include"],
13190     deps = [
13191         ":ArithDialect",
13192         ":ArithUtils",
13193         ":DialectUtils",
13194         ":IR",
13195         ":MathDialect",
13196         ":MathPassIncGen",
13197         ":Pass",
13198         ":SCFDialect",
13199         ":TransformUtils",
13200         ":VectorDialect",
13201         ":VectorUtils",
13202         ":X86VectorDialect",
13203         "//llvm:Support",
13204     ],
13207 cc_library(
13208     name = "MathToLibm",
13209     srcs = glob([
13210         "lib/Conversion/MathToLibm/*.cpp",
13211     ]),
13212     hdrs = glob([
13213         "include/mlir/Conversion/MathToLibm/*.h",
13214     ]),
13215     includes = ["include"],
13216     deps = [
13217         ":ArithDialect",
13218         ":ConversionPassIncGen",
13219         ":DialectUtils",
13220         ":FuncDialect",
13221         ":IR",
13222         ":LLVMDialect",
13223         ":MathDialect",
13224         ":Pass",
13225         ":TransformUtils",
13226         ":VectorDialect",
13227     ],
13230 td_library(
13231     name = "MemRefOpsTdFiles",
13232     srcs = [
13233         "include/mlir/Dialect/MemRef/IR/MemRefBase.td",
13234         "include/mlir/Dialect/MemRef/IR/MemRefOps.td",
13235     ],
13236     includes = ["include"],
13237     deps = [
13238         ":ArithOpsTdFiles",
13239         ":CastInterfacesTdFiles",
13240         ":ControlFlowInterfacesTdFiles",
13241         ":CopyOpInterfaceTdFiles",
13242         ":MemorySlotInterfacesTdFiles",
13243         ":OpBaseTdFiles",
13244         ":ShapedOpInterfacesTdFiles",
13245         ":SideEffectInterfacesTdFiles",
13246         ":ViewLikeInterfaceTdFiles",
13247     ],
13250 gentbl_cc_library(
13251     name = "MemRefBaseIncGen",
13252     tbl_outs = [
13253         (
13254             [
13255                 "-gen-dialect-decls",
13256                 "-dialect=memref",
13257             ],
13258             "include/mlir/Dialect/MemRef/IR/MemRefOpsDialect.h.inc",
13259         ),
13260         (
13261             [
13262                 "-gen-dialect-defs",
13263                 "-dialect=memref",
13264             ],
13265             "include/mlir/Dialect/MemRef/IR/MemRefOpsDialect.cpp.inc",
13266         ),
13267     ],
13268     tblgen = ":mlir-tblgen",
13269     td_file = "include/mlir/Dialect/MemRef/IR/MemRefBase.td",
13270     deps = [":MemRefOpsTdFiles"],
13273 gentbl_cc_library(
13274     name = "MemRefOpsIncGen",
13275     tbl_outs = [
13276         (
13277             ["-gen-op-decls"],
13278             "include/mlir/Dialect/MemRef/IR/MemRefOps.h.inc",
13279         ),
13280         (
13281             ["-gen-op-defs"],
13282             "include/mlir/Dialect/MemRef/IR/MemRefOps.cpp.inc",
13283         ),
13284     ],
13285     tblgen = ":mlir-tblgen",
13286     td_file = "include/mlir/Dialect/MemRef/IR/MemRefOps.td",
13287     deps = [
13288         ":MemRefOpsTdFiles",
13289     ],
13292 cc_library(
13293     name = "MemRefDialect",
13294     srcs = glob(
13295         [
13296             "lib/Dialect/MemRef/IR/*.cpp",
13297         ],
13298     ),
13299     hdrs = [
13300         "include/mlir/Dialect/MemRef/IR/MemRef.h",
13301         "include/mlir/Dialect/MemRef/IR/MemRefMemorySlot.h",
13302         "include/mlir/Dialect/MemRef/IR/ValueBoundsOpInterfaceImpl.h",
13303     ],
13304     includes = ["include"],
13305     deps = [
13306         ":AllocationOpInterface",
13307         ":ArithDialect",
13308         ":ArithUtils",
13309         ":BytecodeOpInterface",
13310         ":CallOpInterfaces",
13311         ":CastInterfaces",
13312         ":ControlFlowInterfaces",
13313         ":ConvertToLLVMInterface",
13314         ":CopyOpInterface",
13315         ":DialectUtils",
13316         ":IR",
13317         ":InferTypeOpInterface",
13318         ":InliningUtils",
13319         ":MemRefBaseIncGen",
13320         ":MemRefOpsIncGen",
13321         ":MemorySlotInterfaces",
13322         ":RuntimeVerifiableOpInterface",
13323         ":ShapedOpInterfaces",
13324         ":SideEffectInterfaces",
13325         ":Support",
13326         ":ValueBoundsOpInterface",
13327         ":ViewLikeInterface",
13328         "//llvm:Support",
13329     ],
13332 cc_library(
13333     name = "MemRefUtils",
13334     srcs = glob(
13335         [
13336             "lib/Dialect/MemRef/Utils/*.cpp",
13337         ],
13338     ),
13339     hdrs = [
13340         "include/mlir/Dialect/MemRef/Utils/MemRefUtils.h",
13341     ],
13342     includes = ["include"],
13343     deps = [
13344         ":AffineDialect",
13345         ":ArithUtils",
13346         ":MemRefDialect",
13347         ":VectorDialect",
13348         ":ViewLikeInterface",
13349         "//llvm:Support",
13350     ],
13353 gentbl_cc_library(
13354     name = "MemRefPassIncGen",
13355     tbl_outs = [
13356         (
13357             [
13358                 "-gen-pass-decls",
13359                 "-name=MemRef",
13360             ],
13361             "include/mlir/Dialect/MemRef/Transforms/Passes.h.inc",
13362         ),
13363     ],
13364     tblgen = ":mlir-tblgen",
13365     td_file = "include/mlir/Dialect/MemRef/Transforms/Passes.td",
13366     deps = [":PassBaseTdFiles"],
13369 cc_library(
13370     name = "MemRefTransforms",
13371     srcs = glob(
13372         [
13373             "lib/Dialect/MemRef/Transforms/*.cpp",
13374         ],
13375     ),
13376     hdrs = glob(["include/mlir/Dialect/MemRef/Transforms/*.h"]),
13377     includes = ["include"],
13378     deps = [
13379         ":AffineDialect",
13380         ":AffineTransforms",
13381         ":AffineUtils",
13382         ":AllocationOpInterface",
13383         ":ArithDialect",
13384         ":ArithTransforms",
13385         ":ArithUtils",
13386         ":BufferizationDialect",
13387         ":BufferizationInterfaces",
13388         ":ControlFlowDialect",
13389         ":DialectUtils",
13390         ":FuncDialect",
13391         ":GPUDialect",
13392         ":IR",
13393         ":InferTypeOpInterface",
13394         ":LoopLikeInterface",
13395         ":MemRefDialect",
13396         ":MemRefPassIncGen",
13397         ":MemRefUtils",
13398         ":NVGPUDialect",
13399         ":Pass",
13400         ":RuntimeVerifiableOpInterface",
13401         ":SCFDialect",
13402         ":Support",
13403         ":TensorDialect",
13404         ":TransformUtils",
13405         ":ValueBoundsOpInterface",
13406         ":VectorDialect",
13407         "//llvm:Support",
13408     ],
13411 td_library(
13412     name = "MemRefTransformOpsTdFiles",
13413     srcs = [
13414         "include/mlir/Dialect/MemRef/TransformOps/MemRefTransformOps.td",
13415     ],
13416     includes = ["include"],
13417     deps = [
13418         ":TransformDialectTdFiles",
13419     ],
13422 gentbl_cc_library(
13423     name = "MemRefTransformOpsIncGen",
13424     tbl_outs = [
13425         (
13426             ["-gen-op-decls"],
13427             "include/mlir/Dialect/MemRef/TransformOps/MemRefTransformOps.h.inc",
13428         ),
13429         (
13430             ["-gen-op-defs"],
13431             "include/mlir/Dialect/MemRef/TransformOps/MemRefTransformOps.cpp.inc",
13432         ),
13433     ],
13434     tblgen = ":mlir-tblgen",
13435     td_file = "include/mlir/Dialect/MemRef/TransformOps/MemRefTransformOps.td",
13436     deps = [
13437         ":MemRefTransformOpsTdFiles",
13438     ],
13441 cc_library(
13442     name = "MemRefTransformOps",
13443     srcs = glob(["lib/Dialect/MemRef/TransformOps/*.cpp"]),
13444     hdrs = glob(["include/mlir/Dialect/MemRef/TransformOps/*.h"]),
13445     includes = ["include"],
13446     deps = [
13447         ":AffineDialect",
13448         ":Analysis",
13449         ":ArithDialect",
13450         ":BytecodeOpInterface",
13451         ":IR",
13452         ":LLVMCommonConversion",
13453         ":LoopLikeInterface",
13454         ":MemRefDialect",
13455         ":MemRefTransformOpsIncGen",
13456         ":MemRefTransforms",
13457         ":MemRefUtils",
13458         ":NVGPUDialect",
13459         ":SCFDialect",
13460         ":TransformDialect",
13461         ":TransformDialectInterfaces",
13462         ":TransformUtils",
13463         ":VectorDialect",
13464         ":VectorTransforms",
13465         "//llvm:Support",
13466     ],
13469 ##---------------------------------------------------------------------------##
13470 # MLProgram dialect
13471 ##---------------------------------------------------------------------------##
13473 td_library(
13474     name = "MLProgramOpsTdFiles",
13475     srcs = [
13476         "include/mlir/Dialect/MLProgram/IR/MLProgramAttributes.td",
13477         "include/mlir/Dialect/MLProgram/IR/MLProgramBase.td",
13478         "include/mlir/Dialect/MLProgram/IR/MLProgramOps.td",
13479         "include/mlir/Dialect/MLProgram/IR/MLProgramTypes.td",
13480     ],
13481     includes = ["include"],
13482     deps = [
13483         ":BuiltinDialectTdFiles",
13484         ":CallInterfacesTdFiles",
13485         ":ControlFlowInterfacesTdFiles",
13486         ":FunctionInterfacesTdFiles",
13487         ":OpBaseTdFiles",
13488         ":RegionKindInterfaceIncGen",
13489         ":SideEffectInterfacesTdFiles",
13490     ],
13493 gentbl_cc_library(
13494     name = "MLProgramOpsIncGen",
13495     tbl_outs = [
13496         (
13497             ["-gen-op-decls"],
13498             "include/mlir/Dialect/MLProgram/IR/MLProgramOps.h.inc",
13499         ),
13500         (
13501             ["-gen-op-defs"],
13502             "include/mlir/Dialect/MLProgram/IR/MLProgramOps.cpp.inc",
13503         ),
13504         (
13505             ["-gen-dialect-decls"],
13506             "include/mlir/Dialect/MLProgram/IR/MLProgramOpsDialect.h.inc",
13507         ),
13508         (
13509             ["-gen-dialect-defs"],
13510             "include/mlir/Dialect/MLProgram/IR/MLProgramOpsDialect.cpp.inc",
13511         ),
13512     ],
13513     tblgen = ":mlir-tblgen",
13514     td_file = "include/mlir/Dialect/MLProgram/IR/MLProgramOps.td",
13515     deps = [":MLProgramOpsTdFiles"],
13518 gentbl_cc_library(
13519     name = "MLProgramAttributesIncGen",
13520     tbl_outs = [
13521         (
13522             ["-gen-attrdef-decls"],
13523             "include/mlir/Dialect/MLProgram/IR/MLProgramAttributes.h.inc",
13524         ),
13525         (
13526             ["-gen-attrdef-defs"],
13527             "include/mlir/Dialect/MLProgram/IR/MLProgramAttributes.cpp.inc",
13528         ),
13529     ],
13530     tblgen = ":mlir-tblgen",
13531     td_file = "include/mlir/Dialect/MLProgram/IR/MLProgramAttributes.td",
13532     deps = [":MLProgramOpsTdFiles"],
13535 gentbl_cc_library(
13536     name = "MLProgramPassIncGen",
13537     tbl_outs = [
13538         (
13539             [
13540                 "-gen-pass-decls",
13541                 "-name=MLProgram",
13542             ],
13543             "include/mlir/Dialect/MLProgram/Transforms/Passes.h.inc",
13544         ),
13545     ],
13546     tblgen = ":mlir-tblgen",
13547     td_file = "include/mlir/Dialect/MLProgram/Transforms/Passes.td",
13548     deps = [":PassBaseTdFiles"],
13551 gentbl_cc_library(
13552     name = "MLProgramTypesIncGen",
13553     tbl_outs = [
13554         (
13555             ["-gen-typedef-decls"],
13556             "include/mlir/Dialect/MLProgram/IR/MLProgramTypes.h.inc",
13557         ),
13558         (
13559             ["-gen-typedef-defs"],
13560             "include/mlir/Dialect/MLProgram/IR/MLProgramTypes.cpp.inc",
13561         ),
13562     ],
13563     tblgen = ":mlir-tblgen",
13564     td_file = "include/mlir/Dialect/MLProgram/IR/MLProgramTypes.td",
13565     deps = [":MLProgramOpsTdFiles"],
13568 cc_library(
13569     name = "MLProgramDialect",
13570     srcs = glob(["lib/Dialect/MLProgram/IR/*.cpp"]),
13571     hdrs = glob(["include/mlir/Dialect/MLProgram/IR/*.h"]),
13572     includes = ["include"],
13573     deps = [
13574         ":BytecodeOpInterface",
13575         ":CallOpInterfaces",
13576         ":ControlFlowInterfaces",
13577         ":FunctionInterfaces",
13578         ":IR",
13579         ":InliningUtils",
13580         ":MLProgramAttributesIncGen",
13581         ":MLProgramOpsIncGen",
13582         ":MLProgramTypesIncGen",
13583         ":SideEffectInterfaces",
13584         "//llvm:Support",
13585     ],
13588 cc_library(
13589     name = "MLProgramTransforms",
13590     srcs = glob([
13591         "lib/Dialect/MLProgram/Transforms/*.cpp",
13592     ]),
13593     hdrs = glob([
13594         "include/mlir/Dialect/MLProgram/Transforms/*.h",
13595     ]),
13596     includes = ["include"],
13597     deps = [
13598         ":BufferizationInterfaces",
13599         ":FuncDialect",
13600         ":IR",
13601         ":MLProgramDialect",
13602         ":MLProgramPassIncGen",
13603         ":MemRefDialect",
13604         ":Pass",
13605         ":TransformUtils",
13606     ],
13609 ##---------------------------------------------------------------------------##
13610 # MPI dialect
13611 ##---------------------------------------------------------------------------##
13613 td_library(
13614     name = "MPITdFiles",
13615     srcs = [
13616         "include/mlir/Dialect/MPI/IR/MPI.td",
13617         "include/mlir/Dialect/MPI/IR/MPIOps.td",
13618         "include/mlir/Dialect/MPI/IR/MPITypes.td",
13619     ],
13620     includes = ["include"],
13621     deps = [
13622         ":AttrTdFiles",
13623         ":OpBaseTdFiles",
13624     ],
13627 gentbl_cc_library(
13628     name = "MPIIncGen",
13629     tbl_outs = [
13630         (
13631             ["-gen-op-decls"],
13632             "include/mlir/Dialect/MPI/IR/MPI.h.inc",
13633         ),
13634         (
13635             ["-gen-op-defs"],
13636             "include/mlir/Dialect/MPI/IR/MPI.cpp.inc",
13637         ),
13638         (
13639             ["-gen-dialect-decls"],
13640             "include/mlir/Dialect/MPI/IR/MPIDialect.h.inc",
13641         ),
13642         (
13643             ["-gen-dialect-defs"],
13644             "include/mlir/Dialect/MPI/IR/MPIDialect.cpp.inc",
13645         ),
13646     ],
13647     tblgen = ":mlir-tblgen",
13648     td_file = "include/mlir/Dialect/MPI/IR/MPI.td",
13649     deps = [":MPITdFiles"],
13652 gentbl_cc_library(
13653     name = "MPIOpsIncGen",
13654     tbl_outs = [
13655         (
13656             ["-gen-op-decls"],
13657             "include/mlir/Dialect/MPI/IR/MPIOps.h.inc",
13658         ),
13659         (
13660             ["-gen-op-defs"],
13661             "include/mlir/Dialect/MPI/IR/MPIOps.cpp.inc",
13662         ),
13663     ],
13664     tblgen = ":mlir-tblgen",
13665     td_file = "include/mlir/Dialect/MPI/IR/MPIOps.td",
13666     deps = [":MPITdFiles"],
13669 gentbl_cc_library(
13670     name = "MPITypesIncGen",
13671     tbl_outs = [
13672         (
13673             ["-gen-typedef-decls"],
13674             "include/mlir/Dialect/MPI/IR/MPITypesGen.h.inc",
13675         ),
13676         (
13677             ["-gen-typedef-defs"],
13678             "include/mlir/Dialect/MPI/IR/MPITypesGen.cpp.inc",
13679         ),
13680     ],
13681     tblgen = ":mlir-tblgen",
13682     td_file = "include/mlir/Dialect/MPI/IR/MPITypes.td",
13683     deps = [":MPITdFiles"],
13686 gentbl_cc_library(
13687     name = "MPIAttrsIncGen",
13688     tbl_outs = [
13689         (
13690             ["-gen-enum-decls"],
13691             "include/mlir/Dialect/MPI/IR/MPIEnums.h.inc",
13692         ),
13693         (
13694             ["-gen-enum-defs"],
13695             "include/mlir/Dialect/MPI/IR/MPIEnums.cpp.inc",
13696         ),
13697         (
13698             ["-gen-attrdef-decls"],
13699             "include/mlir/Dialect/MPI/IR/MPIAttrDefs.h.inc",
13700         ),
13701         (
13702             ["-gen-attrdef-defs"],
13703             "include/mlir/Dialect/MPI/IR/MPIAttrDefs.cpp.inc",
13704         ),
13705     ],
13706     tblgen = ":mlir-tblgen",
13707     td_file = "include/mlir/Dialect/MPI/IR/MPI.td",
13708     deps = [":MPITdFiles"],
13711 cc_library(
13712     name = "MPIDialect",
13713     srcs = glob(["lib/Dialect/MPI/IR/*.cpp"]),
13714     hdrs = glob(["include/mlir/Dialect/MPI/IR/*.h"]),
13715     includes = ["include"],
13716     deps = [
13717         ":BytecodeOpInterface",
13718         ":IR",
13719         ":MPIAttrsIncGen",
13720         ":MPIIncGen",
13721         ":MPIOpsIncGen",
13722         ":MPITypesIncGen",
13723         "//llvm:Support",
13724     ],
13727 ##---------------------------------------------------------------------------##
13728 # Allocation interfaces
13729 ##---------------------------------------------------------------------------##
13731 td_library(
13732     name = "AllocationOpInterfaceTdFiles",
13733     srcs = ["include/mlir/Dialect/Bufferization/IR/AllocationOpInterface.td"],
13734     includes = ["include"],
13735     deps = [":OpBaseTdFiles"],
13738 gentbl_cc_library(
13739     name = "AllocationOpInterfaceIncGen",
13740     tbl_outs = [
13741         (
13742             ["-gen-op-interface-decls"],
13743             "include/mlir/Dialect/Bufferization/IR/AllocationOpInterface.h.inc",
13744         ),
13745         (
13746             ["-gen-op-interface-defs"],
13747             "include/mlir/Dialect/Bufferization/IR/AllocationOpInterface.cpp.inc",
13748         ),
13749     ],
13750     tblgen = ":mlir-tblgen",
13751     td_file = "include/mlir/Dialect/Bufferization/IR/AllocationOpInterface.td",
13752     deps = [":AllocationOpInterfaceTdFiles"],
13755 cc_library(
13756     name = "AllocationOpInterface",
13757     srcs = ["lib/Dialect/Bufferization/IR/AllocationOpInterface.cpp"],
13758     hdrs = ["include/mlir/Dialect/Bufferization/IR/AllocationOpInterface.h"],
13759     includes = ["include"],
13760     deps = [
13761         ":AllocationOpInterfaceIncGen",
13762         ":IR",
13763     ],
13766 td_library(
13767     name = "BufferizationOpsTdFiles",
13768     srcs = [
13769         "include/mlir/Dialect/Bufferization/IR/BufferizationBase.td",
13770         "include/mlir/Dialect/Bufferization/IR/BufferizationEnums.td",
13771         "include/mlir/Dialect/Bufferization/IR/BufferizationOps.td",
13772     ],
13773     includes = ["include"],
13774     deps = [
13775         ":AllocationOpInterfaceTdFiles",
13776         ":BufferViewFlowOpInterfaceTdFiles",
13777         ":BufferizableOpInterfaceTdFiles",
13778         ":CopyOpInterfaceTdFiles",
13779         ":DestinationStyleOpInterfaceTdFiles",
13780         ":InferTypeOpInterfaceTdFiles",
13781         ":OpBaseTdFiles",
13782         ":SideEffectInterfacesTdFiles",
13783         ":SubsetOpInterfaceTdFiles",
13784     ],
13787 gentbl_cc_library(
13788     name = "BufferizationBaseIncGen",
13789     tbl_outs = [
13790         (
13791             [
13792                 "-gen-dialect-decls",
13793                 "-dialect=bufferization",
13794             ],
13795             "include/mlir/Dialect/Bufferization/IR/BufferizationOpsDialect.h.inc",
13796         ),
13797         (
13798             [
13799                 "-gen-dialect-defs",
13800                 "-dialect=bufferization",
13801             ],
13802             "include/mlir/Dialect/Bufferization/IR/BufferizationOpsDialect.cpp.inc",
13803         ),
13804     ],
13805     tblgen = ":mlir-tblgen",
13806     td_file = "include/mlir/Dialect/Bufferization/IR/BufferizationBase.td",
13807     deps = [":BufferizationOpsTdFiles"],
13810 td_library(
13811     name = "BufferizationEnumsTdFiles",
13812     srcs = [
13813         "include/mlir/Dialect/Bufferization/IR/BufferizationEnums.td",
13814     ],
13815     includes = ["include"],
13816     deps = [
13817         ":OpBaseTdFiles",
13818     ],
13821 gentbl_cc_library(
13822     name = "BufferizationEnumsIncGen",
13823     tbl_outs = [
13824         (
13825             ["-gen-enum-decls"],
13826             "include/mlir/Dialect/Bufferization/IR/BufferizationEnums.h.inc",
13827         ),
13828         (
13829             ["-gen-enum-defs"],
13830             "include/mlir/Dialect/Bufferization/IR/BufferizationEnums.cpp.inc",
13831         ),
13832     ],
13833     tblgen = ":mlir-tblgen",
13834     td_file = "include/mlir/Dialect/Bufferization/IR/BufferizationEnums.td",
13835     deps = [":BufferizationEnumsTdFiles"],
13838 td_library(
13839     name = "BufferizationTransformOpsTdFiles",
13840     srcs = [
13841         "include/mlir/Dialect/Bufferization/TransformOps/BufferizationTransformOps.td",
13842     ],
13843     includes = ["include"],
13844     deps = [
13845         ":BufferizationOpsTdFiles",
13846         ":TransformDialectTdFiles",
13847     ],
13850 gentbl_cc_library(
13851     name = "BufferizationTransformOpsIncGen",
13852     tbl_outs = [
13853         (
13854             ["-gen-op-decls"],
13855             "include/mlir/Dialect/Bufferization/TransformOps/BufferizationTransformOps.h.inc",
13856         ),
13857         (
13858             ["-gen-op-defs"],
13859             "include/mlir/Dialect/Bufferization/TransformOps/BufferizationTransformOps.cpp.inc",
13860         ),
13861     ],
13862     tblgen = ":mlir-tblgen",
13863     td_file = "include/mlir/Dialect/Bufferization/TransformOps/BufferizationTransformOps.td",
13864     deps = [
13865         ":BufferizationTransformOpsTdFiles",
13866     ],
13869 cc_library(
13870     name = "BufferizationTransformOps",
13871     srcs = [
13872         "lib/Dialect/Bufferization/TransformOps/BufferizationTransformOps.cpp",
13873     ],
13874     hdrs = [
13875         "include/mlir/Dialect/Bufferization/TransformOps/BufferizationTransformOps.h",
13876     ],
13877     includes = ["include"],
13878     deps = [
13879         ":BufferizationDialect",
13880         ":BufferizationEnumsIncGen",
13881         ":BufferizationInterfaces",
13882         ":BufferizationTransformOpsIncGen",
13883         ":BufferizationTransforms",
13884         ":BytecodeOpInterface",
13885         ":FunctionInterfaces",
13886         ":IR",
13887         ":LinalgDialect",
13888         ":MemRefDialect",
13889         ":TensorDialect",
13890         ":TransformDialect",
13891         ":TransformDialectInterfaces",
13892     ],
13895 gentbl_cc_library(
13896     name = "BufferizationOpsIncGen",
13897     tbl_outs = [
13898         (
13899             ["-gen-op-decls"],
13900             "include/mlir/Dialect/Bufferization/IR/BufferizationOps.h.inc",
13901         ),
13902         (
13903             ["-gen-op-defs"],
13904             "include/mlir/Dialect/Bufferization/IR/BufferizationOps.cpp.inc",
13905         ),
13906     ],
13907     tblgen = ":mlir-tblgen",
13908     td_file = "include/mlir/Dialect/Bufferization/IR/BufferizationOps.td",
13909     deps = [
13910         ":BufferizationOpsTdFiles",
13911     ],
13914 cc_library(
13915     name = "BufferizationInterfaces",
13916     srcs = [
13917         "include/mlir/Analysis/Liveness.h",
13918     ],
13919     hdrs = [
13920         "include/mlir/Dialect/Bufferization/IR/BufferDeallocationOpInterface.h",
13921         "include/mlir/Dialect/Bufferization/IR/BufferViewFlowOpInterface.h",
13922         "include/mlir/Dialect/Bufferization/IR/BufferizableOpInterface.h",
13923     ],
13924     includes = ["include"],
13925     deps = [
13926         ":BufferDeallocationOpInterfaceIncGen",
13927         ":BufferViewFlowOpInterfaceIncGen",
13928         ":BufferizableOpInterfaceIncGen",
13929         ":BufferizationEnumsIncGen",
13930         ":FunctionInterfaces",
13931         ":IR",
13932         ":Support",
13933         "//llvm:Support",
13934     ],
13937 cc_library(
13938     name = "BufferizationDialect",
13939     srcs = [
13940         "lib/Dialect/Bufferization/IR/BufferDeallocationOpInterface.cpp",
13941         "lib/Dialect/Bufferization/IR/BufferViewFlowOpInterface.cpp",
13942         "lib/Dialect/Bufferization/IR/BufferizableOpInterface.cpp",
13943         "lib/Dialect/Bufferization/IR/BufferizationDialect.cpp",
13944         "lib/Dialect/Bufferization/IR/BufferizationOps.cpp",
13945         "lib/Dialect/Bufferization/IR/UnstructuredControlFlow.cpp",
13946     ],
13947     hdrs = [
13948         "include/mlir/Dialect/Bufferization/IR/Bufferization.h",
13949         "include/mlir/Dialect/Bufferization/IR/DstBufferizableOpInterfaceImpl.h",
13950         "include/mlir/Dialect/Bufferization/IR/UnstructuredControlFlow.h",
13951     ],
13952     includes = ["include"],
13953     deps = [
13954         ":AffineDialect",
13955         ":AllocationOpInterface",
13956         ":ArithDialect",
13957         ":BufferDeallocationOpInterfaceIncGen",
13958         ":BufferViewFlowOpInterfaceIncGen",
13959         ":BufferizableOpInterfaceIncGen",
13960         ":BufferizationBaseIncGen",
13961         ":BufferizationInterfaces",
13962         ":BufferizationOpsIncGen",
13963         ":BytecodeOpInterface",
13964         ":ControlFlowInterfaces",
13965         ":CopyOpInterface",
13966         ":DestinationStyleOpInterface",
13967         ":FuncDialect",
13968         ":FunctionInterfaces",
13969         ":IR",
13970         ":InferTypeOpInterface",
13971         ":InliningUtils",
13972         ":MemRefDialect",
13973         ":SparseTensorDialect",
13974         ":SubsetOpInterface",
13975         ":TensorDialect",
13976         "//llvm:Support",
13977     ],
13980 gentbl_cc_library(
13981     name = "BufferizationPassIncGen",
13982     tbl_outs = [
13983         (
13984             [
13985                 "-gen-pass-decls",
13986                 "-name=Bufferization",
13987             ],
13988             "include/mlir/Dialect/Bufferization/Transforms/Passes.h.inc",
13989         ),
13990     ],
13991     tblgen = ":mlir-tblgen",
13992     td_file = "include/mlir/Dialect/Bufferization/Transforms/Passes.td",
13993     deps = [":PassBaseTdFiles"],
13996 cc_library(
13997     name = "BufferizationTransforms",
13998     srcs = glob(
13999         [
14000             "lib/Dialect/Bufferization/Transforms/*.cpp",
14001         ],
14002     ),
14003     hdrs = glob(["include/mlir/Dialect/Bufferization/Transforms/*.h"]),
14004     includes = ["include"],
14005     deps = [
14006         ":AllocationOpInterface",
14007         ":Analysis",
14008         ":ArithDialect",
14009         ":BufferizationDialect",
14010         ":BufferizationInterfaces",
14011         ":BufferizationPassIncGen",
14012         ":CallOpInterfaces",
14013         ":ControlFlowDialect",
14014         ":ControlFlowInterfaces",
14015         ":FuncDialect",
14016         ":FunctionInterfaces",
14017         ":IR",
14018         ":LoopLikeInterface",
14019         ":MemRefDialect",
14020         ":MemRefUtils",
14021         ":Pass",
14022         ":SCFDialect",
14023         ":SideEffectInterfaces",
14024         ":SubsetOpInterface",
14025         ":Support",
14026         ":TensorDialect",
14027         ":TransformUtils",
14028         ":Transforms",
14029         ":ViewLikeInterface",
14030         "//llvm:Support",
14031     ],
14034 cc_library(
14035     name = "BufferizationToMemRef",
14036     srcs = [
14037         "lib/Conversion/BufferizationToMemRef/BufferizationToMemRef.cpp",
14038     ],
14039     hdrs = [
14040         "include/mlir/Conversion/BufferizationToMemRef/BufferizationToMemRef.h",
14041     ],
14042     includes = ["include"],
14043     deps = [
14044         ":ArithDialect",
14045         ":BufferizationDialect",
14046         ":BufferizationTransforms",
14047         ":ConversionPassIncGen",
14048         ":FuncDialect",
14049         ":IR",
14050         ":MemRefDialect",
14051         ":Pass",
14052         ":SCFDialect",
14053         ":Support",
14054         ":TransformUtils",
14055     ],
14058 cc_library(
14059     name = "BufferizationPipelines",
14060     srcs = glob(["lib/Dialect/Bufferization/Pipelines/*.cpp"]),
14061     hdrs = ["include/mlir/Dialect/Bufferization/Pipelines/Passes.h"],
14062     includes = ["include"],
14063     deps = [
14064         ":BufferizationInterfaces",
14065         ":BufferizationTransforms",
14066         ":FuncDialect",
14067         ":MemRefTransforms",
14068         ":Pass",
14069         ":Transforms",
14070     ],
14073 td_library(
14074     name = "DLTIDialectTdFiles",
14075     srcs = [
14076         "include/mlir/Dialect/DLTI/DLTI.td",
14077         "include/mlir/Dialect/DLTI/DLTIBase.td",
14078     ],
14079     includes = ["include"],
14080     deps = [
14081         ":DataLayoutInterfacesTdFiles",
14082         ":OpBaseTdFiles",
14083     ],
14086 gentbl_cc_library(
14087     name = "DLTIBaseIncGen",
14088     tbl_outs = [
14089         (
14090             [
14091                 "-gen-dialect-decls",
14092                 "-dialect=dlti",
14093             ],
14094             "include/mlir/Dialect/DLTI/DLTIDialect.h.inc",
14095         ),
14096         (
14097             [
14098                 "-gen-dialect-defs",
14099                 "-dialect=dlti",
14100             ],
14101             "include/mlir/Dialect/DLTI/DLTIDialect.cpp.inc",
14102         ),
14103     ],
14104     tblgen = ":mlir-tblgen",
14105     td_file = "include/mlir/Dialect/DLTI/DLTIBase.td",
14106     deps = [":OpBaseTdFiles"],
14109 gentbl_cc_library(
14110     name = "DLTIAttrsIncGen",
14111     tbl_outs = [
14112         (
14113             [
14114                 "-gen-attrdef-decls",
14115                 "-dialect=dlti",
14116             ],
14117             "include/mlir/Dialect/DLTI/DLTIAttrs.h.inc",
14118         ),
14119         (
14120             [
14121                 "-gen-attrdef-defs",
14122                 "-dialect=dlti",
14123             ],
14124             "include/mlir/Dialect/DLTI/DLTIAttrs.cpp.inc",
14125         ),
14126     ],
14127     tblgen = ":mlir-tblgen",
14128     td_file = "include/mlir/Dialect/DLTI/DLTIAttrs.td",
14129     deps = [
14130         ":AttrTdFiles",
14131         ":DLTIDialectTdFiles",
14132     ],
14135 cc_library(
14136     name = "DLTIDialect",
14137     srcs = glob(["lib/Dialect/DLTI/*.cpp"]),
14138     hdrs = glob(["include/mlir/Dialect/DLTI/*.h"]),
14139     includes = ["include"],
14140     deps = [
14141         ":DLTIAttrsIncGen",
14142         ":DLTIBaseIncGen",
14143         ":DataLayoutInterfaces",
14144         ":IR",
14145         "//llvm:Support",
14146     ],
14149 td_library(
14150     name = "DLTITransformTdFiles",
14151     srcs = [
14152         "include/mlir/Dialect/DLTI/TransformOps/DLTITransformOps.td",
14153     ],
14154     includes = ["include"],
14155     deps = [":TransformDialectTdFiles"],
14158 gentbl_cc_library(
14159     name = "DLTITransformOpsIncGen",
14160     tbl_outs = [
14161         (
14162             [
14163                 "-gen-op-decls",
14164                 "-dialect=dlti",
14165             ],
14166             "include/mlir/Dialect/DLTI/TransformOps/DLTITransformOps.h.inc",
14167         ),
14168         (
14169             [
14170                 "-gen-op-defs",
14171                 "-dialect=dlti",
14172             ],
14173             "include/mlir/Dialect/DLTI/TransformOps/DLTITransformOps.cpp.inc",
14174         ),
14175     ],
14176     tblgen = ":mlir-tblgen",
14177     td_file = "include/mlir/Dialect/DLTI/TransformOps/DLTITransformOps.td",
14178     deps = [
14179         ":DLTITransformTdFiles",
14180     ],
14183 cc_library(
14184     name = "DLTITransformOps",
14185     srcs = glob(["lib/Dialect/DLTI/TransformOps/*.cpp"]),
14186     hdrs = glob(["include/mlir/Dialect/DLTI/TransformOps/*.h"]),
14187     includes = ["include"],
14188     deps = [
14189         ":DLTIDialect",
14190         ":DLTITransformOpsIncGen",
14191         ":DataLayoutInterfaces",
14192         ":TransformDialect",
14193         ":TransformDialectInterfaces",
14194         ":TransformDialectUtils",
14195     ],
14198 gentbl_cc_library(
14199     name = "ReducerIncGen",
14200     tbl_outs = [
14201         (
14202             [
14203                 "-gen-pass-decls",
14204                 "-name=Reducer",
14205             ],
14206             "include/mlir/Reducer/Passes.h.inc",
14207         ),
14208     ],
14209     tblgen = ":mlir-tblgen",
14210     td_file = "include/mlir/Reducer/Passes.td",
14211     deps = [
14212         ":PassBaseTdFiles",
14213         ":ReducerTdFiles",
14214     ],
14217 cc_library(
14218     name = "Reducer",
14219     srcs = glob(["lib/Reducer/*.cpp"]),
14220     hdrs = glob(["include/mlir/Reducer/*.h"]),
14221     includes = ["include"],
14222     deps = [
14223         ":IR",
14224         ":Pass",
14225         ":ReducerIncGen",
14226         ":Rewrite",
14227         ":Support",
14228         ":TransformUtils",
14229         "//llvm:Support",
14230     ],
14233 cc_library(
14234     name = "MlirReduceLib",
14235     srcs = ["lib/Tools/mlir-reduce/MlirReduceMain.cpp"],
14236     hdrs = ["include/mlir/Tools/mlir-reduce/MlirReduceMain.h"],
14237     includes = ["include"],
14238     deps = [
14239         ":IR",
14240         ":ParseUtilities",
14241         ":Parser",
14242         ":Pass",
14243         ":Reducer",
14244         ":Rewrite",
14245         ":Support",
14246         "//llvm:Support",
14247     ],
14250 cc_binary(
14251     name = "mlir-reduce",
14252     srcs = ["tools/mlir-reduce/mlir-reduce.cpp"],
14253     includes = ["include"],
14254     local_defines = ["MLIR_INCLUDE_TESTS"],
14255     stamp = 0,
14256     deps = [
14257         ":AllPassesAndDialects",
14258         ":IR",
14259         ":MlirReduceLib",
14260         "//llvm:Support",
14261         "//mlir/test:TestDialect",
14262     ],
14265 cc_library(
14266     name = "MlirQueryUtils",
14267     srcs = glob(
14268         [
14269             "lib/Query/Matcher/*.cpp",
14270             "lib/Query/Matcher/*.h",
14271             "lib/Query/*.cpp",
14272             "lib/Query/*.h",
14273         ],
14274     ),
14275     hdrs = glob(
14276         [
14277             "include/mlir/Query/Matcher/*.h",
14278             "include/mlir/Query/*.h",
14279         ],
14280     ),
14281     includes = ["include"],
14282     deps = [
14283         ":IR",
14284         ":Reducer",
14285         ":Rewrite",
14286         ":FuncDialect",
14287         "//llvm:LineEditor",
14288         "//llvm:Support",
14289     ],
14292 cc_library(
14293     name = "MlirQueryLib",
14294     srcs = ["lib/Tools/mlir-query/MlirQueryMain.cpp"],
14295     hdrs = ["include/mlir/Tools/mlir-query/MlirQueryMain.h"],
14296     includes = ["include"],
14297     deps = [
14298         ":IR",
14299         ":MlirQueryUtils",
14300         ":Parser",
14301         ":Support",
14302         "//llvm:LineEditor",
14303         "//llvm:Support",
14304     ],
14307 cc_binary(
14308     name = "mlir-query",
14309     srcs = ["tools/mlir-query/mlir-query.cpp"],
14310     includes = ["include"],
14311     local_defines = ["MLIR_INCLUDE_TESTS"],
14312     stamp = 0,
14313     deps = [
14314         ":AllPassesAndDialects",
14315         ":MlirQueryLib",
14316         ":MlirQueryUtils",
14317         ":IR",
14318         "//llvm:Support",
14319         "//mlir/test:TestDialect",
14320     ],
14323 cc_library(
14324     name = "PDLLODS",
14325     srcs = glob(
14326         [
14327             "lib/Tools/PDLL/ODS/*.cpp",
14328         ],
14329     ),
14330     hdrs = glob(["include/mlir/Tools/PDLL/ODS/*.h"]),
14331     includes = ["include"],
14332     deps = [
14333         ":Support",
14334         "//llvm:Support",
14335     ],
14338 cc_library(
14339     name = "PDLLAST",
14340     srcs = glob(
14341         [
14342             "lib/Tools/PDLL/AST/*.cpp",
14343             "lib/Tools/PDLL/AST/*.h",
14344         ],
14345     ),
14346     hdrs = glob(["include/mlir/Tools/PDLL/AST/*.h"]),
14347     includes = ["include"],
14348     deps = [
14349         ":Support",
14350         "//llvm:Support",
14351     ],
14354 cc_library(
14355     name = "PDLLCodeGen",
14356     srcs = glob(
14357         [
14358             "lib/Tools/PDLL/CodeGen/*.cpp",
14359         ],
14360     ),
14361     hdrs = glob(["include/mlir/Tools/PDLL/CodeGen/*.h"]),
14362     includes = ["include"],
14363     deps = [
14364         ":AsmParser",
14365         ":IR",
14366         ":PDLDialect",
14367         ":PDLLAST",
14368         ":PDLLODS",
14369         ":Support",
14370         "//llvm:Support",
14371     ],
14374 cc_library(
14375     name = "PDLLParser",
14376     srcs = glob(
14377         [
14378             "lib/Tools/PDLL/Parser/*.cpp",
14379             "lib/Tools/PDLL/Parser/*.h",
14380         ],
14381     ),
14382     hdrs = glob(["include/mlir/Tools/PDLL/Parser/*.h"]),
14383     includes = ["include"],
14384     deps = [
14385         ":PDLLAST",
14386         ":PDLLODS",
14387         ":Support",
14388         ":TableGen",
14389         "//llvm:Support",
14390         "//llvm:TableGen",
14391         "//llvm:TargetParser",
14392     ],
14395 cc_binary(
14396     name = "mlir-pdll",
14397     srcs = [
14398         "tools/mlir-pdll/mlir-pdll.cpp",
14399     ],
14400     deps = [
14401         ":IR",
14402         ":PDLLAST",
14403         ":PDLLCodeGen",
14404         ":PDLLODS",
14405         ":PDLLParser",
14406         ":Support",
14407         "//llvm:Support",
14408         "//llvm:config",
14409     ],
14412 cc_binary(
14413     name = "mlir-pdll-lsp-server",
14414     srcs = ["tools/mlir-pdll-lsp-server/mlir-pdll-lsp-server.cpp"],
14415     includes = ["include"],
14416     deps = [
14417         ":MlirPdllLspServerLib",
14418         ":Support",
14419     ],
14422 td_library(
14423     name = "DialectConversionPdllFiles",
14424     srcs = ["include/mlir/Transforms/DialectConversion.pdll"],
14425     includes = ["include"],
14428 td_library(
14429     name = "UBDialectTdFiles",
14430     srcs = [
14431         "include/mlir/Dialect/UB/IR/UBOps.td",
14432         "include/mlir/Dialect/UB/IR/UBOpsInterfaces.td",
14433     ],
14434     includes = ["include"],
14435     deps = [
14436         ":OpBaseTdFiles",
14437         ":SideEffectInterfacesTdFiles",
14438     ],
14441 gentbl_cc_library(
14442     name = "UBOpsInterfacesIncGen",
14443     tbl_outs = [
14444         (
14445             ["--gen-attr-interface-decls"],
14446             "include/mlir/Dialect/UB/IR/UBOpsInterfaces.h.inc",
14447         ),
14448         (
14449             ["--gen-attr-interface-defs"],
14450             "include/mlir/Dialect/UB/IR/UBOpsInterfaces.cpp.inc",
14451         ),
14452     ],
14453     tblgen = ":mlir-tblgen",
14454     td_file = "include/mlir/Dialect/UB/IR/UBOpsInterfaces.td",
14455     deps = [":UBDialectTdFiles"],
14458 gentbl_cc_library(
14459     name = "UBOpsIncGen",
14460     tbl_outs = [
14461         (
14462             [
14463                 "-gen-dialect-decls",
14464                 "-dialect=ub",
14465             ],
14466             "include/mlir/Dialect/UB/IR/UBOpsDialect.h.inc",
14467         ),
14468         (
14469             [
14470                 "-gen-dialect-defs",
14471                 "-dialect=ub",
14472             ],
14473             "include/mlir/Dialect/UB/IR/UBOpsDialect.cpp.inc",
14474         ),
14475         (
14476             ["-gen-op-decls"],
14477             "include/mlir/Dialect/UB/IR/UBOps.h.inc",
14478         ),
14479         (
14480             ["-gen-op-defs"],
14481             "include/mlir/Dialect/UB/IR/UBOps.cpp.inc",
14482         ),
14483         (
14484             ["--gen-attrdef-decls"],
14485             "include/mlir/Dialect/UB/IR/UBOpsAttributes.h.inc",
14486         ),
14487         (
14488             ["--gen-attrdef-defs"],
14489             "include/mlir/Dialect/UB/IR/UBOpsAttributes.cpp.inc",
14490         ),
14491     ],
14492     tblgen = ":mlir-tblgen",
14493     td_file = "include/mlir/Dialect/UB/IR/UBOps.td",
14494     deps = [":UBDialectTdFiles"],
14497 cc_library(
14498     name = "UBDialect",
14499     srcs = [
14500         "lib/Dialect/UB/IR/UBOps.cpp",
14501     ],
14502     hdrs = ["include/mlir/Dialect/UB/IR/UBOps.h"],
14503     includes = ["include"],
14504     deps = [
14505         ":BytecodeOpInterface",
14506         ":ConvertToLLVMInterface",
14507         ":IR",
14508         ":InliningUtils",
14509         ":SideEffectInterfaces",
14510         ":UBOpsIncGen",
14511         ":UBOpsInterfacesIncGen",
14512         "//llvm:Support",
14513     ],
14516 cc_library(
14517     name = "UBToLLVM",
14518     srcs = glob([
14519         "lib/Conversion/UBToLLVM/*.cpp",
14520     ]),
14521     hdrs = glob([
14522         "include/mlir/Conversion/UBToLLVM/*.h",
14523     ]),
14524     includes = ["include"],
14525     deps = [
14526         ":ConversionPassIncGen",
14527         ":ConvertToLLVMInterface",
14528         ":IR",
14529         ":LLVMCommonConversion",
14530         ":LLVMDialect",
14531         ":Pass",
14532         ":UBDialect",
14533     ],
14536 cc_library(
14537     name = "UBToSPIRV",
14538     srcs = glob([
14539         "lib/Conversion/UBToSPIRV/*.cpp",
14540     ]),
14541     hdrs = glob([
14542         "include/mlir/Conversion/UBToSPIRV/*.h",
14543     ]),
14544     includes = ["include"],
14545     deps = [
14546         ":ConversionPassIncGen",
14547         ":Pass",
14548         ":SPIRVConversion",
14549         ":SPIRVDialect",
14550         ":UBDialect",
14551     ],
14554 cc_library(
14555     name = "VCIXDialect",
14556     srcs = ["lib/Dialect/LLVMIR/IR/VCIXDialect.cpp"],
14557     hdrs = ["include/mlir/Dialect/LLVMIR/VCIXDialect.h"],
14558     includes = ["include"],
14559     deps = [
14560         ":BytecodeOpInterface",
14561         ":GPUDialect",
14562         ":IR",
14563         ":LLVMDialect",
14564         ":SideEffectInterfaces",
14565         ":VCIXOpsIncGen",
14566         "//llvm:AsmParser",
14567         "//llvm:Core",
14568         "//llvm:Support",
14569     ],
14572 td_library(
14573     name = "VCIXTdFiles",
14574     srcs = ["include/mlir/Dialect/LLVMIR/VCIXOps.td"],
14575     includes = ["include"],
14576     deps = [
14577         ":LLVMOpsTdFiles",
14578         ":OpBaseTdFiles",
14579     ],
14582 gentbl_cc_library(
14583     name = "VCIXOpsIncGen",
14584     tbl_outs = [
14585         (
14586             ["-gen-op-decls"],
14587             "include/mlir/Dialect/LLVMIR/VCIXOps.h.inc",
14588         ),
14589         (
14590             ["-gen-op-defs"],
14591             "include/mlir/Dialect/LLVMIR/VCIXOps.cpp.inc",
14592         ),
14593         (
14594             [
14595                 "-gen-dialect-decls",
14596                 "-dialect=vcix",
14597             ],
14598             "include/mlir/Dialect/LLVMIR/VCIXOpsDialect.h.inc",
14599         ),
14600         (
14601             [
14602                 "-gen-dialect-defs",
14603                 "-dialect=vcix",
14604             ],
14605             "include/mlir/Dialect/LLVMIR/VCIXOpsDialect.cpp.inc",
14606         ),
14607         (
14608             [
14609                 "-gen-attrdef-decls",
14610                 "-attrdefs-dialect=vcix",
14611             ],
14612             "include/mlir/Dialect/LLVMIR/VCIXOpsAttributes.h.inc",
14613         ),
14614         (
14615             [
14616                 "-gen-attrdef-defs",
14617                 "-attrdefs-dialect=vcix",
14618             ],
14619             "include/mlir/Dialect/LLVMIR/VCIXOpsAttributes.cpp.inc",
14620         ),
14621     ],
14622     tblgen = ":mlir-tblgen",
14623     td_file = "include/mlir/Dialect/LLVMIR/VCIXOps.td",
14624     deps = [":VCIXTdFiles"],
14627 cc_library(
14628     name = "VCIXToLLVMIRTranslation",
14629     srcs = glob(["lib/Target/LLVMIR/Dialect/VCIX/*.cpp"]),
14630     hdrs = glob(["include/mlir/Target/LLVMIR/Dialect/VCIX/*.h"]),
14631     includes = ["include"],
14632     deps = [
14633         ":IR",
14634         ":ToLLVMIRTranslation",
14635         ":VCIXConversionIncGen",
14636         ":VCIXDialect",
14637         "//llvm:Core",
14638         "//llvm:Support",
14639     ],
14642 gentbl_cc_library(
14643     name = "VCIXConversionIncGen",
14644     tbl_outs = [
14645         (
14646             ["-gen-llvmir-conversions"],
14647             "include/mlir/Dialect/LLVMIR/VCIXConversions.inc",
14648         ),
14649     ],
14650     tblgen = ":mlir-tblgen",
14651     td_file = "include/mlir/Dialect/LLVMIR/VCIXOps.td",
14652     deps = [":VCIXTdFiles"],
14655 gentbl_cc_library(
14656     name = "QuantPassIncGen",
14657     tbl_outs = [
14658         (
14659             [
14660                 "-gen-pass-decls",
14661                 "-name=Quant",
14662             ],
14663             "include/mlir/Dialect/Quant/Transforms/Passes.h.inc",
14664         ),
14665     ],
14666     tblgen = ":mlir-tblgen",
14667     td_file = "include/mlir/Dialect/Quant/Transforms/Passes.td",
14668     deps = [":PassBaseTdFiles"],
14671 cc_library(
14672     name = "QuantTransforms",
14673     srcs = glob([
14674         "lib/Dialect/Quant/Transforms/*.cpp",
14675     ]),
14676     hdrs = glob([
14677         "include/mlir/Dialect/Quant/Transforms/*.h",
14678     ]),
14679     includes = ["include"],
14680     deps = [
14681         ":ArithDialect",
14682         ":FuncDialect",
14683         ":FuncTransforms",
14684         ":IR",
14685         ":LinalgDialect",
14686         ":Pass",
14687         ":QuantOps",
14688         ":QuantPassIncGen",
14689         ":ShapeDialect",
14690         ":TensorDialect",
14691         ":TransformUtils",
14692         "//llvm:Support",
14693     ],