[AMDGPU] Make v8i16/v8f16 legal
[llvm-project.git] / utils / bazel / llvm-project-overlay / mlir / BUILD.bazel
bloba3876c0b71f4fc42120c19d6eaed65cdc18b464f
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(":tblgen.bzl", "gentbl_cc_library", "td_library")
9 load(":linalggen.bzl", "genlinalg")
10 load(
11     ":build_defs.bzl",
12     "cc_headers_only",
13     "if_cuda_available",
14     "mlir_c_api_cc_library",
17 package(
18     default_visibility = ["//visibility:public"],
19     features = ["layering_check"],
20     licenses = ["notice"],
23 exports_files([
24     "LICENSE.TXT",
25     "include/mlir/Dialect/LLVMIR/LLVMOps.td",
26     "run_lit.sh",
29 filegroup(
30     name = "c_headers",
31     srcs = glob(["include/mlir-c/**/*"]),  # <== i.e. match the entire tree
34 filegroup(
35     name = "ConversionPassDetail",
36     srcs = [
37         "include/mlir/Conversion/GPUToROCDL/Runtimes.h",
38         "lib/Conversion/PassDetail.h",
39     ],
42 exports_files(glob(["include/**/*.td"]))
45     gentbl_cc_library(
46         name = name + "IncGen",
47         strip_include_prefix = "include",
48         tbl_outs = [
49             (
50                 ["-gen-op-interface-decls"],
51                 "include/mlir/IR/" + name + ".h.inc",
52             ),
53             (
54                 ["-gen-op-interface-defs"],
55                 "include/mlir/IR/" + name + ".cpp.inc",
56             ),
57         ],
58         tblgen = ":mlir-tblgen",
59         td_file = "include/mlir/IR/" + name + ".td",
60         deps = [":OpBaseTdFiles"],
61     )
62     for name in [
63         "OpAsmInterface",
64         "RegionKindInterface",
65         "SymbolInterfaces",
66     ]
69 gentbl_cc_library(
70     name = "TensorEncodingIncGen",
71     strip_include_prefix = "include",
72     tbl_outs = [
73         (
74             ["-gen-attr-interface-decls"],
75             "include/mlir/IR/TensorEncInterfaces.h.inc",
76         ),
77         (
78             ["-gen-attr-interface-defs"],
79             "include/mlir/IR/TensorEncInterfaces.cpp.inc",
80         ),
81     ],
82     tblgen = ":mlir-tblgen",
83     td_file = "include/mlir/IR/TensorEncoding.td",
84     deps = [":TensorOpsTdFiles"],
87 td_library(
88     name = "SubElementInterfacesTdFiles",
89     srcs = ["include/mlir/IR/SubElementInterfaces.td"],
90     includes = ["include"],
91     deps = [":OpBaseTdFiles"],
94 gentbl_cc_library(
95     name = "SubElementInterfacesIncGen",
96     strip_include_prefix = "include",
97     tbl_outs = [
98         (
99             ["-gen-attr-interface-decls"],
100             "include/mlir/IR/SubElementAttrInterfaces.h.inc",
101         ),
102         (
103             ["-gen-attr-interface-defs"],
104             "include/mlir/IR/SubElementAttrInterfaces.cpp.inc",
105         ),
106         (
107             ["-gen-type-interface-decls"],
108             "include/mlir/IR/SubElementTypeInterfaces.h.inc",
109         ),
110         (
111             ["-gen-type-interface-defs"],
112             "include/mlir/IR/SubElementTypeInterfaces.cpp.inc",
113         ),
114     ],
115     tblgen = ":mlir-tblgen",
116     td_file = "include/mlir/IR/SubElementInterfaces.td",
117     deps = [":SubElementInterfacesTdFiles"],
120 td_library(
121     name = "BuiltinDialectTdFiles",
122     srcs = [
123         "include/mlir/IR/BuiltinAttributeInterfaces.td",
124         "include/mlir/IR/BuiltinAttributes.td",
125         "include/mlir/IR/BuiltinDialect.td",
126         "include/mlir/IR/BuiltinLocationAttributes.td",
127         "include/mlir/IR/BuiltinOps.td",
128         "include/mlir/IR/BuiltinTypeInterfaces.td",
129         "include/mlir/IR/BuiltinTypes.td",
130     ],
131     includes = ["include"],
132     deps = [
133         ":CallInterfacesTdFiles",
134         ":CastInterfacesTdFiles",
135         ":DataLayoutInterfacesTdFiles",
136         ":OpBaseTdFiles",
137         ":SideEffectInterfacesTdFiles",
138         ":SubElementInterfacesTdFiles",
139     ],
142 gentbl_cc_library(
143     name = "BuiltinDialectIncGen",
144     strip_include_prefix = "include",
145     tbl_outs = [
146         (
147             ["-gen-dialect-decls"],
148             "include/mlir/IR/BuiltinDialect.h.inc",
149         ),
150         (
151             ["-gen-dialect-defs"],
152             "include/mlir/IR/BuiltinDialect.cpp.inc",
153         ),
154     ],
155     tblgen = ":mlir-tblgen",
156     td_file = "include/mlir/IR/BuiltinDialect.td",
157     deps = [":BuiltinDialectTdFiles"],
160 gentbl_cc_library(
161     name = "BuiltinAttributesIncGen",
162     strip_include_prefix = "include",
163     tbl_outs = [
164         (
165             ["--gen-attrdef-decls"],
166             "include/mlir/IR/BuiltinAttributes.h.inc",
167         ),
168         (
169             ["--gen-attrdef-defs"],
170             "include/mlir/IR/BuiltinAttributes.cpp.inc",
171         ),
172     ],
173     tblgen = ":mlir-tblgen",
174     td_file = "include/mlir/IR/BuiltinAttributes.td",
175     deps = [":BuiltinDialectTdFiles"],
178 gentbl_cc_library(
179     name = "BuiltinAttributeInterfacesIncGen",
180     strip_include_prefix = "include",
181     tbl_outs = [
182         (
183             ["--gen-attr-interface-decls"],
184             "include/mlir/IR/BuiltinAttributeInterfaces.h.inc",
185         ),
186         (
187             ["--gen-attr-interface-defs"],
188             "include/mlir/IR/BuiltinAttributeInterfaces.cpp.inc",
189         ),
190     ],
191     tblgen = ":mlir-tblgen",
192     td_file = "include/mlir/IR/BuiltinAttributeInterfaces.td",
193     deps = [":BuiltinDialectTdFiles"],
196 gentbl_cc_library(
197     name = "BuiltinLocationAttributesIncGen",
198     strip_include_prefix = "include",
199     tbl_outs = [
200         (
201             ["--gen-attrdef-decls"],
202             "include/mlir/IR/BuiltinLocationAttributes.h.inc",
203         ),
204         (
205             ["--gen-attrdef-defs"],
206             "include/mlir/IR/BuiltinLocationAttributes.cpp.inc",
207         ),
208     ],
209     tblgen = ":mlir-tblgen",
210     td_file = "include/mlir/IR/BuiltinLocationAttributes.td",
211     deps = [":BuiltinDialectTdFiles"],
214 gentbl_cc_library(
215     name = "BuiltinOpsIncGen",
216     strip_include_prefix = "include",
217     tbl_outs = [
218         (
219             ["-gen-op-decls"],
220             "include/mlir/IR/BuiltinOps.h.inc",
221         ),
222         (
223             ["-gen-op-defs"],
224             "include/mlir/IR/BuiltinOps.cpp.inc",
225         ),
226     ],
227     tblgen = ":mlir-tblgen",
228     td_file = "include/mlir/IR/BuiltinOps.td",
229     deps = [
230         ":BuiltinDialectTdFiles",
231         ":FunctionInterfacesTdFiles",
232     ],
235 gentbl_cc_library(
236     name = "BuiltinTypesIncGen",
237     strip_include_prefix = "include",
238     tbl_outs = [
239         (
240             ["--gen-typedef-decls"],
241             "include/mlir/IR/BuiltinTypes.h.inc",
242         ),
243         (
244             ["--gen-typedef-defs"],
245             "include/mlir/IR/BuiltinTypes.cpp.inc",
246         ),
247     ],
248     tblgen = ":mlir-tblgen",
249     td_file = "include/mlir/IR/BuiltinTypes.td",
250     deps = [":BuiltinDialectTdFiles"],
253 gentbl_cc_library(
254     name = "BuiltinTypeInterfacesIncGen",
255     strip_include_prefix = "include",
256     tbl_outs = [
257         (
258             ["--gen-type-interface-decls"],
259             "include/mlir/IR/BuiltinTypeInterfaces.h.inc",
260         ),
261         (
262             ["--gen-type-interface-defs"],
263             "include/mlir/IR/BuiltinTypeInterfaces.cpp.inc",
264         ),
265     ],
266     tblgen = ":mlir-tblgen",
267     td_file = "include/mlir/IR/BuiltinTypeInterfaces.td",
268     deps = [
269         ":BuiltinDialectTdFiles",
270     ],
273 td_library(
274     name = "FunctionInterfacesTdFiles",
275     srcs = ["include/mlir/IR/FunctionInterfaces.td"],
276     includes = ["include"],
277     deps = [":OpBaseTdFiles"],
280 gentbl_cc_library(
281     name = "FunctionInterfacesIncGen",
282     strip_include_prefix = "include",
283     tbl_outs = [
284         (
285             ["-gen-op-interface-decls"],
286             "include/mlir/IR/FunctionOpInterfaces.h.inc",
287         ),
288         (
289             ["-gen-op-interface-defs"],
290             "include/mlir/IR/FunctionOpInterfaces.cpp.inc",
291         ),
292     ],
293     tblgen = ":mlir-tblgen",
294     td_file = "include/mlir/IR/FunctionInterfaces.td",
295     deps = [
296         ":OpBaseTdFiles",
297     ],
300 cc_library(
301     name = "IR",
302     srcs = glob([
303         "lib/IR/*.cpp",
304         "lib/IR/*.h",
305     ]),
306     hdrs = glob([
307         "include/mlir/IR/*.h",
308     ]) + [
309         "include/mlir/Interfaces/CallInterfaces.h",
310         "include/mlir/Interfaces/CastInterfaces.h",
311         "include/mlir/Interfaces/SideEffectInterfaces.h",
312         "include/mlir/Interfaces/DataLayoutInterfaces.h",
313         "include/mlir/Interfaces/DecodeAttributesInterfaces.h",
314         "include/mlir/Interfaces/FoldInterfaces.h",
315     ],
316     includes = ["include"],
317     deps = [
318         ":BuiltinAttributeInterfacesIncGen",
319         ":BuiltinAttributesIncGen",
320         ":BuiltinDialectIncGen",
321         ":BuiltinLocationAttributesIncGen",
322         ":BuiltinOpsIncGen",
323         ":BuiltinTypeInterfacesIncGen",
324         ":BuiltinTypesIncGen",
325         ":CallOpInterfacesIncGen",
326         ":CastOpInterfacesIncGen",
327         ":DataLayoutInterfacesIncGen",
328         ":FunctionInterfacesIncGen",
329         ":InferTypeOpInterfaceIncGen",
330         ":OpAsmInterfaceIncGen",
331         ":RegionKindInterfaceIncGen",
332         ":SideEffectInterfacesIncGen",
333         ":SubElementInterfacesIncGen",
334         ":Support",
335         ":SymbolInterfacesIncGen",
336         ":TensorEncodingIncGen",
337         "//llvm:Support",
338     ],
341 cc_library(
342     name = "Pass",
343     srcs = glob([
344         "lib/Pass/*.cpp",
345         "lib/Pass/*.h",
346     ]),
347     hdrs = glob([
348         "include/mlir/Pass/*.h",
349     ]),
350     includes = ["include"],
351     deps = [
352         ":IR",
353         ":Support",
354         "//llvm:Support",
355     ],
358 mlir_c_api_cc_library(
359     name = "CAPIIR",
360     srcs = [
361         "lib/CAPI/Dialect/Standard.cpp",
362         "lib/CAPI/IR/AffineExpr.cpp",
363         "lib/CAPI/IR/AffineMap.cpp",
364         "lib/CAPI/IR/BuiltinAttributes.cpp",
365         "lib/CAPI/IR/BuiltinTypes.cpp",
366         "lib/CAPI/IR/Diagnostics.cpp",
367         "lib/CAPI/IR/DialectHandle.cpp",
368         "lib/CAPI/IR/IR.cpp",
369         "lib/CAPI/IR/IntegerSet.cpp",
370         "lib/CAPI/IR/Pass.cpp",
371         "lib/CAPI/IR/Support.cpp",
372     ],
373     hdrs = [
374         "include/mlir-c/AffineExpr.h",
375         "include/mlir-c/AffineMap.h",
376         "include/mlir-c/BuiltinAttributes.h",
377         "include/mlir-c/BuiltinTypes.h",
378         "include/mlir-c/Diagnostics.h",
379         "include/mlir-c/Dialect/Standard.h",
380         "include/mlir-c/ExecutionEngine.h",
381         "include/mlir-c/IR.h",
382         "include/mlir-c/IntegerSet.h",
383         "include/mlir-c/Interfaces.h",
384         "include/mlir-c/Pass.h",
385         "include/mlir-c/Registration.h",
386         "include/mlir-c/Support.h",
387         "include/mlir/CAPI/AffineExpr.h",
388         "include/mlir/CAPI/AffineMap.h",
389         "include/mlir/CAPI/Diagnostics.h",
390         "include/mlir/CAPI/IR.h",
391         "include/mlir/CAPI/IntegerSet.h",
392         "include/mlir/CAPI/Pass.h",
393         "include/mlir/CAPI/Registration.h",
394         "include/mlir/CAPI/Support.h",
395         "include/mlir/CAPI/Utils.h",
396         "include/mlir/CAPI/Wrap.h",
397     ],
398     header_deps = [
399         ":IR",
400         ":Pass",
401         ":Support",
402         "//llvm:Support",
403     ],
404     includes = ["include"],
405     deps = [
406         ":ConversionPassIncGen",
407         ":InferTypeOpInterface",
408         ":Parser",
409         ":StandardOps",
410     ],
413 mlir_c_api_cc_library(
414     name = "CAPIInterfaces",
415     srcs = [
416         "lib/CAPI/Interfaces/Interfaces.cpp",
417     ],
418     capi_deps = [
419         ":CAPIIR",
420     ],
421     includes = ["include"],
422     deps = [
423         ":IR",
424         ":InferTypeOpInterface",
425         "//llvm:Support",
426     ],
429 mlir_c_api_cc_library(
430     name = "CAPIAsync",
431     srcs = [
432         "lib/CAPI/Dialect/Async.cpp",
433         "lib/CAPI/Dialect/AsyncPasses.cpp",
434     ],
435     hdrs = ["include/mlir-c/Dialect/Async.h"],
436     capi_deps = [
437         ":CAPIIR",
438     ],
439     header_deps = [
440         ":AsyncPassIncGen",
441     ],
442     includes = ["include"],
443     deps = [
444         ":Async",
445         ":AsyncTransforms",
446         ":Pass",
447     ],
450 mlir_c_api_cc_library(
451     name = "CAPILinalg",
452     srcs = [
453         "lib/CAPI/Dialect/Linalg.cpp",
454         "lib/CAPI/Dialect/LinalgPasses.cpp",
455     ],
456     hdrs = [
457         "include/mlir-c/Dialect/Linalg.h",
458     ],
459     capi_deps = [
460         ":CAPIIR",
461     ],
462     header_deps = [
463         ":LinalgPassIncGen",
464     ],
465     includes = ["include"],
466     deps = [
467         ":LinalgOps",
468         ":LinalgTransforms",
469         ":Pass",
470     ],
473 mlir_c_api_cc_library(
474     name = "CAPILLVM",
475     srcs = [
476         "lib/CAPI/Dialect/LLVM.cpp",
477     ],
478     hdrs = [
479         "include/mlir-c/Dialect/LLVM.h",
480     ],
481     capi_deps = [
482         ":CAPIIR",
483     ],
484     includes = ["include"],
485     deps = [
486         ":LLVMDialect",
487     ],
490 mlir_c_api_cc_library(
491     name = "CAPIGPU",
492     srcs = [
493         "lib/CAPI/Dialect/GPU.cpp",
494         "lib/CAPI/Dialect/GPUPasses.cpp",
495     ],
496     hdrs = [
497         "include/mlir-c/Dialect/GPU.h",
498     ],
499     capi_deps = [
500         ":CAPIIR",
501     ],
502     header_deps = [
503         ":GPUPassIncGen",
504     ],
505     includes = ["include"],
506     deps = [
507         ":GPUDialect",
508         ":GPUTransforms",
509         ":Pass",
510     ],
513 mlir_c_api_cc_library(
514     name = "CAPISparseTensor",
515     srcs = [
516         "lib/CAPI/Dialect/SparseTensor.cpp",
517         "lib/CAPI/Dialect/SparseTensorPasses.cpp",
518     ],
519     hdrs = [
520         "include/mlir-c/Dialect/SparseTensor.h",
521     ],
522     capi_deps = [
523         ":CAPIIR",
524     ],
525     header_deps = [
526         ":SparseTensorPassIncGen",
527     ],
528     includes = ["include"],
529     deps = [
530         ":Pass",
531         ":SparseTensor",
532         ":SparseTensorTransforms",
533         ":Support",
534     ],
537 mlir_c_api_cc_library(
538     name = "CAPIQuant",
539     srcs = [
540         "lib/CAPI/Dialect/Quant.cpp",
541     ],
542     hdrs = [
543         "include/mlir-c/Dialect/Quant.h",
544     ],
545     capi_deps = [
546         ":CAPIIR",
547     ],
548     includes = ["include"],
549     deps = [
550         ":QuantOps",
551     ],
554 mlir_c_api_cc_library(
555     name = "CAPIPDL",
556     srcs = [
557         "lib/CAPI/Dialect/PDL.cpp",
558     ],
559     hdrs = [
560         "include/mlir-c/Dialect/PDL.h",
561     ],
562     header_deps = [
563         ":CAPIIRHeaders",
564     ],
565     includes = ["include"],
566     deps = [
567         ":CAPIIR",
568         ":PDLDialect",
569         ":PDLOpsIncGen",
570         ":PDLTypesIncGen",
571     ],
574 mlir_c_api_cc_library(
575     name = "CAPIConversion",
576     srcs = ["lib/CAPI/Conversion/Passes.cpp"],
577     hdrs = ["include/mlir-c/Conversion.h"],
578     capi_deps = [
579         ":CAPIIR",
580     ],
581     header_deps = [
582         ":ConversionPassIncGen",
583     ],
584     includes = ["include"],
585     deps = [
586         ":ConversionPasses",
587         ":Pass",
588     ],
591 mlir_c_api_cc_library(
592     name = "CAPIDebug",
593     srcs = ["lib/CAPI/Debug/Debug.cpp"],
594     hdrs = ["include/mlir-c/Debug.h"],
595     capi_deps = [
596         ":CAPIIR",
597     ],
598     includes = ["include"],
599     deps = [
600         ":Support",
601         "//llvm:Support",
602     ],
605 mlir_c_api_cc_library(
606     name = "CAPIExecutionEngine",
607     srcs = ["lib/CAPI/ExecutionEngine/ExecutionEngine.cpp"],
608     hdrs = [
609         "include/mlir-c/ExecutionEngine.h",
610         "include/mlir/CAPI/ExecutionEngine.h",
611     ],
612     capi_deps = [
613         ":CAPIIR",
614     ],
615     header_deps = [
616         ":ExecutionEngine",
617     ],
618     includes = ["include"],
619     deps = [
620         ":ExecutionEngineUtils",
621         ":LLVMToLLVMIRTranslation",
622         "//llvm:OrcJIT",
623         "//llvm:Support",
624     ],
627 mlir_c_api_cc_library(
628     name = "CAPITransforms",
629     srcs = ["lib/CAPI/Transforms/Passes.cpp"],
630     hdrs = ["include/mlir-c/Transforms.h"],
631     capi_deps = [
632         ":CAPIIR",
633     ],
634     header_deps = [
635         ":TransformsPassIncGen",
636     ],
637     includes = ["include"],
638     deps = [
639         ":Pass",
640         ":Transforms",
641     ],
644 mlir_c_api_cc_library(
645     name = "CAPIRegistration",
646     srcs = ["lib/CAPI/Registration/Registration.cpp"],
647     hdrs = ["include/mlir-c/Registration.h"],
648     capi_deps = [
649         ":CAPIIR",
650     ],
651     includes = ["include"],
652     deps = [
653         ":AllPassesAndDialects",
654         ":LLVMToLLVMIRTranslation",
655     ],
658 ##---------------------------------------------------------------------------##
659 # Sources of Python bindings.
660 #----------------------------------------------------------------------------##
662 exports_files(
663     glob(["lib/Bindings/Python/**/*.cpp"]),
666 MLIR_BINDINGS_PYTHON_HEADERS = [
667     "lib/Bindings/Python/*.h",
668     "include/mlir-c/Bindings/Python/*.h",
669     "include/mlir/Bindings/Python/*.h",
672 cc_library(
673     name = "MLIRBindingsPythonHeaders",
674     includes = [
675         "include",
676         "lib/Bindings/Python",
677     ],
678     tags = [
679         "manual",  # External dependency
680         "nobuildkite",  # TODO(gcmn): Add support for this target
681     ],
682     textual_hdrs = glob(MLIR_BINDINGS_PYTHON_HEADERS),
683     deps = [
684         ":CAPIIRHeaders",
685         "@pybind11",
686         "@python_runtime//:headers",
687     ],
690 cc_library(
691     name = "MLIRBindingsPythonHeadersAndDeps",
692     includes = [
693         "include",
694         "lib/Bindings/Python",
695     ],
696     tags = [
697         "manual",  # External dependency
698         "nobuildkite",  # TODO(gcmn): Add support for this target
699     ],
700     textual_hdrs = glob(MLIR_BINDINGS_PYTHON_HEADERS),
701     deps = [
702         ":CAPIIR",
703         "@pybind11",
704         "@python_runtime//:headers",
705     ],
708 # These flags are needed for pybind11 to work.
709 PYBIND11_COPTS = [
710     "-fexceptions",
711     "-frtti",
714 PYBIND11_FEATURES = [
715     # Cannot use header_modules (parse_headers feature fails).
716     "-use_header_modules",
719 MLIR_PYTHON_BINDINGS_SOURCES = [
720     "lib/Bindings/Python/IRAffine.cpp",
721     "lib/Bindings/Python/IRAttributes.cpp",
722     "lib/Bindings/Python/IRCore.cpp",
723     "lib/Bindings/Python/IRInterfaces.cpp",
724     "lib/Bindings/Python/IRModule.cpp",
725     "lib/Bindings/Python/IRTypes.cpp",
726     "lib/Bindings/Python/Pass.cpp",
727     "lib/Bindings/Python/PybindUtils.cpp",
730 cc_library(
731     name = "MLIRBindingsPythonCore",
732     srcs = MLIR_PYTHON_BINDINGS_SOURCES,
733     copts = PYBIND11_COPTS,
734     features = PYBIND11_FEATURES,
735     tags = [
736         "manual",  # External dependency
737         "nobuildkite",  # TODO(gcmn): Add support for this target
738     ],
739     deps = [
740         ":CAPIAsync",
741         ":CAPIDebug",
742         ":CAPIGPU",
743         ":CAPIIR",
744         ":CAPIInterfaces",
745         ":CAPIRegistration",
746         ":MLIRBindingsPythonHeadersAndDeps",
747         "//llvm:Support",
748         "@pybind11",
749         "@python_runtime//:headers",
750     ],
753 cc_library(
754     name = "MLIRBindingsPythonCoreNoCAPI",
755     srcs = MLIR_PYTHON_BINDINGS_SOURCES,
756     copts = PYBIND11_COPTS,
757     features = PYBIND11_FEATURES,
758     tags = [
759         "manual",  # External dependency
760         "nobuildkite",  # TODO(gcmn): Add support for this target
761     ],
762     deps = [
763         ":CAPIAsyncHeaders",
764         ":CAPIDebugHeaders",
765         ":CAPIGPUHeaders",
766         ":CAPIIRHeaders",
767         ":CAPIRegistrationHeaders",
768         ":MLIRBindingsPythonHeaders",
769         "//llvm:Support",
770         "@pybind11",
771         "@python_runtime//:headers",
772     ],
775 # Target that bundles together the CAPI objects needed for
776 # MLIRBindingsPythonCoreNoCAPI.
777 cc_library(
778     name = "MLIRBindingsPythonCAPIObjects",
779     tags = [
780         "manual",  # External dependency
781         "nobuildkite",  # TODO(gcmn): Add support for this target
782     ],
783     deps = [
784         ":CAPIAsyncObjects",
785         ":CAPIDebugObjects",
786         ":CAPIGPUObjects",
787         ":CAPIIRObjects",
788         ":CAPIInterfacesObjects",
789         ":CAPIRegistrationObjects",
790     ],
793 # Dynamic library with the MLIR Python extension.
794 cc_binary(
795     name = "_mlir.so",
796     srcs = ["lib/Bindings/Python/MainModule.cpp"],
797     # These flags are needed for pybind11 to work.
798     copts = PYBIND11_COPTS,
799     features = PYBIND11_FEATURES,
800     linkshared = 1,
801     linkstatic = 0,
802     tags = [
803         "manual",  # External dependency
804         "nobuildkite",  # TODO(gcmn): Add support for this target
805     ],
806     deps = [
807         ":MLIRBindingsPythonCore",
808         ":MLIRBindingsPythonHeadersAndDeps",
809     ],
812 cc_binary(
813     name = "_mlirDialectsLinalg.so",
814     srcs = ["lib/Bindings/Python/DialectLinalg.cpp"],
815     copts = PYBIND11_COPTS,
816     features = PYBIND11_FEATURES,
817     linkshared = 1,
818     linkstatic = 0,
819     tags = [
820         "manual",  # External dependency
821         "nobuildkite",  # TODO(gcmn): Add support for this target
822     ],
823     deps = [
824         ":CAPIIR",
825         ":CAPILinalg",
826         ":CAPIRegistration",
827         ":MLIRBindingsPythonHeadersAndDeps",
828     ],
831 cc_binary(
832     name = "_mlirDialectsQuant.so",
833     srcs = ["lib/Bindings/Python/DialectQuant.cpp"],
834     copts = PYBIND11_COPTS,
835     features = PYBIND11_FEATURES,
836     linkshared = 1,
837     linkstatic = 0,
838     tags = [
839         "manual",  # External dependency
840         "nobuildkite",  # TODO(gcmn): Add support for this target
841     ],
842     deps = [
843         ":CAPIIR",
844         ":CAPIQuant",
845         ":CAPIRegistration",
846         ":MLIRBindingsPythonHeadersAndDeps",
847     ],
850 cc_binary(
851     name = "_mlirDialectsSparseTensor.so",
852     srcs = ["lib/Bindings/Python/DialectSparseTensor.cpp"],
853     copts = PYBIND11_COPTS,
854     features = PYBIND11_FEATURES,
855     linkshared = 1,
856     linkstatic = 0,
857     tags = [
858         "manual",  # External dependency
859         "nobuildkite",  # TODO(gcmn): Add support for this target
860     ],
861     deps = [
862         ":CAPIIR",
863         ":CAPIRegistration",
864         ":CAPISparseTensor",
865         ":MLIRBindingsPythonHeadersAndDeps",
866     ],
869 # Dynamic library with the MLIR Conversions Python extension.
870 cc_binary(
871     name = "_mlirConversions.so",
872     srcs = ["lib/Bindings/Python/Conversions/Conversions.cpp"],
873     copts = PYBIND11_COPTS,
874     features = PYBIND11_FEATURES,
875     linkshared = 1,
876     linkstatic = 0,
877     tags = [
878         "manual",  # External dependency
879         "nobuildkite",  # TODO(gcmn): Add support for this target
880     ],
881     deps = [
882         ":CAPIConversion",
883         ":MLIRBindingsPythonHeadersAndDeps",
884         "@pybind11",
885         "@python_runtime//:headers",
886     ],
889 # Dynamic library with the MLIR Conversions Python extension.
890 cc_binary(
891     name = "_mlirExecutionEngine.so",
892     srcs = ["lib/Bindings/Python/ExecutionEngineModule.cpp"],
893     copts = PYBIND11_COPTS,
894     features = PYBIND11_FEATURES,
895     linkshared = 1,
896     linkstatic = 0,
897     tags = [
898         "manual",  # External dependency
899         "nobuildkite",  # TODO(gcmn): Add support for this target
900     ],
901     deps = [
902         ":CAPIExecutionEngine",
903         ":MLIRBindingsPythonHeadersAndDeps",
904         "@pybind11",
905         "@python_runtime//:headers",
906     ],
909 # Dynamic library with the MLIR Transforms Python extension.
910 cc_binary(
911     name = "_mlirTransforms.so",
912     srcs = ["lib/Bindings/Python/Transforms/Transforms.cpp"],
913     copts = PYBIND11_COPTS,
914     features = PYBIND11_FEATURES,
915     linkshared = 1,
916     linkstatic = 0,
917     tags = [
918         "manual",  # External dependency
919         "nobuildkite",  # TODO(gcmn): Add support for this target
920     ],
921     deps = [
922         ":CAPITransforms",
923         ":MLIRBindingsPythonHeadersAndDeps",
924         "@pybind11",
925         "@python_runtime//:headers",
926     ],
929 # Dynamic library with the MLIR Linalg dialect+passes Python extension.
930 cc_binary(
931     name = "_mlirLinalgPasses.so",
932     srcs = ["lib/Bindings/Python/LinalgPasses.cpp"],
933     copts = PYBIND11_COPTS,
934     features = PYBIND11_FEATURES,
935     linkshared = 1,
936     linkstatic = 0,
937     tags = [
938         "manual",  # External dependency
939         "nobuildkite",  # TODO(gcmn): Add support for this target
940     ],
941     deps = [
942         ":CAPILinalg",
943         ":MLIRBindingsPythonHeadersAndDeps",
944         "@pybind11",
945         "@python_runtime//:headers",
946     ],
949 ##---------------------------------------------------------------------------##
951 td_library(
952     name = "OpBaseTdFiles",
953     srcs = [
954         "include/mlir/IR/EnumAttr.td",
955         "include/mlir/IR/OpAsmInterface.td",
956         "include/mlir/IR/OpBase.td",
957         "include/mlir/IR/RegionKindInterface.td",
958         "include/mlir/IR/SymbolInterfaces.td",
959         "include/mlir/IR/TensorEncoding.td",
960     ],
961     includes = ["include"],
964 td_library(
965     name = "CallInterfacesTdFiles",
966     srcs = ["include/mlir/Interfaces/CallInterfaces.td"],
967     includes = ["include"],
968     deps = [":OpBaseTdFiles"],
971 td_library(
972     name = "CastInterfacesTdFiles",
973     srcs = ["include/mlir/Interfaces/CastInterfaces.td"],
974     includes = ["include"],
975     deps = [":OpBaseTdFiles"],
978 td_library(
979     name = "ControlFlowInterfacesTdFiles",
980     srcs = ["include/mlir/Interfaces/ControlFlowInterfaces.td"],
981     includes = ["include"],
982     deps = [":OpBaseTdFiles"],
985 td_library(
986     name = "CopyOpInterfaceTdFiles",
987     srcs = ["include/mlir/Interfaces/CopyOpInterface.td"],
988     includes = ["include"],
989     deps = [":OpBaseTdFiles"],
992 td_library(
993     name = "DerivedAttributeOpInterfaceTdFiles",
994     srcs = ["include/mlir/Interfaces/DerivedAttributeOpInterface.td"],
995     includes = ["include"],
996     deps = [":OpBaseTdFiles"],
999 td_library(
1000     name = "InferTypeOpInterfaceTdFiles",
1001     srcs = ["include/mlir/Interfaces/InferTypeOpInterface.td"],
1002     includes = ["include"],
1003     deps = [":OpBaseTdFiles"],
1006 td_library(
1007     name = "LoopLikeInterfaceTdFiles",
1008     srcs = ["include/mlir/Interfaces/LoopLikeInterface.td"],
1009     includes = ["include"],
1010     deps = [":OpBaseTdFiles"],
1013 td_library(
1014     name = "SideEffectInterfacesTdFiles",
1015     srcs = [
1016         "include/mlir/Interfaces/SideEffectInterfaceBase.td",
1017         "include/mlir/Interfaces/SideEffectInterfaces.td",
1018     ],
1019     includes = ["include"],
1020     deps = [":OpBaseTdFiles"],
1023 alias(
1024     name = "SideEffectTdFiles",
1025     actual = ":SideEffectInterfacesTdFiles",
1028 td_library(
1029     name = "TilingInterfaceTdFiles",
1030     srcs = ["include/mlir/Interfaces/TilingInterface.td"],
1031     includes = ["include"],
1032     deps = [":OpBaseTdFiles"],
1035 td_library(
1036     name = "VectorInterfacesTdFiles",
1037     srcs = ["include/mlir/Interfaces/VectorInterfaces.td"],
1038     includes = ["include"],
1039     deps = [":OpBaseTdFiles"],
1042 td_library(
1043     name = "ViewLikeInterfaceTdFiles",
1044     srcs = ["include/mlir/Interfaces/ViewLikeInterface.td"],
1045     includes = ["include"],
1046     deps = [":OpBaseTdFiles"],
1049 td_library(
1050     name = "ReducerTdFiles",
1051     srcs = ["include/mlir/Reducer/Passes.td"],
1052     includes = ["include"],
1053     deps = [":OpBaseTdFiles"],
1056 ##---------------------------------------------------------------------------##
1057 # Affine dialect.
1058 ##---------------------------------------------------------------------------##
1060 td_library(
1061     name = "PassBaseTdFiles",
1062     srcs = ["include/mlir/Pass/PassBase.td"],
1063     includes = ["include"],
1066 td_library(
1067     name = "RewritePassBaseTdFiles",
1068     srcs = ["include/mlir/Rewrite/PassUtil.td"],
1069     includes = ["include"],
1072 td_library(
1073     name = "AffineOpsTdFiles",
1074     srcs = [
1075         "include/mlir/Dialect/Affine/IR/AffineMemoryOpInterfaces.td",
1076         "include/mlir/Dialect/Affine/IR/AffineOps.td",
1077     ],
1078     includes = ["include"],
1079     deps = [
1080         ":ArithmeticOpsTdFiles",
1081         ":LoopLikeInterfaceTdFiles",
1082         ":OpBaseTdFiles",
1083         ":SideEffectInterfacesTdFiles",
1084         ":StdOpsTdFiles",
1085     ],
1088 gentbl_cc_library(
1089     name = "AffineOpsIncGen",
1090     strip_include_prefix = "include",
1091     tbl_outs = [
1092         (
1093             ["-gen-op-decls"],
1094             "include/mlir/Dialect/Affine/IR/AffineOps.h.inc",
1095         ),
1096         (
1097             ["-gen-op-defs"],
1098             "include/mlir/Dialect/Affine/IR/AffineOps.cpp.inc",
1099         ),
1100         (
1101             [
1102                 "-gen-dialect-decls",
1103                 "-dialect=affine",
1104             ],
1105             "include/mlir/Dialect/Affine/IR/AffineOpsDialect.h.inc",
1106         ),
1107         (
1108             [
1109                 "-gen-dialect-defs",
1110                 "-dialect=affine",
1111             ],
1112             "include/mlir/Dialect/Affine/IR/AffineOpsDialect.cpp.inc",
1113         ),
1114     ],
1115     tblgen = ":mlir-tblgen",
1116     td_file = "include/mlir/Dialect/Affine/IR/AffineOps.td",
1117     deps = [":AffineOpsTdFiles"],
1120 gentbl_cc_library(
1121     name = "AffineMemoryOpInterfacesIncGen",
1122     strip_include_prefix = "include",
1123     tbl_outs = [
1124         (
1125             ["-gen-op-interface-decls"],
1126             "include/mlir/Dialect/Affine/IR/AffineMemoryOpInterfaces.h.inc",
1127         ),
1128         (
1129             ["-gen-op-interface-defs"],
1130             "include/mlir/Dialect/Affine/IR/AffineMemoryOpInterfaces.cpp.inc",
1131         ),
1132     ],
1133     tblgen = ":mlir-tblgen",
1134     td_file = "include/mlir/Dialect/Affine/IR/AffineMemoryOpInterfaces.td",
1135     deps = [":AffineOpsTdFiles"],
1138 ##---------------------------------------------------------------------------##
1139 # EmitC dialect.
1140 ##---------------------------------------------------------------------------##
1142 td_library(
1143     name = "EmitCTdFiles",
1144     srcs = [
1145         "include/mlir/Dialect/EmitC/IR/EmitC.td",
1146         "include/mlir/Dialect/EmitC/IR/EmitCAttributes.td",
1147         "include/mlir/Dialect/EmitC/IR/EmitCBase.td",
1148         "include/mlir/Dialect/EmitC/IR/EmitCTypes.td",
1149     ],
1150     includes = ["include"],
1151     deps = [
1152         ":OpBaseTdFiles",
1153         ":SideEffectInterfacesTdFiles",
1154     ],
1157 gentbl_cc_library(
1158     name = "EmitCAttributesIncGen",
1159     strip_include_prefix = "include",
1160     tbl_outs = [
1161         (
1162             ["--gen-attrdef-decls"],
1163             "include/mlir/Dialect/EmitC/IR/EmitCAttributes.h.inc",
1164         ),
1165         (
1166             ["--gen-attrdef-defs"],
1167             "include/mlir/Dialect/EmitC/IR/EmitCAttributes.cpp.inc",
1168         ),
1169     ],
1170     tblgen = ":mlir-tblgen",
1171     td_file = "include/mlir/Dialect/EmitC/IR/EmitCAttributes.td",
1172     deps = [":EmitCTdFiles"],
1175 gentbl_cc_library(
1176     name = "EmitCOpsIncGen",
1177     strip_include_prefix = "include",
1178     tbl_outs = [
1179         (
1180             ["-gen-dialect-decls"],
1181             "include/mlir/Dialect/EmitC/IR/EmitCDialect.h.inc",
1182         ),
1183         (
1184             ["-gen-dialect-defs"],
1185             "include/mlir/Dialect/EmitC/IR/EmitCDialect.cpp.inc",
1186         ),
1187         (
1188             ["-gen-op-decls"],
1189             "include/mlir/Dialect/EmitC/IR/EmitC.h.inc",
1190         ),
1191         (
1192             ["-gen-op-defs"],
1193             "include/mlir/Dialect/EmitC/IR/EmitC.cpp.inc",
1194         ),
1195         (
1196             ["-gen-typedef-decls"],
1197             "include/mlir/Dialect/EmitC/IR/EmitCTypes.h.inc",
1198         ),
1199         (
1200             ["-gen-typedef-defs"],
1201             "include/mlir/Dialect/EmitC/IR/EmitCTypes.cpp.inc",
1202         ),
1203     ],
1204     tblgen = ":mlir-tblgen",
1205     td_file = "include/mlir/Dialect/EmitC/IR/EmitC.td",
1206     deps = [":EmitCTdFiles"],
1209 cc_library(
1210     name = "TargetCpp",
1211     srcs = glob([
1212         "lib/Target/Cpp/*.cpp",
1213         "lib/Target/Cpp/*.h",
1214     ]),
1215     hdrs = glob(["include/mlir/Target/Cpp/*.h"]),
1216     deps = [
1217         ":ArithmeticDialect",
1218         ":EmitC",
1219         ":IR",
1220         ":MathDialect",
1221         ":SCFDialect",
1222         ":StandardOps",
1223         ":Support",
1224         ":Translation",
1225         "//llvm:Support",
1226     ],
1229 ##---------------------------------------------------------------------------##
1230 # Async dialect.
1231 ##---------------------------------------------------------------------------##
1233 td_library(
1234     name = "AsyncOpsTdFiles",
1235     srcs = [
1236         "include/mlir/Dialect/Async/IR/AsyncDialect.td",
1237         "include/mlir/Dialect/Async/IR/AsyncOps.td",
1238         "include/mlir/Dialect/Async/IR/AsyncTypes.td",
1239     ],
1240     includes = ["include"],
1241     deps = [
1242         ":ControlFlowInterfacesTdFiles",
1243         ":OpBaseTdFiles",
1244         ":SideEffectInterfacesTdFiles",
1245     ],
1248 gentbl_cc_library(
1249     name = "AsyncOpsIncGen",
1250     strip_include_prefix = "include",
1251     tbl_outs = [
1252         (
1253             ["-gen-op-decls"],
1254             "include/mlir/Dialect/Async/IR/AsyncOps.h.inc",
1255         ),
1256         (
1257             ["-gen-op-defs"],
1258             "include/mlir/Dialect/Async/IR/AsyncOps.cpp.inc",
1259         ),
1260         (
1261             ["-gen-dialect-decls"],
1262             "include/mlir/Dialect/Async/IR/AsyncOpsDialect.h.inc",
1263         ),
1264         (
1265             ["-gen-dialect-defs"],
1266             "include/mlir/Dialect/Async/IR/AsyncOpsDialect.cpp.inc",
1267         ),
1268         (
1269             ["-gen-typedef-decls"],
1270             "include/mlir/Dialect/Async/IR/AsyncOpsTypes.h.inc",
1271         ),
1272         (
1273             ["-gen-typedef-defs"],
1274             "include/mlir/Dialect/Async/IR/AsyncOpsTypes.cpp.inc",
1275         ),
1276     ],
1277     tblgen = ":mlir-tblgen",
1278     td_file = "include/mlir/Dialect/Async/IR/AsyncOps.td",
1279     deps = [":AsyncOpsTdFiles"],
1282 gentbl_cc_library(
1283     name = "AsyncPassIncGen",
1284     strip_include_prefix = "include",
1285     tbl_outs = [
1286         (
1287             [
1288                 "-gen-pass-decls",
1289                 "-name=Async",
1290             ],
1291             "include/mlir/Dialect/Async/Passes.h.inc",
1292         ),
1293         (
1294             [
1295                 "-gen-pass-capi-header",
1296                 "--prefix=Async",
1297             ],
1298             "include/mlir/Dialect/Async/Passes.capi.h.inc",
1299         ),
1300         (
1301             [
1302                 "-gen-pass-capi-impl",
1303                 "--prefix=Async",
1304             ],
1305             "include/mlir/Dialect/Async/Passes.capi.cpp.inc",
1306         ),
1307     ],
1308     tblgen = ":mlir-tblgen",
1309     td_file = "include/mlir/Dialect/Async/Passes.td",
1310     deps = [":PassBaseTdFiles"],
1313 ##---------------------------------------------------------------------------##
1314 # ArmNeon dialect.
1315 ##---------------------------------------------------------------------------##
1317 td_library(
1318     name = "ArmNeonTdFiles",
1319     srcs = ["include/mlir/Dialect/ArmNeon/ArmNeon.td"],
1320     includes = ["include"],
1321     deps = [
1322         ":LLVMOpsTdFiles",
1323         ":OpBaseTdFiles",
1324         ":SideEffectInterfacesTdFiles",
1325     ],
1328 gentbl_cc_library(
1329     name = "ArmNeonIncGen",
1330     strip_include_prefix = "include",
1331     tbl_outs = [
1332         (
1333             [
1334                 "-gen-dialect-decls",
1335                 "-dialect=arm_neon",
1336             ],
1337             "include/mlir/Dialect/ArmNeon/ArmNeonDialect.h.inc",
1338         ),
1339         (
1340             [
1341                 "-gen-dialect-defs",
1342                 "-dialect=arm_neon",
1343             ],
1344             "include/mlir/Dialect/ArmNeon/ArmNeonDialect.cpp.inc",
1345         ),
1346         (
1347             ["-gen-op-decls"],
1348             "include/mlir/Dialect/ArmNeon/ArmNeon.h.inc",
1349         ),
1350         (
1351             ["-gen-op-defs"],
1352             "include/mlir/Dialect/ArmNeon/ArmNeon.cpp.inc",
1353         ),
1354         (
1355             ["-gen-op-doc"],
1356             "g3doc/Dialects/ArmNeon/ArmNeon.md",
1357         ),
1358     ],
1359     tblgen = ":mlir-tblgen",
1360     td_file = "include/mlir/Dialect/ArmNeon/ArmNeon.td",
1361     deps = [":ArmNeonTdFiles"],
1364 cc_library(
1365     name = "ArmNeon",
1366     srcs = ["lib/Dialect/ArmNeon/IR/ArmNeonDialect.cpp"],
1367     hdrs = ["include/mlir/Dialect/ArmNeon/ArmNeonDialect.h"],
1368     includes = ["include"],
1369     deps = [
1370         ":ArmNeonIncGen",
1371         ":IR",
1372         ":SideEffectInterfaces",
1373         ":VectorOps",
1374         "//llvm:Core",
1375         "//llvm:Support",
1376     ],
1379 gentbl_cc_library(
1380     name = "ArmNeonConversionIncGen",
1381     strip_include_prefix = "include",
1382     tbl_outs = [
1383         (
1384             ["-gen-llvmir-conversions"],
1385             "include/mlir/Dialect/ArmNeon/ArmNeonConversions.inc",
1386         ),
1387     ],
1388     tblgen = ":mlir-tblgen",
1389     td_file = "include/mlir/Dialect/ArmNeon/ArmNeon.td",
1390     deps = [":ArmNeonTdFiles"],
1393 cc_library(
1394     name = "ArmNeon2dToIntr",
1395     srcs = glob([
1396         "lib/Conversion/ArmNeon2dToIntr/*.cpp",
1397         "lib/Conversion/ArmNeon2dToIntr/*.h",
1398     ]) + [":ConversionPassDetail"],
1399     hdrs = glob([
1400         "include/mlir/Conversion/ArmNeon2dToIntr/*.h",
1401     ]),
1402     includes = ["include"],
1403     deps = [
1404         ":ArmNeon",
1405         ":ConversionPassIncGen",
1406         ":IR",
1407         ":MemRefDialect",
1408         ":OpenACCDialect",
1409         ":Pass",
1410         ":SCFDialect",
1411         ":StandardOps",
1412         ":Support",
1413         ":Transforms",
1414         ":VectorOps",
1415     ],
1418 ##---------------------------------------------------------------------------##
1419 # ArmSVE dialect.
1420 ##---------------------------------------------------------------------------##
1422 td_library(
1423     name = "ArmSVETdFiles",
1424     srcs = [
1425         "include/mlir/Dialect/ArmSVE/ArmSVE.td",
1426     ],
1427     includes = ["include"],
1428     deps = [
1429         ":ArithmeticOpsTdFiles",
1430         ":LLVMOpsTdFiles",
1431         ":OpBaseTdFiles",
1432         ":SideEffectInterfacesTdFiles",
1433         ":StdOpsTdFiles",
1434     ],
1437 gentbl_cc_library(
1438     name = "ArmSVEIncGen",
1439     strip_include_prefix = "include",
1440     tbl_outs = [
1441         (
1442             ["-gen-op-decls"],
1443             "include/mlir/Dialect/ArmSVE/ArmSVE.h.inc",
1444         ),
1445         (
1446             ["-gen-op-defs"],
1447             "include/mlir/Dialect/ArmSVE/ArmSVE.cpp.inc",
1448         ),
1449         (
1450             ["-gen-typedef-decls"],
1451             "include/mlir/Dialect/ArmSVE/ArmSVETypes.h.inc",
1452         ),
1453         (
1454             ["-gen-typedef-defs"],
1455             "include/mlir/Dialect/ArmSVE/ArmSVETypes.cpp.inc",
1456         ),
1457         (
1458             [
1459                 "-gen-dialect-decls",
1460                 "-dialect=arm_sve",
1461             ],
1462             "include/mlir/Dialect/ArmSVE/ArmSVEDialect.h.inc",
1463         ),
1464         (
1465             [
1466                 "-gen-dialect-defs",
1467                 "-dialect=arm_sve",
1468             ],
1469             "include/mlir/Dialect/ArmSVE/ArmSVEDialect.cpp.inc",
1470         ),
1471     ],
1472     tblgen = ":mlir-tblgen",
1473     td_file = "include/mlir/Dialect/ArmSVE/ArmSVE.td",
1474     deps = [":ArmSVETdFiles"],
1477 cc_library(
1478     name = "ArmSVE",
1479     srcs = ["lib/Dialect/ArmSVE/IR/ArmSVEDialect.cpp"],
1480     hdrs = ["include/mlir/Dialect/ArmSVE/ArmSVEDialect.h"],
1481     includes = ["include"],
1482     deps = [
1483         ":ArmSVEIncGen",
1484         ":IR",
1485         ":LLVMDialect",
1486         ":SideEffectInterfaces",
1487         ":StandardOps",
1488         ":VectorOps",
1489         "//llvm:Core",
1490         "//llvm:Support",
1491     ],
1494 cc_library(
1495     name = "ArmSVETransforms",
1496     srcs = glob(["lib/Dialect/ArmSVE/Transforms/*.cpp"]),
1497     hdrs = ["include/mlir/Dialect/ArmSVE/Transforms.h"],
1498     includes = ["include"],
1499     deps = [
1500         ":ArmSVE",
1501         ":IR",
1502         ":LLVMCommonConversion",
1503         ":LLVMDialect",
1504         ":Pass",
1505         ":StandardOps",
1506         ":TransformUtils",
1507         "//llvm:Core",
1508         "//llvm:Support",
1509     ],
1512 gentbl_cc_library(
1513     name = "ArmSVEConversionIncGen",
1514     strip_include_prefix = "include",
1515     tbl_outs = [
1516         (
1517             ["-gen-llvmir-conversions"],
1518             "include/mlir/Dialect/ArmSVE/ArmSVEConversions.inc",
1519         ),
1520     ],
1521     tblgen = ":mlir-tblgen",
1522     td_file = "include/mlir/Dialect/ArmSVE/ArmSVE.td",
1523     deps = [":ArmSVETdFiles"],
1526 ##---------------------------------------------------------------------------##
1527 # AMX dialect.
1528 ##---------------------------------------------------------------------------##
1530 td_library(
1531     name = "AMXTdFiles",
1532     srcs = ["include/mlir/Dialect/AMX/AMX.td"],
1533     includes = ["include"],
1534     deps = [
1535         ":LLVMOpsTdFiles",
1536         ":SideEffectInterfacesTdFiles",
1537     ],
1540 gentbl_cc_library(
1541     name = "AMXIncGen",
1542     strip_include_prefix = "include",
1543     tbl_outs = [
1544         (
1545             [
1546                 "-gen-dialect-decls",
1547                 "-dialect=amx",
1548             ],
1549             "include/mlir/Dialect/AMX/AMXDialect.h.inc",
1550         ),
1551         (
1552             [
1553                 "-gen-dialect-defs",
1554                 "-dialect=amx",
1555             ],
1556             "include/mlir/Dialect/AMX/AMXDialect.cpp.inc",
1557         ),
1558         (
1559             ["-gen-op-decls"],
1560             "include/mlir/Dialect/AMX/AMX.h.inc",
1561         ),
1562         (
1563             ["-gen-op-defs"],
1564             "include/mlir/Dialect/AMX/AMX.cpp.inc",
1565         ),
1566         (
1567             ["-gen-op-doc"],
1568             "g3doc/Dialects/AMX/AMX.md",
1569         ),
1570     ],
1571     tblgen = ":mlir-tblgen",
1572     td_file = "include/mlir/Dialect/AMX/AMX.td",
1573     deps = [":AMXTdFiles"],
1576 cc_library(
1577     name = "AMX",
1578     srcs = ["lib/Dialect/AMX/IR/AMXDialect.cpp"],
1579     hdrs = ["include/mlir/Dialect/AMX/AMXDialect.h"],
1580     includes = ["include"],
1581     deps = [
1582         ":AMXIncGen",
1583         ":IR",
1584         ":LLVMDialect",
1585         ":SideEffectInterfaces",
1586         "//llvm:Core",
1587         "//llvm:Support",
1588     ],
1591 cc_library(
1592     name = "AMXTransforms",
1593     srcs = glob(["lib/Dialect/AMX/Transforms/*.cpp"]),
1594     hdrs = ["include/mlir/Dialect/AMX/Transforms.h"],
1595     includes = ["include"],
1596     deps = [
1597         ":AMX",
1598         ":IR",
1599         ":LLVMCommonConversion",
1600         ":LLVMDialect",
1601         ":StandardOps",
1602         "//llvm:Core",
1603         "//llvm:Support",
1604     ],
1607 gentbl_cc_library(
1608     name = "AMXConversionIncGen",
1609     strip_include_prefix = "include",
1610     tbl_outs = [
1611         (
1612             ["-gen-llvmir-conversions"],
1613             "include/mlir/Dialect/AMX/AMXConversions.inc",
1614         ),
1615     ],
1616     tblgen = ":mlir-tblgen",
1617     td_file = "include/mlir/Dialect/AMX/AMX.td",
1618     deps = [":AMXTdFiles"],
1621 ##---------------------------------------------------------------------------##
1622 # X86Vector dialect.
1623 ##---------------------------------------------------------------------------##
1625 td_library(
1626     name = "X86VectorTdFiles",
1627     srcs = ["include/mlir/Dialect/X86Vector/X86Vector.td"],
1628     includes = ["include"],
1629     deps = [
1630         ":InferTypeOpInterfaceTdFiles",
1631         ":LLVMOpsTdFiles",
1632         ":SideEffectInterfacesTdFiles",
1633     ],
1636 gentbl_cc_library(
1637     name = "X86VectorIncGen",
1638     strip_include_prefix = "include",
1639     tbl_outs = [
1640         (
1641             [
1642                 "-gen-dialect-decls",
1643                 "-dialect=x86vector",
1644             ],
1645             "include/mlir/Dialect/X86Vector/X86VectorDialect.h.inc",
1646         ),
1647         (
1648             [
1649                 "-gen-dialect-defs",
1650                 "-dialect=x86vector",
1651             ],
1652             "include/mlir/Dialect/X86Vector/X86VectorDialect.cpp.inc",
1653         ),
1654         (
1655             ["-gen-op-decls"],
1656             "include/mlir/Dialect/X86Vector/X86Vector.h.inc",
1657         ),
1658         (
1659             ["-gen-op-defs"],
1660             "include/mlir/Dialect/X86Vector/X86Vector.cpp.inc",
1661         ),
1662         (
1663             ["-gen-op-doc"],
1664             "g3doc/Dialects/X86Vector/X86Vector.md",
1665         ),
1666     ],
1667     tblgen = ":mlir-tblgen",
1668     td_file = "include/mlir/Dialect/X86Vector/X86Vector.td",
1669     deps = [":X86VectorTdFiles"],
1672 cc_library(
1673     name = "X86Vector",
1674     srcs = ["lib/Dialect/X86Vector/IR/X86VectorDialect.cpp"],
1675     hdrs = ["include/mlir/Dialect/X86Vector/X86VectorDialect.h"],
1676     includes = ["include"],
1677     deps = [
1678         ":IR",
1679         ":InferTypeOpInterface",
1680         ":LLVMDialect",
1681         ":SideEffectInterfaces",
1682         ":X86VectorIncGen",
1683         "//llvm:Core",
1684         "//llvm:Support",
1685     ],
1688 cc_library(
1689     name = "X86VectorTransforms",
1690     srcs = glob(["lib/Dialect/X86Vector/Transforms/*.cpp"]),
1691     hdrs = ["include/mlir/Dialect/X86Vector/Transforms.h"],
1692     includes = ["include"],
1693     deps = [
1694         ":ArithmeticDialect",
1695         ":IR",
1696         ":LLVMCommonConversion",
1697         ":LLVMDialect",
1698         ":StandardOps",
1699         ":VectorOps",
1700         ":X86Vector",
1701         "//llvm:Core",
1702         "//llvm:Support",
1703     ],
1706 gentbl_cc_library(
1707     name = "X86VectorConversionIncGen",
1708     strip_include_prefix = "include",
1709     tbl_outs = [
1710         (
1711             ["-gen-llvmir-conversions"],
1712             "include/mlir/Dialect/X86Vector/X86VectorConversions.inc",
1713         ),
1714     ],
1715     tblgen = ":mlir-tblgen",
1716     td_file = "include/mlir/Dialect/X86Vector/X86Vector.td",
1717     deps = [":X86VectorTdFiles"],
1720 ##---------------------------------------------------------------------------##
1721 # SCF dialect.
1722 ##---------------------------------------------------------------------------##
1724 td_library(
1725     name = "SCFTdFiles",
1726     srcs = ["include/mlir/Dialect/SCF/SCFOps.td"],
1727     includes = ["include"],
1728     deps = [
1729         ":ControlFlowInterfacesTdFiles",
1730         ":LoopLikeInterfaceTdFiles",
1731         ":SideEffectInterfacesTdFiles",
1732     ],
1735 gentbl_cc_library(
1736     name = "SCFIncGen",
1737     strip_include_prefix = "include",
1738     tbl_outs = [
1739         (
1740             ["-gen-op-decls"],
1741             "include/mlir/Dialect/SCF/SCFOps.h.inc",
1742         ),
1743         (
1744             ["-gen-op-defs"],
1745             "include/mlir/Dialect/SCF/SCFOps.cpp.inc",
1746         ),
1747         (
1748             ["-gen-dialect-decls"],
1749             "include/mlir/Dialect/SCF/SCFOpsDialect.h.inc",
1750         ),
1751         (
1752             ["-gen-dialect-defs"],
1753             "include/mlir/Dialect/SCF/SCFOpsDialect.cpp.inc",
1754         ),
1755     ],
1756     tblgen = ":mlir-tblgen",
1757     td_file = "include/mlir/Dialect/SCF/SCFOps.td",
1758     deps = [":SCFTdFiles"],
1761 gentbl_cc_library(
1762     name = "SCFPassIncGen",
1763     strip_include_prefix = "include",
1764     tbl_outs = [
1765         (
1766             [
1767                 "-gen-pass-decls",
1768                 "-name=SCF",
1769             ],
1770             "include/mlir/Dialect/SCF/Passes.h.inc",
1771         ),
1772     ],
1773     tblgen = ":mlir-tblgen",
1774     td_file = "include/mlir/Dialect/SCF/Passes.td",
1775     deps = [":PassBaseTdFiles"],
1778 cc_library(
1779     name = "SCFTransforms",
1780     srcs = glob([
1781         "lib/Dialect/SCF/Transforms/*.cpp",
1782         "lib/Dialect/SCF/Transforms/*.h",
1783     ]),
1784     hdrs = [
1785         "include/mlir/Dialect/SCF/Passes.h",
1786         "include/mlir/Dialect/SCF/Transforms.h",
1787     ],
1788     includes = ["include"],
1789     deps = [
1790         ":Affine",
1791         ":AffineAnalysis",
1792         ":Analysis",
1793         ":ArithmeticDialect",
1794         ":BufferizationDialect",
1795         ":BufferizationTransforms",
1796         ":DialectUtils",
1797         ":IR",
1798         ":MemRefDialect",
1799         ":Pass",
1800         ":SCFDialect",
1801         ":SCFPassIncGen",
1802         ":StandardOps",
1803         ":Support",
1804         ":TensorDialect",
1805         ":Transforms",
1806         "//llvm:Support",
1807     ],
1810 ##---------------------------------------------------------------------------##
1811 # SparseTensor dialect.
1812 ##---------------------------------------------------------------------------##
1814 td_library(
1815     name = "SparseTensorTdFiles",
1816     srcs = [
1817         "include/mlir/Dialect/SparseTensor/IR/SparseTensorAttrDefs.td",
1818         "include/mlir/Dialect/SparseTensor/IR/SparseTensorBase.td",
1819         "include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td",
1820     ],
1821     includes = ["include"],
1822     deps = [
1823         ":InferTypeOpInterfaceTdFiles",
1824         ":OpBaseTdFiles",
1825         ":SideEffectInterfacesTdFiles",
1826     ],
1829 gentbl_cc_library(
1830     name = "SparseTensorAttrDefsIncGen",
1831     strip_include_prefix = "include",
1832     tbl_outs = [
1833         (
1834             ["--gen-attrdef-decls"],
1835             "include/mlir/Dialect/SparseTensor/IR/SparseTensorAttrDefs.h.inc",
1836         ),
1837         (
1838             ["--gen-attrdef-defs"],
1839             "include/mlir/Dialect/SparseTensor/IR/SparseTensorAttrDefs.cpp.inc",
1840         ),
1841     ],
1842     tblgen = ":mlir-tblgen",
1843     td_file = "include/mlir/Dialect/SparseTensor/IR/SparseTensorAttrDefs.td",
1844     deps = [":SparseTensorTdFiles"],
1847 gentbl_cc_library(
1848     name = "SparseTensorOpsIncGen",
1849     strip_include_prefix = "include",
1850     tbl_outs = [
1851         (
1852             [
1853                 "-gen-dialect-decls",
1854                 "-dialect=sparse_tensor",
1855             ],
1856             "include/mlir/Dialect/SparseTensor/IR/SparseTensorOpsDialect.h.inc",
1857         ),
1858         (
1859             [
1860                 "-gen-dialect-defs",
1861                 "-dialect=sparse_tensor",
1862             ],
1863             "include/mlir/Dialect/SparseTensor/IR/SparseTensorOpsDialect.cpp.inc",
1864         ),
1865         (
1866             ["-gen-op-decls"],
1867             "include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.h.inc",
1868         ),
1869         (
1870             ["-gen-op-defs"],
1871             "include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.cpp.inc",
1872         ),
1873         (
1874             ["-gen-op-doc"],
1875             "g3doc/Dialects/SparseTensor/SparseTensor.md",
1876         ),
1877     ],
1878     tblgen = ":mlir-tblgen",
1879     td_file = "include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td",
1880     deps = [":SparseTensorTdFiles"],
1883 gentbl_cc_library(
1884     name = "SparseTensorPassIncGen",
1885     strip_include_prefix = "include",
1886     tbl_outs = [
1887         (
1888             [
1889                 "-gen-pass-decls",
1890                 "-name=SparseTensor",
1891             ],
1892             "include/mlir/Dialect/SparseTensor/Transforms/Passes.h.inc",
1893         ),
1894         (
1895             [
1896                 "-gen-pass-capi-header",
1897                 "--prefix=SparseTensor",
1898             ],
1899             "include/mlir/Dialect/SparseTensor/Transforms/Passes.capi.h.inc",
1900         ),
1901         (
1902             [
1903                 "-gen-pass-capi-impl",
1904                 "--prefix=SparseTensor",
1905             ],
1906             "include/mlir/Dialect/SparseTensor/Transforms/Passes.capi.cpp.inc",
1907         ),
1908     ],
1909     tblgen = ":mlir-tblgen",
1910     td_file = "include/mlir/Dialect/SparseTensor/Transforms/Passes.td",
1911     deps = [":PassBaseTdFiles"],
1914 cc_library(
1915     name = "SparseTensor",
1916     srcs = glob([
1917         "lib/Dialect/SparseTensor/IR/*.cpp",
1918     ]),
1919     hdrs = ["include/mlir/Dialect/SparseTensor/IR/SparseTensor.h"],
1920     includes = ["include"],
1921     deps = [
1922         ":ArithmeticDialect",
1923         ":IR",
1924         ":InferTypeOpInterface",
1925         ":SideEffectInterfaces",
1926         ":SparseTensorAttrDefsIncGen",
1927         ":SparseTensorOpsIncGen",
1928         ":StandardOps",
1929         "//llvm:Support",
1930     ],
1933 cc_library(
1934     name = "SparseTensorUtils",
1935     srcs = glob(["lib/Dialect/SparseTensor/Utils/*.cpp"]),
1936     hdrs = glob(["include/mlir/Dialect/SparseTensor/Utils/*.h"]),
1937     includes = ["include"],
1938     deps = [
1939         ":ArithmeticDialect",
1940         ":IR",
1941         ":LinalgOps",
1942         ":SparseTensor",
1943         "//llvm:Support",
1944     ],
1947 cc_library(
1948     name = "SparseTensorTransforms",
1949     srcs = glob([
1950         "lib/Dialect/SparseTensor/Transforms/*.cpp",
1951         "lib/Dialect/SparseTensor/Transforms/*.h",
1952     ]),
1953     hdrs = [
1954         "include/mlir/Dialect/SparseTensor/Transforms/Passes.h",
1955         "include/mlir/ExecutionEngine/SparseTensorUtils.h",
1956     ],
1957     includes = ["include"],
1958     deps = [
1959         ":Affine",
1960         ":ArithmeticDialect",
1961         ":BufferizationDialect",
1962         ":IR",
1963         ":LLVMDialect",
1964         ":LinalgOps",
1965         ":LinalgTransforms",
1966         ":MemRefDialect",
1967         ":Pass",
1968         ":SCFDialect",
1969         ":SparseTensor",
1970         ":SparseTensorPassIncGen",
1971         ":SparseTensorUtils",
1972         ":StandardOps",
1973         ":StandardOpsTransforms",
1974         ":TensorDialect",
1975         ":Transforms",
1976         ":VectorOps",
1977         "//llvm:Support",
1978     ],
1981 td_library(
1982     name = "StdOpsTdFiles",
1983     srcs = [
1984         "include/mlir/Dialect/StandardOps/IR/Ops.td",
1985     ],
1986     includes = ["include"],
1987     deps = [
1988         ":CallInterfacesTdFiles",
1989         ":CastInterfacesTdFiles",
1990         ":ControlFlowInterfacesTdFiles",
1991         ":InferTypeOpInterfaceTdFiles",
1992         ":OpBaseTdFiles",
1993         ":SideEffectInterfacesTdFiles",
1994         ":VectorInterfacesTdFiles",
1995     ],
1998 gentbl_cc_library(
1999     name = "StandardOpsIncGen",
2000     strip_include_prefix = "include",
2001     tbl_outs = [
2002         (
2003             ["-gen-op-decls"],
2004             "include/mlir/Dialect/StandardOps/IR/Ops.h.inc",
2005         ),
2006         (
2007             ["-gen-op-defs"],
2008             "include/mlir/Dialect/StandardOps/IR/Ops.cpp.inc",
2009         ),
2010         (
2011             ["-gen-dialect-decls"],
2012             "include/mlir/Dialect/StandardOps/IR/OpsDialect.h.inc",
2013         ),
2014         (
2015             ["-gen-dialect-defs"],
2016             "include/mlir/Dialect/StandardOps/IR/OpsDialect.cpp.inc",
2017         ),
2018         (
2019             ["-gen-enum-decls"],
2020             "include/mlir/Dialect/StandardOps/IR/OpsEnums.h.inc",
2021         ),
2022         (
2023             ["-gen-enum-defs"],
2024             "include/mlir/Dialect/StandardOps/IR/OpsEnums.cpp.inc",
2025         ),
2026     ],
2027     tblgen = ":mlir-tblgen",
2028     td_file = "include/mlir/Dialect/StandardOps/IR/Ops.td",
2029     deps = [":StdOpsTdFiles"],
2032 cc_library(
2033     name = "Dialect",
2034     srcs = glob([
2035         "lib/Dialect/*.cpp",
2036         "lib/Dialect/*.h",
2037     ]),
2038     hdrs = glob([
2039         "include/mlir/Dialect/*.h",
2040     ]),
2041     includes = ["include"],
2042     deps = [
2043         ":IR",
2044         "//llvm:Support",
2045     ],
2048 cc_library(
2049     name = "DialectUtils",
2050     srcs = glob([
2051         "lib/Dialect/Utils/*.cpp",
2052         "lib/Dialect/Utils/*.h",
2053     ]),
2054     hdrs = glob([
2055         "include/mlir/Dialect/Utils/*.h",
2056     ]),
2057     includes = ["include"],
2058     deps = [
2059         ":IR",
2060         ":Support",
2061         "//llvm:Support",
2062     ],
2065 cc_library(
2066     name = "Affine",
2067     srcs = glob(
2068         [
2069             "lib/Dialect/Affine/IR/*.cpp",
2070             "lib/Dialect/Affine/IR/*.h",
2071         ],
2072     ) + ["include/mlir/Transforms/InliningUtils.h"],
2073     hdrs = glob([
2074         "include/mlir/Dialect/Affine/IR/*.h",
2075     ]),
2076     includes = ["include"],
2077     deps = [
2078         ":AffineMemoryOpInterfacesIncGen",
2079         ":AffineOpsIncGen",
2080         ":ArithmeticDialect",
2081         ":IR",
2082         ":LoopLikeInterface",
2083         ":MemRefDialect",
2084         ":SideEffectInterfaces",
2085         ":StandardOps",
2086         ":Support",
2087         ":TensorDialect",
2088         "//llvm:Support",
2089     ],
2092 cc_library(
2093     name = "EmitC",
2094     srcs = glob([
2095         "lib/Dialect/EmitC/IR/*.cpp",
2096     ]),
2097     hdrs = glob([
2098         "include/mlir/Dialect/EmitC/IR/*.h",
2099     ]),
2100     includes = ["include"],
2101     deps = [
2102         ":Dialect",
2103         ":EmitCAttributesIncGen",
2104         ":EmitCOpsIncGen",
2105         ":IR",
2106         ":SideEffectInterfaces",
2107         "//llvm:Support",
2108     ],
2111 cc_library(
2112     name = "Async",
2113     srcs = glob([
2114         "lib/Dialect/Async/IR/*.cpp",
2115     ]),
2116     hdrs = glob([
2117         "include/mlir/Dialect/Async/IR/*.h",
2118     ]),
2119     includes = ["include"],
2120     deps = [
2121         ":AsyncOpsIncGen",
2122         ":ControlFlowInterfaces",
2123         ":Dialect",
2124         ":IR",
2125         ":SideEffectInterfaces",
2126         ":StandardOps",
2127         ":Support",
2128         "//llvm:Support",
2129     ],
2132 cc_library(
2133     name = "AsyncTransforms",
2134     srcs = glob([
2135         "lib/Dialect/Async/Transforms/*.cpp",
2136         "lib/Dialect/Async/Transforms/*.h",
2137     ]),
2138     hdrs = [
2139         "include/mlir/Dialect/Async/Passes.h",
2140         "include/mlir/Dialect/Async/Transforms.h",
2141     ],
2142     includes = ["include"],
2143     deps = [
2144         ":Analysis",
2145         ":ArithmeticDialect",
2146         ":Async",
2147         ":AsyncPassIncGen",
2148         ":IR",
2149         ":Pass",
2150         ":SCFDialect",
2151         ":SCFToStandard",
2152         ":StandardOps",
2153         ":Support",
2154         ":TransformUtils",
2155         ":Transforms",
2156         ":TransformsPassIncGen",
2157         "//llvm:Core",
2158         "//llvm:Support",
2159     ],
2162 cc_library(
2163     name = "AffineAnalysis",
2164     srcs = glob([
2165         "lib/Dialect/Affine/Analysis/*.cpp",
2166         "lib/Dialect/Affine/Analysis/*.h",
2167     ]),
2168     hdrs = glob(["include/mlir/Dialect/Affine/Analysis/*.h"]),
2169     includes = ["include"],
2170     deps = [
2171         ":Affine",
2172         ":Analysis",
2173         ":ArithmeticDialect",
2174         ":IR",
2175         ":StandardOps",
2176         ":Support",
2177         "//llvm:Support",
2178     ],
2181 cc_library(
2182     name = "AffineUtils",
2183     srcs = glob(
2184         [
2185             "lib/Dialect/Affine/Utils/*.cpp",
2186             "lib/Dialect/Affine/Utils/*.h",
2187         ],
2188     ),
2189     hdrs = ["include/mlir/Dialect/Affine/Utils.h"],
2190     includes = ["include"],
2191     deps = [
2192         ":Affine",
2193         ":AffineAnalysis",
2194         ":Analysis",
2195         ":IR",
2196         ":MemRefDialect",
2197         ":TransformUtils",
2198     ],
2201 gentbl_cc_library(
2202     name = "AffinePassIncGen",
2203     strip_include_prefix = "include",
2204     tbl_outs = [
2205         (
2206             [
2207                 "-gen-pass-decls",
2208                 "-name=Affine",
2209             ],
2210             "include/mlir/Dialect/Affine/Passes.h.inc",
2211         ),
2212     ],
2213     tblgen = ":mlir-tblgen",
2214     td_file = "include/mlir/Dialect/Affine/Passes.td",
2215     deps = [":PassBaseTdFiles"],
2218 cc_library(
2219     name = "AffineTransforms",
2220     srcs = glob([
2221         "lib/Dialect/Affine/Transforms/*.cpp",
2222         "lib/Dialect/Affine/Transforms/*.h",
2223     ]),
2224     hdrs = ["include/mlir/Dialect/Affine/Passes.h"],
2225     includes = ["include"],
2226     deps = [
2227         ":Affine",
2228         ":AffineAnalysis",
2229         ":AffinePassIncGen",
2230         ":AffineUtils",
2231         ":Analysis",
2232         ":ArithmeticDialect",
2233         ":IR",
2234         ":MemRefDialect",
2235         ":Pass",
2236         ":SCFDialect",
2237         ":StandardOps",
2238         ":Support",
2239         ":Transforms",
2240         ":VectorOps",
2241         "//llvm:Support",
2242     ],
2245 gentbl_cc_library(
2246     name = "ConversionPassIncGen",
2247     strip_include_prefix = "include",
2248     tbl_outs = [
2249         (
2250             [
2251                 "-gen-pass-decls",
2252                 "-name=Conversion",
2253             ],
2254             "include/mlir/Conversion/Passes.h.inc",
2255         ),
2256         (
2257             [
2258                 "-gen-pass-capi-header",
2259                 "--prefix=Conversion",
2260             ],
2261             "include/mlir/Conversion/Passes.capi.h.inc",
2262         ),
2263         (
2264             [
2265                 "-gen-pass-capi-impl",
2266                 "--prefix=Conversion",
2267             ],
2268             "include/mlir/Conversion/Passes.capi.cpp.inc",
2269         ),
2270     ],
2271     tblgen = ":mlir-tblgen",
2272     td_file = "include/mlir/Conversion/Passes.td",
2273     deps = [":PassBaseTdFiles"],
2276 cc_library(
2277     name = "ConversionPasses",
2278     hdrs = ["include/mlir/Conversion/Passes.h"],
2279     includes = ["include"],
2280     deps = [
2281         ":AffineToStandard",
2282         ":ArithmeticToLLVM",
2283         ":ArithmeticToSPIRV",
2284         ":ArmNeon2dToIntr",
2285         ":AsyncToLLVM",
2286         ":BufferizationToMemRef",
2287         ":ComplexToLLVM",
2288         ":ComplexToStandard",
2289         ":ConversionPassIncGen",
2290         ":GPUToGPURuntimeTransforms",
2291         ":GPUToNVVMTransforms",
2292         ":GPUToROCDLTransforms",
2293         ":GPUToSPIRV",
2294         ":GPUToVulkanTransforms",
2295         ":LinalgToLLVM",
2296         ":LinalgToSPIRV",
2297         ":LinalgToStandard",
2298         ":MathToLLVM",
2299         ":MathToLibm",
2300         ":MathToSPIRV",
2301         ":MemRefToLLVM",
2302         ":MemRefToSPIRV",
2303         ":OpenACCToLLVM",
2304         ":OpenACCToSCF",
2305         ":OpenMPToLLVM",
2306         ":PDLToPDLInterp",
2307         ":ReconcileUnrealizedCasts",
2308         ":SCFToGPUPass",
2309         ":SCFToOpenMP",
2310         ":SCFToSPIRV",
2311         ":SCFToStandard",
2312         ":SPIRVToLLVM",
2313         ":ShapeToStandard",
2314         ":StandardToLLVM",
2315         ":StandardToSPIRV",
2316         ":TosaToLinalg",
2317         ":TosaToSCF",
2318         ":TosaToStandard",
2319         ":VectorToGPU",
2320         ":VectorToLLVM",
2321         ":VectorToROCDL",
2322         ":VectorToSCF",
2323         ":VectorToSPIRV",
2324     ],
2327 cc_library(
2328     name = "AsyncToLLVM",
2329     srcs = glob([
2330         "lib/Conversion/AsyncToLLVM/*.cpp",
2331         "lib/Conversion/AsyncToLLVM/*.h",
2332     ]) + [":ConversionPassDetail"],
2333     hdrs = glob(["include/mlir/Conversion/AsyncToLLVM/*.h"]),
2334     includes = ["include"],
2335     deps = [
2336         ":ArithmeticDialect",
2337         ":Async",
2338         ":ConversionPassIncGen",
2339         ":IR",
2340         ":LLVMCommonConversion",
2341         ":LLVMDialect",
2342         ":Pass",
2343         ":StandardOps",
2344         ":StandardOpsTransforms",
2345         ":StandardToLLVM",
2346         ":Support",
2347         ":Transforms",
2348         "//llvm:Support",
2349     ],
2352 cc_library(
2353     name = "AffineToStandard",
2354     srcs = glob([
2355         "lib/Conversion/AffineToStandard/*.cpp",
2356         "lib/Conversion/AffineToStandard/*.h",
2357     ]) + [":ConversionPassDetail"],
2358     hdrs = glob(["include/mlir/Conversion/AffineToStandard/*.h"]),
2359     includes = ["include"],
2360     deps = [
2361         ":Affine",
2362         ":ArithmeticDialect",
2363         ":ConversionPassIncGen",
2364         ":IR",
2365         ":MemRefDialect",
2366         ":Pass",
2367         ":SCFDialect",
2368         ":StandardOps",
2369         ":Support",
2370         ":Transforms",
2371         ":VectorOps",
2372     ],
2375 alias(
2376     name = "AffineToStandardTransforms",
2377     actual = "AffineToStandard",
2380 # SDBM dialect only contains attribute components that can be constructed given
2381 # a dialect object, so whenever it is used it must also be registered. Therefore
2382 # we don't split out the registration library for it.
2383 cc_library(
2384     name = "SDBM",
2385     srcs = glob([
2386         "lib/Dialect/SDBM/*.cpp",
2387         "lib/Dialect/SDBM/*.h",
2388     ]),
2389     hdrs = glob([
2390         "include/mlir/Dialect/SDBM/*.h",
2391     ]),
2392     includes = ["include"],
2393     deps = [
2394         ":IR",
2395         ":Support",
2396         "//llvm:Support",
2397     ],
2400 cc_library(
2401     name = "SCFDialect",
2402     srcs = glob(
2403         [
2404             "lib/Dialect/SCF/*.cpp",
2405             "lib/Dialect/SCF/*.h",
2406         ],
2407     ),
2408     hdrs = glob([
2409         "include/mlir/Dialect/SCF/*.h",
2410     ]),
2411     includes = ["include"],
2412     deps = [
2413         ":ArithmeticDialect",
2414         ":BufferizationDialect",
2415         ":ControlFlowInterfaces",
2416         ":IR",
2417         ":LoopLikeInterface",
2418         ":MemRefDialect",
2419         ":Pass",
2420         ":SCFIncGen",
2421         ":SCFPassIncGen",
2422         ":StandardOps",
2423         ":Support",
2424         ":TensorDialect",
2425         "//llvm:Support",
2426     ],
2429 cc_library(
2430     name = "LinalgInterfaces",
2431     srcs = ["lib/Dialect/Linalg/IR/LinalgInterfaces.cpp"],
2432     hdrs = ["include/mlir/Dialect/Linalg/IR/LinalgInterfaces.h"],
2433     includes = ["include"],
2434     deps = [
2435         ":Affine",
2436         ":ArithmeticDialect",
2437         ":DialectUtils",
2438         ":IR",
2439         ":InferTypeOpInterface",
2440         ":LinalgInterfacesIncGen",
2441         ":LinalgStructuredOpsIncGen",
2442         ":MemRefDialect",
2443         ":TensorDialect",
2444         ":ViewLikeInterface",
2445         "//llvm:Support",
2446     ],
2449 cc_library(
2450     name = "DataLayoutInterfaces",
2451     srcs = ["lib/Interfaces/DataLayoutInterfaces.cpp"],
2452     hdrs = ["include/mlir/Interfaces/DataLayoutInterfaces.h"],
2453     includes = ["include"],
2454     deps = [
2455         ":DataLayoutInterfacesIncGen",
2456         ":IR",
2457         "//llvm:Support",
2458     ],
2461 cc_library(
2462     name = "LoopLikeInterface",
2463     srcs = ["lib/Interfaces/LoopLikeInterface.cpp"],
2464     hdrs = ["include/mlir/Interfaces/LoopLikeInterface.h"],
2465     includes = ["include"],
2466     deps = [
2467         ":IR",
2468         ":LoopLikeInterfaceIncGen",
2469     ],
2472 cc_library(
2473     name = "VectorInterfaces",
2474     srcs = ["lib/Interfaces/VectorInterfaces.cpp"],
2475     hdrs = ["include/mlir/Interfaces/VectorInterfaces.h"],
2476     includes = ["include"],
2477     deps = [
2478         ":IR",
2479         ":VectorInterfacesIncGen",
2480     ],
2483 cc_library(
2484     name = "ViewLikeInterface",
2485     srcs = ["lib/Interfaces/ViewLikeInterface.cpp"],
2486     hdrs = ["include/mlir/Interfaces/ViewLikeInterface.h"],
2487     includes = ["include"],
2488     deps = [
2489         ":DialectUtils",
2490         ":IR",
2491         ":ViewLikeInterfaceIncGen",
2492     ],
2495 cc_library(
2496     name = "CopyOpInterface",
2497     srcs = ["lib/Interfaces/CopyOpInterface.cpp"],
2498     hdrs = ["include/mlir/Interfaces/CopyOpInterface.h"],
2499     includes = ["include"],
2500     deps = [
2501         ":CopyOpInterfaceIncGen",
2502         ":IR",
2503     ],
2506 td_library(
2507     name = "ShapeOpsTdFiles",
2508     srcs = [
2509         "include/mlir/Dialect/Shape/IR/ShapeBase.td",
2510         "include/mlir/Dialect/Shape/IR/ShapeOps.td",
2511     ],
2512     includes = ["include"],
2513     deps = [
2514         ":ControlFlowInterfacesTdFiles",
2515         ":InferTypeOpInterfaceTdFiles",
2516         ":SideEffectInterfacesTdFiles",
2517     ],
2520 gentbl_cc_library(
2521     name = "ShapeOpsIncGen",
2522     strip_include_prefix = "include",
2523     tbl_outs = [
2524         (
2525             ["-gen-op-decls"],
2526             "include/mlir/Dialect/Shape/IR/ShapeOps.h.inc",
2527         ),
2528         (
2529             ["-gen-op-defs"],
2530             "include/mlir/Dialect/Shape/IR/ShapeOps.cpp.inc",
2531         ),
2532         (
2533             ["-gen-dialect-decls"],
2534             "include/mlir/Dialect/Shape/IR/ShapeOpsDialect.h.inc",
2535         ),
2536         (
2537             ["-gen-dialect-defs"],
2538             "include/mlir/Dialect/Shape/IR/ShapeOpsDialect.cpp.inc",
2539         ),
2540     ],
2541     tblgen = ":mlir-tblgen",
2542     td_file = "include/mlir/Dialect/Shape/IR/ShapeOps.td",
2543     deps = [":ShapeOpsTdFiles"],
2546 gentbl_cc_library(
2547     name = "MLIRShapeCanonicalizationIncGen",
2548     strip_include_prefix = "include/mlir/Dialect/Shape/IR",
2549     tbl_outs = [
2550         (
2551             ["-gen-rewriters"],
2552             "include/mlir/Dialect/Shape/IR/ShapeCanonicalization.inc",
2553         ),
2554     ],
2555     tblgen = ":mlir-tblgen",
2556     td_file = "lib/Dialect/Shape/IR/ShapeCanonicalization.td",
2557     deps = [
2558         ":ShapeOpsTdFiles",
2559         ":StdOpsTdFiles",
2560         ":TensorOpsTdFiles",
2561     ],
2564 cc_library(
2565     name = "Shape",
2566     srcs = glob(["lib/Dialect/Shape/IR/*.cpp"]),
2567     hdrs = ["include/mlir/Dialect/Shape/IR/Shape.h"],
2568     includes = ["include"],
2569     deps = [
2570         ":ArithmeticDialect",
2571         ":CallOpInterfaces",
2572         ":CommonFolders",
2573         ":ControlFlowInterfaces",
2574         ":Dialect",
2575         ":IR",
2576         ":InferTypeOpInterface",
2577         ":MLIRShapeCanonicalizationIncGen",
2578         ":ShapeOpsIncGen",
2579         ":SideEffectInterfaces",
2580         ":StandardOps",
2581         ":Support",
2582         ":TensorDialect",
2583         "//llvm:Support",
2584     ],
2587 gentbl_cc_library(
2588     name = "ShapeToStandardGen",
2589     strip_include_prefix = "lib/Conversion/ShapeToStandard",
2590     tbl_outs = [
2591         (
2592             ["-gen-rewriters"],
2593             "lib/Conversion/ShapeToStandard/ShapeToStandard.cpp.inc",
2594         ),
2595     ],
2596     tblgen = ":mlir-tblgen",
2597     td_file = "lib/Conversion/ShapeToStandard/ShapeToStandard.td",
2598     deps = [":ShapeOpsTdFiles"],
2601 cc_library(
2602     name = "ShapeToStandard",
2603     srcs = glob([
2604         "lib/Conversion/ShapeToStandard/*.cpp",
2605         "lib/Conversion/ShapeToStandard/*.h",
2606     ]) + [":ConversionPassDetail"],
2607     hdrs = ["include/mlir/Conversion/ShapeToStandard/ShapeToStandard.h"],
2608     includes = ["include"],
2609     deps = [
2610         ":ArithmeticDialect",
2611         ":ConversionPassIncGen",
2612         ":IR",
2613         ":MemRefDialect",
2614         ":Pass",
2615         ":SCFDialect",
2616         ":Shape",
2617         ":ShapeToStandardGen",
2618         ":StandardOps",
2619         ":Support",
2620         ":TensorDialect",
2621         ":Transforms",
2622         "//llvm:Support",
2623     ],
2626 gentbl_cc_library(
2627     name = "ShapeTransformsPassIncGen",
2628     strip_include_prefix = "include",
2629     tbl_outs = [(
2630         [
2631             "-gen-pass-decls",
2632             "-name=Shape",
2633         ],
2634         "include/mlir/Dialect/Shape/Transforms/Passes.h.inc",
2635     )],
2636     tblgen = ":mlir-tblgen",
2637     td_file = "include/mlir/Dialect/Shape/Transforms/Passes.td",
2638     deps = [":PassBaseTdFiles"],
2641 cc_library(
2642     name = "ShapeTransforms",
2643     srcs = glob([
2644         "lib/Dialect/Shape/Transforms/*.cpp",
2645         "lib/Dialect/Shape/Transforms/*.h",
2646     ]),
2647     hdrs = ["include/mlir/Dialect/Shape/Transforms/Passes.h"],
2648     includes = ["include"],
2649     deps = [
2650         ":ArithmeticDialect",
2651         ":BufferizationDialect",
2652         ":BufferizationTransforms",
2653         ":IR",
2654         ":MemRefDialect",
2655         ":Pass",
2656         ":Shape",
2657         ":ShapeTransformsPassIncGen",
2658         ":StandardOps",
2659         ":Transforms",
2660     ],
2663 cc_library(
2664     name = "StandardOps",
2665     srcs = glob(
2666         [
2667             "lib/Dialect/StandardOps/IR/*.cpp",
2668             "lib/Dialect/StandardOps/IR/*.h",
2669             "lib/Dialect/StandardOps/Utils/*.cpp",
2670         ],
2671     ),
2672     hdrs = glob([
2673         "include/mlir/Dialect/StandardOps/IR/*.h",
2674         "include/mlir/Dialect/StandardOps/Utils/*.h",
2675     ]) + ["include/mlir/Transforms/InliningUtils.h"],
2676     includes = ["include"],
2677     deps = [
2678         ":ArithmeticDialect",
2679         ":CallOpInterfaces",
2680         ":CastOpInterfaces",
2681         ":CommonFolders",
2682         ":ControlFlowInterfaces",
2683         ":IR",
2684         ":InferTypeOpInterface",
2685         ":SideEffectInterfaces",
2686         ":StandardOpsIncGen",
2687         ":Support",
2688         ":VectorInterfaces",
2689         "//llvm:Support",
2690     ],
2693 gentbl_cc_library(
2694     name = "StandardOpsTransformsPassIncGen",
2695     strip_include_prefix = "include",
2696     tbl_outs = [(
2697         [
2698             "-gen-pass-decls",
2699             "-name=Standard",
2700         ],
2701         "include/mlir/Dialect/StandardOps/Transforms/Passes.h.inc",
2702     )],
2703     tblgen = ":mlir-tblgen",
2704     td_file = "include/mlir/Dialect/StandardOps/Transforms/Passes.td",
2705     deps = [":PassBaseTdFiles"],
2708 cc_library(
2709     name = "StandardOpsTransforms",
2710     srcs = glob([
2711         "lib/Dialect/StandardOps/Transforms/*.cpp",
2712         "lib/Dialect/StandardOps/Transforms/*.h",
2713     ]),
2714     hdrs = glob(["include/mlir/Dialect/StandardOps/Transforms/*.h"]),
2715     includes = ["include"],
2716     deps = [
2717         ":Affine",
2718         ":ArithmeticDialect",
2719         ":ArithmeticTransforms",
2720         ":BufferizationDialect",
2721         ":BufferizationTransforms",
2722         ":IR",
2723         ":MemRefDialect",  # TODO: Remove dependency on MemRef dialect
2724         ":Pass",
2725         ":SCFDialect",
2726         ":StandardOps",
2727         ":StandardOpsTransformsPassIncGen",
2728         ":Support",
2729         ":TensorDialect",
2730         ":Transforms",
2731         "//llvm:Support",
2732     ],
2735 cc_library(
2736     name = "VectorOps",
2737     srcs = glob(
2738         [
2739             "lib/Dialect/Vector/*.cpp",
2740             "lib/Dialect/Vector/*.h",
2741         ],
2742     ),
2743     hdrs = glob([
2744         "include/mlir/Dialect/Vector/*.h",
2745     ]),
2746     includes = ["include"],
2747     deps = [
2748         ":Affine",
2749         ":AffineAnalysis",
2750         ":AffineUtils",
2751         ":Analysis",
2752         ":ArithmeticDialect",
2753         ":DataLayoutInterfaces",
2754         ":DialectUtils",
2755         ":IR",
2756         ":LinalgOps",
2757         ":MemRefDialect",
2758         ":SCFDialect",
2759         ":SideEffectInterfaces",
2760         ":StandardOps",
2761         ":Support",
2762         ":TensorDialect",
2763         ":VectorInterfaces",
2764         ":VectorOpsIncGen",
2765         ":ViewLikeInterface",
2766         "//llvm:Support",
2767     ],
2770 cc_library(
2771     name = "Support",
2772     srcs = glob(
2773         [
2774             "lib/Support/*.cpp",
2775             "lib/Support/*.h",
2776         ],
2777         exclude = [
2778             # TODO(jpienaar): Move this out, else Support depends on Analysis/
2779             "lib/Support/MlirOptMain.cpp",
2780         ],
2781     ),
2782     hdrs = glob(
2783         ["include/mlir/Support/*.h"],
2784         exclude = ["include/mlir/Support/MlirOptMain.h"],
2785     ),
2786     includes = ["include"],
2787     deps = ["//llvm:Support"],
2790 cc_library(
2791     name = "MlirLspServerLib",
2792     srcs = glob(
2793         [
2794             "lib/Tools/mlir-lsp-server/*.cpp",
2795             "lib/Tools/mlir-lsp-server/*.h",
2796             "lib/Tools/mlir-lsp-server/lsp/*.cpp",
2797             "lib/Tools/mlir-lsp-server/lsp/*.h",
2798         ],
2799     ),
2800     hdrs = glob(
2801         ["include/mlir/Tools/mlir-lsp-server/*.h"],
2802     ),
2803     includes = ["include"],
2804     deps = [
2805         ":IR",
2806         ":Parser",
2807         ":Support",
2808         "//llvm:Support",
2809     ],
2812 cc_library(
2813     name = "ParserTokenKinds",
2814     # strip_include_prefix does not apply to textual_hdrs.
2815     hdrs = ["lib/Parser/TokenKinds.def"],
2816     strip_include_prefix = "lib/Parser",
2817     textual_hdrs = ["lib/Parser/TokenKinds.def"],
2820 cc_library(
2821     name = "Parser",
2822     srcs = glob([
2823         "lib/Parser/*.cpp",
2824         "lib/Parser/*.h",
2825     ]),
2826     hdrs = glob([
2827         "include/mlir/Parser/*.h",
2828     ]) + [
2829         "include/mlir/Parser.h",
2830     ],
2831     includes = ["include"],
2832     deps = [
2833         ":IR",
2834         ":ParserTokenKinds",
2835         ":Support",
2836         "//llvm:Support",
2837     ],
2840 gentbl_cc_library(
2841     name = "LLVMDialectInterfaceIncGen",
2842     strip_include_prefix = "include",
2843     tbl_outs = [
2844         (
2845             ["-gen-op-interface-decls"],
2846             "include/mlir/Dialect/LLVMIR/LLVMOpsInterfaces.h.inc",
2847         ),
2848         (
2849             ["-gen-op-interface-defs"],
2850             "include/mlir/Dialect/LLVMIR/LLVMOpsInterfaces.cpp.inc",
2851         ),
2852         (
2853             ["-gen-type-interface-decls"],
2854             "include/mlir/Dialect/LLVMIR/LLVMTypeInterfaces.h.inc",
2855         ),
2856         (
2857             ["-gen-type-interface-defs"],
2858             "include/mlir/Dialect/LLVMIR/LLVMTypeInterfaces.cpp.inc",
2859         ),
2860     ],
2861     tblgen = ":mlir-tblgen",
2862     td_file = "include/mlir/Dialect/LLVMIR/LLVMOpsInterfaces.td",
2863     deps = [":LLVMOpsTdFiles"],
2866 gentbl_cc_library(
2867     name = "LLVMDialectAttributesIncGen",
2868     strip_include_prefix = "include",
2869     tbl_outs = [
2870         (
2871             ["--gen-attrdef-decls"],
2872             "include/mlir/Dialect/LLVMIR/LLVMOpsAttrDefs.h.inc",
2873         ),
2874         (
2875             ["--gen-attrdef-defs"],
2876             "include/mlir/Dialect/LLVMIR/LLVMOpsAttrDefs.cpp.inc",
2877         ),
2878     ],
2879     tblgen = ":mlir-tblgen",
2880     td_file = "include/mlir/Dialect/LLVMIR/LLVMAttrDefs.td",
2881     deps = [":LLVMOpsTdFiles"],
2884 cc_library(
2885     name = "LLVMDialect",
2886     srcs = glob(
2887         [
2888             "lib/Dialect/LLVMIR/IR/*.cpp",
2889             "lib/Dialect/LLVMIR/IR/*.h",
2890         ],
2891         exclude = [
2892             "lib/Dialect/LLVMIR/IR/*AMX*.cpp",
2893             "lib/Dialect/LLVMIR/IR/*AMX*.h",
2894             "lib/Dialect/LLVMIR/IR/*ArmSVE*.cpp",
2895             "lib/Dialect/LLVMIR/IR/*ArmSVE*.h",
2896             "lib/Dialect/LLVMIR/IR/NVVM*.cpp",
2897             "lib/Dialect/LLVMIR/IR/NVVM*.h",
2898             "lib/Dialect/LLVMIR/IR/ROCDL*.cpp",
2899             "lib/Dialect/LLVMIR/IR/ROCDL*.h",
2900             "lib/Dialect/LLVMIR/IR/*X86Vector*.cpp",
2901             "lib/Dialect/LLVMIR/IR/*X86Vector*.h",
2902         ],
2903     ),
2904     hdrs = glob(
2905         ["include/mlir/Dialect/LLVMIR/*.h"],
2906         exclude = [
2907             "include/mlir/Dialect/LLVMIR/*AMX*.h",
2908             "include/mlir/Dialect/LLVMIR/*ArmSVE*.h",
2909             "include/mlir/Dialect/LLVMIR/NVVM*.h",
2910             "include/mlir/Dialect/LLVMIR/ROCDL*.h",
2911             "include/mlir/Dialect/LLVMIR/*X86Vector*.h",
2912         ],
2913     ),
2914     includes = ["include"],
2915     deps = [
2916         ":ControlFlowInterfaces",
2917         ":DataLayoutInterfaces",
2918         ":IR",
2919         ":InferTypeOpInterface",
2920         ":LLVMDialectAttributesIncGen",
2921         ":LLVMDialectInterfaceIncGen",
2922         ":LLVMOpsIncGen",
2923         ":SideEffectInterfaces",
2924         ":Support",
2925         "//llvm:AsmParser",
2926         "//llvm:BitReader",
2927         "//llvm:BitWriter",
2928         "//llvm:Core",
2929         "//llvm:Support",
2930     ],
2933 gentbl_cc_library(
2934     name = "LLVMPassIncGen",
2935     strip_include_prefix = "include",
2936     tbl_outs = [
2937         (
2938             [
2939                 "-gen-pass-decls",
2940                 "-name=LLVM",
2941             ],
2942             "include/mlir/Dialect/LLVMIR/Transforms/Passes.h.inc",
2943         ),
2944     ],
2945     tblgen = ":mlir-tblgen",
2946     td_file = "include/mlir/Dialect/LLVMIR/Transforms/Passes.td",
2947     deps = [":PassBaseTdFiles"],
2950 cc_library(
2951     name = "LLVMIRTransforms",
2952     srcs = glob([
2953         "lib/Dialect/LLVMIR/Transforms/*.cpp",
2954         "lib/Dialect/LLVMIR/Transforms/*.h",
2955     ]),
2956     hdrs = glob(["include/mlir/Dialect/LLVMIR/Transforms/*.h"]),
2957     includes = ["include"],
2958     deps = [
2959         ":IR",
2960         ":LLVMDialect",
2961         ":LLVMPassIncGen",
2962         ":Pass",
2963     ],
2966 td_library(
2967     name = "GPUOpsTdFiles",
2968     srcs = [
2969         "include/mlir/Dialect/GPU/GPUBase.td",
2970         "include/mlir/Dialect/GPU/GPUOps.td",
2971     ],
2972     includes = ["include"],
2973     deps = [
2974         ":DLTIDialectTdFiles",
2975         ":DataLayoutInterfacesTdFiles",
2976         ":FunctionInterfacesTdFiles",
2977         ":LLVMOpsTdFiles",
2978         ":OpBaseTdFiles",
2979         ":SideEffectInterfacesTdFiles",
2980     ],
2983 gentbl_cc_library(
2984     name = "ParallelLoopMapperAttrGen",
2985     strip_include_prefix = "include",
2986     tbl_outs = [
2987         (
2988             ["-gen-struct-attr-decls"],
2989             "include/mlir/Dialect/GPU/ParallelLoopMapperAttr.h.inc",
2990         ),
2991         (
2992             ["-gen-struct-attr-defs"],
2993             "include/mlir/Dialect/GPU/ParallelLoopMapperAttr.cpp.inc",
2994         ),
2995         (
2996             ["-gen-enum-decls"],
2997             "include/mlir/Dialect/GPU/ParallelLoopMapperEnums.h.inc",
2998         ),
2999         (
3000             ["-gen-enum-defs"],
3001             "include/mlir/Dialect/GPU/ParallelLoopMapperEnums.cpp.inc",
3002         ),
3003     ],
3004     tblgen = ":mlir-tblgen",
3005     td_file = "include/mlir/Dialect/GPU/ParallelLoopMapperAttr.td",
3006     deps = [":GPUOpsTdFiles"],
3009 gentbl_cc_library(
3010     name = "GPUBaseIncGen",
3011     strip_include_prefix = "include",
3012     tbl_outs = [
3013         (
3014             ["-gen-op-interface-decls"],
3015             "include/mlir/Dialect/GPU/GPUOpInterfaces.h.inc",
3016         ),
3017         (
3018             ["-gen-op-interface-defs"],
3019             "include/mlir/Dialect/GPU/GPUOpInterfaces.cpp.inc",
3020         ),
3021     ],
3022     tblgen = ":mlir-tblgen",
3023     td_file = "include/mlir/Dialect/GPU/GPUBase.td",
3024     deps = [":GPUOpsTdFiles"],
3027 gentbl_cc_library(
3028     name = "GPUOpsIncGen",
3029     strip_include_prefix = "include",
3030     tbl_outs = [
3031         (
3032             [
3033                 "-gen-dialect-decls",
3034                 "-dialect=gpu",
3035             ],
3036             "include/mlir/Dialect/GPU/GPUOpsDialect.h.inc",
3037         ),
3038         (
3039             [
3040                 "-gen-dialect-defs",
3041                 "-dialect=gpu",
3042             ],
3043             "include/mlir/Dialect/GPU/GPUOpsDialect.cpp.inc",
3044         ),
3045         (
3046             ["-gen-op-decls"],
3047             "include/mlir/Dialect/GPU/GPUOps.h.inc",
3048         ),
3049         (
3050             ["-gen-op-defs"],
3051             "include/mlir/Dialect/GPU/GPUOps.cpp.inc",
3052         ),
3053         (
3054             ["-gen-enum-decls"],
3055             "include/mlir/Dialect/GPU/GPUOpsEnums.h.inc",
3056         ),
3057         (
3058             ["-gen-enum-defs"],
3059             "include/mlir/Dialect/GPU/GPUOpsEnums.cpp.inc",
3060         ),
3061         (
3062             ["-gen-attrdef-decls"],
3063             "include/mlir/Dialect/GPU/GPUOpsAttributes.h.inc",
3064         ),
3065         (
3066             ["-gen-attrdef-defs"],
3067             "include/mlir/Dialect/GPU/GPUOpsAttributes.cpp.inc",
3068         ),
3069     ],
3070     tblgen = ":mlir-tblgen",
3071     td_file = "include/mlir/Dialect/GPU/GPUOps.td",
3072     deps = [
3073         ":DLTIDialectTdFiles",
3074         ":GPUOpsTdFiles",
3075     ],
3078 cc_library(
3079     name = "GPUDialect",
3080     srcs = glob(
3081         [
3082             "lib/Dialect/GPU/IR/*.cpp",
3083             "lib/Dialect/GPU/IR/*.h",
3084         ],
3085     ),
3086     hdrs = ["include/mlir/Dialect/GPU/GPUDialect.h"],
3087     includes = ["include"],
3088     deps = [
3089         ":ArithmeticDialect",
3090         ":DLTIDialect",
3091         ":GPUBaseIncGen",
3092         ":GPUOpsIncGen",
3093         ":IR",
3094         ":InferTypeOpInterface",
3095         ":LLVMDialect",
3096         ":MemRefDialect",
3097         ":SideEffectInterfaces",
3098         ":StandardOps",
3099         ":Support",
3100         "//llvm:Support",
3101     ],
3104 gentbl_cc_library(
3105     name = "GPUPassIncGen",
3106     strip_include_prefix = "include",
3107     tbl_outs = [
3108         (
3109             [
3110                 "-gen-pass-decls",
3111                 "-name=GPU",
3112             ],
3113             "include/mlir/Dialect/GPU/Passes.h.inc",
3114         ),
3115         (
3116             [
3117                 "-gen-pass-capi-header",
3118                 "--prefix=GPU",
3119             ],
3120             "include/mlir/Dialect/GPU/Passes.capi.h.inc",
3121         ),
3122         (
3123             [
3124                 "-gen-pass-capi-impl",
3125                 "--prefix=GPU",
3126             ],
3127             "include/mlir/Dialect/GPU/Passes.capi.cpp.inc",
3128         ),
3129     ],
3130     tblgen = ":mlir-tblgen",
3131     td_file = "include/mlir/Dialect/GPU/Passes.td",
3132     deps = [":PassBaseTdFiles"],
3135 cc_library(
3136     name = "GPUTransforms",
3137     srcs = glob(
3138         [
3139             "lib/Dialect/GPU/Transforms/*.cpp",
3140             "lib/Dialect/GPU/Transforms/*.h",
3141         ],
3142     ),
3143     hdrs = [
3144         "include/mlir/Dialect/GPU/MemoryPromotion.h",
3145         "include/mlir/Dialect/GPU/ParallelLoopMapper.h",
3146         "include/mlir/Dialect/GPU/Passes.h",
3147         "include/mlir/Dialect/GPU/Utils.h",
3148     ],
3149     defines = if_cuda_available(["MLIR_GPU_TO_CUBIN_PASS_ENABLE"]),
3150     includes = ["include"],
3151     deps = [
3152         ":ArithmeticDialect",
3153         ":Async",
3154         ":DLTIDialect",
3155         ":GPUDialect",
3156         ":GPUPassIncGen",
3157         ":MemRefDialect",
3158         ":IR",
3159         ":ParallelLoopMapperAttrGen",
3160         ":Parser",
3161         ":Pass",
3162         ":ROCDLToLLVMIRTranslation",
3163         ":SCFDialect",
3164         ":StandardOps",
3165         ":Support",
3166         ":Transforms",
3167         ":ToLLVMIRTranslation",
3168         ":LLVMToLLVMIRTranslation",
3169         "//llvm:Core",
3170         "//llvm:MC",
3171         "//llvm:Support",
3172         "//llvm:Target",
3173     ] + if_cuda_available([
3174         # Dependencies for SerializeToCubin.cpp with
3175         # -DMLIR_GPU_TO_CUBIN_PASS_ENABLE
3176         ":NVVMToLLVMIRTranslation",
3177         "//llvm:NVPTXCodeGen",
3178         "@cuda//:cuda_headers",
3179         "@cuda//:libcuda",
3180     ]),
3183 td_library(
3184     name = "LLVMOpsTdFiles",
3185     srcs = [
3186         "include/mlir/Dialect/LLVMIR/LLVMOpBase.td",
3187         "include/mlir/Dialect/LLVMIR/LLVMOps.td",
3188         "include/mlir/Dialect/LLVMIR/LLVMOpsInterfaces.td",
3189     ],
3190     includes = ["include"],
3191     deps = [
3192         ":ControlFlowInterfacesTdFiles",
3193         ":FunctionInterfacesTdFiles",
3194         ":InferTypeOpInterfaceTdFiles",
3195         ":OpBaseTdFiles",
3196         ":SideEffectInterfacesTdFiles",
3197     ],
3200 cc_library(
3201     name = "GPUCommonTransforms",
3202     srcs = [
3203         "lib/Conversion/GPUCommon/GPUOpsLowering.cpp",
3204     ],
3205     hdrs = [
3206         "lib/Conversion/GPUCommon/GPUOpsLowering.h",
3207         "lib/Conversion/GPUCommon/IndexIntrinsicsOpLowering.h",
3208         "lib/Conversion/GPUCommon/OpToFuncCallLowering.h",
3209     ],
3210     deps = [
3211         ":GPUDialect",
3212         ":IR",
3213         ":LLVMCommonConversion",
3214         ":LLVMDialect",
3215         ":StandardOps",
3216         "//llvm:Support",
3217     ],
3220 gentbl_cc_library(
3221     name = "GPUToNVVMGen",
3222     strip_include_prefix = "lib/Conversion/GPUToNVVM",
3223     tbl_outs = [
3224         (
3225             ["-gen-rewriters"],
3226             "lib/Conversion/GPUToNVVM/GPUToNVVM.cpp.inc",
3227         ),
3228     ],
3229     tblgen = ":mlir-tblgen",
3230     td_file = "lib/Conversion/GPUToNVVM/GPUToNVVM.td",
3231     deps = [
3232         ":GPUOpsTdFiles",
3233         ":NVVMOpsTdFiles",
3234     ],
3237 cc_library(
3238     name = "GPUToNVVMTransforms",
3239     srcs = glob([
3240         "lib/Conversion/GPUToNVVM/*.cpp",
3241         "lib/Conversion/GPUToNVVM/*.h",
3242     ]) + [":ConversionPassDetail"],
3243     hdrs = glob([
3244         "include/mlir/Conversion/GPUToNVVM/*.h",
3245     ]),
3246     includes = ["include"],
3247     deps = [
3248         ":ArithmeticDialect",
3249         ":ArithmeticToLLVM",
3250         ":ConversionPassIncGen",
3251         ":GPUCommonTransforms",
3252         ":GPUDialect",
3253         ":GPUToNVVMGen",
3254         ":GPUTransforms",
3255         ":IR",
3256         ":LLVMCommonConversion",
3257         ":LLVMDialect",
3258         ":MathDialect",
3259         ":MemRefDialect",
3260         ":MemRefToLLVM",
3261         ":NVVMDialect",
3262         ":Pass",
3263         ":StandardToLLVM",
3264         ":Transforms",
3265         "//llvm:Support",
3266     ],
3269 cc_library(
3270     name = "VectorToROCDL",
3271     srcs = [
3272         "lib/Conversion/VectorToROCDL/VectorToROCDL.cpp",
3273         ":ConversionPassDetail",
3274     ],
3275     hdrs = ["include/mlir/Conversion/VectorToROCDL/VectorToROCDL.h"],
3276     includes = ["include"],
3277     deps = [
3278         ":ConversionPassIncGen",
3279         ":GPUDialect",
3280         ":LLVMCommonConversion",
3281         ":LLVMDialect",
3282         ":MemRefToLLVM",
3283         ":Pass",
3284         ":ROCDLDialect",
3285         ":StandardOps",
3286         ":StandardToLLVM",
3287         ":Transforms",
3288         ":VectorOps",
3289     ],
3292 cc_library(
3293     name = "VectorToSPIRV",
3294     srcs = glob([
3295         "lib/Conversion/VectorToSPIRV/*.cpp",
3296         "lib/Conversion/VectorToSPIRV/*.h",
3297     ]) + [":ConversionPassDetail"],
3298     hdrs = glob([
3299         "include/mlir/Conversion/VectorToSPIRV/*.h",
3300     ]),
3301     includes = ["include"],
3302     deps = [
3303         ":ConversionPassIncGen",
3304         ":Pass",
3305         ":SPIRVConversion",
3306         ":SPIRVDialect",
3307         ":Transforms",
3308         ":VectorOps",
3309     ],
3312 gentbl_cc_library(
3313     name = "GPUToROCDLTGen",
3314     strip_include_prefix = "lib/Conversion/GPUToROCDL",
3315     tbl_outs = [
3316         (
3317             ["-gen-rewriters"],
3318             "lib/Conversion/GPUToROCDL/GPUToROCDL.cpp.inc",
3319         ),
3320     ],
3321     tblgen = ":mlir-tblgen",
3322     td_file = "lib/Conversion/GPUToROCDL/GPUToROCDL.td",
3323     deps = [
3324         ":GPUOpsTdFiles",
3325         ":ROCDLOpsTdFiles",
3326     ],
3329 cc_library(
3330     name = "GPUToROCDLTransforms",
3331     srcs = [
3332         "lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp",
3333         ":ConversionPassDetail",
3334     ],
3335     hdrs = ["include/mlir/Conversion/GPUToROCDL/GPUToROCDLPass.h"],
3336     includes = ["include"],
3337     deps = [
3338         ":ArithmeticToLLVM",
3339         ":ConversionPassIncGen",
3340         ":GPUCommonTransforms",
3341         ":GPUDialect",
3342         ":GPUToROCDLTGen",
3343         ":GPUTransforms",
3344         ":LLVMCommonConversion",
3345         ":MathDialect",
3346         ":MemRefToLLVM",
3347         ":Pass",
3348         ":ROCDLDialect",
3349         ":StandardToLLVM",
3350         ":Transforms",
3351         ":VectorOps",
3352         ":VectorToLLVM",
3353         ":VectorToROCDL",
3354         ":VectorToSCF",
3355         "//llvm:Support",
3356     ],
3359 cc_library(
3360     name = "GPUToVulkanTransforms",
3361     srcs = [
3362         "lib/Conversion/GPUToVulkan/ConvertGPULaunchFuncToVulkanLaunchFunc.cpp",
3363         "lib/Conversion/GPUToVulkan/ConvertLaunchFuncToVulkanCalls.cpp",
3364         ":ConversionPassDetail",
3365     ],
3366     hdrs = ["include/mlir/Conversion/GPUToVulkan/ConvertGPUToVulkanPass.h"],
3367     includes = ["include"],
3368     deps = [
3369         ":ConversionPassIncGen",
3370         ":GPUDialect",
3371         ":IR",
3372         ":LLVMDialect",
3373         ":Pass",
3374         ":SPIRVDialect",
3375         ":SPIRVSerialization",
3376         ":StandardOps",
3377         ":Support",
3378         "//llvm:Support",
3379     ],
3382 cc_library(
3383     name = "GPUToGPURuntimeTransforms",
3384     srcs = [
3385         "lib/Conversion/GPUCommon/GPUToLLVMConversion.cpp",
3386         ":ConversionPassDetail",
3387     ],
3388     hdrs = ["include/mlir/Conversion/GPUCommon/GPUCommonPass.h"],
3389     includes = ["include"],
3390     deps = [
3391         ":ArithmeticToLLVM",
3392         ":Async",
3393         ":AsyncToLLVM",
3394         ":ConversionPassIncGen",
3395         ":GPUDialect",
3396         ":GPUTransforms",
3397         ":IR",
3398         ":LLVMCommonConversion",
3399         ":LLVMDialect",
3400         ":MemRefToLLVM",
3401         ":NVVMToLLVMIRTranslation",
3402         ":Pass",
3403         ":StandardToLLVM",
3404         ":Support",
3405         ":VectorToLLVM",
3406         "//llvm:Support",
3407     ],
3410 cc_library(
3411     name = "GPUToSPIRV",
3412     srcs = glob([
3413         "lib/Conversion/GPUToSPIRV/*.cpp",
3414         "lib/Conversion/GPUToSPIRV/*.h",
3415     ]) + [":ConversionPassDetail"],
3416     hdrs = glob([
3417         "include/mlir/Conversion/GPUToSPIRV/*.h",
3418     ]),
3419     includes = [
3420         "include",
3421         "lib/Conversions/GPUToSPIRV",
3422     ],
3423     deps = [
3424         ":ArithmeticToSPIRV",
3425         ":ConversionPassIncGen",
3426         ":GPUDialect",
3427         ":IR",
3428         ":MemRefToSPIRV",
3429         ":Pass",
3430         ":SCFDialect",
3431         ":SCFToSPIRV",
3432         ":SPIRVConversion",
3433         ":SPIRVDialect",
3434         ":StandardToSPIRV",
3435         ":Support",
3436         ":Transforms",
3437         ":VectorToSPIRV",
3438         "//llvm:Support",
3439     ],
3442 cc_library(
3443     name = "PDLToPDLInterp",
3444     srcs = glob([
3445         "lib/Conversion/PDLToPDLInterp/*.cpp",
3446         "lib/Conversion/PDLToPDLInterp/*.h",
3447     ]) + [":ConversionPassDetail"],
3448     hdrs = ["include/mlir/Conversion/PDLToPDLInterp/PDLToPDLInterp.h"],
3449     includes = ["include"],
3450     deps = [
3451         ":ConversionPassIncGen",
3452         ":IR",
3453         ":InferTypeOpInterface",
3454         ":PDLDialect",
3455         ":PDLInterpDialect",
3456         ":Pass",
3457         ":Support",
3458         "//llvm:Support",
3459     ],
3462 cc_library(
3463     name = "SPIRVToLLVM",
3464     srcs = glob([
3465         "lib/Conversion/SPIRVToLLVM/*.cpp",
3466     ]) + [":ConversionPassDetail"],
3467     hdrs = glob([
3468         "include/mlir/Conversion/SPIRVToLLVM/*.h",
3469     ]),
3470     includes = ["include"],
3471     deps = [
3472         ":ArithmeticToLLVM",
3473         ":ConversionPassIncGen",
3474         ":GPUDialect",
3475         ":IR",
3476         ":LLVMCommonConversion",
3477         ":LLVMDialect",
3478         ":MemRefToLLVM",
3479         ":Pass",
3480         ":SPIRVDialect",
3481         ":SPIRVUtils",
3482         ":StandardOps",
3483         ":StandardToLLVM",
3484         ":Support",
3485         ":Transforms",
3486         "//llvm:Support",
3487     ],
3490 gentbl_cc_library(
3491     name = "LLVMOpsIncGen",
3492     strip_include_prefix = "include",
3493     tbl_outs = [
3494         (
3495             ["-gen-op-decls"],
3496             "include/mlir/Dialect/LLVMIR/LLVMOps.h.inc",
3497         ),
3498         (
3499             ["-gen-op-defs"],
3500             "include/mlir/Dialect/LLVMIR/LLVMOps.cpp.inc",
3501         ),
3502         (
3503             ["-gen-dialect-decls"],
3504             "include/mlir/Dialect/LLVMIR/LLVMOpsDialect.h.inc",
3505         ),
3506         (
3507             ["-gen-dialect-defs"],
3508             "include/mlir/Dialect/LLVMIR/LLVMOpsDialect.cpp.inc",
3509         ),
3510         (
3511             ["-gen-enum-decls"],
3512             "include/mlir/Dialect/LLVMIR/LLVMOpsEnums.h.inc",
3513         ),
3514         (
3515             ["-gen-enum-defs"],
3516             "include/mlir/Dialect/LLVMIR/LLVMOpsEnums.cpp.inc",
3517         ),
3518     ],
3519     tblgen = ":mlir-tblgen",
3520     td_file = "include/mlir/Dialect/LLVMIR/LLVMOps.td",
3521     deps = [":LLVMOpsTdFiles"],
3524 gentbl_cc_library(
3525     name = "LLVMConversionIncGen",
3526     strip_include_prefix = "include",
3527     tbl_outs = [
3528         (
3529             ["-gen-llvmir-conversions"],
3530             "include/mlir/Dialect/LLVMIR/LLVMConversions.inc",
3531         ),
3532         (
3533             ["-gen-enum-to-llvmir-conversions"],
3534             "include/mlir/Dialect/LLVMIR/LLVMConversionEnumsToLLVM.inc",
3535         ),
3536         (
3537             ["-gen-enum-from-llvmir-conversions"],
3538             "include/mlir/Dialect/LLVMIR/LLVMConversionEnumsFromLLVM.inc",
3539         ),
3540     ],
3541     tblgen = ":mlir-tblgen",
3542     td_file = "include/mlir/Dialect/LLVMIR/LLVMOps.td",
3543     deps = [":LLVMOpsTdFiles"],
3546 cc_library(
3547     name = "NVVMDialect",
3548     srcs = ["lib/Dialect/LLVMIR/IR/NVVMDialect.cpp"],
3549     hdrs = ["include/mlir/Dialect/LLVMIR/NVVMDialect.h"],
3550     includes = ["include"],
3551     deps = [
3552         ":IR",
3553         ":LLVMDialect",
3554         ":NVVMOpsIncGen",
3555         ":SideEffectInterfaces",
3556         ":StandardOps",
3557         ":Support",
3558         "//llvm:AsmParser",
3559         "//llvm:Core",
3560         "//llvm:Support",
3561     ],
3564 td_library(
3565     name = "NVVMOpsTdFiles",
3566     srcs = ["include/mlir/Dialect/LLVMIR/NVVMOps.td"],
3567     includes = ["include"],
3568     deps = [
3569         ":LLVMOpsTdFiles",
3570         ":OpBaseTdFiles",
3571         ":SideEffectInterfacesTdFiles",
3572     ],
3575 gentbl_cc_library(
3576     name = "NVVMOpsIncGen",
3577     strip_include_prefix = "include",
3578     tbl_outs = [
3579         (
3580             ["-gen-op-decls"],
3581             "include/mlir/Dialect/LLVMIR/NVVMOps.h.inc",
3582         ),
3583         (
3584             ["-gen-op-defs"],
3585             "include/mlir/Dialect/LLVMIR/NVVMOps.cpp.inc",
3586         ),
3587         (
3588             [
3589                 "-gen-dialect-decls",
3590                 "-dialect=nvvm",
3591             ],
3592             "include/mlir/Dialect/LLVMIR/NVVMOpsDialect.h.inc",
3593         ),
3594         (
3595             [
3596                 "-gen-dialect-defs",
3597                 "-dialect=nvvm",
3598             ],
3599             "include/mlir/Dialect/LLVMIR/NVVMOpsDialect.cpp.inc",
3600         ),
3601         (
3602             ["-gen-enum-decls"],
3603             "include/mlir/Dialect/LLVMIR/NVVMOpsEnums.h.inc",
3604         ),
3605         (
3606             ["-gen-enum-defs"],
3607             "include/mlir/Dialect/LLVMIR/NVVMOpsEnums.cpp.inc",
3608         ),
3609         (
3610             [
3611                 "-gen-attrdef-decls",
3612                 "-attrdefs-dialect=nvvm",
3613             ],
3614             "include/mlir/Dialect/LLVMIR/NVVMOpsAttributes.h.inc",
3615         ),
3616         (
3617             [
3618                 "-gen-attrdef-defs",
3619                 "-attrdefs-dialect=nvvm",
3620             ],
3621             "include/mlir/Dialect/LLVMIR/NVVMOpsAttributes.cpp.inc",
3622         ),
3623     ],
3624     tblgen = ":mlir-tblgen",
3625     td_file = "include/mlir/Dialect/LLVMIR/NVVMOps.td",
3626     deps = [":NVVMOpsTdFiles"],
3629 gentbl_cc_library(
3630     name = "NVVMConversionIncGen",
3631     strip_include_prefix = "include",
3632     tbl_outs = [
3633         (
3634             ["-gen-llvmir-conversions"],
3635             "include/mlir/Dialect/LLVMIR/NVVMConversions.inc",
3636         ),
3637     ],
3638     tblgen = ":mlir-tblgen",
3639     td_file = "include/mlir/Dialect/LLVMIR/NVVMOps.td",
3640     deps = [":NVVMOpsTdFiles"],
3643 cc_library(
3644     name = "ROCDLDialect",
3645     srcs = ["lib/Dialect/LLVMIR/IR/ROCDLDialect.cpp"],
3646     hdrs = ["include/mlir/Dialect/LLVMIR/ROCDLDialect.h"],
3647     includes = ["include"],
3648     deps = [
3649         ":IR",
3650         ":LLVMDialect",
3651         ":ROCDLOpsIncGen",
3652         ":SideEffectInterfaces",
3653         ":StandardOps",
3654         ":Support",
3655         "//llvm:AsmParser",
3656         "//llvm:Core",
3657         "//llvm:Support",
3658     ],
3661 td_library(
3662     name = "ROCDLOpsTdFiles",
3663     srcs = ["include/mlir/Dialect/LLVMIR/ROCDLOps.td"],
3664     includes = ["include"],
3665     deps = [
3666         ":LLVMOpsTdFiles",
3667         ":OpBaseTdFiles",
3668         ":SideEffectInterfacesTdFiles",
3669     ],
3672 gentbl_cc_library(
3673     name = "ROCDLOpsIncGen",
3674     strip_include_prefix = "include",
3675     tbl_outs = [
3676         (
3677             ["-gen-op-decls"],
3678             "include/mlir/Dialect/LLVMIR/ROCDLOps.h.inc",
3679         ),
3680         (
3681             ["-gen-op-defs"],
3682             "include/mlir/Dialect/LLVMIR/ROCDLOps.cpp.inc",
3683         ),
3684         (
3685             [
3686                 "-gen-dialect-decls",
3687                 "-dialect=rocdl",
3688             ],
3689             "include/mlir/Dialect/LLVMIR/ROCDLOpsDialect.h.inc",
3690         ),
3691         (
3692             [
3693                 "-gen-dialect-defs",
3694                 "-dialect=rocdl",
3695             ],
3696             "include/mlir/Dialect/LLVMIR/ROCDLOpsDialect.cpp.inc",
3697         ),
3698     ],
3699     tblgen = ":mlir-tblgen",
3700     td_file = "include/mlir/Dialect/LLVMIR/ROCDLOps.td",
3701     deps = [":ROCDLOpsTdFiles"],
3704 gentbl_cc_library(
3705     name = "ROCDLConversionIncGen",
3706     strip_include_prefix = "include",
3707     tbl_outs = [
3708         (
3709             ["-gen-llvmir-conversions"],
3710             "include/mlir/Dialect/LLVMIR/ROCDLConversions.inc",
3711         ),
3712     ],
3713     tblgen = ":mlir-tblgen",
3714     td_file = "include/mlir/Dialect/LLVMIR/ROCDLOps.td",
3715     deps = [":ROCDLOpsTdFiles"],
3718 cc_library(
3719     name = "PDLDialect",
3720     srcs = glob([
3721         "lib/Dialect/PDL/IR/*.cpp",
3722         "lib/Dialect/PDL/IR/*.h",
3723     ]),
3724     hdrs = glob([
3725         "include/mlir/Dialect/PDL/IR/*.h",
3726     ]),
3727     includes = ["include"],
3728     deps = [
3729         ":IR",
3730         ":InferTypeOpInterface",
3731         ":PDLOpsIncGen",
3732         ":PDLTypesIncGen",
3733         ":SideEffects",
3734         ":Support",
3735         "//llvm:Support",
3736     ],
3739 td_library(
3740     name = "PDLDialectTdFiles",
3741     srcs = [
3742         "include/mlir/Dialect/PDL/IR/PDLDialect.td",
3743         "include/mlir/Dialect/PDL/IR/PDLOps.td",
3744         "include/mlir/Dialect/PDL/IR/PDLTypes.td",
3745     ],
3746     deps = [
3747         ":OpBaseTdFiles",
3748         ":SideEffectInterfacesTdFiles",
3749     ],
3752 gentbl_cc_library(
3753     name = "PDLOpsIncGen",
3754     strip_include_prefix = "include",
3755     tbl_outs = [
3756         (
3757             ["-gen-op-decls"],
3758             "include/mlir/Dialect/PDL/IR/PDLOps.h.inc",
3759         ),
3760         (
3761             ["-gen-op-defs"],
3762             "include/mlir/Dialect/PDL/IR/PDLOps.cpp.inc",
3763         ),
3764         (
3765             ["-gen-dialect-decls"],
3766             "include/mlir/Dialect/PDL/IR/PDLOpsDialect.h.inc",
3767         ),
3768         (
3769             ["-gen-dialect-defs"],
3770             "include/mlir/Dialect/PDL/IR/PDLOpsDialect.cpp.inc",
3771         ),
3772     ],
3773     tblgen = ":mlir-tblgen",
3774     td_file = "include/mlir/Dialect/PDL/IR/PDLOps.td",
3775     deps = [":PDLDialectTdFiles"],
3778 gentbl_cc_library(
3779     name = "PDLTypesIncGen",
3780     strip_include_prefix = "include",
3781     tbl_outs = [
3782         (
3783             ["-gen-typedef-decls"],
3784             "include/mlir/Dialect/PDL/IR/PDLOpsTypes.h.inc",
3785         ),
3786         (
3787             ["-gen-typedef-defs"],
3788             "include/mlir/Dialect/PDL/IR/PDLOpsTypes.cpp.inc",
3789         ),
3790     ],
3791     tblgen = ":mlir-tblgen",
3792     td_file = "include/mlir/Dialect/PDL/IR/PDLTypes.td",
3793     deps = [":PDLDialectTdFiles"],
3796 cc_library(
3797     name = "PDLInterpDialect",
3798     srcs = glob([
3799         "lib/Dialect/PDLInterp/IR/*.cpp",
3800         "lib/Dialect/PDLInterp/IR/*.h",
3801     ]),
3802     hdrs = glob([
3803         "include/mlir/Dialect/PDLInterp/IR/*.h",
3804     ]),
3805     includes = ["include"],
3806     deps = [
3807         ":IR",
3808         ":InferTypeOpInterface",
3809         ":PDLDialect",
3810         ":PDLInterpOpsIncGen",
3811         ":SideEffects",
3812         ":Support",
3813         "//llvm:Support",
3814     ],
3817 td_library(
3818     name = "PDLInterpOpsTdFiles",
3819     srcs = ["include/mlir/Dialect/PDLInterp/IR/PDLInterpOps.td"],
3820     includes = ["include"],
3821     deps = [
3822         ":OpBaseTdFiles",
3823         ":PDLDialectTdFiles",
3824         ":SideEffectInterfacesTdFiles",
3825     ],
3828 gentbl_cc_library(
3829     name = "PDLInterpOpsIncGen",
3830     strip_include_prefix = "include",
3831     tbl_outs = [
3832         (
3833             ["-gen-op-decls"],
3834             "include/mlir/Dialect/PDLInterp/IR/PDLInterpOps.h.inc",
3835         ),
3836         (
3837             ["-gen-op-defs"],
3838             "include/mlir/Dialect/PDLInterp/IR/PDLInterpOps.cpp.inc",
3839         ),
3840         (
3841             [
3842                 "-gen-dialect-decls",
3843                 "-dialect=pdl_interp",
3844             ],
3845             "include/mlir/Dialect/PDLInterp/IR/PDLInterpOpsDialect.h.inc",
3846         ),
3847         (
3848             [
3849                 "-gen-dialect-defs",
3850                 "-dialect=pdl_interp",
3851             ],
3852             "include/mlir/Dialect/PDLInterp/IR/PDLInterpOpsDialect.cpp.inc",
3853         ),
3854     ],
3855     tblgen = ":mlir-tblgen",
3856     td_file = "include/mlir/Dialect/PDLInterp/IR/PDLInterpOps.td",
3857     deps = [":PDLInterpOpsTdFiles"],
3860 td_library(
3861     name = "SPIRVOpsTdFiles",
3862     srcs = glob(["include/mlir/Dialect/SPIRV/IR/*.td"]),
3863     includes = ["include"],
3864     deps = [
3865         ":CallInterfacesTdFiles",
3866         ":ControlFlowInterfacesTdFiles",
3867         ":FunctionInterfacesTdFiles",
3868         ":InferTypeOpInterfaceTdFiles",
3869         ":OpBaseTdFiles",
3870         ":SideEffectInterfacesTdFiles",
3871     ],
3874 gentbl_cc_library(
3875     name = "SPIRVOpsIncGen",
3876     strip_include_prefix = "include",
3877     tbl_outs = [
3878         (
3879             ["-gen-op-decls"],
3880             "include/mlir/Dialect/SPIRV/IR/SPIRVOps.h.inc",
3881         ),
3882         (
3883             ["-gen-op-defs"],
3884             "include/mlir/Dialect/SPIRV/IR/SPIRVOps.cpp.inc",
3885         ),
3886         (
3887             ["-gen-dialect-decls"],
3888             "include/mlir/Dialect/SPIRV/IR/SPIRVOpsDialect.h.inc",
3889         ),
3890         (
3891             ["-gen-dialect-defs"],
3892             "include/mlir/Dialect/SPIRV/IR/SPIRVOpsDialect.cpp.inc",
3893         ),
3894         (
3895             ["-gen-op-doc"],
3896             "g3doc/Dialects/SPIRV/SPIRVOps.md",
3897         ),
3898         (
3899             ["-gen-enum-decls"],
3900             "include/mlir/Dialect/SPIRV/IR/SPIRVEnums.h.inc",
3901         ),
3902         (
3903             ["-gen-enum-defs"],
3904             "include/mlir/Dialect/SPIRV/IR/SPIRVEnums.cpp.inc",
3905         ),
3906         (
3907             ["-gen-spirv-enum-avail-decls"],
3908             "include/mlir/Dialect/SPIRV/IR/SPIRVEnumAvailability.h.inc",
3909         ),
3910         (
3911             ["-gen-spirv-enum-avail-defs"],
3912             "include/mlir/Dialect/SPIRV/IR/SPIRVEnumAvailability.cpp.inc",
3913         ),
3914         (
3915             ["-gen-spirv-capability-implication"],
3916             "include/mlir/Dialect/SPIRV/IR/SPIRVCapabilityImplication.inc",
3917         ),
3918     ],
3919     tblgen = ":mlir-tblgen",
3920     td_file = "include/mlir/Dialect/SPIRV/IR/SPIRVOps.td",
3921     deps = [":SPIRVOpsTdFiles"],
3924 gentbl_cc_library(
3925     name = "SPIRVCanonicalizationIncGen",
3926     strip_include_prefix = "lib/Dialect/SPIRV/IR",
3927     tbl_outs = [
3928         (
3929             ["-gen-rewriters"],
3930             "lib/Dialect/SPIRV/IR/SPIRVCanonicalization.inc",
3931         ),
3932     ],
3933     tblgen = ":mlir-tblgen",
3934     td_file = "lib/Dialect/SPIRV/IR/SPIRVCanonicalization.td",
3935     deps = [":SPIRVOpsTdFiles"],
3938 gentbl_cc_library(
3939     name = "SPIRVAvailabilityIncGen",
3940     strip_include_prefix = "include",
3941     tbl_outs = [
3942         (
3943             ["-gen-avail-interface-decls"],
3944             "include/mlir/Dialect/SPIRV/IR/SPIRVAvailability.h.inc",
3945         ),
3946         (
3947             ["-gen-avail-interface-defs"],
3948             "include/mlir/Dialect/SPIRV/IR/SPIRVAvailability.cpp.inc",
3949         ),
3950         (
3951             ["-gen-spirv-avail-impls"],
3952             "include/mlir/Dialect/SPIRV/IR/SPIRVOpAvailabilityImpl.inc",
3953         ),
3954     ],
3955     tblgen = ":mlir-tblgen",
3956     td_file = "include/mlir/Dialect/SPIRV/IR/SPIRVOps.td",
3957     deps = [":SPIRVOpsTdFiles"],
3960 gentbl_cc_library(
3961     name = "SPIRVTargetAndABIStructGen",
3962     tbl_outs = [
3963         (
3964             ["-gen-struct-attr-decls"],
3965             "include/mlir/Dialect/SPIRV/IR/TargetAndABI.h.inc",
3966         ),
3967         (
3968             ["-gen-struct-attr-defs"],
3969             "include/mlir/Dialect/SPIRV/IR/TargetAndABI.cpp.inc",
3970         ),
3971     ],
3972     tblgen = ":mlir-tblgen",
3973     td_file = "include/mlir/Dialect/SPIRV/IR/TargetAndABI.td",
3974     deps = [":SPIRVOpsTdFiles"],
3977 gentbl_cc_library(
3978     name = "SPIRVAttrUtilsGen",
3979     strip_include_prefix = "include",
3980     tbl_outs = [
3981         (
3982             ["-gen-spirv-attr-utils"],
3983             "include/mlir/Dialect/SPIRV/IR/SPIRVAttrUtils.inc",
3984         ),
3985     ],
3986     tblgen = ":mlir-tblgen",
3987     td_file = "include/mlir/Dialect/SPIRV/IR/SPIRVBase.td",
3988     deps = [":SPIRVOpsTdFiles"],
3991 gentbl_cc_library(
3992     name = "SPIRVSerializationGen",
3993     strip_include_prefix = "include",
3994     tbl_outs = [
3995         (
3996             ["-gen-spirv-serialization"],
3997             "include/mlir/Dialect/SPIRV/IR/SPIRVSerialization.inc",
3998         ),
3999     ],
4000     tblgen = ":mlir-tblgen",
4001     td_file = "include/mlir/Dialect/SPIRV/IR/SPIRVOps.td",
4002     deps = [":SPIRVOpsTdFiles"],
4005 cc_library(
4006     name = "SPIRVDialect",
4007     srcs = glob([
4008         "lib/Dialect/SPIRV/IR/*.cpp",
4009         "lib/Dialect/SPIRV/IR/*.h",
4010     ]) + ["include/mlir/Transforms/InliningUtils.h"],
4011     hdrs = glob([
4012         "include/mlir/Dialect/SPIRV/IR/*.h",
4013     ]),
4014     includes = ["include"],
4015     deps = [
4016         ":CommonFolders",
4017         ":ControlFlowInterfaces",
4018         ":IR",
4019         ":InferTypeOpInterface",
4020         ":Parser",
4021         ":Pass",
4022         ":SPIRVAttrUtilsGen",
4023         ":SPIRVAvailabilityIncGen",
4024         ":SPIRVCanonicalizationIncGen",
4025         ":SPIRVOpsIncGen",
4026         ":SPIRVSerializationGen",
4027         ":SPIRVTargetAndABIStructGen",
4028         ":SideEffectInterfaces",
4029         ":Support",
4030         ":Transforms",
4031         "//llvm:Support",
4032     ],
4035 gentbl_cc_library(
4036     name = "SPIRVPassIncGen",
4037     strip_include_prefix = "include",
4038     tbl_outs = [
4039         (
4040             [
4041                 "-gen-pass-decls",
4042                 "-name=SPIRV",
4043             ],
4044             "include/mlir/Dialect/SPIRV/Transforms/Passes.h.inc",
4045         ),
4046     ],
4047     tblgen = ":mlir-tblgen",
4048     td_file = "include/mlir/Dialect/SPIRV/Transforms/Passes.td",
4049     deps = [":PassBaseTdFiles"],
4052 cc_library(
4053     name = "SPIRVUtils",
4054     srcs = glob([
4055         "lib/Dialect/SPIRV/Utils/*.cpp",
4056     ]),
4057     hdrs = glob([
4058         "include/mlir/Dialect/SPIRV/Utils/*.h",
4059     ]),
4060     includes = ["include"],
4061     deps = [
4062         ":SPIRVDialect",
4063         ":Support",
4064         "//llvm:Support",
4065     ],
4068 cc_library(
4069     name = "SPIRVConversion",
4070     srcs = ["lib/Dialect/SPIRV/Transforms/SPIRVConversion.cpp"],
4071     hdrs = ["include/mlir/Dialect/SPIRV/Transforms/SPIRVConversion.h"],
4072     includes = ["include"],
4073     deps = [
4074         ":SPIRVDialect",
4075         ":Support",
4076         ":TransformUtils",
4077         "//llvm:Support",
4078     ],
4081 cc_library(
4082     name = "SPIRVTransforms",
4083     srcs = glob(
4084         [
4085             "lib/Dialect/SPIRV/Transforms/*.cpp",
4086             "lib/Dialect/SPIRV/Transforms/*.h",
4087         ],
4088         exclude = ["lib/Dialect/SPIRV/Transforms/SPIRVConversion.cpp"],
4089     ),
4090     hdrs = glob(
4091         ["include/mlir/Dialect/SPIRV/Transforms/*.h"],
4092         exclude = ["include/mlir/Dialect/SPIRV/Transforms/SPIRVConversion.h"],
4093     ),
4094     includes = ["include"],
4095     deps = [
4096         ":IR",
4097         ":Pass",
4098         ":SPIRVConversion",
4099         ":SPIRVDialect",
4100         ":SPIRVPassIncGen",
4101         ":SPIRVUtils",
4102         ":Support",
4103         ":Transforms",
4104         "//llvm:Support",
4105     ],
4108 cc_library(
4109     name = "SPIRVCommonConversion",
4110     hdrs = ["lib/Conversion/SPIRVCommon/Pattern.h"],
4111     includes = ["include"],
4112     deps = [
4113         ":IR",
4114         ":SPIRVDialect",
4115         ":Support",
4116         ":Transforms",
4117     ],
4120 cc_library(
4121     name = "MathToSPIRV",
4122     srcs = glob([
4123         "lib/Conversion/MathToSPIRV/*.cpp",
4124         "lib/Conversion/MathToSPIRV/*.h",
4125     ]) + [":ConversionPassDetail"],
4126     hdrs = glob([
4127         "include/mlir/Conversion/MathToSPIRV/*.h",
4128     ]),
4129     includes = [
4130         "include",
4131         "lib/Conversion/MathToSPIRV",
4132     ],
4133     deps = [
4134         ":ConversionPassIncGen",
4135         ":IR",
4136         ":MathDialect",
4137         ":Pass",
4138         ":SPIRVCommonConversion",
4139         ":SPIRVConversion",
4140         ":SPIRVDialect",
4141         ":Support",
4142         ":Transforms",
4143         "//llvm:Support",
4144     ],
4147 cc_library(
4148     name = "StandardToSPIRV",
4149     srcs = glob([
4150         "lib/Conversion/StandardToSPIRV/*.cpp",
4151         "lib/Conversion/StandardToSPIRV/*.h",
4152     ]) + [":ConversionPassDetail"],
4153     hdrs = glob([
4154         "include/mlir/Conversion/StandardToSPIRV/*.h",
4155     ]),
4156     includes = [
4157         "include",
4158         "lib/Conversion/StandardToSPIRV",
4159     ],
4160     deps = [
4161         ":ArithmeticToSPIRV",
4162         ":ConversionPassIncGen",
4163         ":IR",
4164         ":MathToSPIRV",
4165         ":Pass",
4166         ":SPIRVCommonConversion",
4167         ":SPIRVConversion",
4168         ":SPIRVDialect",
4169         ":SPIRVUtils",
4170         ":StandardOps",
4171         ":Support",
4172         ":TensorDialect",
4173         ":Transforms",
4174         ":VectorOps",
4175         "//llvm:Support",
4176     ],
4179 cc_library(
4180     name = "SPIRVBinaryUtils",
4181     srcs = ["lib/Target/SPIRV/SPIRVBinaryUtils.cpp"],
4182     hdrs = ["include/mlir/Target/SPIRV/SPIRVBinaryUtils.h"],
4183     includes = ["include"],
4184     deps = [
4185         ":IR",
4186         ":SPIRVAttrUtilsGen",
4187         ":SPIRVDialect",
4188         ":SPIRVOpsIncGen",
4189         ":Support",
4190         "//llvm:Support",
4191     ],
4194 cc_library(
4195     name = "SPIRVSerialization",
4196     srcs = [
4197         "lib/Target/SPIRV/Serialization/Serialization.cpp",
4198         "lib/Target/SPIRV/Serialization/SerializeOps.cpp",
4199         "lib/Target/SPIRV/Serialization/Serializer.cpp",
4200         "lib/Target/SPIRV/Serialization/Serializer.h",
4201     ],
4202     hdrs = ["include/mlir/Target/SPIRV/Serialization.h"],
4203     includes = ["include"],
4204     deps = [
4205         ":IR",
4206         ":SPIRVAttrUtilsGen",
4207         ":SPIRVBinaryUtils",
4208         ":SPIRVDialect",
4209         ":SPIRVOpsIncGen",
4210         ":SPIRVSerializationGen",
4211         ":Support",
4212         ":Transforms",
4213         "//llvm:Support",
4214     ],
4217 cc_library(
4218     name = "SPIRVDeserialization",
4219     srcs = glob([
4220         "lib/Target/SPIRV/Deserialization/*.cpp",
4221         "lib/Target/SPIRV/Deserialization/*.h",
4222     ]),
4223     hdrs = ["include/mlir/Target/SPIRV/Deserialization.h"],
4224     includes = ["include"],
4225     deps = [
4226         ":IR",
4227         ":SPIRVAttrUtilsGen",
4228         ":SPIRVBinaryUtils",
4229         ":SPIRVDialect",
4230         ":SPIRVOpsIncGen",
4231         ":SPIRVSerializationGen",
4232         ":Support",
4233         ":Transforms",
4234         "//llvm:Support",
4235     ],
4238 cc_library(
4239     name = "SPIRVModuleCombiner",
4240     srcs = glob(
4241         ["lib/Dialect/SPIRV/Linking/ModuleCombiner/*.cpp"],
4242     ),
4243     hdrs = ["include/mlir/Dialect/SPIRV/Linking/ModuleCombiner.h"],
4244     includes = ["include"],
4245     deps = [
4246         ":IR",
4247         ":SPIRVDialect",
4248         ":Support",
4249         "//llvm:Support",
4250     ],
4253 cc_library(
4254     name = "SPIRVTranslateRegistration",
4255     srcs = ["lib/Target/SPIRV/TranslateRegistration.cpp"],
4256     includes = ["include"],
4257     deps = [
4258         ":IR",
4259         ":Parser",
4260         ":SPIRVDeserialization",
4261         ":SPIRVDialect",
4262         ":SPIRVSerialization",
4263         ":Support",
4264         ":Translation",
4265         "//llvm:Support",
4266     ],
4269 td_library(
4270     name = "TensorOpsTdFiles",
4271     srcs = [
4272         "include/mlir/Dialect/Tensor/IR/TensorBase.td",
4273         "include/mlir/Dialect/Tensor/IR/TensorOps.td",
4274     ],
4275     includes = ["include"],
4276     deps = [
4277         ":CastInterfacesTdFiles",
4278         ":ControlFlowInterfacesTdFiles",
4279         ":InferTypeOpInterfaceTdFiles",
4280         ":OpBaseTdFiles",
4281         ":SideEffectInterfacesTdFiles",
4282         ":TilingInterfaceTdFiles",
4283         ":ViewLikeInterfaceTdFiles",
4284     ],
4287 gentbl_cc_library(
4288     name = "TensorOpsIncGen",
4289     strip_include_prefix = "include",
4290     tbl_outs = [
4291         (
4292             [
4293                 "-gen-dialect-decls",
4294                 "-dialect=tensor",
4295             ],
4296             "include/mlir/Dialect/Tensor/IR/TensorOpsDialect.h.inc",
4297         ),
4298         (
4299             [
4300                 "-gen-dialect-defs",
4301                 "-dialect=tensor",
4302             ],
4303             "include/mlir/Dialect/Tensor/IR/TensorOpsDialect.cpp.inc",
4304         ),
4305         (
4306             ["-gen-op-decls"],
4307             "include/mlir/Dialect/Tensor/IR/TensorOps.h.inc",
4308         ),
4309         (
4310             ["-gen-op-defs"],
4311             "include/mlir/Dialect/Tensor/IR/TensorOps.cpp.inc",
4312         ),
4313     ],
4314     tblgen = ":mlir-tblgen",
4315     td_file = "include/mlir/Dialect/Tensor/IR/TensorOps.td",
4316     deps = [":TensorOpsTdFiles"],
4319 cc_library(
4320     name = "TensorDialect",
4321     srcs = [
4322         "include/mlir/Transforms/InliningUtils.h",
4323         "lib/Dialect/Tensor/IR/TensorDialect.cpp",
4324         "lib/Dialect/Tensor/IR/TensorOps.cpp",
4325     ],
4326     hdrs = ["include/mlir/Dialect/Tensor/IR/Tensor.h"],
4327     includes = ["include"],
4328     deps = [
4329         ":ArithmeticDialect",
4330         ":CastOpInterfaces",
4331         ":ControlFlowInterfaces",
4332         ":DialectUtils",
4333         ":IR",
4334         ":InferTypeOpInterface",
4335         ":SideEffectInterfaces",
4336         ":StandardOps",
4337         ":Support",
4338         ":TensorOpsIncGen",
4339         ":TilingInterface",
4340         ":ViewLikeInterface",
4341         "//llvm:Support",
4342     ],
4345 cc_library(
4346     name = "TensorInferTypeOpInterfaceImpl",
4347     srcs = ["lib/Dialect/Tensor/IR/TensorInferTypeOpInterfaceImpl.cpp"],
4348     hdrs = ["include/mlir/Dialect/Tensor/IR/TensorInferTypeOpInterfaceImpl.h"],
4349     includes = ["include"],
4350     deps = [
4351         ":Affine",
4352         ":IR",
4353         ":InferTypeOpInterface",
4354         ":StandardOps",
4355         ":TensorDialect",
4356         "//llvm:Support",
4357     ],
4360 cc_library(
4361     name = "TensorTilingInterfaceImpl",
4362     srcs = ["lib/Dialect/Tensor/IR/TensorTilingInterfaceImpl.cpp"],
4363     hdrs = ["include/mlir/Dialect/Tensor/IR/TensorTilingInterfaceImpl.h"],
4364     includes = ["include"],
4365     deps = [
4366         ":Affine",
4367         ":IR",
4368         ":LinalgOps",
4369         ":SCFDialect",
4370         ":StandardOps",
4371         ":TensorDialect",
4372         ":TilingInterface",
4373         "//llvm:Support",
4374     ],
4377 cc_library(
4378     name = "TensorUtils",
4379     srcs = ["lib/Dialect/Tensor/Utils/Utils.cpp"],
4380     hdrs = ["include/mlir/Dialect/Tensor/Utils/Utils.h"],
4381     includes = ["include"],
4382     deps = [
4383         ":Affine",
4384         ":ArithmeticDialect",
4385         ":IR",
4386         ":Support",
4387         ":TensorDialect",
4388         "//llvm:Support",
4389     ],
4392 gentbl_cc_library(
4393     name = "TensorPassIncGen",
4394     strip_include_prefix = "include",
4395     tbl_outs = [
4396         (
4397             [
4398                 "-gen-pass-decls",
4399                 "-name=Tensor",
4400             ],
4401             "include/mlir/Dialect/Tensor/Transforms/Passes.h.inc",
4402         ),
4403     ],
4404     tblgen = ":mlir-tblgen",
4405     td_file = "include/mlir/Dialect/Tensor/Transforms/Passes.td",
4406     deps = [":PassBaseTdFiles"],
4409 cc_library(
4410     name = "TensorTransforms",
4411     srcs = glob(
4412         [
4413             "lib/Dialect/Tensor/Transforms/*.cpp",
4414             "lib/Dialect/Tensor/Transforms/*.h",
4415         ],
4416     ),
4417     hdrs = [
4418         "include/mlir/Dialect/Tensor/Transforms/BufferizableOpInterfaceImpl.h",
4419         "include/mlir/Dialect/Tensor/Transforms/Passes.h",
4420     ],
4421     includes = ["include"],
4422     deps = [
4423         ":ArithmeticDialect",
4424         ":Async",
4425         ":BufferizationDialect",
4426         ":BufferizationTransforms",
4427         ":IR",
4428         ":MemRefDialect",
4429         ":ParallelLoopMapperAttrGen",
4430         ":Pass",
4431         ":SCFDialect",
4432         ":StandardOps",
4433         ":Support",
4434         ":TensorDialect",
4435         ":TensorPassIncGen",
4436         ":Transforms",
4437         "//llvm:Support",
4438     ],
4441 cc_library(
4442     name = "Rewrite",
4443     srcs = glob([
4444         "lib/Rewrite/*.cpp",
4445         "lib/Rewrite/*.h",
4446     ]),
4447     hdrs = glob(["include/mlir/Rewrite/*.h"]),
4448     includes = ["include"],
4449     deps = [
4450         ":Analysis",
4451         ":IR",
4452         ":PDLDialect",
4453         ":PDLInterpDialect",
4454         ":PDLToPDLInterp",
4455         ":Pass",
4456         ":SideEffectInterfaces",
4457         "//llvm:Support",
4458     ],
4461 cc_library(
4462     name = "TransformUtils",
4463     srcs = glob([
4464         "lib/Transforms/Utils/*.cpp",
4465         "lib/Transforms/Utils/*.h",
4466     ]),
4467     hdrs = glob([
4468         "include/mlir/Transforms/*.h",
4469     ]),
4470     includes = ["include"],
4471     deps = [
4472         ":Affine",
4473         ":AffineAnalysis",
4474         ":Analysis",
4475         ":ArithmeticDialect",
4476         ":ControlFlowInterfaces",
4477         ":IR",
4478         ":MemRefDialect",
4479         ":Pass",
4480         ":Rewrite",
4481         ":SCFDialect",
4482         ":SideEffectInterfaces",
4483         ":StandardOps",
4484         ":Support",
4485         ":TransformsPassIncGen",
4486         "//llvm:Support",
4487     ],
4490 gentbl_cc_library(
4491     name = "DerivedAttributeOpInterfaceIncGen",
4492     strip_include_prefix = "include",
4493     tbl_outs = [
4494         (
4495             ["-gen-op-interface-decls"],
4496             "include/mlir/Interfaces/DerivedAttributeOpInterface.h.inc",
4497         ),
4498         (
4499             ["-gen-op-interface-defs"],
4500             "include/mlir/Interfaces/DerivedAttributeOpInterface.cpp.inc",
4501         ),
4502     ],
4503     tblgen = ":mlir-tblgen",
4504     td_file = "include/mlir/Interfaces/DerivedAttributeOpInterface.td",
4505     deps = [":DerivedAttributeOpInterfaceTdFiles"],
4508 cc_library(
4509     name = "DerivedAttributeOpInterface",
4510     srcs = ["lib/Interfaces/DerivedAttributeOpInterface.cpp"],
4511     hdrs = ["include/mlir/Interfaces/DerivedAttributeOpInterface.h"],
4512     includes = ["include"],
4513     deps = [
4514         ":DerivedAttributeOpInterfaceIncGen",
4515         ":IR",
4516         ":Support",
4517         "//llvm:Support",
4518     ],
4521 td_library(
4522     name = "DataLayoutInterfacesTdFiles",
4523     srcs = ["include/mlir/Interfaces/DataLayoutInterfaces.td"],
4524     includes = ["include"],
4527 gentbl_cc_library(
4528     name = "DataLayoutInterfacesIncGen",
4529     tbl_outs = [
4530         (
4531             ["-gen-attr-interface-decls"],
4532             "include/mlir/Interfaces/DataLayoutAttrInterface.h.inc",
4533         ),
4534         (
4535             ["-gen-attr-interface-defs"],
4536             "include/mlir/Interfaces/DataLayoutAttrInterface.cpp.inc",
4537         ),
4538         (
4539             ["-gen-op-interface-decls"],
4540             "include/mlir/Interfaces/DataLayoutOpInterface.h.inc",
4541         ),
4542         (
4543             ["-gen-op-interface-defs"],
4544             "include/mlir/Interfaces/DataLayoutOpInterface.cpp.inc",
4545         ),
4546         (
4547             ["-gen-type-interface-decls"],
4548             "include/mlir/Interfaces/DataLayoutTypeInterface.h.inc",
4549         ),
4550         (
4551             ["-gen-type-interface-defs"],
4552             "include/mlir/Interfaces/DataLayoutTypeInterface.cpp.inc",
4553         ),
4554     ],
4555     tblgen = ":mlir-tblgen",
4556     td_file = "include/mlir/Interfaces/DataLayoutInterfaces.td",
4557     deps = [":OpBaseTdFiles"],
4560 gentbl_cc_library(
4561     name = "LoopLikeInterfaceIncGen",
4562     strip_include_prefix = "include",
4563     tbl_outs = [
4564         (
4565             ["-gen-op-interface-decls"],
4566             "include/mlir/Interfaces/LoopLikeInterface.h.inc",
4567         ),
4568         (
4569             ["-gen-op-interface-defs"],
4570             "include/mlir/Interfaces/LoopLikeInterface.cpp.inc",
4571         ),
4572     ],
4573     tblgen = ":mlir-tblgen",
4574     td_file = "include/mlir/Interfaces/LoopLikeInterface.td",
4575     deps = [":LoopLikeInterfaceTdFiles"],
4578 gentbl_cc_library(
4579     name = "VectorInterfacesIncGen",
4580     strip_include_prefix = "include",
4581     tbl_outs = [
4582         (
4583             ["-gen-op-interface-decls"],
4584             "include/mlir/Interfaces/VectorInterfaces.h.inc",
4585         ),
4586         (
4587             ["-gen-op-interface-defs"],
4588             "include/mlir/Interfaces/VectorInterfaces.cpp.inc",
4589         ),
4590     ],
4591     tblgen = ":mlir-tblgen",
4592     td_file = "include/mlir/Interfaces/VectorInterfaces.td",
4593     deps = [":VectorInterfacesTdFiles"],
4596 gentbl_cc_library(
4597     name = "ViewLikeInterfaceIncGen",
4598     strip_include_prefix = "include",
4599     tbl_outs = [
4600         (
4601             ["-gen-op-interface-decls"],
4602             "include/mlir/Interfaces/ViewLikeInterface.h.inc",
4603         ),
4604         (
4605             ["-gen-op-interface-defs"],
4606             "include/mlir/Interfaces/ViewLikeInterface.cpp.inc",
4607         ),
4608     ],
4609     tblgen = ":mlir-tblgen",
4610     td_file = "include/mlir/Interfaces/ViewLikeInterface.td",
4611     deps = [":ViewLikeInterfaceTdFiles"],
4614 gentbl_cc_library(
4615     name = "CopyOpInterfaceIncGen",
4616     strip_include_prefix = "include",
4617     tbl_outs = [
4618         (
4619             ["-gen-op-interface-decls"],
4620             "include/mlir/Interfaces/CopyOpInterface.h.inc",
4621         ),
4622         (
4623             ["-gen-op-interface-defs"],
4624             "include/mlir/Interfaces/CopyOpInterface.cpp.inc",
4625         ),
4626     ],
4627     tblgen = ":mlir-tblgen",
4628     td_file = "include/mlir/Interfaces/CopyOpInterface.td",
4629     deps = [":CopyOpInterfaceTdFiles"],
4632 gentbl_cc_library(
4633     name = "TransformsPassIncGen",
4634     strip_include_prefix = "include",
4635     tbl_outs = [
4636         (
4637             [
4638                 "-gen-pass-decls",
4639                 "-name=Transforms",
4640             ],
4641             "include/mlir/Transforms/Passes.h.inc",
4642         ),
4643         (
4644             [
4645                 "-gen-pass-capi-header",
4646                 "--prefix=Transforms",
4647             ],
4648             "include/mlir/Transforms/Transforms.capi.h.inc",
4649         ),
4650         (
4651             [
4652                 "-gen-pass-capi-impl",
4653                 "--prefix=Transforms",
4654             ],
4655             "include/mlir/Transforms/Transforms.capi.cpp.inc",
4656         ),
4657     ],
4658     tblgen = ":mlir-tblgen",
4659     td_file = "include/mlir/Transforms/Passes.td",
4660     deps = [
4661         ":PassBaseTdFiles",
4662         ":RewritePassBaseTdFiles",
4663     ],
4666 cc_library(
4667     name = "Transforms",
4668     srcs = glob([
4669         "lib/Transforms/*.cpp",
4670         "lib/Transforms/*.h",
4671     ]),
4672     hdrs = glob(["include/mlir/Transforms/*.h"]),
4673     includes = ["include"],
4674     deps = [
4675         ":Affine",
4676         ":AffineAnalysis",
4677         ":AllocationOpInterface",
4678         ":Analysis",
4679         ":ArithmeticDialect",
4680         ":BufferizationDialect",
4681         ":ControlFlowInterfaces",
4682         ":CopyOpInterface",
4683         ":IR",
4684         ":LinalgOps",
4685         ":LoopLikeInterface",
4686         ":MemRefDialect",
4687         ":Pass",
4688         ":Rewrite",
4689         ":SCFDialect",
4690         ":SideEffectInterfaces",
4691         ":StandardOps",
4692         ":Support",
4693         ":TensorDialect",
4694         ":TransformUtils",
4695         ":TransformsPassIncGen",
4696         "//llvm:Support",
4697     ],
4700 cc_library(
4701     name = "CommonFolders",
4702     srcs = [
4703     ],
4704     hdrs = ["include/mlir/Dialect/CommonFolders.h"],
4705     includes = ["include"],
4706     deps = [
4707         ":IR",
4708         "//llvm:Support",
4709     ],
4712 cc_library(
4713     name = "SCFToGPU",
4714     srcs = ["lib/Conversion/SCFToGPU/SCFToGPU.cpp"],
4715     hdrs = ["include/mlir/Conversion/SCFToGPU/SCFToGPU.h"],
4716     includes = ["include"],
4717     deps = [
4718         ":Affine",
4719         ":AffineToStandard",
4720         ":ArithmeticDialect",
4721         ":ConversionPassIncGen",
4722         ":GPUDialect",
4723         ":GPUTransforms",
4724         ":IR",
4725         ":MemRefDialect",
4726         ":Pass",
4727         ":SCFDialect",
4728         ":StandardOps",
4729         ":Support",
4730         ":TransformUtils",
4731         ":Transforms",
4732         "//llvm:Support",
4733     ],
4736 cc_library(
4737     name = "SCFToGPUPass",
4738     srcs = [
4739         "lib/Conversion/SCFToGPU/SCFToGPUPass.cpp",
4740         ":ConversionPassDetail",
4741     ],
4742     hdrs = ["include/mlir/Conversion/SCFToGPU/SCFToGPUPass.h"],
4743     includes = ["include"],
4744     deps = [
4745         ":Affine",
4746         ":ArithmeticDialect",
4747         ":ComplexDialect",
4748         ":ConversionPassIncGen",
4749         ":GPUDialect",
4750         ":Pass",
4751         ":SCFDialect",
4752         ":SCFToGPU",
4753         ":StandardOps",
4754         ":Support",
4755         ":Transforms",
4756         "//llvm:Support",
4757     ],
4760 cc_library(
4761     name = "SCFToSPIRV",
4762     srcs = glob([
4763         "lib/Conversion/SCFToSPIRV/*.cpp",
4764         "lib/Conversion/SCFToSPIRV/*.h",
4765     ]) + [":ConversionPassDetail"],
4766     hdrs = glob([
4767         "include/mlir/Conversion/SCFToSPIRV/*.h",
4768     ]),
4769     includes = ["include"],
4770     deps = [
4771         ":Affine",
4772         ":ArithmeticToSPIRV",
4773         ":ConversionPassIncGen",
4774         ":IR",
4775         ":MemRefToSPIRV",
4776         ":Pass",
4777         ":SCFDialect",
4778         ":SPIRVConversion",
4779         ":SPIRVDialect",
4780         ":StandardOps",
4781         ":StandardToSPIRV",
4782         ":Support",
4783         ":TransformUtils",
4784         ":Transforms",
4785         "//llvm:Support",
4786     ],
4789 cc_library(
4790     name = "SCFToOpenMP",
4791     srcs = [
4792         "lib/Conversion/SCFToOpenMP/SCFToOpenMP.cpp",
4793         ":ConversionPassDetail",
4794     ],
4795     hdrs = ["include/mlir/Conversion/SCFToOpenMP/SCFToOpenMP.h"],
4796     includes = ["include"],
4797     deps = [
4798         ":AffineAnalysis",
4799         ":Analysis",
4800         ":ArithmeticDialect",
4801         ":ConversionPassIncGen",
4802         ":IR",
4803         ":LLVMDialect",
4804         ":OpenMPDialect",
4805         ":Pass",
4806         ":SCFDialect",
4807         ":StandardOps",
4808         ":Support",
4809         ":Transforms",
4810     ],
4813 cc_library(
4814     name = "SCFToStandard",
4815     srcs = [
4816         "lib/Conversion/SCFToStandard/SCFToStandard.cpp",
4817         ":ConversionPassDetail",
4818     ],
4819     hdrs = ["include/mlir/Conversion/SCFToStandard/SCFToStandard.h"],
4820     includes = ["include"],
4821     deps = [
4822         ":ArithmeticDialect",
4823         ":ConversionPassIncGen",
4824         ":IR",
4825         ":LLVMDialect",
4826         ":Pass",
4827         ":SCFDialect",
4828         ":StandardOps",
4829         ":Support",
4830         ":TransformUtils",
4831         ":Transforms",
4832     ],
4835 alias(
4836     name = "CFGTransforms",
4837     actual = "SCFToStandard",
4840 cc_library(
4841     name = "LLVMCommonConversion",
4842     srcs = glob([
4843         "lib/Conversion/LLVMCommon/*.cpp",
4844     ]) + ["lib/Conversion/LLVMCommon/MemRefDescriptor.h"],
4845     hdrs = glob(["include/mlir/Conversion/LLVMCommon/*.h"]),
4846     includes = ["include"],
4847     deps = [
4848         ":IR",
4849         ":LLVMDialect",
4850         ":Support",
4851         ":Transforms",
4852         "//llvm:Core",
4853     ],
4856 cc_library(
4857     name = "ReconcileUnrealizedCasts",
4858     srcs = glob(["lib/Conversion/ReconcileUnrealizedCasts/*.cpp"]) + [":ConversionPassDetail"],
4859     hdrs = glob(["include/mlir/Conversion/ReconcileUnrealizedCasts/*.h"]),
4860     includes = ["include"],
4861     deps = [
4862         ":ConversionPassIncGen",
4863         ":IR",
4864         ":Pass",
4865         ":TransformUtils",
4866     ],
4869 cc_library(
4870     name = "StandardToLLVM",
4871     srcs = [
4872         "lib/Conversion/StandardToLLVM/StandardToLLVM.cpp",
4873         ":ConversionPassDetail",
4874     ],
4875     hdrs = [
4876         "include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h",
4877         "include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVMPass.h",
4878     ],
4879     includes = ["include"],
4880     deps = [
4881         ":Analysis",
4882         ":ArithmeticToLLVM",
4883         ":ConversionPassIncGen",
4884         ":DataLayoutInterfaces",
4885         ":DialectUtils",
4886         ":IR",
4887         ":LLVMCommonConversion",
4888         ":LLVMDialect",
4889         ":MathDialect",
4890         ":MemRefDialect",
4891         ":Parser",
4892         ":Pass",
4893         ":StandardOps",
4894         ":StandardOpsTransforms",
4895         ":Support",
4896         ":TransformUtils",
4897         ":Transforms",
4898         "//llvm:Core",
4899         "//llvm:Support",
4900     ],
4903 cc_library(
4904     name = "MemRefToLLVM",
4905     srcs = glob(["lib/Conversion/MemRefToLLVM/*.cpp"]) + [":ConversionPassDetail"],
4906     hdrs = glob(["include/mlir/Conversion/MemRefToLLVM/*.h"]),
4907     includes = ["include"],
4908     deps = [
4909         ":Analysis",
4910         ":ConversionPassIncGen",
4911         ":DataLayoutInterfaces",
4912         ":IR",
4913         ":LLVMCommonConversion",
4914         ":LLVMDialect",
4915         ":MemRefDialect",
4916         ":Pass",
4917         ":Support",
4918         ":Transforms",
4919     ],
4922 cc_library(
4923     name = "MemRefToSPIRV",
4924     srcs = glob([
4925         "lib/Conversion/MemRefToSPIRV/*.cpp",
4926         "lib/Conversion/MemRefToSPIRV/*.h",
4927     ]) + [":ConversionPassDetail"],
4928     hdrs = glob([
4929         "include/mlir/Conversion/MemRefToSPIRV/*.h",
4930     ]),
4931     includes = [
4932         "include",
4933         "lib/Conversion/MemRefToSPIRV",
4934     ],
4935     deps = [
4936         ":ConversionPassIncGen",
4937         ":IR",
4938         ":MemRefDialect",
4939         ":Pass",
4940         ":SPIRVConversion",
4941         ":SPIRVDialect",
4942         ":Support",
4943         ":Transforms",
4944         "//llvm:Support",
4945     ],
4948 cc_library(
4949     name = "ArithmeticToLLVM",
4950     srcs = glob(["lib/Conversion/ArithmeticToLLVM/*.cpp"]) + [":ConversionPassDetail"],
4951     hdrs = glob(["include/mlir/Conversion/ArithmeticToLLVM/*.h"]),
4952     includes = ["include"],
4953     deps = [
4954         ":Analysis",
4955         ":ArithmeticDialect",
4956         ":ConversionPassIncGen",
4957         ":IR",
4958         ":LLVMCommonConversion",
4959         ":LLVMDialect",
4960         ":Pass",
4961         ":Support",
4962         ":Transforms",
4963     ],
4966 cc_library(
4967     name = "ArithmeticToSPIRV",
4968     srcs = glob(["lib/Conversion/ArithmeticToSPIRV/*.cpp"]) + [":ConversionPassDetail"],
4969     hdrs = glob(["include/mlir/Conversion/ArithmeticToSPIRV/*.h"]),
4970     includes = ["include"],
4971     deps = [
4972         ":ArithmeticDialect",
4973         ":ConversionPassIncGen",
4974         ":IR",
4975         ":Pass",
4976         ":SPIRVCommonConversion",
4977         ":SPIRVConversion",
4978         ":SPIRVDialect",
4979         ":Support",
4980         ":Transforms",
4981         "//llvm:Support",
4982     ],
4985 cc_library(
4986     name = "MathToLLVM",
4987     srcs = glob(["lib/Conversion/MathToLLVM/*.cpp"]) + [":ConversionPassDetail"],
4988     hdrs = glob(["include/mlir/Conversion/MathToLLVM/*.h"]),
4989     includes = ["include"],
4990     deps = [
4991         ":Analysis",
4992         ":ConversionPassIncGen",
4993         ":DataLayoutInterfaces",
4994         ":IR",
4995         ":LLVMCommonConversion",
4996         ":LLVMDialect",
4997         ":MathDialect",
4998         ":Pass",
4999         ":Support",
5000         ":Transforms",
5001     ],
5004 alias(
5005     name = "LLVMTransforms",
5006     actual = "StandardToLLVM",
5009 gentbl_cc_library(
5010     name = "CallOpInterfacesIncGen",
5011     strip_include_prefix = "include",
5012     tbl_outs = [
5013         (
5014             ["-gen-op-interface-decls"],
5015             "include/mlir/Interfaces/CallInterfaces.h.inc",
5016         ),
5017         (
5018             ["-gen-op-interface-defs"],
5019             "include/mlir/Interfaces/CallInterfaces.cpp.inc",
5020         ),
5021     ],
5022     tblgen = ":mlir-tblgen",
5023     td_file = "include/mlir/Interfaces/CallInterfaces.td",
5024     deps = [":CallInterfacesTdFiles"],
5027 cc_library(
5028     name = "CallOpInterfaces",
5029     srcs = ["lib/Interfaces/CallInterfaces.cpp"],
5030     hdrs = ["include/mlir/Interfaces/CallInterfaces.h"],
5031     includes = ["include"],
5032     deps = [
5033         ":CallOpInterfacesIncGen",
5034         ":IR",
5035         ":Support",
5036         "//llvm:Support",
5037     ],
5040 gentbl_cc_library(
5041     name = "CastOpInterfacesIncGen",
5042     strip_include_prefix = "include",
5043     tbl_outs = [
5044         (
5045             ["-gen-op-interface-decls"],
5046             "include/mlir/Interfaces/CastInterfaces.h.inc",
5047         ),
5048         (
5049             ["-gen-op-interface-defs"],
5050             "include/mlir/Interfaces/CastInterfaces.cpp.inc",
5051         ),
5052     ],
5053     tblgen = ":mlir-tblgen",
5054     td_file = "include/mlir/Interfaces/CastInterfaces.td",
5055     deps = [":CastInterfacesTdFiles"],
5058 cc_library(
5059     name = "CastOpInterfaces",
5060     srcs = ["lib/Interfaces/CastInterfaces.cpp"],
5061     hdrs = ["include/mlir/Interfaces/CastInterfaces.h"],
5062     includes = ["include"],
5063     deps = [
5064         ":CastOpInterfacesIncGen",
5065         ":IR",
5066         ":Support",
5067         "//llvm:Support",
5068     ],
5071 gentbl_cc_library(
5072     name = "ControlFlowInterfacesIncGen",
5073     strip_include_prefix = "include",
5074     tbl_outs = [
5075         (
5076             ["-gen-op-interface-decls"],
5077             "include/mlir/Interfaces/ControlFlowInterfaces.h.inc",
5078         ),
5079         (
5080             ["-gen-op-interface-defs"],
5081             "include/mlir/Interfaces/ControlFlowInterfaces.cpp.inc",
5082         ),
5083     ],
5084     tblgen = ":mlir-tblgen",
5085     td_file = "include/mlir/Interfaces/ControlFlowInterfaces.td",
5086     deps = [":ControlFlowInterfacesTdFiles"],
5089 cc_library(
5090     name = "ControlFlowInterfaces",
5091     srcs = ["lib/Interfaces/ControlFlowInterfaces.cpp"],
5092     hdrs = ["include/mlir/Interfaces/ControlFlowInterfaces.h"],
5093     includes = ["include"],
5094     deps = [
5095         ":ControlFlowInterfacesIncGen",
5096         ":IR",
5097         ":Support",
5098         "//llvm:Support",
5099     ],
5102 gentbl_cc_library(
5103     name = "InferTypeOpInterfaceIncGen",
5104     strip_include_prefix = "include",
5105     tbl_outs = [
5106         (
5107             ["-gen-op-interface-decls"],
5108             "include/mlir/Interfaces/InferTypeOpInterface.h.inc",
5109         ),
5110         (
5111             ["-gen-op-interface-defs"],
5112             "include/mlir/Interfaces/InferTypeOpInterface.cpp.inc",
5113         ),
5114     ],
5115     tblgen = ":mlir-tblgen",
5116     td_file = "include/mlir/Interfaces/InferTypeOpInterface.td",
5117     deps = [":InferTypeOpInterfaceTdFiles"],
5120 cc_library(
5121     name = "InferTypeOpInterface",
5122     srcs = ["lib/Interfaces/InferTypeOpInterface.cpp"],
5123     hdrs = ["include/mlir/Interfaces/InferTypeOpInterface.h"],
5124     includes = ["include"],
5125     deps = [
5126         ":IR",
5127         ":InferTypeOpInterfaceIncGen",
5128         ":Support",
5129         "//llvm:Support",
5130     ],
5133 gentbl_cc_library(
5134     name = "SideEffectInterfacesIncGen",
5135     strip_include_prefix = "include",
5136     tbl_outs = [
5137         (
5138             ["-gen-op-interface-decls"],
5139             "include/mlir/Interfaces/SideEffectInterfaces.h.inc",
5140         ),
5141         (
5142             ["-gen-op-interface-defs"],
5143             "include/mlir/Interfaces/SideEffectInterfaces.cpp.inc",
5144         ),
5145     ],
5146     tblgen = ":mlir-tblgen",
5147     td_file = "include/mlir/Interfaces/SideEffectInterfaces.td",
5148     deps = [":SideEffectInterfacesTdFiles"],
5151 cc_library(
5152     name = "SideEffectInterfaces",
5153     srcs = ["lib/Interfaces/SideEffectInterfaces.cpp"],
5154     hdrs = ["include/mlir/Interfaces/SideEffectInterfaces.h"],
5155     includes = ["include"],
5156     deps = [
5157         ":IR",
5158         ":SideEffectInterfacesIncGen",
5159         ":Support",
5160         "//llvm:Support",
5161     ],
5164 alias(
5165     name = "SideEffects",
5166     actual = "SideEffectInterfaces",
5169 gentbl_cc_library(
5170     name = "TilingInterfaceIncGen",
5171     strip_include_prefix = "include",
5172     tbl_outs = [
5173         (
5174             ["-gen-op-interface-decls"],
5175             "include/mlir/Interfaces/TilingInterface.h.inc",
5176         ),
5177         (
5178             ["-gen-op-interface-defs"],
5179             "include/mlir/Interfaces/TilingInterface.cpp.inc",
5180         ),
5181     ],
5182     tblgen = ":mlir-tblgen",
5183     td_file = "include/mlir/Interfaces/TilingInterface.td",
5184     deps = [":TilingInterfaceTdFiles"],
5187 cc_library(
5188     name = "Analysis",
5189     srcs = glob(
5190         [
5191             "lib/Analysis/*.cpp",
5192             "lib/Analysis/*.h",
5193             "lib/Analysis/*/*.cpp",
5194             "lib/Analysis/*/*.h",
5195         ],
5196         exclude = [
5197             "lib/Analysis/Vector*.cpp",
5198             "lib/Analysis/Vector*.h",
5199         ],
5200     ),
5201     hdrs = glob(
5202         [
5203             "include/mlir/Analysis/*.h",
5204             "include/mlir/Analysis/*/*.h",
5205         ],
5206         exclude = ["include/mlir/Analysis/Vector*.h"],
5207     ),
5208     includes = ["include"],
5209     deps = [
5210         ":Affine",
5211         ":ArithmeticDialect",
5212         ":BufferizationDialect",
5213         ":CallOpInterfaces",
5214         ":ControlFlowInterfaces",
5215         ":DataLayoutInterfaces",
5216         ":IR",
5217         ":LinalgOps",
5218         ":SCFDialect",
5219         ":SideEffectInterfaces",
5220         ":StandardOps",
5221         ":Support",
5222         ":ViewLikeInterface",
5223         "//llvm:Support",
5224     ],
5227 cc_library(
5228     name = "Translation",
5229     srcs = glob([
5230         "lib/Translation/*.cpp",
5231         "lib/Translation/*.h",
5232     ]),
5233     hdrs = ["include/mlir/Translation.h"],
5234     includes = ["include"],
5235     deps = [
5236         ":Analysis",
5237         ":IR",
5238         ":Parser",
5239         ":Support",
5240         "//llvm:Support",
5241     ],
5244 cc_library(
5245     name = "ToLLVMIRTranslation",
5246     srcs = [
5247         "lib/Target/LLVMIR/DebugTranslation.cpp",
5248         "lib/Target/LLVMIR/DebugTranslation.h",
5249         "lib/Target/LLVMIR/ModuleTranslation.cpp",
5250         "lib/Target/LLVMIR/TypeToLLVM.cpp",
5251     ],
5252     hdrs = [
5253         "include/mlir/Target/LLVMIR/Export.h",
5254         "include/mlir/Target/LLVMIR/LLVMTranslationInterface.h",
5255         "include/mlir/Target/LLVMIR/ModuleTranslation.h",
5256         "include/mlir/Target/LLVMIR/TypeToLLVM.h",
5257     ],
5258     includes = ["include"],
5259     deps = [
5260         ":IR",
5261         ":LLVMConversionIncGen",
5262         ":LLVMDialect",
5263         ":LLVMIRTransforms",
5264         ":OpenMPDialect",
5265         ":Support",
5266         "//llvm:Core",
5267         "//llvm:FrontendOpenMP",
5268         "//llvm:Support",
5269         "//llvm:TransformUtils",
5270     ],
5273 cc_library(
5274     name = "AMXToLLVMIRTranslation",
5275     srcs = glob(["lib/Target/LLVMIR/Dialect/AMX/*.cpp"]),
5276     hdrs = glob(["include/mlir/Target/LLVMIR/Dialect/AMX/*.h"]),
5277     includes = ["include"],
5278     deps = [
5279         ":AMX",
5280         ":AMXConversionIncGen",
5281         ":IR",
5282         ":Support",
5283         ":ToLLVMIRTranslation",
5284         "//llvm:Core",
5285         "//llvm:Support",
5286     ],
5289 cc_library(
5290     name = "X86VectorToLLVMIRTranslation",
5291     srcs = glob(["lib/Target/LLVMIR/Dialect/X86Vector/*.cpp"]),
5292     hdrs = glob(["include/mlir/Target/LLVMIR/Dialect/X86Vector/*.h"]),
5293     includes = ["include"],
5294     deps = [
5295         ":IR",
5296         ":Support",
5297         ":ToLLVMIRTranslation",
5298         ":X86Vector",
5299         ":X86VectorConversionIncGen",
5300         "//llvm:Core",
5301         "//llvm:Support",
5302     ],
5305 cc_library(
5306     name = "ArmNeonToLLVMIRTranslation",
5307     srcs = glob(["lib/Target/LLVMIR/Dialect/ArmNeon/*.cpp"]),
5308     hdrs = glob(["include/mlir/Target/LLVMIR/Dialect/ArmNeon/*.h"]),
5309     includes = ["include"],
5310     deps = [
5311         ":ArmNeon",
5312         ":ArmNeonConversionIncGen",
5313         ":ArmNeonIncGen",
5314         ":IR",
5315         ":Support",
5316         ":ToLLVMIRTranslation",
5317         "//llvm:Core",
5318         "//llvm:Support",
5319     ],
5322 cc_library(
5323     name = "ArmSVEToLLVMIRTranslation",
5324     srcs = glob(["lib/Target/LLVMIR/Dialect/ArmSVE/*.cpp"]),
5325     hdrs = glob(["include/mlir/Target/LLVMIR/Dialect/ArmSVE/*.h"]),
5326     includes = ["include"],
5327     deps = [
5328         ":ArmSVE",
5329         ":ArmSVEConversionIncGen",
5330         ":IR",
5331         ":Support",
5332         ":ToLLVMIRTranslation",
5333         "//llvm:Core",
5334         "//llvm:Support",
5335     ],
5338 cc_library(
5339     name = "NVVMToLLVMIRTranslation",
5340     srcs = glob(["lib/Target/LLVMIR/Dialect/NVVM/*.cpp"]),
5341     hdrs = glob(["include/mlir/Target/LLVMIR/Dialect/NVVM/*.h"]),
5342     includes = ["include"],
5343     deps = [
5344         ":IR",
5345         ":NVVMConversionIncGen",
5346         ":NVVMDialect",
5347         ":Support",
5348         ":ToLLVMIRTranslation",
5349         "//llvm:Core",
5350         "//llvm:Support",
5351     ],
5354 cc_library(
5355     name = "ROCDLToLLVMIRTranslation",
5356     srcs = glob(["lib/Target/LLVMIR/Dialect/ROCDL/*.cpp"]),
5357     hdrs = glob(["include/mlir/Target/LLVMIR/Dialect/ROCDL/*.h"]),
5358     includes = ["include"],
5359     deps = [
5360         ":IR",
5361         ":ROCDLConversionIncGen",
5362         ":ROCDLDialect",
5363         ":Support",
5364         ":ToLLVMIRTranslation",
5365         "//llvm:Core",
5366         "//llvm:Support",
5367     ],
5370 cc_library(
5371     name = "LLVMToLLVMIRTranslation",
5372     srcs = glob(["lib/Target/LLVMIR/Dialect/LLVMIR/*.cpp"]),
5373     hdrs = glob(["include/mlir/Target/LLVMIR/Dialect/LLVMIR/*.h"]),
5374     includes = ["include"],
5375     deps = [
5376         ":IR",
5377         ":LLVMConversionIncGen",
5378         ":LLVMDialect",
5379         ":Support",
5380         ":ToLLVMIRTranslation",
5381         "//llvm:Core",
5382         "//llvm:Support",
5383     ],
5386 cc_library(
5387     name = "OpenACCToLLVMIRTranslation",
5388     srcs = glob(["lib/Target/LLVMIR/Dialect/OpenACC/*.cpp"]),
5389     hdrs = glob(["include/mlir/Target/LLVMIR/Dialect/OpenACC/*.h"]),
5390     includes = ["include"],
5391     deps = [
5392         ":IR",
5393         ":LLVMDialect",
5394         ":OpenACCDialect",
5395         ":OpenACCToLLVM",
5396         ":Support",
5397         ":ToLLVMIRTranslation",
5398         "//llvm:Core",
5399         "//llvm:FrontendOpenMP",
5400         "//llvm:Support",
5401     ],
5404 cc_library(
5405     name = "OpenMPToLLVMIRTranslation",
5406     srcs = glob(["lib/Target/LLVMIR/Dialect/OpenMP/*.cpp"]),
5407     hdrs = glob(["include/mlir/Target/LLVMIR/Dialect/OpenMP/*.h"]),
5408     includes = ["include"],
5409     deps = [
5410         ":IR",
5411         ":OpenMPDialect",
5412         ":Support",
5413         ":ToLLVMIRTranslation",
5414         "//llvm:Core",
5415         "//llvm:FrontendOpenMP",
5416         "//llvm:Support",
5417     ],
5420 cc_library(
5421     name = "AllToLLVMIRTranslations",
5422     hdrs = ["include/mlir/Target/LLVMIR/Dialect/All.h"],
5423     includes = ["include"],
5424     deps = [
5425         ":AMXToLLVMIRTranslation",
5426         ":ArmNeonToLLVMIRTranslation",
5427         ":ArmSVEToLLVMIRTranslation",
5428         ":LLVMToLLVMIRTranslation",
5429         ":NVVMToLLVMIRTranslation",
5430         ":OpenACCToLLVMIRTranslation",
5431         ":OpenMPToLLVMIRTranslation",
5432         ":ROCDLToLLVMIRTranslation",
5433         ":X86VectorToLLVMIRTranslation",
5434     ],
5437 cc_library(
5438     name = "ToLLVMIRTranslationRegistration",
5439     srcs = ["lib/Target/LLVMIR/ConvertToLLVMIR.cpp"],
5440     includes = ["include"],
5441     deps = [
5442         ":AllToLLVMIRTranslations",
5443         ":IR",
5444         ":ToLLVMIRTranslation",
5445         ":Translation",
5446         "//llvm:Core",
5447         "//llvm:Support",
5448     ],
5451 cc_library(
5452     name = "FromLLVMIRTranslation",
5453     srcs = [
5454         "lib/Target/LLVMIR/ConvertFromLLVMIR.cpp",
5455         "lib/Target/LLVMIR/TypeFromLLVM.cpp",
5456     ],
5457     hdrs = [
5458         "include/mlir/Target/LLVMIR/Import.h",
5459         "include/mlir/Target/LLVMIR/TypeFromLLVM.h",
5460     ],
5461     includes = ["include"],
5462     deps = [
5463         ":IR",
5464         ":LLVMConversionIncGen",
5465         ":LLVMDialect",
5466         ":Support",
5467         ":Translation",
5468         "//llvm:Core",
5469         "//llvm:IRReader",
5470         "//llvm:Support",
5471     ],
5474 cc_library(
5475     name = "ExecutionEngine",
5476     srcs = [
5477         "include/mlir/ExecutionEngine/CRunnerUtils.h",
5478         "lib/ExecutionEngine/ExecutionEngine.cpp",
5479     ],
5480     hdrs = [
5481         "include/mlir/ExecutionEngine/ExecutionEngine.h",
5482         "include/mlir/ExecutionEngine/MemRefUtils.h",
5483     ],
5484     includes = ["include"],
5485     deps = [
5486         ":AllToLLVMIRTranslations",
5487         ":IR",
5488         ":LLVMDialect",
5489         ":Support",
5490         ":ToLLVMIRTranslation",
5491         ":Translation",
5492         "//llvm:AllTargetsAsmParsers",
5493         "//llvm:BitReader",
5494         "//llvm:BitWriter",
5495         "//llvm:Core",
5496         "//llvm:ExecutionEngine",
5497         "//llvm:MC",
5498         "//llvm:OrcJIT",
5499         "//llvm:Support",
5500         "//llvm:Target",  # fixdeps: keep
5501         "//llvm:TransformUtils",
5502         "//llvm:X86CodeGen",  # fixdeps: keep
5503         "//llvm:X86Disassembler",  # fixdeps: keep
5504     ],
5507 cc_library(
5508     name = "ExecutionEngineUtils",
5509     srcs = ["lib/ExecutionEngine/OptUtils.cpp"],
5510     hdrs = ["include/mlir/ExecutionEngine/OptUtils.h"],
5511     includes = ["include"],
5512     deps = [
5513         "//llvm:Analysis",
5514         "//llvm:Core",
5515         "//llvm:Coroutines",
5516         "//llvm:IPO",
5517         "//llvm:Support",
5518         "//llvm:Target",
5519         "//llvm:common_transforms",
5520     ],
5523 # TODO(jpienaar): Update this.
5524 cc_library(
5525     name = "MlirOptLib",
5526     srcs = ["lib/Support/MlirOptMain.cpp"],
5527     hdrs = ["include/mlir/Support/MlirOptMain.h"],
5528     includes = ["include"],
5529     deps = [
5530         ":Analysis",
5531         ":ConversionPasses",
5532         ":GPUToGPURuntimeTransforms",
5533         ":GPUToNVVMTransforms",
5534         ":GPUToROCDLTransforms",
5535         ":GPUToSPIRV",
5536         ":GPUTransforms",
5537         ":IR",
5538         ":Parser",
5539         ":Pass",
5540         ":SCFTransforms",
5541         ":ShapeToStandard",
5542         ":ShapeTransforms",
5543         ":StandardOpsTransforms",
5544         ":StandardToLLVM",
5545         ":StandardToSPIRV",
5546         ":Support",
5547         "//llvm:Support",
5548     ],
5551 cc_library(
5552     name = "AllTranslations",
5553     hdrs = ["include/mlir/InitAllTranslations.h"],
5554     deps = [
5555         ":FromLLVMIRTranslation",
5556         ":SPIRVTranslateRegistration",
5557         ":TargetCpp",
5558         ":ToLLVMIRTranslationRegistration",
5559     ],
5562 cc_library(
5563     name = "MlirTranslateMain",
5564     srcs = ["tools/mlir-translate/mlir-translate.cpp"],
5565     deps = [
5566         ":AllPassesAndDialects",
5567         ":AllTranslations",
5568         ":IR",
5569         ":Parser",
5570         ":Support",
5571         ":Translation",
5572         "//llvm:Support",
5573     ],
5576 cc_binary(
5577     name = "mlir-translate",
5578     deps = [":MlirTranslateMain"],
5581 cc_library(
5582     name = "AllPassesAndDialects",
5583     hdrs = [
5584         "include/mlir/InitAllDialects.h",
5585         "include/mlir/InitAllPasses.h",
5586     ],
5587     deps = [
5588         ":AMX",
5589         ":AMXTransforms",
5590         ":Affine",
5591         ":AffinePassIncGen",
5592         ":AffineToStandard",
5593         ":AffineTransforms",
5594         ":ArithmeticDialect",
5595         ":ArithmeticToLLVM",
5596         ":ArithmeticToSPIRV",
5597         ":ArithmeticTransforms",
5598         ":ArmNeon",
5599         ":ArmSVE",
5600         ":ArmSVETransforms",
5601         ":Async",
5602         ":AsyncPassIncGen",
5603         ":AsyncToLLVM",
5604         ":AsyncTransforms",
5605         ":BufferizationDialect",
5606         ":BufferizationTransforms",
5607         ":ComplexDialect",
5608         ":ComplexToLLVM",
5609         ":ConversionPasses",
5610         ":DLTIDialect",
5611         ":EmitC",
5612         ":GPUDialect",
5613         ":GPUPassIncGen",
5614         ":GPUToGPURuntimeTransforms",
5615         ":GPUToNVVMTransforms",
5616         ":GPUToROCDLTransforms",
5617         ":GPUToSPIRV",
5618         ":GPUToVulkanTransforms",
5619         ":GPUTransforms",
5620         ":IR",
5621         ":LLVMDialect",
5622         ":LLVMIRTransforms",
5623         ":LLVMPassIncGen",
5624         ":LinalgOps",
5625         ":LinalgPassIncGen",
5626         ":LinalgToLLVM",
5627         ":LinalgToSPIRV",
5628         ":LinalgToStandard",
5629         ":LinalgTransforms",
5630         ":MathDialect",
5631         ":MathToLLVM",
5632         ":MathToLibm",
5633         ":MathToSPIRV",
5634         ":MathTransforms",
5635         ":MemRefDialect",
5636         ":MemRefToLLVM",
5637         ":MemRefToSPIRV",
5638         ":MemRefTransforms",
5639         ":NVVMDialect",
5640         ":OpenACCDialect",
5641         ":OpenMPDialect",
5642         ":OpenMPToLLVM",
5643         ":PDLDialect",
5644         ":PDLInterpDialect",
5645         ":PDLToPDLInterp",
5646         ":QuantOps",
5647         ":QuantPassIncGen",
5648         ":ROCDLDialect",
5649         ":ReconcileUnrealizedCasts",
5650         ":SCFDialect",
5651         ":SCFPassIncGen",
5652         ":SCFToGPUPass",
5653         ":SCFToStandard",
5654         ":SCFTransforms",
5655         ":SDBM",
5656         ":SPIRVDialect",
5657         ":SPIRVPassIncGen",
5658         ":SPIRVToLLVM",
5659         ":SPIRVTransforms",
5660         ":Shape",
5661         ":ShapeToStandard",
5662         ":ShapeTransforms",
5663         ":ShapeTransformsPassIncGen",
5664         ":SparseTensor",
5665         ":SparseTensorTransforms",
5666         ":StandardOps",
5667         ":StandardOpsTransforms",
5668         ":StandardOpsTransformsPassIncGen",
5669         ":StandardToLLVM",
5670         ":StandardToSPIRV",
5671         ":TensorDialect",
5672         ":TensorInferTypeOpInterfaceImpl",
5673         ":TensorTilingInterfaceImpl",
5674         ":TensorTransforms",
5675         ":TosaDialect",
5676         ":TosaToLinalg",
5677         ":Transforms",
5678         ":TransformsPassIncGen",
5679         ":VectorOps",
5680         ":VectorToLLVM",
5681         ":VectorToROCDL",
5682         ":VectorToSCF",
5683         ":VectorToSPIRV",
5684         ":X86Vector",
5685         ":X86VectorTransforms",
5686     ],
5689 cc_binary(
5690     name = "mlir-lsp-server",
5691     srcs = ["tools/mlir-lsp-server/mlir-lsp-server.cpp"],
5692     includes = ["include"],
5693     deps = [
5694         ":AllPassesAndDialects",
5695         ":IR",
5696         ":MlirLspServerLib",
5697     ],
5700 cc_binary(
5701     name = "mlir-opt",
5702     srcs = ["tools/mlir-opt/mlir-opt.cpp"],
5703     local_defines = ["MLIR_INCLUDE_TESTS"],
5704     deps = [
5705         ":AllPassesAndDialects",
5706         ":Analysis",
5707         ":IR",
5708         ":MlirOptLib",
5709         ":OpenMPDialect",
5710         ":Pass",
5711         ":QuantOps",
5712         ":SCFToGPUPass",
5713         ":Support",
5714         ":Transforms",
5715         "//llvm:AllTargetsCodeGens",
5716         "//llvm:Support",
5717         "//mlir/test:TestAffine",
5718         "//mlir/test:TestAnalysis",
5719         "//mlir/test:TestDLTI",
5720         "//mlir/test:TestDialect",
5721         "//mlir/test:TestGPU",
5722         "//mlir/test:TestIR",
5723         "//mlir/test:TestLinalg",
5724         "//mlir/test:TestMath",
5725         "//mlir/test:TestPass",
5726         "//mlir/test:TestReducer",
5727         "//mlir/test:TestRewrite",
5728         "//mlir/test:TestSCF",
5729         "//mlir/test:TestSPIRV",
5730         "//mlir/test:TestShapeDialect",
5731         "//mlir/test:TestStandardOps",
5732         "//mlir/test:TestStandardToLLVM",
5733         "//mlir/test:TestTosaDialect",
5734         "//mlir/test:TestTransforms",
5735         "//mlir/test:TestTypeDialect",
5736         "//mlir/test:TestVector",
5737     ],
5740 cc_library(
5741     name = "MlirJitRunner",
5742     srcs = ["lib/ExecutionEngine/JitRunner.cpp"],
5743     hdrs = ["include/mlir/ExecutionEngine/JitRunner.h"],
5744     includes = ["include"],
5745     deps = [
5746         ":AllPassesAndDialects",
5747         ":ExecutionEngine",
5748         ":ExecutionEngineUtils",
5749         ":IR",
5750         ":LLVMDialect",
5751         ":LLVMToLLVMIRTranslation",
5752         ":OpenACCToLLVMIRTranslation",
5753         ":OpenMPToLLVMIRTranslation",
5754         ":Parser",
5755         ":Pass",
5756         ":SCFToStandard",
5757         ":Support",
5758         "//llvm:Core",
5759         "//llvm:OrcJIT",
5760         "//llvm:Support",
5761     ],
5764 cc_library(
5765     name = "mlir_c_runner_utils",
5766     srcs = [
5767         "lib/ExecutionEngine/CRunnerUtils.cpp",
5768         "lib/ExecutionEngine/SparseTensorUtils.cpp",
5769     ],
5770     hdrs = [
5771         "include/mlir/ExecutionEngine/CRunnerUtils.h",
5772         "include/mlir/ExecutionEngine/SparseTensorUtils.h",
5773     ],
5774     includes = ["include"],
5777 cc_library(
5778     name = "mlir_async_runtime_api",
5779     hdrs = ["include/mlir/ExecutionEngine/AsyncRuntime.h"],
5780     includes = ["include"],
5783 cc_library(
5784     name = "mlir_async_runtime",
5785     srcs = ["lib/ExecutionEngine/AsyncRuntime.cpp"],
5786     copts = ["-Dmlir_async_runtime_EXPORTS"],
5787     deps = [
5788         ":mlir_async_runtime_api",
5789         "//llvm:Support",
5790     ],
5793 cc_library(
5794     name = "mlir_runner_utils",
5795     srcs = ["lib/ExecutionEngine/RunnerUtils.cpp"],
5796     hdrs = ["include/mlir/ExecutionEngine/RunnerUtils.h"],
5797     includes = ["include"],
5798     deps = [":mlir_c_runner_utils"],
5801 cc_binary(
5802     name = "mlir-cpu-runner",
5803     srcs = ["tools/mlir-cpu-runner/mlir-cpu-runner.cpp"],
5804     deps = [
5805         ":AllToLLVMIRTranslations",
5806         ":ExecutionEngineUtils",
5807         ":IR",
5808         ":LLVMDialect",
5809         ":LLVMToLLVMIRTranslation",
5810         ":MlirJitRunner",
5811         ":OpenACCToLLVMIRTranslation",
5812         ":OpenMPToLLVMIRTranslation",
5813         ":ToLLVMIRTranslation",
5814         "//llvm:AsmParser",
5815         "//llvm:Support",
5816         "//llvm:X86AsmParser",
5817     ],
5820 # This target provides the headers from LLVM's Support target without any of
5821 # the symbols. In particular, it does not contain the static registration code
5822 # which may be executed by at most one shared library loaded by ORCJit. Direct
5823 # dependencies need to avoid requiring symbols from LLVMSupport by adding
5824 # copts = ["-DLLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING=1"].
5826 # Bazel links the dependencies' object files instead of the archives, which
5827 # means that symbols are linked in even if none are used. The LLVM cmake build
5828 # on the other hand links archives (or shared libraries, depending on
5829 # BUILD_SHARED_LIBS), skipping them if none of the symbols are used.
5830 # See also https://reviews.llvm.org/D95613.
5831 cc_headers_only(
5832     name = "LLVMSupportHeaders",
5833     src = "//llvm:Support",
5836 cc_library(
5837     name = "mlir_cuda_runtime",
5838     srcs = ["lib/ExecutionEngine/CudaRuntimeWrappers.cpp"],
5839     # Prevent needing EnableABIBreakingChecks symbol from LLVMSupport.
5840     copts = ["-DLLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING=1"],
5841     tags = [
5842         "manual",  # External dependency
5843         "nobuildkite",  # TODO(gcmn): Add support for this target
5844     ],
5845     deps = [
5846         ":LLVMSupportHeaders",
5847         ":mlir_c_runner_utils",
5848         "@cuda//:cuda_headers",
5849         "@cuda//:libcuda",
5850     ],
5853 cc_library(
5854     name = "VulkanRuntime",
5855     srcs = ["tools/mlir-vulkan-runner/VulkanRuntime.cpp"],
5856     hdrs = ["tools/mlir-vulkan-runner/VulkanRuntime.h"],
5857     tags = [
5858         "manual",  # External dependency
5859     ],
5860     deps = [
5861         ":IR",
5862         ":Pass",
5863         ":SPIRVDialect",
5864         ":SideEffectInterfaces",
5865         ":StandardOps",
5866         ":Support",
5867         "//llvm:Support",
5868         "@vulkan_headers",
5869         "@vulkan_sdk//:sdk",
5870     ],
5873 cc_binary(
5874     name = "tools/libvulkan-runtime-wrappers.so",
5875     srcs = ["tools/mlir-vulkan-runner/vulkan-runtime-wrappers.cpp"],
5876     linkshared = True,
5877     tags = [
5878         "manual",  # External dependency
5879     ],
5880     deps = [
5881         ":VulkanRuntime",
5882         "//llvm:Support",
5883     ],
5886 cc_binary(
5887     name = "mlir-vulkan-runner",
5888     srcs = ["tools/mlir-vulkan-runner/mlir-vulkan-runner.cpp"],
5889     deps = [
5890         ":ArithmeticDialect",
5891         ":ExecutionEngineUtils",
5892         ":GPUDialect",
5893         ":GPUToSPIRV",
5894         ":GPUToVulkanTransforms",
5895         ":GPUTransforms",
5896         ":LLVMCommonConversion",
5897         ":LLVMDialect",
5898         ":LLVMToLLVMIRTranslation",
5899         ":MemRefDialect",
5900         ":MemRefToLLVM",
5901         ":MemRefTransforms",
5902         ":MlirJitRunner",
5903         ":Pass",
5904         ":ReconcileUnrealizedCasts",
5905         ":SPIRVDialect",
5906         ":SPIRVTransforms",
5907         ":StandardOps",
5908         ":StandardToLLVM",
5909         ":StandardToSPIRV",
5910         ":ToLLVMIRTranslation",
5911         "//llvm:Support",
5912     ],
5915 cc_binary(
5916     name = "mlir-spirv-cpu-runner",
5917     srcs = ["tools/mlir-spirv-cpu-runner/mlir-spirv-cpu-runner.cpp"],
5918     deps = [
5919         ":ArithmeticDialect",
5920         ":ExecutionEngineUtils",
5921         ":GPUDialect",
5922         ":GPUToSPIRV",
5923         ":GPUTransforms",
5924         ":IR",
5925         ":LLVMDialect",
5926         ":LLVMToLLVMIRTranslation",
5927         ":MemRefDialect",
5928         ":MlirJitRunner",
5929         ":Pass",
5930         ":SPIRVConversion",
5931         ":SPIRVDialect",
5932         ":SPIRVToLLVM",
5933         ":SPIRVTransforms",
5934         ":StandardOps",
5935         ":StandardToLLVM",
5936         ":ToLLVMIRTranslation",
5937         "//llvm:Core",
5938         "//llvm:Linker",
5939         "//llvm:Support",
5940     ],
5943 cc_library(
5944     name = "TableGen",
5945     srcs = glob(["lib/TableGen/*.cpp"]),
5946     hdrs = glob(["include/mlir/TableGen/*.h"]),
5947     includes = ["include"],
5948     deps = [
5949         ":Support",
5950         "//llvm:Support",
5951         "//llvm:TableGen",
5952     ],
5955 cc_library(
5956     name = "MlirTableGenMain",
5957     srcs = ["tools/mlir-tblgen/mlir-tblgen.cpp"],
5958     includes = ["include"],
5959     deps = [
5960         ":Support",
5961         ":TableGen",
5962         "//llvm:Support",
5963         "//llvm:TableGen",
5964         "//llvm:config",
5965     ],
5968 cc_binary(
5969     name = "mlir-tblgen",
5970     srcs = glob([
5971         "tools/mlir-tblgen/*.h",
5972         "tools/mlir-tblgen/*.cpp",
5973     ]),
5974     deps = [
5975         ":MlirTableGenMain",
5976         ":Support",
5977         ":TableGen",
5978         "//llvm:Support",
5979         "//llvm:TableGen",
5980         "//llvm:config",
5981     ],
5984 cc_binary(
5985     name = "mlir-linalg-ods-yaml-gen",
5986     srcs = [
5987         "tools/mlir-linalg-ods-gen/mlir-linalg-ods-yaml-gen.cpp",
5988     ],
5989     deps = [
5990         ":IR",
5991         ":Parser",
5992         ":Support",
5993         "//llvm:Support",
5994         "//llvm:TableGen",
5995         "//llvm:config",
5996     ],
5999 ## OpenACC dialect
6001 # TODO(gcmn): This is sticking td files in a cc_library
6002 gentbl_cc_library(
6003     name = "AccCommonGen",
6004     includes = ["/llvm/include"],
6005     strip_include_prefix = "include",
6006     tbl_outs = [
6007         (
6008             [
6009                 "-gen-directive-decl",
6010                 "-directives-dialect=OpenACC",
6011             ],
6012             "include/mlir/Dialect/OpenACC/AccCommon.td",
6013         ),
6014     ],
6015     tblgen = ":mlir-tblgen",
6016     td_file = "//llvm:include/llvm/Frontend/OpenACC/ACC.td",
6017     deps = ["//llvm:acc_td_files"],
6020 td_library(
6021     name = "OpenAccOpsTdFiles",
6022     srcs = [
6023         "include/mlir/Dialect/OpenACC/AccCommon.td",
6024         "include/mlir/Dialect/OpenACC/OpenACCOps.td",
6025     ],
6026     includes = ["include"],
6027     deps = [":OpBaseTdFiles"],
6030 gentbl_cc_library(
6031     name = "OpenACCOpsIncGen",
6032     strip_include_prefix = "include",
6033     tbl_outs = [
6034         (
6035             [
6036                 "-gen-dialect-decls",
6037                 "-dialect=acc",
6038             ],
6039             "include/mlir/Dialect/OpenACC/OpenACCOpsDialect.h.inc",
6040         ),
6041         (
6042             [
6043                 "-gen-dialect-defs",
6044                 "-dialect=acc",
6045             ],
6046             "include/mlir/Dialect/OpenACC/OpenACCOpsDialect.cpp.inc",
6047         ),
6048         (
6049             ["-gen-op-decls"],
6050             "include/mlir/Dialect/OpenACC/OpenACCOps.h.inc",
6051         ),
6052         (
6053             ["-gen-op-defs"],
6054             "include/mlir/Dialect/OpenACC/OpenACCOps.cpp.inc",
6055         ),
6056         (
6057             ["-gen-enum-decls"],
6058             "include/mlir/Dialect/OpenACC/OpenACCOpsEnums.h.inc",
6059         ),
6060         (
6061             ["-gen-enum-defs"],
6062             "include/mlir/Dialect/OpenACC/OpenACCOpsEnums.cpp.inc",
6063         ),
6064         (
6065             [
6066                 "-gen-attrdef-decls",
6067                 "-attrdefs-dialect=acc",
6068             ],
6069             "include/mlir/Dialect/OpenACC/OpenACCOpsAttributes.h.inc",
6070         ),
6071         (
6072             [
6073                 "-gen-attrdef-defs",
6074                 "-attrdefs-dialect=acc",
6075             ],
6076             "include/mlir/Dialect/OpenACC/OpenACCOpsAttributes.cpp.inc",
6077         ),
6078         (
6079             ["-gen-op-doc"],
6080             "g3doc/Dialects/OpenACC/OpenACCOps.md",
6081         ),
6082     ],
6083     tblgen = ":mlir-tblgen",
6084     td_file = "include/mlir/Dialect/OpenACC/OpenACCOps.td",
6085     deps = [":OpenAccOpsTdFiles"],
6088 cc_library(
6089     name = "OpenACCDialect",
6090     srcs = glob(
6091         [
6092             "lib/Dialect/OpenACC/IR/*.cpp",
6093             "lib/Dialect/OpenACC/IR/*.h",
6094         ],
6095     ),
6096     hdrs = glob([
6097         "include/mlir/Dialect/OpenACC/*.h",
6098     ]),
6099     includes = ["include"],
6100     deps = [
6101         ":ArithmeticDialect",
6102         ":IR",
6103         ":OpenACCOpsIncGen",
6104         ":StandardOps",
6105         ":Transforms",
6106         "//llvm:Support",
6107     ],
6110 ## OpenMP dialect
6112 # TODO(gcmn): This is sticking td files in a cc_library
6113 gentbl_cc_library(
6114     name = "OmpCommonTdGen",
6115     includes = ["/llvm/include"],
6116     strip_include_prefix = "include",
6117     tbl_outs = [
6118         (
6119             [
6120                 "-gen-directive-decl",
6121                 "-directives-dialect=OpenMP",
6122             ],
6123             "include/mlir/Dialect/OpenMP/OmpCommon.td",
6124         ),
6125     ],
6126     tblgen = ":mlir-tblgen",
6127     td_file = "//llvm:include/llvm/Frontend/OpenMP/OMP.td",
6128     deps = [
6129         ":OpBaseTdFiles",
6130         "//llvm:omp_td_files",
6131     ],
6134 td_library(
6135     name = "OpenMPOpsTdFiles",
6136     srcs = [
6137         "include/mlir/Dialect/OpenMP/OmpCommon.td",
6138         "include/mlir/Dialect/OpenMP/OpenMPOps.td",
6139         "include/mlir/Dialect/OpenMP/OpenMPOpsInterfaces.td",
6140     ],
6141     deps = [
6142         ":LLVMOpsTdFiles",
6143         ":OpBaseTdFiles",
6144     ],
6147 gentbl_cc_library(
6148     name = "OpenMPOpsIncGen",
6149     strip_include_prefix = "include",
6150     tbl_outs = [
6151         (
6152             ["-gen-op-decls"],
6153             "include/mlir/Dialect/OpenMP/OpenMPOps.h.inc",
6154         ),
6155         (
6156             ["-gen-op-defs"],
6157             "include/mlir/Dialect/OpenMP/OpenMPOps.cpp.inc",
6158         ),
6159         (
6160             ["-gen-enum-decls"],
6161             "include/mlir/Dialect/OpenMP/OpenMPOpsEnums.h.inc",
6162         ),
6163         (
6164             ["-gen-enum-defs"],
6165             "include/mlir/Dialect/OpenMP/OpenMPOpsEnums.cpp.inc",
6166         ),
6167         (
6168             [
6169                 "-gen-dialect-decls",
6170                 "-dialect=omp",
6171             ],
6172             "include/mlir/Dialect/OpenMP/OpenMPOpsDialect.h.inc",
6173         ),
6174         (
6175             [
6176                 "-gen-dialect-defs",
6177                 "-dialect=omp",
6178             ],
6179             "include/mlir/Dialect/OpenMP/OpenMPOpsDialect.cpp.inc",
6180         ),
6181         (
6182             ["-gen-type-interface-decls"],
6183             "include/mlir/Dialect/OpenMP/OpenMPTypeInterfaces.h.inc",
6184         ),
6185         (
6186             ["-gen-type-interface-defs"],
6187             "include/mlir/Dialect/OpenMP/OpenMPTypeInterfaces.cpp.inc",
6188         ),
6189         (
6190             [
6191                 "-gen-attrdef-decls",
6192                 "-attrdefs-dialect=omp",
6193             ],
6194             "include/mlir/Dialect/OpenMP/OpenMPOpsAttributes.h.inc",
6195         ),
6196         (
6197             [
6198                 "-gen-attrdef-defs",
6199                 "-attrdefs-dialect=omp",
6200             ],
6201             "include/mlir/Dialect/OpenMP/OpenMPOpsAttributes.cpp.inc",
6202         ),
6203         (
6204             ["-gen-op-doc"],
6205             "g3doc/Dialects/OpenMP/OpenMPOps.md",
6206         ),
6207     ],
6208     tblgen = ":mlir-tblgen",
6209     td_file = "include/mlir/Dialect/OpenMP/OpenMPOps.td",
6210     deps = [":OpenMPOpsTdFiles"],
6213 gentbl_cc_library(
6214     name = "OpenMPInterfacesIncGen",
6215     strip_include_prefix = "include",
6216     tbl_outs = [
6217         (
6218             ["-gen-op-interface-decls"],
6219             "include/mlir/Dialect/OpenMP/OpenMPOpsInterfaces.h.inc",
6220         ),
6221         (
6222             ["-gen-op-interface-defs"],
6223             "include/mlir/Dialect/OpenMP/OpenMPOpsInterfaces.cpp.inc",
6224         ),
6225     ],
6226     tblgen = ":mlir-tblgen",
6227     td_file = "include/mlir/Dialect/OpenMP/OpenMPOpsInterfaces.td",
6228     deps = [":OpenMPOpsTdFiles"],
6231 cc_library(
6232     name = "OpenMPDialect",
6233     srcs = glob(
6234         [
6235             "lib/Dialect/OpenMP/IR/*.cpp",
6236             "lib/Dialect/OpenMP/IR/*.h",
6237         ],
6238     ),
6239     hdrs = glob([
6240         "include/mlir/Dialect/OpenMP/*.h",
6241     ]),
6242     includes = ["include"],
6243     deps = [
6244         ":ControlFlowInterfaces",
6245         ":IR",
6246         ":LLVMDialect",
6247         ":OpenMPInterfacesIncGen",
6248         ":OpenMPOpsIncGen",
6249         ":SideEffectInterfaces",
6250         ":StandardOps",
6251         "//llvm:Support",
6252     ],
6255 cc_library(
6256     name = "OpenACCToSCF",
6257     srcs = glob([
6258         "lib/Conversion/OpenACCToSCF/*.cpp",
6259         "lib/Conversion/OpenACCToSCF/*.h",
6260     ]) + [":ConversionPassDetail"],
6261     hdrs = glob([
6262         "include/mlir/Conversion/OpenACCToSCF/*.h",
6263     ]),
6264     includes = ["include"],
6265     deps = [
6266         ":ArithmeticDialect",
6267         ":ConversionPassIncGen",
6268         ":IR",
6269         ":OpenACCDialect",
6270         ":Pass",
6271         ":SCFDialect",
6272         ":StandardOps",
6273         ":Transforms",
6274     ],
6277 cc_library(
6278     name = "OpenACCToLLVM",
6279     srcs = glob([
6280         "lib/Conversion/OpenACCToLLVM/*.cpp",
6281         "lib/Conversion/OpenACCToLLVM/*.h",
6282     ]) + [":ConversionPassDetail"],
6283     hdrs = glob([
6284         "include/mlir/Conversion/OpenACCToLLVM/*.h",
6285     ]),
6286     includes = ["include"],
6287     deps = [
6288         ":ConversionPassIncGen",
6289         ":IR",
6290         ":LLVMCommonConversion",
6291         ":LLVMDialect",
6292         ":OpenACCDialect",
6293         ":Pass",
6294         ":StandardOps",
6295         ":Transforms",
6296         "//llvm:Core",
6297         "//llvm:Support",
6298     ],
6301 cc_library(
6302     name = "OpenMPToLLVM",
6303     srcs = glob([
6304         "lib/Conversion/OpenMPToLLVM/*.cpp",
6305         "lib/Conversion/OpenMPToLLVM/*.h",
6306     ]) + [":ConversionPassDetail"],
6307     hdrs = glob([
6308         "include/mlir/Conversion/OpenMPToLLVM/*.h",
6309     ]),
6310     includes = ["include"],
6311     deps = [
6312         ":ArithmeticToLLVM",
6313         ":ConversionPassIncGen",
6314         ":IR",
6315         ":LLVMCommonConversion",
6316         ":LLVMDialect",
6317         ":MemRefToLLVM",
6318         ":OpenMPDialect",
6319         ":Pass",
6320         ":StandardOps",
6321         ":StandardToLLVM",
6322         ":Transforms",
6323         "//llvm:Core",
6324         "//llvm:Support",
6325     ],
6328 td_library(
6329     name = "QuantizationOpsTdFiles",
6330     srcs = [
6331         "include/mlir/Dialect/Quant/QuantOps.td",
6332         "include/mlir/Dialect/Quant/QuantOpsBase.td",
6333     ],
6334     includes = ["include"],
6335     deps = [
6336         ":InferTypeOpInterfaceTdFiles",
6337         ":OpBaseTdFiles",
6338         ":SideEffectInterfacesTdFiles",
6339     ],
6342 gentbl_cc_library(
6343     name = "QuantOpsIncGen",
6344     strip_include_prefix = "include",
6345     tbl_outs = [
6346         (
6347             ["-gen-op-decls"],
6348             "include/mlir/Dialect/Quant/QuantOps.h.inc",
6349         ),
6350         (
6351             ["-gen-op-defs"],
6352             "include/mlir/Dialect/Quant/QuantOps.cpp.inc",
6353         ),
6354         (
6355             ["-gen-dialect-decls"],
6356             "include/mlir/Dialect/Quant/QuantOpsDialect.h.inc",
6357         ),
6358         (
6359             ["-gen-dialect-defs"],
6360             "include/mlir/Dialect/Quant/QuantOpsDialect.cpp.inc",
6361         ),
6362         (
6363             ["-gen-op-doc"],
6364             "g3doc/Dialects/QuantOps/QuantOps.md",
6365         ),
6366     ],
6367     tblgen = ":mlir-tblgen",
6368     td_file = "include/mlir/Dialect/Quant/QuantOps.td",
6369     deps = [":QuantizationOpsTdFiles"],
6372 gentbl_cc_library(
6373     name = "QuantPassIncGen",
6374     strip_include_prefix = "include",
6375     tbl_outs = [
6376         (
6377             [
6378                 "-gen-pass-decls",
6379                 "-name=Quant",
6380             ],
6381             "include/mlir/Dialect/Quant/Passes.h.inc",
6382         ),
6383     ],
6384     tblgen = ":mlir-tblgen",
6385     td_file = "include/mlir/Dialect/Quant/Passes.td",
6386     deps = [":PassBaseTdFiles"],
6389 cc_library(
6390     name = "QuantOps",
6391     srcs = [
6392         "lib/Dialect/Quant/IR/QuantOps.cpp",
6393         "lib/Dialect/Quant/IR/QuantTypes.cpp",
6394         "lib/Dialect/Quant/IR/TypeDetail.h",
6395         "lib/Dialect/Quant/IR/TypeParser.cpp",
6396         "lib/Dialect/Quant/Transforms/ConvertConst.cpp",
6397         "lib/Dialect/Quant/Transforms/ConvertSimQuant.cpp",
6398         "lib/Dialect/Quant/Transforms/PassDetail.h",
6399         "lib/Dialect/Quant/Utils/FakeQuantSupport.cpp",
6400         "lib/Dialect/Quant/Utils/QuantizeUtils.cpp",
6401         "lib/Dialect/Quant/Utils/UniformSupport.cpp",
6402     ],
6403     hdrs = [
6404         "include/mlir/Dialect/Quant/FakeQuantSupport.h",
6405         "include/mlir/Dialect/Quant/Passes.h",
6406         "include/mlir/Dialect/Quant/QuantOps.h",
6407         "include/mlir/Dialect/Quant/QuantTypes.h",
6408         "include/mlir/Dialect/Quant/QuantizeUtils.h",
6409         "include/mlir/Dialect/Quant/UniformSupport.h",
6410     ],
6411     includes = ["include"],
6412     deps = [
6413         ":ArithmeticDialect",
6414         ":IR",
6415         ":Pass",
6416         ":QuantOpsIncGen",
6417         ":QuantPassIncGen",
6418         ":SideEffectInterfaces",
6419         ":StandardOps",
6420         ":TransformUtils",
6421         "//llvm:Support",
6422     ],
6425 td_library(
6426     name = "LinalgOpsTdFiles",
6427     srcs = [
6428         "include/mlir/Dialect/Linalg/IR/LinalgBase.td",
6429         "include/mlir/Dialect/Linalg/IR/LinalgOps.td",
6430     ],
6431     includes = ["include"],
6432     deps = [
6433         ":ControlFlowInterfacesTdFiles",
6434         ":InferTypeOpInterfaceTdFiles",
6435         ":LoopLikeInterfaceTdFiles",
6436         ":OpBaseTdFiles",
6437         ":SideEffectInterfacesTdFiles",
6438         ":TilingInterfaceTdFiles",
6439         ":ViewLikeInterfaceTdFiles",
6440     ],
6443 gentbl_cc_library(
6444     name = "LinalgOpsIncGen",
6445     strip_include_prefix = "include",
6446     tbl_outs = [
6447         (
6448             ["-gen-op-decls"],
6449             "include/mlir/Dialect/Linalg/IR/LinalgOps.h.inc",
6450         ),
6451         (
6452             ["-gen-op-defs"],
6453             "include/mlir/Dialect/Linalg/IR/LinalgOps.cpp.inc",
6454         ),
6455         (
6456             [
6457                 "-gen-dialect-decls",
6458                 "-dialect=linalg",
6459             ],
6460             "include/mlir/Dialect/Linalg/IR/LinalgOpsDialect.h.inc",
6461         ),
6462         (
6463             [
6464                 "-gen-dialect-defs",
6465                 "-dialect=linalg",
6466             ],
6467             "include/mlir/Dialect/Linalg/IR/LinalgOpsDialect.cpp.inc",
6468         ),
6469     ],
6470     tblgen = ":mlir-tblgen",
6471     td_file = "include/mlir/Dialect/Linalg/IR/LinalgOps.td",
6472     deps = [":LinalgOpsTdFiles"],
6475 genlinalg(
6476     name = "LinalgNamedStructuredOpsYamlIncGen",
6477     src = "include/mlir/Dialect/Linalg/IR/LinalgNamedStructuredOps.yaml",
6478     linalg_outs = [
6479         (
6480             "-o-impl=$@",
6481             "include/mlir/Dialect/Linalg/IR/LinalgNamedStructuredOps.yamlgen.cpp.inc",
6482         ),
6483         (
6484             "-o-ods-decl=$@",
6485             "include/mlir/Dialect/Linalg/IR/LinalgNamedStructuredOps.yamlgen.td",
6486         ),
6487     ],
6488     linalggen = ":mlir-linalg-ods-yaml-gen",
6491 td_library(
6492     name = "LinalgStructuredOpsTdFiles",
6493     srcs = [
6494         "include/mlir/Dialect/Linalg/IR/LinalgInterfaces.td",
6495         "include/mlir/Dialect/Linalg/IR/LinalgNamedStructuredOps.yamlgen.td",
6496         "include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td",
6497     ],
6498     includes = ["include"],
6499     deps = [
6500         ":CopyOpInterfaceTdFiles",
6501         ":LinalgOpsTdFiles",
6502         ":OpBaseTdFiles",
6503         ":SideEffectInterfacesTdFiles",
6504     ],
6507 gentbl_cc_library(
6508     name = "LinalgStructuredOpsIncGen",
6509     strip_include_prefix = "include",
6510     tbl_outs = [
6511         (
6512             ["-gen-op-decls"],
6513             "include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.h.inc",
6514         ),
6515         (
6516             ["-gen-op-defs"],
6517             "include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.cpp.inc",
6518         ),
6519     ],
6520     tblgen = ":mlir-tblgen",
6521     td_file = "include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td",
6522     deps = [":LinalgStructuredOpsTdFiles"],
6525 gentbl_cc_library(
6526     name = "LinalgInterfacesIncGen",
6527     strip_include_prefix = "include",
6528     tbl_outs = [
6529         (
6530             ["-gen-op-interface-decls"],
6531             "include/mlir/Dialect/Linalg/IR/LinalgInterfaces.h.inc",
6532         ),
6533         (
6534             ["-gen-op-interface-defs"],
6535             "include/mlir/Dialect/Linalg/IR/LinalgInterfaces.cpp.inc",
6536         ),
6537     ],
6538     tblgen = ":mlir-tblgen",
6539     td_file = "include/mlir/Dialect/Linalg/IR/LinalgInterfaces.td",
6540     deps = [":LinalgStructuredOpsTdFiles"],
6543 td_library(
6544     name = "BufferizableOpInterfaceTdFiles",
6545     srcs = [
6546         "include/mlir/Dialect/Bufferization/IR/BufferizableOpInterface.td",
6547     ],
6548     includes = ["include"],
6549     deps = [
6550         ":OpBaseTdFiles",
6551     ],
6554 gentbl_cc_library(
6555     name = "BufferizableOpInterfaceIncGen",
6556     strip_include_prefix = "include",
6557     tbl_outs = [
6558         (
6559             ["-gen-op-interface-decls"],
6560             "include/mlir/Dialect/Bufferization/IR/BufferizableOpInterface.h.inc",
6561         ),
6562         (
6563             ["-gen-op-interface-defs"],
6564             "include/mlir/Dialect/Bufferization/IR/BufferizableOpInterface.cpp.inc",
6565         ),
6566     ],
6567     tblgen = ":mlir-tblgen",
6568     td_file = "include/mlir/Dialect/Bufferization/IR/BufferizableOpInterface.td",
6569     deps = [
6570         ":BufferizableOpInterfaceTdFiles",
6571     ],
6574 cc_library(
6575     name = "AffineBufferizableOpInterfaceImpl",
6576     srcs = [
6577         "lib/Dialect/Linalg/ComprehensiveBufferize/AffineInterfaceImpl.cpp",
6578     ],
6579     hdrs = [
6580         "include/mlir/Dialect/Linalg/ComprehensiveBufferize/AffineInterfaceImpl.h",
6581     ],
6582     includes = ["include"],
6583     deps = [
6584         ":Affine",
6585         ":BufferizationDialect",
6586         "//llvm:Support",
6587     ],
6590 cc_library(
6591     name = "ArithBufferizableOpInterfaceImpl",
6592     srcs = [
6593         "lib/Dialect/Linalg/ComprehensiveBufferize/ArithInterfaceImpl.cpp",
6594     ],
6595     hdrs = [
6596         "include/mlir/Dialect/Linalg/ComprehensiveBufferize/ArithInterfaceImpl.h",
6597     ],
6598     includes = ["include"],
6599     deps = [
6600         ":ArithmeticDialect",
6601         ":BufferizationDialect",
6602         ":IR",
6603         ":MemRefDialect",
6604         ":Support",
6605         ":TransformUtils",
6606         "//llvm:Support",
6607     ],
6610 cc_library(
6611     name = "LinalgBufferizableOpInterfaceImpl",
6612     srcs = [
6613         "lib/Dialect/Linalg/ComprehensiveBufferize/LinalgInterfaceImpl.cpp",
6614     ],
6615     hdrs = [
6616         "include/mlir/Dialect/Linalg/ComprehensiveBufferize/LinalgInterfaceImpl.h",
6617     ],
6618     includes = ["include"],
6619     deps = [
6620         ":BufferizationDialect",
6621         ":BufferizationTransforms",
6622         ":IR",
6623         ":LinalgOps",
6624         ":LinalgStructuredOpsIncGen",
6625         ":TensorDialect",
6626     ],
6629 cc_library(
6630     name = "SCFBufferizableOpInterfaceImpl",
6631     srcs = [
6632         "lib/Dialect/Linalg/ComprehensiveBufferize/SCFInterfaceImpl.cpp",
6633     ],
6634     hdrs = [
6635         "include/mlir/Dialect/Linalg/ComprehensiveBufferize/SCFInterfaceImpl.h",
6636     ],
6637     includes = ["include"],
6638     deps = [
6639         ":BufferizationDialect",
6640         ":BufferizationTransforms",
6641         ":IR",
6642         ":SCFDialect",
6643         ":Support",
6644         "//llvm:Support",
6645     ],
6648 cc_library(
6649     name = "StdBufferizableOpInterfaceImpl",
6650     srcs = [
6651         "lib/Dialect/Linalg/ComprehensiveBufferize/StdInterfaceImpl.cpp",
6652     ],
6653     hdrs = [
6654         "include/mlir/Dialect/Linalg/ComprehensiveBufferize/StdInterfaceImpl.h",
6655     ],
6656     includes = ["include"],
6657     deps = [
6658         ":BufferizationDialect",
6659         ":IR",
6660         ":StandardOps",
6661         ":Support",
6662         "//llvm:Support",
6663     ],
6666 cc_library(
6667     name = "VectorBufferizableOpInterfaceImpl",
6668     srcs = [
6669         "lib/Dialect/Linalg/ComprehensiveBufferize/VectorInterfaceImpl.cpp",
6670     ],
6671     hdrs = [
6672         "include/mlir/Dialect/Linalg/ComprehensiveBufferize/VectorInterfaceImpl.h",
6673     ],
6674     includes = ["include"],
6675     deps = [
6676         ":BufferizationDialect",
6677         ":IR",
6678         ":Support",
6679         ":VectorOps",
6680         "//llvm:Support",
6681     ],
6684 td_library(
6685     name = "LinalgDocTdFiles",
6686     srcs = ["include/mlir/Dialect/Linalg/IR/LinalgDoc.td"],
6687     includes = ["include"],
6688     deps = [
6689         ":LinalgOpsTdFiles",
6690         ":LinalgStructuredOpsTdFiles",
6691     ],
6694 gentbl_cc_library(
6695     name = "LinalgDocIncGen",
6696     strip_include_prefix = "include",
6697     tbl_outs = [
6698         (
6699             ["-gen-op-doc"],
6700             "g3doc/Dialects/Linalg/LinalgOps.md",
6701         ),
6702     ],
6703     tblgen = ":mlir-tblgen",
6704     td_file = "include/mlir/Dialect/Linalg/IR/LinalgDoc.td",
6705     deps = [":LinalgDocTdFiles"],
6708 cc_library(
6709     name = "LinalgToLLVM",
6710     srcs = glob([
6711         "lib/Conversion/LinalgToLLVM/*.cpp",
6712         "lib/Conversion/LinalgToLLVM/*.h",
6713     ]) + [":ConversionPassDetail"],
6714     hdrs = glob([
6715         "include/mlir/Conversion/LinalgToLLVM/*.h",
6716     ]),
6717     includes = ["include"],
6718     deps = [
6719         ":AffineToStandard",
6720         ":Analysis",
6721         ":ConversionPassIncGen",
6722         ":IR",
6723         ":LLVMCommonConversion",
6724         ":LLVMDialect",
6725         ":LinalgOps",
6726         ":LinalgTransforms",
6727         ":MemRefToLLVM",
6728         ":Pass",
6729         ":SCFDialect",
6730         ":SCFToStandard",
6731         ":StandardOps",
6732         ":Support",
6733         ":Transforms",
6734         ":VectorToLLVM",
6735         ":VectorToSCF",
6736         "//llvm:Core",
6737         "//llvm:Support",
6738     ],
6741 cc_library(
6742     name = "LinalgToStandard",
6743     srcs = glob([
6744         "lib/Conversion/LinalgToStandard/*.cpp",
6745         "lib/Conversion/LinalgToStandard/*.h",
6746     ]) + [":ConversionPassDetail"],
6747     hdrs = glob([
6748         "include/mlir/Conversion/LinalgToStandard/*.h",
6749     ]),
6750     includes = ["include"],
6751     deps = [
6752         ":Affine",
6753         ":ConversionPassIncGen",
6754         ":IR",
6755         ":LinalgOps",
6756         ":LinalgTransforms",
6757         ":MemRefDialect",
6758         ":Pass",
6759         ":SCFDialect",
6760         ":StandardOps",
6761         ":Support",
6762         ":Transforms",
6763         "//llvm:Core",
6764         "//llvm:Support",
6765     ],
6768 cc_library(
6769     name = "LinalgToSPIRV",
6770     srcs = glob([
6771         "lib/Conversion/LinalgToSPIRV/*.cpp",
6772         "lib/Conversion/LinalgToSPIRV/*.h",
6773     ]) + [":ConversionPassDetail"],
6774     hdrs = glob([
6775         "include/mlir/Conversion/LinalgToSPIRV/*.h",
6776     ]),
6777     includes = ["include"],
6778     deps = [
6779         ":ConversionPassIncGen",
6780         ":DialectUtils",
6781         ":IR",
6782         ":LinalgOps",
6783         ":LinalgTransforms",
6784         ":Pass",
6785         ":SPIRVConversion",
6786         ":SPIRVDialect",
6787         ":StandardOps",
6788         ":TransformUtils",
6789     ],
6792 cc_library(
6793     name = "LinalgOps",
6794     srcs = [
6795         "lib/Dialect/Linalg/IR/LinalgDialect.cpp",
6796         "lib/Dialect/Linalg/IR/LinalgOps.cpp",
6797     ],
6798     hdrs = [
6799         "include/mlir/Dialect/Linalg/IR/Linalg.h",
6800     ],
6801     includes = ["include"],
6802     deps = [
6803         ":Affine",
6804         ":ArithmeticDialect",
6805         ":BufferizationDialect",
6806         ":CopyOpInterface",
6807         ":DialectUtils",
6808         ":IR",
6809         ":InferTypeOpInterface",
6810         ":LinalgInterfaces",
6811         ":LinalgInterfacesIncGen",
6812         ":LinalgNamedStructuredOpsYamlIncGen",
6813         ":LinalgOpsIncGen",
6814         ":LinalgStructuredOpsIncGen",
6815         ":MathDialect",
6816         ":MemRefDialect",
6817         ":Parser",
6818         ":SCFDialect",
6819         ":SideEffectInterfaces",
6820         ":StandardOps",
6821         ":Support",
6822         ":TensorDialect",
6823         ":TilingInterface",
6824         ":ViewLikeInterface",
6825         "//llvm:Support",
6826     ],
6829 gentbl_cc_library(
6830     name = "LinalgPassIncGen",
6831     strip_include_prefix = "include",
6832     tbl_outs = [
6833         (
6834             [
6835                 "-gen-pass-decls",
6836                 "-name=Linalg",
6837             ],
6838             "include/mlir/Dialect/Linalg/Passes.h.inc",
6839         ),
6840         (
6841             [
6842                 "-gen-pass-capi-header",
6843                 "--prefix=Linalg",
6844             ],
6845             "include/mlir/Dialect/Linalg/Passes.capi.h.inc",
6846         ),
6847         (
6848             [
6849                 "-gen-pass-capi-impl",
6850                 "--prefix=Linalg",
6851             ],
6852             "include/mlir/Dialect/Linalg/Passes.capi.cpp.inc",
6853         ),
6854     ],
6855     tblgen = ":mlir-tblgen",
6856     td_file = "include/mlir/Dialect/Linalg/Passes.td",
6857     deps = [":PassBaseTdFiles"],
6860 cc_library(
6861     name = "LinalgTransforms",
6862     srcs = glob([
6863         "lib/Dialect/Linalg/Transforms/*.cpp",
6864         "lib/Dialect/Linalg/Transforms/*.h",
6865     ]) + [
6866         "lib/Dialect/Linalg/Analysis/DependenceAnalysis.cpp",
6867         "lib/Dialect/Linalg/Utils/Utils.cpp",
6868     ],
6869     hdrs = [
6870         "include/mlir/Dialect/Linalg/Analysis/DependenceAnalysis.h",
6871         "include/mlir/Dialect/Linalg/Passes.h",
6872         "include/mlir/Dialect/Linalg/Transforms/CodegenStrategy.h",
6873         "include/mlir/Dialect/Linalg/Transforms/HoistPadding.h",
6874         "include/mlir/Dialect/Linalg/Transforms/Hoisting.h",
6875         "include/mlir/Dialect/Linalg/Transforms/Transforms.h",
6876         "include/mlir/Dialect/Linalg/Utils/Utils.h",
6877     ],
6878     includes = ["include"],
6879     deps = [
6880         ":Affine",
6881         ":AffineAnalysis",
6882         ":AffineBufferizableOpInterfaceImpl",
6883         ":AffineUtils",
6884         ":Analysis",
6885         ":ArithBufferizableOpInterfaceImpl",
6886         ":ArithmeticDialect",
6887         ":BufferizationDialect",
6888         ":BufferizationTransforms",
6889         ":ComplexDialect",
6890         ":DialectUtils",
6891         ":IR",
6892         ":InferTypeOpInterface",
6893         ":LinalgBufferizableOpInterfaceImpl",
6894         ":LinalgOps",
6895         ":LinalgPassIncGen",
6896         ":LinalgStructuredOpsIncGen",
6897         ":MathDialect",
6898         ":MemRefDialect",
6899         ":ModuleBufferization",
6900         ":Pass",
6901         ":SCFBufferizableOpInterfaceImpl",
6902         ":SCFDialect",
6903         ":SCFTransforms",
6904         ":StandardOps",
6905         ":StandardOpsTransforms",
6906         ":StdBufferizableOpInterfaceImpl",
6907         ":Support",
6908         ":TensorDialect",
6909         ":TensorTransforms",
6910         ":TensorUtils",
6911         ":TransformUtils",
6912         ":VectorBufferizableOpInterfaceImpl",
6913         ":VectorOps",
6914         ":VectorToSCF",
6915         ":X86VectorTransforms",
6916         "//llvm:Support",
6917     ],
6920 cc_library(
6921     name = "ModuleBufferization",
6922     srcs = [
6923         "lib/Dialect/Linalg/ComprehensiveBufferize/ModuleBufferization.cpp",
6924     ],
6925     hdrs = [
6926         "include/mlir/Dialect/Linalg/ComprehensiveBufferize/ModuleBufferization.h",
6927     ],
6928     includes = ["include"],
6929     deps = [
6930         ":BufferizationDialect",
6931         ":BufferizationTransforms",
6932         ":DialectUtils",
6933         ":IR",
6934         ":MemRefDialect",
6935         ":StandardOps",
6936         ":Support",
6937         "//llvm:Support",
6938     ],
6941 cc_library(
6942     name = "TilingInterface",
6943     srcs = ["lib/Interfaces/TilingInterface.cpp"],
6944     hdrs = ["include/mlir/Interfaces/TilingInterface.h"],
6945     includes = ["include"],
6946     deps = [
6947         ":IR",
6948         ":Support",
6949         ":TilingInterfaceIncGen",
6950         ":ViewLikeInterface",
6951         "//llvm:Support",
6952     ],
6955 td_library(
6956     name = "VectorOpsTdFiles",
6957     srcs = ["include/mlir/Dialect/Vector/VectorOps.td"],
6958     includes = ["include"],
6959     deps = [
6960         ":OpBaseTdFiles",
6961         ":SideEffectInterfacesTdFiles",
6962         ":VectorInterfacesTdFiles",
6963         ":ViewLikeInterfaceTdFiles",
6964     ],
6967 gentbl_cc_library(
6968     name = "VectorOpsIncGen",
6969     strip_include_prefix = "include",
6970     tbl_outs = [
6971         (
6972             ["-gen-op-decls"],
6973             "include/mlir/Dialect/Vector/VectorOps.h.inc",
6974         ),
6975         (
6976             ["-gen-op-defs"],
6977             "include/mlir/Dialect/Vector/VectorOps.cpp.inc",
6978         ),
6979         (
6980             [
6981                 "-gen-dialect-decls",
6982                 "-dialect=vector",
6983             ],
6984             "include/mlir/Dialect/Vector/VectorOpsDialect.h.inc",
6985         ),
6986         (
6987             [
6988                 "-gen-dialect-defs",
6989                 "-dialect=vector",
6990             ],
6991             "include/mlir/Dialect/Vector/VectorOpsDialect.cpp.inc",
6992         ),
6993         (
6994             ["-gen-enum-decls"],
6995             "include/mlir/Dialect/Vector/VectorOpsEnums.h.inc",
6996         ),
6997         (
6998             ["-gen-enum-defs"],
6999             "include/mlir/Dialect/Vector/VectorOpsEnums.cpp.inc",
7000         ),
7001         (
7002             ["-gen-op-doc"],
7003             "g3doc/Dialects/Vector/VectorOps.md",
7004         ),
7005     ],
7006     tblgen = ":mlir-tblgen",
7007     td_file = "include/mlir/Dialect/Vector/VectorOps.td",
7008     deps = [":VectorOpsTdFiles"],
7011 cc_library(
7012     name = "VectorToLLVM",
7013     srcs = glob([
7014         "lib/Conversion/VectorToLLVM/*.cpp",
7015         "lib/Conversion/VectorToLLVM/*.h",
7016     ]) + [":ConversionPassDetail"],
7017     hdrs = glob([
7018         "include/mlir/Conversion/VectorToLLVM/*.h",
7019     ]),
7020     includes = ["include"],
7021     deps = [
7022         ":AMX",
7023         ":AMXTransforms",
7024         ":ArithmeticDialect",
7025         ":ArmNeon",
7026         ":ArmSVE",
7027         ":ArmSVETransforms",
7028         ":ConversionPassIncGen",
7029         ":DialectUtils",
7030         ":IR",
7031         ":LLVMCommonConversion",
7032         ":LLVMDialect",
7033         ":MemRefDialect",
7034         ":Pass",
7035         ":StandardOps",
7036         ":Support",
7037         ":ToLLVMIRTranslation",
7038         ":Transforms",
7039         ":VectorOps",
7040         ":X86Vector",
7041         ":X86VectorTransforms",
7042         "//llvm:Core",
7043         "//llvm:Support",
7044     ],
7047 cc_library(
7048     name = "VectorToGPU",
7049     srcs = glob([
7050         "lib/Conversion/VectorToGPU/*.cpp",
7051         "lib/Conversion/VectorToGPU/*.h",
7052     ]) + [":ConversionPassDetail"],
7053     hdrs = glob([
7054         "include/mlir/Conversion/VectorToGPU/*.h",
7055     ]),
7056     includes = ["include"],
7057     deps = [
7058         ":Affine",
7059         ":Analysis",
7060         ":ArithmeticDialect",
7061         ":ConversionPassIncGen",
7062         ":DialectUtils",
7063         ":GPUDialect",
7064         ":IR",
7065         ":LLVMDialect",
7066         ":MemRefDialect",
7067         ":Pass",
7068         ":SCFDialect",
7069         ":StandardOps",
7070         ":StandardToLLVM",
7071         ":Support",
7072         ":Transforms",
7073         ":VectorOps",
7074         "//llvm:Core",
7075         "//llvm:Support",
7076     ],
7079 cc_library(
7080     name = "VectorToSCF",
7081     srcs = glob([
7082         "lib/Conversion/VectorToSCF/*.cpp",
7083         "lib/Conversion/VectorToSCF/*.h",
7084     ]) + [":ConversionPassDetail"],
7085     hdrs = glob([
7086         "include/mlir/Conversion/VectorToSCF/*.h",
7087     ]),
7088     includes = ["include"],
7089     deps = [
7090         ":Affine",
7091         ":AffineUtils",
7092         ":ArithmeticDialect",
7093         ":ConversionPassIncGen",
7094         ":IR",
7095         ":LLVMDialect",
7096         ":MemRefDialect",
7097         ":Pass",
7098         ":SCFDialect",
7099         ":StandardOps",
7100         ":StandardToLLVM",
7101         ":Support",
7102         ":Transforms",
7103         ":VectorOps",
7104         "//llvm:Core",
7105         "//llvm:Support",
7106     ],
7109 td_library(
7110     name = "TosaDialectTdFiles",
7111     srcs = glob(["include/mlir/Dialect/Tosa/IR/*.td"]),
7112     deps = [
7113         ":InferTypeOpInterfaceTdFiles",
7114         ":LoopLikeInterfaceTdFiles",
7115         ":OpBaseTdFiles",
7116         ":SideEffectInterfacesTdFiles",
7117     ],
7120 gentbl_cc_library(
7121     name = "TosaDialectIncGen",
7122     strip_include_prefix = "include",
7123     tbl_outs = [
7124         (
7125             ["-gen-op-decls"],
7126             "include/mlir/Dialect/Tosa/IR/TosaOps.h.inc",
7127         ),
7128         (
7129             ["-gen-op-defs"],
7130             "include/mlir/Dialect/Tosa/IR/TosaOps.cpp.inc",
7131         ),
7132         (
7133             ["-gen-struct-attr-decls"],
7134             "include/mlir/Dialect/Tosa/IR/TosaStructs.h.inc",
7135         ),
7136         (
7137             ["-gen-struct-attr-defs"],
7138             "include/mlir/Dialect/Tosa/IR/TosaStructs.cpp.inc",
7139         ),
7140         (
7141             ["-gen-dialect-decls"],
7142             "include/mlir/Dialect/Tosa/IR/TosaOpsDialect.h.inc",
7143         ),
7144         (
7145             ["-gen-dialect-defs"],
7146             "include/mlir/Dialect/Tosa/IR/TosaOpsDialect.cpp.inc",
7147         ),
7148         (
7149             ["-gen-op-doc"],
7150             "g3doc/Dialects/Tosa/TosaOps.md",
7151         ),
7152     ],
7153     tblgen = ":mlir-tblgen",
7154     td_file = "include/mlir/Dialect/Tosa/IR/TosaOps.td",
7155     deps = [":TosaDialectTdFiles"],
7158 gentbl_cc_library(
7159     name = "TosaInterfacesIncGen",
7160     strip_include_prefix = "include",
7161     tbl_outs = [
7162         (
7163             ["-gen-op-interface-decls"],
7164             "include/mlir/Dialect/Tosa/IR/TosaInterfaces.h.inc",
7165         ),
7166         (
7167             ["-gen-op-interface-defs"],
7168             "include/mlir/Dialect/Tosa/IR/TosaInterfaces.cpp.inc",
7169         ),
7170     ],
7171     tblgen = ":mlir-tblgen",
7172     td_file = "include/mlir/Dialect/Tosa/IR/TosaInterfaces.td",
7173     deps = [":TosaDialectTdFiles"],
7176 gentbl_cc_library(
7177     name = "TosaPassIncGen",
7178     strip_include_prefix = "include",
7179     tbl_outs = [
7180         (
7181             [
7182                 "-gen-pass-decls",
7183                 "-name=TosaOpt",
7184             ],
7185             "include/mlir/Dialect/Tosa/Transforms/Passes.h.inc",
7186         ),
7187     ],
7188     tblgen = ":mlir-tblgen",
7189     td_file = "include/mlir/Dialect/Tosa/Transforms/Passes.td",
7190     deps = [":PassBaseTdFiles"],
7193 cc_library(
7194     name = "TosaDialect",
7195     srcs = glob([
7196         "lib/Dialect/Tosa/IR/*.cpp",
7197         "lib/Dialect/Tosa/IR/*.h",
7198         "lib/Dialect/Tosa/Utils/*.cpp",
7199         "lib/Dialect/Tosa/Transforms/*.cpp",
7200     ]),
7201     hdrs = glob([
7202         "include/mlir/Dialect/Tosa/IR/*.h",
7203         "include/mlir/Dialect/Tosa/Utils/*.h",
7204         "include/mlir/Dialect/Tosa/Transforms/*.h",
7205     ]),
7206     includes = ["include"],
7207     deps = [
7208         ":Analysis",
7209         ":ArithmeticDialect",
7210         ":Dialect",
7211         ":DialectUtils",
7212         ":IR",
7213         ":InferTypeOpInterface",
7214         ":LoopLikeInterface",
7215         ":Pass",
7216         ":QuantOps",
7217         ":StandardOps",
7218         ":TensorDialect",
7219         ":TosaDialectIncGen",
7220         ":TosaInterfacesIncGen",
7221         ":TosaPassIncGen",
7222         ":TransformUtils",
7223         "//llvm:Support",
7224     ],
7227 cc_library(
7228     name = "TosaToLinalg",
7229     srcs = glob([
7230         "lib/Conversion/TosaToLinalg/*.cpp",
7231         "lib/Conversion/TosaToLinalg/*.h",
7232     ]) + [":ConversionPassDetail"],
7233     hdrs = glob([
7234         "include/mlir/Conversion/TosaToLinalg/*.h",
7235     ]),
7236     includes = [
7237         "include",
7238         "lib/Conversion/TosaToLinalg",
7239     ],
7240     deps = [
7241         ":ArithmeticDialect",
7242         ":ConversionPassIncGen",
7243         ":DialectUtils",
7244         ":IR",
7245         ":LinalgOps",
7246         ":MathDialect",
7247         ":Pass",
7248         ":SCFDialect",
7249         ":StandardOps",
7250         ":TensorDialect",
7251         ":TensorUtils",
7252         ":TosaDialect",
7253         ":Transforms",
7254     ],
7257 cc_library(
7258     name = "TosaToSCF",
7259     srcs = glob([
7260         "lib/Conversion/TosaToSCF/*.cpp",
7261         "lib/Conversion/TosaToSCF/*.h",
7262     ]) + [":ConversionPassDetail"],
7263     hdrs = glob([
7264         "include/mlir/Conversion/TosaToSCF/*.h",
7265     ]),
7266     includes = [
7267         "include",
7268         "lib/Conversion/TosaToSCF",
7269     ],
7270     deps = [
7271         ":ConversionPassIncGen",
7272         ":IR",
7273         ":Pass",
7274         ":SCFDialect",
7275         ":TensorDialect",
7276         ":TosaDialect",
7277         ":Transforms",
7278     ],
7281 cc_library(
7282     name = "TosaToStandard",
7283     srcs = glob([
7284         "lib/Conversion/TosaToStandard/*.cpp",
7285         "lib/Conversion/TosaToStandard/*.h",
7286     ]) + [":ConversionPassDetail"],
7287     hdrs = glob([
7288         "include/mlir/Conversion/TosaToStandard/*.h",
7289     ]),
7290     includes = [
7291         "include",
7292         "lib/Conversion/TosaToStandard",
7293     ],
7294     deps = [
7295         ":ArithmeticDialect",
7296         ":ConversionPassIncGen",
7297         ":IR",
7298         ":Pass",
7299         ":StandardOps",
7300         ":TensorDialect",
7301         ":TosaDialect",
7302         ":Transforms",
7303     ],
7306 td_library(
7307     name = "ComplexOpsTdFiles",
7308     srcs = [
7309         "include/mlir/Dialect/Complex/IR/ComplexBase.td",
7310         "include/mlir/Dialect/Complex/IR/ComplexOps.td",
7311     ],
7312     includes = ["include"],
7313     deps = [
7314         ":InferTypeOpInterfaceTdFiles",
7315         ":OpBaseTdFiles",
7316         ":SideEffectInterfacesTdFiles",
7317     ],
7320 gentbl_cc_library(
7321     name = "ComplexBaseIncGen",
7322     strip_include_prefix = "include",
7323     tbl_outs = [
7324         (
7325             [
7326                 "-gen-dialect-decls",
7327                 "-dialect=complex",
7328             ],
7329             "include/mlir/Dialect/Complex/IR/ComplexOpsDialect.h.inc",
7330         ),
7331         (
7332             [
7333                 "-gen-dialect-defs",
7334                 "-dialect=complex",
7335             ],
7336             "include/mlir/Dialect/Complex/IR/ComplexOpsDialect.cpp.inc",
7337         ),
7338     ],
7339     tblgen = ":mlir-tblgen",
7340     td_file = "include/mlir/Dialect/Complex/IR/ComplexBase.td",
7341     deps = [":ComplexOpsTdFiles"],
7344 gentbl_cc_library(
7345     name = "ComplexOpsIncGen",
7346     strip_include_prefix = "include",
7347     tbl_outs = [
7348         (
7349             ["-gen-op-decls"],
7350             "include/mlir/Dialect/Complex/IR/ComplexOps.h.inc",
7351         ),
7352         (
7353             ["-gen-op-defs"],
7354             "include/mlir/Dialect/Complex/IR/ComplexOps.cpp.inc",
7355         ),
7356     ],
7357     tblgen = ":mlir-tblgen",
7358     td_file = "include/mlir/Dialect/Complex/IR/ComplexOps.td",
7359     deps = [":ComplexOpsTdFiles"],
7362 cc_library(
7363     name = "ComplexDialect",
7364     srcs = glob(
7365         [
7366             "lib/Dialect/Complex/IR/*.cpp",
7367             "lib/Dialect/Complex/IR/*.h",
7368         ],
7369     ),
7370     hdrs = ["include/mlir/Dialect/Complex/IR/Complex.h"],
7371     includes = ["include"],
7372     deps = [
7373         ":ArithmeticDialect",
7374         ":ComplexBaseIncGen",
7375         ":ComplexOpsIncGen",
7376         ":IR",
7377         ":SideEffectInterfaces",
7378         ":StandardOps",
7379         ":Support",
7380         ":VectorInterfaces",
7381         "//llvm:Support",
7382     ],
7385 cc_library(
7386     name = "ComplexToLLVM",
7387     srcs = glob([
7388         "lib/Conversion/ComplexToLLVM/*.cpp",
7389         "lib/Conversion/ComplexToLLVM/*.h",
7390     ]) + [":ConversionPassDetail"],
7391     hdrs = glob([
7392         "include/mlir/Conversion/ComplexToLLVM/*.h",
7393     ]),
7394     includes = ["include"],
7395     deps = [
7396         ":ArithmeticDialect",
7397         ":ComplexDialect",
7398         ":ConversionPassIncGen",
7399         ":IR",
7400         ":LLVMCommonConversion",
7401         ":LLVMDialect",
7402         ":Pass",
7403         ":StandardOps",
7404         ":Support",
7405         ":Transforms",
7406         "//llvm:Core",
7407         "//llvm:Support",
7408     ],
7411 cc_library(
7412     name = "ComplexToStandard",
7413     srcs = glob([
7414         "lib/Conversion/ComplexToStandard/*.cpp",
7415         "lib/Conversion/ComplexToStandard/*.h",
7416     ]) + [":ConversionPassDetail"],
7417     hdrs = glob([
7418         "include/mlir/Conversion/ComplexToStandard/*.h",
7419     ]),
7420     includes = ["include"],
7421     deps = [
7422         ":ArithmeticDialect",
7423         ":ComplexDialect",
7424         ":ConversionPassIncGen",
7425         ":IR",
7426         ":MathDialect",
7427         ":Pass",
7428         ":StandardOps",
7429         ":Transforms",
7430     ],
7433 exports_files([
7434     "include/mlir/Interfaces/CallInterfaces.h",
7435     "include/mlir/Interfaces/CastInterfaces.h",
7436     "include/mlir/Interfaces/ControlFlowInterfaces.h",
7437     "include/mlir/Transforms/InliningUtils.h",
7440 td_library(
7441     name = "ArithmeticOpsTdFiles",
7442     srcs = [
7443         "include/mlir/Dialect/Arithmetic/IR/ArithmeticBase.td",
7444         "include/mlir/Dialect/Arithmetic/IR/ArithmeticOps.td",
7445     ],
7446     includes = ["include"],
7447     deps = [
7448         ":CastInterfacesTdFiles",
7449         ":InferTypeOpInterfaceTdFiles",
7450         ":OpBaseTdFiles",
7451         ":SideEffectInterfacesTdFiles",
7452         ":VectorInterfacesTdFiles",
7453     ],
7456 gentbl_cc_library(
7457     name = "ArithmeticBaseIncGen",
7458     strip_include_prefix = "include",
7459     tbl_outs = [
7460         (
7461             [
7462                 "-gen-dialect-decls",
7463                 "-dialect=arith",
7464             ],
7465             "include/mlir/Dialect/Arithmetic/IR/ArithmeticOpsDialect.h.inc",
7466         ),
7467         (
7468             [
7469                 "-gen-dialect-defs",
7470                 "-dialect=arith",
7471             ],
7472             "include/mlir/Dialect/Arithmetic/IR/ArithmeticOpsDialect.cpp.inc",
7473         ),
7474         (
7475             ["-gen-enum-decls"],
7476             "include/mlir/Dialect/Arithmetic/IR/ArithmeticOpsEnums.h.inc",
7477         ),
7478         (
7479             ["-gen-enum-defs"],
7480             "include/mlir/Dialect/Arithmetic/IR/ArithmeticOpsEnums.cpp.inc",
7481         ),
7482     ],
7483     tblgen = ":mlir-tblgen",
7484     td_file = "include/mlir/Dialect/Arithmetic/IR/ArithmeticBase.td",
7485     deps = [":ArithmeticOpsTdFiles"],
7488 gentbl_cc_library(
7489     name = "ArithmeticOpsIncGen",
7490     strip_include_prefix = "include",
7491     tbl_outs = [
7492         (
7493             ["-gen-op-decls"],
7494             "include/mlir/Dialect/Arithmetic/IR/ArithmeticOps.h.inc",
7495         ),
7496         (
7497             ["-gen-op-defs"],
7498             "include/mlir/Dialect/Arithmetic/IR/ArithmeticOps.cpp.inc",
7499         ),
7500     ],
7501     tblgen = ":mlir-tblgen",
7502     td_file = "include/mlir/Dialect/Arithmetic/IR/ArithmeticOps.td",
7503     deps = [
7504         ":ArithmeticOpsTdFiles",
7505     ],
7508 gentbl_cc_library(
7509     name = "ArithmeticCanonicalizationIncGen",
7510     strip_include_prefix = "include/mlir/Dialect/Arithmetic/IR",
7511     tbl_outs = [
7512         (
7513             ["-gen-rewriters"],
7514             "include/mlir/Dialect/Arithmetic/IR/ArithmeticCanonicalization.inc",
7515         ),
7516     ],
7517     tblgen = ":mlir-tblgen",
7518     td_file = "lib/Dialect/Arithmetic/IR/ArithmeticCanonicalization.td",
7519     deps = [
7520         ":ArithmeticOpsTdFiles",
7521         ":CastInterfacesTdFiles",
7522         ":StdOpsTdFiles",
7523     ],
7526 cc_library(
7527     name = "ArithmeticDialect",
7528     srcs = glob(
7529         [
7530             "lib/Dialect/Arithmetic/IR/*.cpp",
7531             "lib/Dialect/Arithmetic/IR/*.h",
7532         ],
7533     ),
7534     hdrs = [
7535         "include/mlir/Dialect/Arithmetic/IR/Arithmetic.h",
7536         "include/mlir/Transforms/InliningUtils.h",
7537     ],
7538     includes = ["include"],
7539     deps = [
7540         ":ArithmeticBaseIncGen",
7541         ":ArithmeticCanonicalizationIncGen",
7542         ":ArithmeticOpsIncGen",
7543         ":CommonFolders",
7544         ":IR",
7545         ":SideEffectInterfaces",
7546         ":Support",
7547         ":VectorInterfaces",
7548         "//llvm:Support",
7549     ],
7552 gentbl_cc_library(
7553     name = "ArithmeticPassIncGen",
7554     strip_include_prefix = "include",
7555     tbl_outs = [
7556         (
7557             [
7558                 "-gen-pass-decls",
7559                 "-name=Arithmetic",
7560             ],
7561             "include/mlir/Dialect/Arithmetic/Transforms/Passes.h.inc",
7562         ),
7563     ],
7564     tblgen = ":mlir-tblgen",
7565     td_file = "include/mlir/Dialect/Arithmetic/Transforms/Passes.td",
7566     deps = [":PassBaseTdFiles"],
7569 cc_library(
7570     name = "ArithmeticTransforms",
7571     srcs = glob([
7572         "lib/Dialect/Arithmetic/Transforms/*.cpp",
7573         "lib/Dialect/Arithmetic/Transforms/*.h",
7574     ]),
7575     hdrs = ["include/mlir/Dialect/Arithmetic/Transforms/Passes.h"],
7576     includes = ["include"],
7577     deps = [
7578         ":ArithmeticDialect",
7579         ":ArithmeticPassIncGen",
7580         ":BufferizationDialect",
7581         ":BufferizationTransforms",
7582         ":IR",
7583         ":MemRefDialect",
7584         ":Pass",
7585         ":StandardOps",
7586         ":Transforms",
7587     ],
7590 td_library(
7591     name = "MathOpsTdFiles",
7592     srcs = [
7593         "include/mlir/Dialect/Math/IR/MathBase.td",
7594         "include/mlir/Dialect/Math/IR/MathOps.td",
7595     ],
7596     includes = ["include"],
7597     deps = [
7598         ":InferTypeOpInterfaceTdFiles",
7599         ":OpBaseTdFiles",
7600         ":SideEffectInterfacesTdFiles",
7601         ":VectorInterfacesTdFiles",
7602     ],
7605 gentbl_cc_library(
7606     name = "MathBaseIncGen",
7607     strip_include_prefix = "include",
7608     tbl_outs = [
7609         (
7610             [
7611                 "-gen-dialect-decls",
7612                 "-dialect=math",
7613             ],
7614             "include/mlir/Dialect/Math/IR/MathOpsDialect.h.inc",
7615         ),
7616         (
7617             [
7618                 "-gen-dialect-defs",
7619                 "-dialect=math",
7620             ],
7621             "include/mlir/Dialect/Math/IR/MathOpsDialect.cpp.inc",
7622         ),
7623     ],
7624     tblgen = ":mlir-tblgen",
7625     td_file = "include/mlir/Dialect/Math/IR/MathBase.td",
7626     deps = [":MathOpsTdFiles"],
7629 gentbl_cc_library(
7630     name = "MathOpsIncGen",
7631     strip_include_prefix = "include",
7632     tbl_outs = [
7633         (
7634             ["-gen-op-decls"],
7635             "include/mlir/Dialect/Math/IR/MathOps.h.inc",
7636         ),
7637         (
7638             ["-gen-op-defs"],
7639             "include/mlir/Dialect/Math/IR/MathOps.cpp.inc",
7640         ),
7641     ],
7642     tblgen = ":mlir-tblgen",
7643     td_file = "include/mlir/Dialect/Math/IR/MathOps.td",
7644     deps = [":MathOpsTdFiles"],
7647 cc_library(
7648     name = "MathDialect",
7649     srcs = glob(
7650         [
7651             "lib/Dialect/Math/IR/*.cpp",
7652             "lib/Dialect/Math/IR/*.h",
7653         ],
7654     ),
7655     hdrs = [
7656         "include/mlir/Dialect/Math/IR/Math.h",
7657         "include/mlir/Transforms/InliningUtils.h",
7658     ],
7659     includes = ["include"],
7660     deps = [
7661         ":ArithmeticDialect",
7662         ":IR",
7663         ":MathBaseIncGen",
7664         ":MathOpsIncGen",
7665         ":SideEffectInterfaces",
7666         ":Support",
7667         ":VectorInterfaces",
7668         "//llvm:Support",
7669     ],
7672 cc_library(
7673     name = "MathTransforms",
7674     srcs = glob([
7675         "lib/Dialect/Math/Transforms/*.cpp",
7676         "lib/Dialect/Math/Transforms/*.h",
7677     ]),
7678     hdrs = glob(["include/mlir/Dialect/Math/Transforms/*.h"]),
7679     includes = ["include"],
7680     deps = [
7681         ":ArithmeticDialect",
7682         ":IR",
7683         ":MathDialect",
7684         ":Pass",
7685         ":SCFDialect",
7686         ":StandardOps",
7687         ":Support",
7688         ":Transforms",
7689         ":VectorOps",
7690         ":X86Vector",
7691         "//llvm:Support",
7692     ],
7695 cc_library(
7696     name = "MathToLibm",
7697     srcs = glob([
7698         "lib/Conversion/MathToLibm/*.cpp",
7699         "lib/Conversion/MathToLibm/*.h",
7700     ]) + [":ConversionPassDetail"],
7701     hdrs = glob([
7702         "include/mlir/Conversion/MathToLibm/*.h",
7703     ]),
7704     includes = ["include"],
7705     deps = [
7706         ":ArithmeticDialect",
7707         ":ConversionPassIncGen",
7708         ":IR",
7709         ":LLVMDialect",
7710         ":MathDialect",
7711         ":Pass",
7712         ":StandardOps",
7713         ":Support",
7714         ":Transforms",
7715         ":VectorOps",
7716         "//llvm:Core",
7717         "//llvm:Support",
7718     ],
7721 td_library(
7722     name = "MemRefOpsTdFiles",
7723     srcs = [
7724         "include/mlir/Dialect/MemRef/IR/MemRefBase.td",
7725         "include/mlir/Dialect/MemRef/IR/MemRefOps.td",
7726     ],
7727     includes = ["include"],
7728     deps = [
7729         ":ArithmeticOpsTdFiles",
7730         ":CastInterfacesTdFiles",
7731         ":ControlFlowInterfacesTdFiles",
7732         ":CopyOpInterfaceTdFiles",
7733         ":OpBaseTdFiles",
7734         ":SideEffectInterfacesTdFiles",
7735         ":ViewLikeInterfaceTdFiles",
7736     ],
7739 gentbl_cc_library(
7740     name = "MemRefBaseIncGen",
7741     strip_include_prefix = "include",
7742     tbl_outs = [
7743         (
7744             [
7745                 "-gen-dialect-decls",
7746                 "-dialect=memref",
7747             ],
7748             "include/mlir/Dialect/MemRef/IR/MemRefOpsDialect.h.inc",
7749         ),
7750         (
7751             [
7752                 "-gen-dialect-defs",
7753                 "-dialect=memref",
7754             ],
7755             "include/mlir/Dialect/MemRef/IR/MemRefOpsDialect.cpp.inc",
7756         ),
7757     ],
7758     tblgen = ":mlir-tblgen",
7759     td_file = "include/mlir/Dialect/MemRef/IR/MemRefBase.td",
7760     deps = [":MemRefOpsTdFiles"],
7763 gentbl_cc_library(
7764     name = "MemRefOpsIncGen",
7765     strip_include_prefix = "include",
7766     tbl_outs = [
7767         (
7768             ["-gen-op-decls"],
7769             "include/mlir/Dialect/MemRef/IR/MemRefOps.h.inc",
7770         ),
7771         (
7772             ["-gen-op-defs"],
7773             "include/mlir/Dialect/MemRef/IR/MemRefOps.cpp.inc",
7774         ),
7775     ],
7776     tblgen = ":mlir-tblgen",
7777     td_file = "include/mlir/Dialect/MemRef/IR/MemRefOps.td",
7778     deps = [":MemRefOpsTdFiles"],
7781 cc_library(
7782     name = "MemRefDialect",
7783     srcs = glob(
7784         [
7785             "lib/Dialect/MemRef/IR/*.cpp",
7786             "lib/Dialect/MemRef/IR/*.h",
7787             "lib/Dialect/MemRef/Utils/*.cpp",
7788         ],
7789     ),
7790     hdrs = [
7791         "include/mlir/Dialect/MemRef/IR/MemRef.h",
7792         "include/mlir/Dialect/MemRef/Utils/MemRefUtils.h",
7793     ],
7794     includes = ["include"],
7795     deps = [
7796         ":ArithmeticDialect",
7797         ":ControlFlowInterfaces",
7798         ":CopyOpInterface",
7799         ":DialectUtils",
7800         ":IR",
7801         ":InferTypeOpInterface",
7802         ":MemRefBaseIncGen",
7803         ":MemRefOpsIncGen",
7804         ":StandardOps",
7805         ":ViewLikeInterface",
7806         "//llvm:Support",
7807     ],
7810 gentbl_cc_library(
7811     name = "MemRefPassIncGen",
7812     strip_include_prefix = "include",
7813     tbl_outs = [
7814         (
7815             [
7816                 "-gen-pass-decls",
7817                 "-name=MemRef",
7818             ],
7819             "include/mlir/Dialect/MemRef/Transforms/Passes.h.inc",
7820         ),
7821     ],
7822     tblgen = ":mlir-tblgen",
7823     td_file = "include/mlir/Dialect/MemRef/Transforms/Passes.td",
7824     deps = [":PassBaseTdFiles"],
7827 cc_library(
7828     name = "MemRefTransforms",
7829     srcs = glob(
7830         [
7831             "lib/Dialect/MemRef/Transforms/*.cpp",
7832             "lib/Dialect/MemRef/Transforms/*.h",
7833         ],
7834     ),
7835     hdrs = glob(["include/mlir/Dialect/MemRef/Transforms/*.h"]),
7836     includes = ["include"],
7837     deps = [
7838         ":Affine",
7839         ":ArithmeticDialect",
7840         ":IR",
7841         ":InferTypeOpInterface",
7842         ":MemRefDialect",
7843         ":MemRefPassIncGen",
7844         ":Pass",
7845         ":StandardOps",
7846         ":Support",
7847         ":TensorDialect",
7848         ":Transforms",
7849         ":VectorOps",
7850         "//llvm:Support",
7851     ],
7854 td_library(
7855     name = "AllocationOpInterfaceTdFiles",
7856     srcs = ["include/mlir/Dialect/Bufferization/IR/AllocationOpInterface.td"],
7857     includes = ["include"],
7858     deps = [":OpBaseTdFiles"],
7861 gentbl_cc_library(
7862     name = "AllocationOpInterfaceIncGen",
7863     strip_include_prefix = "include",
7864     tbl_outs = [
7865         (
7866             ["-gen-op-interface-decls"],
7867             "include/mlir/Dialect/Bufferization/IR/AllocationOpInterface.h.inc",
7868         ),
7869         (
7870             ["-gen-op-interface-defs"],
7871             "include/mlir/Dialect/Bufferization/IR/AllocationOpInterface.cpp.inc",
7872         ),
7873     ],
7874     tblgen = ":mlir-tblgen",
7875     td_file = "include/mlir/Dialect/Bufferization/IR/AllocationOpInterface.td",
7876     deps = [":AllocationOpInterfaceTdFiles"],
7879 cc_library(
7880     name = "AllocationOpInterface",
7881     srcs = ["lib/Dialect/Bufferization/IR/AllocationOpInterface.cpp"],
7882     hdrs = ["include/mlir/Dialect/Bufferization/IR/AllocationOpInterface.h"],
7883     includes = ["include"],
7884     deps = [
7885         ":AllocationOpInterfaceIncGen",
7886         ":IR",
7887     ],
7890 td_library(
7891     name = "BufferizationOpsTdFiles",
7892     srcs = [
7893         "include/mlir/Dialect/Bufferization/IR/BufferizationBase.td",
7894         "include/mlir/Dialect/Bufferization/IR/BufferizationOps.td",
7895     ],
7896     includes = ["include"],
7897     deps = [
7898         ":AllocationOpInterfaceTdFiles",
7899         ":CopyOpInterfaceTdFiles",
7900         ":OpBaseTdFiles",
7901         ":SideEffectInterfacesTdFiles",
7902     ],
7905 gentbl_cc_library(
7906     name = "BufferizationBaseIncGen",
7907     strip_include_prefix = "include",
7908     tbl_outs = [
7909         (
7910             [
7911                 "-gen-dialect-decls",
7912                 "-dialect=bufferization",
7913             ],
7914             "include/mlir/Dialect/Bufferization/IR/BufferizationOpsDialect.h.inc",
7915         ),
7916         (
7917             [
7918                 "-gen-dialect-defs",
7919                 "-dialect=bufferization",
7920             ],
7921             "include/mlir/Dialect/Bufferization/IR/BufferizationOpsDialect.cpp.inc",
7922         ),
7923     ],
7924     tblgen = ":mlir-tblgen",
7925     td_file = "include/mlir/Dialect/Bufferization/IR/BufferizationBase.td",
7926     deps = [":BufferizationOpsTdFiles"],
7929 gentbl_cc_library(
7930     name = "BufferizationOpsIncGen",
7931     strip_include_prefix = "include",
7932     tbl_outs = [
7933         (
7934             ["-gen-op-decls"],
7935             "include/mlir/Dialect/Bufferization/IR/BufferizationOps.h.inc",
7936         ),
7937         (
7938             ["-gen-op-defs"],
7939             "include/mlir/Dialect/Bufferization/IR/BufferizationOps.cpp.inc",
7940         ),
7941     ],
7942     tblgen = ":mlir-tblgen",
7943     td_file = "include/mlir/Dialect/Bufferization/IR/BufferizationOps.td",
7944     deps = [
7945         ":BufferizableOpInterfaceTdFiles",
7946         ":BufferizationOpsTdFiles",
7947     ],
7950 cc_library(
7951     name = "BufferizationDialect",
7952     srcs = [
7953         "lib/Dialect/Bufferization/IR/BufferizableOpInterface.cpp",
7954         "lib/Dialect/Bufferization/IR/BufferizationDialect.cpp",
7955         "lib/Dialect/Bufferization/IR/BufferizationOps.cpp",
7956     ],
7957     hdrs = [
7958         "include/mlir/Dialect/Bufferization/IR/BufferizableOpInterface.h",
7959         "include/mlir/Dialect/Bufferization/IR/Bufferization.h",
7960     ],
7961     includes = ["include"],
7962     deps = [
7963         ":AllocationOpInterface",
7964         ":BufferizableOpInterfaceIncGen",
7965         ":BufferizationBaseIncGen",
7966         ":BufferizationOpsIncGen",
7967         ":ControlFlowInterfaces",
7968         ":CopyOpInterface",
7969         ":IR",
7970         ":InferTypeOpInterface",
7971         ":MemRefDialect",
7972         ":StandardOps",
7973         ":Support",
7974         ":TensorDialect",
7975         ":ViewLikeInterface",
7976         "//llvm:Support",
7977     ],
7980 gentbl_cc_library(
7981     name = "BufferizationPassIncGen",
7982     strip_include_prefix = "include",
7983     tbl_outs = [
7984         (
7985             [
7986                 "-gen-pass-decls",
7987                 "-name=Bufferization",
7988             ],
7989             "include/mlir/Dialect/Bufferization/Transforms/Passes.h.inc",
7990         ),
7991     ],
7992     tblgen = ":mlir-tblgen",
7993     td_file = "include/mlir/Dialect/Bufferization/Transforms/Passes.td",
7994     deps = [":PassBaseTdFiles"],
7997 cc_library(
7998     name = "BufferizationTransforms",
7999     srcs = glob(
8000         [
8001             "lib/Dialect/Bufferization/Transforms/*.cpp",
8002             "lib/Dialect/Bufferization/Transforms/*.h",
8003         ],
8004     ),
8005     hdrs = glob(["include/mlir/Dialect/Bufferization/Transforms/*.h"]),
8006     includes = ["include"],
8007     deps = [
8008         ":AllocationOpInterface",
8009         ":Analysis",
8010         ":BufferizationDialect",
8011         ":BufferizationPassIncGen",
8012         ":ControlFlowInterfaces",
8013         ":DialectUtils",
8014         ":IR",
8015         ":InferTypeOpInterface",
8016         ":MemRefDialect",
8017         ":Pass",
8018         ":StandardOps",
8019         ":Support",
8020         ":Transforms",
8021         "//llvm:Support",
8022     ],
8025 cc_library(
8026     name = "BufferizationToMemRef",
8027     srcs = [
8028         "lib/Conversion/BufferizationToMemRef/BufferizationToMemRef.cpp",
8029         ":ConversionPassDetail",
8030     ],
8031     hdrs = [
8032         "include/mlir/Conversion/BufferizationToMemRef/BufferizationToMemRef.h",
8033     ],
8034     includes = ["include"],
8035     deps = [
8036         ":ArithmeticDialect",
8037         ":BufferizationDialect",
8038         ":ConversionPassIncGen",
8039         ":IR",
8040         ":MemRefDialect",
8041         ":Pass",
8042         ":StandardOps",
8043         ":Support",
8044         ":Transforms",
8045     ],
8048 td_library(
8049     name = "DLTIDialectTdFiles",
8050     srcs = [
8051         "include/mlir/Dialect/DLTI/DLTI.td",
8052         "include/mlir/Dialect/DLTI/DLTIBase.td",
8053     ],
8054     includes = ["include"],
8055     deps = [":OpBaseTdFiles"],
8058 gentbl_cc_library(
8059     name = "DLTIBaseIncGen",
8060     strip_include_prefix = "include",
8061     tbl_outs = [
8062         (
8063             [
8064                 "-gen-dialect-decls",
8065                 "-dialect=dlti",
8066             ],
8067             "include/mlir/Dialect/DLTI/DLTIDialect.h.inc",
8068         ),
8069         (
8070             [
8071                 "-gen-dialect-defs",
8072                 "-dialect=dlti",
8073             ],
8074             "include/mlir/Dialect/DLTI/DLTIDialect.cpp.inc",
8075         ),
8076     ],
8077     tblgen = ":mlir-tblgen",
8078     td_file = "include/mlir/Dialect/DLTI/DLTIBase.td",
8079     deps = [":OpBaseTdFiles"],
8082 cc_library(
8083     name = "DLTIDialect",
8084     srcs = glob(["lib/Dialect/DLTI/*.cpp"]),
8085     hdrs = glob(["include/mlir/Dialect/DLTI/*.h"]),
8086     includes = ["include"],
8087     deps = [
8088         ":DLTIBaseIncGen",
8089         ":DataLayoutInterfaces",
8090         ":IR",
8091         "//llvm:Support",
8092     ],
8095 gentbl_cc_library(
8096     name = "ReducerIncGen",
8097     strip_include_prefix = "include",
8098     tbl_outs = [
8099         (
8100             [
8101                 "-gen-pass-decls",
8102                 "-name=Reducer",
8103             ],
8104             "include/mlir/Reducer/Passes.h.inc",
8105         ),
8106     ],
8107     tblgen = ":mlir-tblgen",
8108     td_file = "include/mlir/Reducer/Passes.td",
8109     deps = [
8110         ":PassBaseTdFiles",
8111         ":ReducerTdFiles",
8112     ],
8115 cc_library(
8116     name = "Reducer",
8117     srcs = glob(["lib/Reducer/*.cpp"]),
8118     hdrs = glob(["include/mlir/Reducer/*.h"]),
8119     includes = ["include"],
8120     deps = [
8121         ":IR",
8122         ":Pass",
8123         ":ReducerIncGen",
8124         ":Rewrite",
8125         ":Support",
8126         ":TransformUtils",
8127         "//llvm:Support",
8128     ],
8131 cc_library(
8132     name = "MlirReduceLib",
8133     srcs = ["lib/Tools/mlir-reduce/MlirReduceMain.cpp"],
8134     hdrs = ["include/mlir/Tools/mlir-reduce/MlirReduceMain.h"],
8135     includes = ["include"],
8136     deps = [
8137         ":IR",
8138         ":Parser",
8139         ":Pass",
8140         ":Reducer",
8141         ":Rewrite",
8142         ":Support",
8143         "//llvm:Support",
8144     ],
8147 cc_binary(
8148     name = "mlir-reduce",
8149     srcs = ["tools/mlir-reduce/mlir-reduce.cpp"],
8150     includes = ["include"],
8151     local_defines = ["MLIR_INCLUDE_TESTS"],
8152     stamp = 0,
8153     deps = [
8154         ":AllPassesAndDialects",
8155         ":IR",
8156         ":MlirReduceLib",
8157         ":Pass",
8158         "//llvm:Support",
8159         "//mlir/test:TestDialect",
8160     ],
8163 cc_library(
8164     name = "PDLLAST",
8165     srcs = glob(
8166         [
8167             "lib/Tools/PDLL/AST/*.cpp",
8168             "lib/Tools/PDLL/AST/*.h",
8169         ],
8170     ),
8171     hdrs = glob(["include/mlir/Tools/PDLL/AST/*.h"]),
8172     includes = ["include"],
8173     deps = [
8174         "//llvm:Support",
8175         "//mlir:Support",
8176     ],
8179 cc_library(
8180     name = "PDLLParser",
8181     srcs = glob(
8182         [
8183             "lib/Tools/PDLL/Parser/*.cpp",
8184             "lib/Tools/PDLL/Parser/*.h",
8185         ],
8186     ),
8187     hdrs = glob(["include/mlir/Tools/PDLL/Parser/*.h"]),
8188     includes = ["include"],
8189     deps = [
8190         ":PDLLAST",
8191         ":Support",
8192         ":TableGen",
8193         "//llvm:Support",
8194     ],
8197 cc_binary(
8198     name = "mlir-pdll",
8199     srcs = [
8200         "tools/mlir-pdll/mlir-pdll.cpp",
8201     ],
8202     deps = [
8203         ":PDLLAST",
8204         ":PDLLParser",
8205         ":Support",
8206         "//llvm:Support",
8207         "//llvm:config",
8208     ],