[Xtensa] Implement vararg support. (#117126)
[llvm-project.git] / utils / bazel / llvm-project-overlay / mlir / test / BUILD.bazel
bloba9446d60d26345ed8f99d57788beae386828b955
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 load("@bazel_skylib//rules:expand_template.bzl", "expand_template")
6 load("//llvm:lit_test.bzl", "package_path")
7 load("//mlir:tblgen.bzl", "gentbl_cc_library", "gentbl_sharded_ops", "td_library")
9 package(
10     default_visibility = ["//visibility:public"],
11     features = ["layering_check"],
14 licenses(["notice"])
16 LLVM_LIT_PATH_FUNCTION = " " + \
17                          "# Allow generated file to be relocatable.\n" + \
18                          "from pathlib import Path\n" + \
19                          "def path(p):\n" + \
20                          "    if not p: return ''\n" + \
21                          "    return str((Path(__file__).parent / p).resolve())\n"
23 LIT_SITE_CFG_IN_HEADER = "# Autogenerated, do not edit." + LLVM_LIT_PATH_FUNCTION
25 expand_template(
26     name = "lit_site_cfg_py",
27     testonly = True,
28     out = "lit.site.cfg.py",
29     substitutions = {
30         "@LIT_SITE_CFG_IN_HEADER@": LIT_SITE_CFG_IN_HEADER,
31         "@LLVM_TOOLS_DIR@": package_path("//llvm:BUILD"),
32         "@ENABLE_SHARED@": "1",
33         "@ENABLE_ASSERTIONS@": "1",
34         "@MLIR_SOURCE_DIR@": package_path("//mlir:BUILD"),
35         "@MLIR_TOOLS_DIR@": package_path("//mlir:BUILD"),
36         "\"@MLIR_BINARY_DIR@\"": "os.environ[\"TEST_UNDECLARED_OUTPUTS_DIR\"]",
37         # All disabled, but required to substituted because they are not in quotes.
38         "@LLVM_BUILD_EXAMPLES@": "0",
39         "@LLVM_HAS_NVPTX_TARGET@": "0",
40         "@MLIR_ENABLE_CUDA_RUNNER@": "0",
41         "@MLIR_ENABLE_ROCM_CONVERSIONS@": "0",
42         "@MLIR_ENABLE_ROCM_RUNNER@": "0",
43         "@MLIR_ENABLE_SYCL_RUNNER@": "0",
44         "@MLIR_ENABLE_SPIRV_CPU_RUNNER@": "0",
45         "@MLIR_ENABLE_VULKAN_RUNNER@": "0",
46         "@MLIR_ENABLE_BINDINGS_PYTHON@": "0",
47         "@MLIR_RUN_AMX_TESTS@": "0",
48         "@MLIR_RUN_ARM_SVE_TESTS@": "0",
49         "@MLIR_RUN_ARM_SME_TESTS@": "0",
50         "@MLIR_RUN_X86VECTOR_TESTS@": "0",
51         "@MLIR_RUN_CUDA_TENSOR_CORE_TESTS@": "0",
52         "@MLIR_RUN_CUDA_SM80_TESTS@": "0",
53         "@MLIR_RUN_CUDA_SM80_LT_TESTS@": "0",
54         "@MLIR_RUN_CUDA_SM90_TESTS@": "0",
55         "@MLIR_INCLUDE_INTEGRATION_TESTS@": "0",
56         "@SHLIBDIR@": package_path("//llvm:BUILD"),
57     },
58     template = "lit.site.cfg.py.in",
61 # Common data used by most lit tests.
62 filegroup(
63     name = "lit_data",
64     testonly = True,
65     data = [
66         "lit.cfg.py",
67         "lit.site.cfg.py",
68         "//llvm:FileCheck",
69         "//llvm:count",
70         "//llvm:not",
71     ],
74 cc_library(
75     name = "IRProducingAPITest",
76     hdrs = ["APITest.h"],
77     includes = ["."],
80 cc_library(
81     name = "TestAnalysis",
82     srcs = glob(
83         [
84             "lib/Analysis/*.cpp",
85             "lib/Analysis/*.h",
86             "lib/Analysis/DataFlow/*.cpp",
87             "lib/Analysis/DataFlow/*.h",
88         ],
89     ),
90     includes = ["lib/Dialect/Test"],
91     deps = [
92         ":TestDialect",
93         "//llvm:Support",
94         "//mlir:AffineAnalysis",
95         "//mlir:AffineDialect",
96         "//mlir:Analysis",
97         "//mlir:CallOpInterfaces",
98         "//mlir:ControlFlowInterfaces",
99         "//mlir:FuncDialect",
100         "//mlir:FunctionInterfaces",
101         "//mlir:IR",
102         "//mlir:MemRefDialect",
103         "//mlir:Pass",
104         "//mlir:SideEffectInterfaces",
105         "//mlir:Support",
106     ],
109 td_library(
110     name = "TestOpTdFiles",
111     srcs = glob(["lib/Dialect/Test/*.td"]),
112     deps = [
113         "//mlir:BuiltinDialectTdFiles",
114         "//mlir:CallInterfacesTdFiles",
115         "//mlir:ControlFlowInterfacesTdFiles",
116         "//mlir:CopyOpInterfaceTdFiles",
117         "//mlir:DLTIDialectTdFiles",
118         "//mlir:DataLayoutInterfacesTdFiles",
119         "//mlir:DestinationStyleOpInterfaceTdFiles",
120         "//mlir:FunctionInterfacesTdFiles",
121         "//mlir:InferIntRangeInterfaceTdFiles",
122         "//mlir:InferTypeOpInterfaceTdFiles",
123         "//mlir:LinalgStructuredOpsTdFiles",
124         "//mlir:MemorySlotInterfacesTdFiles",
125         "//mlir:OpBaseTdFiles",
126         "//mlir:PolynomialTdFiles",
127         "//mlir:SideEffectInterfacesTdFiles",
128     ],
131 gentbl_cc_library(
132     name = "TestOpsSyntaxIncGen",
133     strip_include_prefix = "lib/Dialect/Test",
134     tbl_outs = [
135         (
136             ["-gen-op-decls"],
137             "lib/Dialect/Test/TestOpsSyntax.h.inc",
138         ),
139         (
140             ["-gen-op-defs"],
141             "lib/Dialect/Test/TestOpsSyntax.cpp.inc",
142         ),
143     ],
144     tblgen = "//mlir:mlir-tblgen",
145     td_file = "lib/Dialect/Test/TestOpsSyntax.td",
146     test = True,
147     deps = [
148         ":TestOpTdFiles",
149     ],
152 gentbl_cc_library(
153     name = "TestOpsIncGen",
154     strip_include_prefix = "lib/Dialect/Test",
155     tbl_outs = [
156         (
157             [
158                 "-gen-dialect-decls",
159                 "-dialect=test",
160             ],
161             "lib/Dialect/Test/TestOpsDialect.h.inc",
162         ),
163         (
164             [
165                 "-gen-dialect-defs",
166                 "-dialect=test",
167             ],
168             "lib/Dialect/Test/TestOpsDialect.cpp.inc",
169         ),
170         (
171             ["-gen-rewriters"],
172             "lib/Dialect/Test/TestPatterns.inc",
173         ),
174     ],
175     tblgen = "//mlir:mlir-tblgen",
176     td_file = "lib/Dialect/Test/TestOps.td",
177     test = True,
178     deps = [
179         ":TestOpTdFiles",
180     ],
183 gentbl_cc_library(
184     name = "TestInterfacesIncGen",
185     strip_include_prefix = "lib/Dialect/Test",
186     tbl_outs = [
187         (
188             ["-gen-attr-interface-decls"],
189             "lib/Dialect/Test/TestAttrInterfaces.h.inc",
190         ),
191         (
192             ["-gen-attr-interface-defs"],
193             "lib/Dialect/Test/TestAttrInterfaces.cpp.inc",
194         ),
195         (
196             ["-gen-type-interface-decls"],
197             "lib/Dialect/Test/TestTypeInterfaces.h.inc",
198         ),
199         (
200             ["-gen-type-interface-defs"],
201             "lib/Dialect/Test/TestTypeInterfaces.cpp.inc",
202         ),
203         (
204             ["-gen-op-interface-decls"],
205             "lib/Dialect/Test/TestOpInterfaces.h.inc",
206         ),
207         (
208             ["-gen-op-interface-defs"],
209             "lib/Dialect/Test/TestOpInterfaces.cpp.inc",
210         ),
211     ],
212     tblgen = "//mlir:mlir-tblgen",
213     td_file = "lib/Dialect/Test/TestInterfaces.td",
214     test = True,
215     deps = [
216         "//mlir:OpBaseTdFiles",
217         "//mlir:SideEffectInterfacesTdFiles",
218     ],
221 gentbl_cc_library(
222     name = "TestAttrDefsIncGen",
223     strip_include_prefix = "lib/Dialect/Test",
224     tbl_outs = [
225         (
226             [
227                 "-gen-attrdef-decls",
228                 "--attrdefs-dialect=test",
229             ],
230             "lib/Dialect/Test/TestAttrDefs.h.inc",
231         ),
232         (
233             [
234                 "-gen-attrdef-defs",
235                 "--attrdefs-dialect=test",
236             ],
237             "lib/Dialect/Test/TestAttrDefs.cpp.inc",
238         ),
239     ],
240     tblgen = "//mlir:mlir-tblgen",
241     td_file = "lib/Dialect/Test/TestOps.td",
242     test = True,
243     deps = [
244         ":TestOpTdFiles",
245     ],
248 gentbl_cc_library(
249     name = "TestEnumDefsIncGen",
250     strip_include_prefix = "lib/Dialect/Test",
251     tbl_outs = [
252         (
253             ["-gen-enum-decls"],
254             "lib/Dialect/Test/TestOpEnums.h.inc",
255         ),
256         (
257             ["-gen-enum-defs"],
258             "lib/Dialect/Test/TestOpEnums.cpp.inc",
259         ),
260     ],
261     tblgen = "//mlir:mlir-tblgen",
262     td_file = "lib/Dialect/Test/TestEnumDefs.td",
263     test = True,
264     deps = [
265         ":TestOpTdFiles",
266     ],
269 gentbl_cc_library(
270     name = "TestTypeDefsIncGen",
271     strip_include_prefix = "lib/Dialect/Test",
272     tbl_outs = [
273         (
274             [
275                 "-gen-typedef-decls",
276                 "--typedefs-dialect=test",
277             ],
278             "lib/Dialect/Test/TestTypeDefs.h.inc",
279         ),
280         (
281             [
282                 "-gen-typedef-defs",
283                 "--typedefs-dialect=test",
284             ],
285             "lib/Dialect/Test/TestTypeDefs.cpp.inc",
286         ),
287     ],
288     tblgen = "//mlir:mlir-tblgen",
289     td_file = "lib/Dialect/Test/TestTypeDefs.td",
290     test = True,
291     deps = [
292         ":TestOpTdFiles",
293         "//mlir:BuiltinDialectTdFiles",
294     ],
297 cc_library(
298     name = "TestTestDynDialect",
299     srcs = glob([
300         "lib/Dialect/TestDyn/*.cpp",
301     ]),
302     deps = [
303         "//mlir:IR",
304     ],
307 td_library(
308     name = "TransformDialectTdFiles",
309     srcs = glob(["lib/Dialect/Transform/*.td"]),
310     deps = [
311         "//mlir:OpBaseTdFiles",
312     ],
315 gentbl_cc_library(
316     name = "TestTransformDialectExtensionIncGen",
317     strip_include_prefix = "lib/Dialect/Transform",
318     tbl_outs = [
319         (
320             ["-gen-op-decls"],
321             "lib/Dialect/Transform/TestTransformDialectExtension.h.inc",
322         ),
323         (
324             ["-gen-op-defs"],
325             "lib/Dialect/Transform/TestTransformDialectExtension.cpp.inc",
326         ),
327         (
328             [
329                 "-gen-typedef-decls",
330                 "-typedefs-dialect=transform",
331             ],
332             "lib/Dialect/Transform/TestTransformDialectExtensionTypes.h.inc",
333         ),
334         (
335             [
336                 "-gen-typedef-defs",
337                 "-typedefs-dialect=transform",
338             ],
339             "lib/Dialect/Transform/TestTransformDialectExtensionTypes.cpp.inc",
340         ),
341     ],
342     tblgen = "//mlir:mlir-tblgen",
343     td_file = "lib/Dialect/Transform/TestTransformDialectExtension.td",
344     test = True,
345     deps = [
346         ":TransformDialectTdFiles",
347         "//mlir:PDLDialectTdFiles",
348         "//mlir:TransformDialectTdFiles",
349         "//mlir:TransformPDLExtension",
350     ],
353 cc_library(
354     name = "TestTransformDialect",
355     srcs = glob(["lib/Dialect/Transform/*.cpp"]),
356     hdrs = glob(["lib/Dialect/Transform/*.h"]),
357     includes = ["lib/Dialect/Transform"],
358     deps = [
359         ":TestTransformDialectExtensionIncGen",
360         "//llvm:Support",
361         "//mlir:BytecodeOpInterface",
362         "//mlir:IR",
363         "//mlir:PDLDialect",
364         "//mlir:Pass",
365         "//mlir:TransformDebugExtension",
366         "//mlir:TransformDialect",
367         "//mlir:TransformDialectInterfaces",
368         "//mlir:TransformDialectTransforms",
369         "//mlir:TransformPDLExtension",
370     ],
373 gentbl_sharded_ops(
374     name = "TestDialectOpSrcs",
375     hdr_out = "lib/Dialect/Test/TestOps.h.inc",
376     shard_count = 20,
377     sharder = "//mlir:mlir-src-sharder",
378     src_file = "lib/Dialect/Test/TestOps.cpp",
379     src_out = "lib/Dialect/Test/TestOps.cpp.inc",
380     tblgen = "//mlir:mlir-tblgen",
381     td_file = "lib/Dialect/Test/TestOps.td",
382     test = True,
383     deps = [":TestOpTdFiles"],
386 cc_library(
387     name = "TestDialect",
388     srcs = glob(
389         ["lib/Dialect/Test/*.cpp"],
390         exclude = ["lib/Dialect/Test/TestToLLVMIRTranslation.cpp"],
391     ) + [":TestDialectOpSrcs"],
392     hdrs = glob(["lib/Dialect/Test/*.h"]),
393     includes = [
394         "lib/Dialect/Test",
395     ],
396     deps = [
397         ":TestAttrDefsIncGen",
398         ":TestEnumDefsIncGen",
399         ":TestInterfacesIncGen",
400         ":TestOpsIncGen",
401         ":TestOpsSyntaxIncGen",
402         ":TestTypeDefsIncGen",
403         "//llvm:Core",
404         "//llvm:IRReader",
405         "//llvm:Support",
406         "//mlir:ArithDialect",
407         "//mlir:BytecodeOpInterface",
408         "//mlir:CallOpInterfaces",
409         "//mlir:ControlFlowInterfaces",
410         "//mlir:CopyOpInterface",
411         "//mlir:DLTIDialect",
412         "//mlir:DataLayoutInterfaces",
413         "//mlir:DerivedAttributeOpInterface",
414         "//mlir:DestinationStyleOpInterface",
415         "//mlir:Dialect",
416         "//mlir:DialectUtils",
417         "//mlir:FromLLVMIRTranslation",
418         "//mlir:FuncDialect",
419         "//mlir:FuncTransforms",
420         "//mlir:FunctionInterfaces",
421         "//mlir:IR",
422         "//mlir:InferIntRangeInterface",
423         "//mlir:InferTypeOpInterface",
424         "//mlir:InliningUtils",
425         "//mlir:LLVMDialect",
426         "//mlir:LLVMIRToLLVMTranslation",
427         "//mlir:LinalgDialect",
428         "//mlir:LoopLikeInterface",
429         "//mlir:MemorySlotInterfaces",
430         "//mlir:Pass",
431         "//mlir:PolynomialDialect",
432         "//mlir:Reducer",
433         "//mlir:SideEffectInterfaces",
434         "//mlir:Support",
435         "//mlir:TensorDialect",
436         "//mlir:TransformUtils",
437         "//mlir:Transforms",
438         "//mlir:TranslateLib",
439         "//mlir:ValueBoundsOpInterface",
440         "//mlir:ViewLikeInterface",
441     ],
444 cc_library(
445     name = "TestToLLVMIRTranslation",
446     srcs = ["lib/Dialect/Test/TestToLLVMIRTranslation.cpp"],
447     deps = [
448         ":TestDialect",
449         "//llvm:Core",
450         "//llvm:Support",
451         "//mlir:BuiltinToLLVMIRTranslation",
452         "//mlir:IR",
453         "//mlir:LLVMToLLVMIRTranslation",
454         "//mlir:ToLLVMIRTranslation",
455         "//mlir:TranslateLib",
456     ],
459 cc_library(
460     name = "TestIR",
461     srcs = glob(["lib/IR/*.cpp"]),
462     deps = [
463         ":TestDialect",
464         "//llvm:Support",
465         "//mlir:Analysis",
466         "//mlir:ArithDialect",
467         "//mlir:BytecodeOpInterface",
468         "//mlir:BytecodeReader",
469         "//mlir:BytecodeWriter",
470         "//mlir:FuncDialect",
471         "//mlir:FunctionInterfaces",
472         "//mlir:IR",
473         "//mlir:LinalgDialect",
474         "//mlir:Parser",
475         "//mlir:Pass",
476         "//mlir:Support",
477     ],
480 cc_library(
481     name = "TestLoopLikeInterface",
482     srcs = glob(["lib/Interfaces/LoopLikeInterface/*.cpp"]),
483     deps = [
484         "//llvm:Support",
485         "//mlir:FuncDialect",
486         "//mlir:IR",
487         "//mlir:LoopLikeInterface",
488         "//mlir:Pass",
489     ],
492 gentbl_cc_library(
493     name = "TestTilingInterfaceTransformOpsIncGen",
494     includes = ["lib/Interfaces/TilingInterface"],
495     strip_include_prefix = "lib",
496     tbl_outs = [
497         (
498             ["-gen-op-decls"],
499             "lib/Interfaces/TilingInterface/TestTilingInterfaceTransformOps.h.inc",
500         ),
501         (
502             ["-gen-op-defs"],
503             "lib/Interfaces/TilingInterface/TestTilingInterfaceTransformOps.cpp.inc",
504         ),
505     ],
506     tblgen = "//mlir:mlir-tblgen",
507     td_file = "lib/Interfaces/TilingInterface/TestTilingInterfaceTransformOps.td",
508     deps = [
509         "//mlir:SCFTdFiles",
510         "//mlir:TransformDialectTdFiles",
511     ],
514 cc_library(
515     name = "TestTilingInterface",
516     srcs = glob(["lib/Interfaces/TilingInterface/*.cpp"]),
517     includes = ["lib/Interfaces/TilingInterface"],
518     deps = [
519         ":TestTilingInterfaceTransformOpsIncGen",
520         "//llvm:Support",
521         "//mlir:AffineDialect",
522         "//mlir:ArithDialect",
523         "//mlir:DialectUtils",
524         "//mlir:FuncDialect",
525         "//mlir:GPUDialect",
526         "//mlir:IR",
527         "//mlir:IndexDialect",
528         "//mlir:LinalgDialect",
529         "//mlir:LinalgTransforms",
530         "//mlir:MemRefDialect",
531         "//mlir:Pass",
532         "//mlir:SCFDialect",
533         "//mlir:SCFTransforms",
534         "//mlir:TensorDialect",
535         "//mlir:TensorTilingInterfaceImpl",
536         "//mlir:TilingInterface",
537         "//mlir:TransformDialect",
538         "//mlir:TransformDialectInterfaces",
539         "//mlir:Transforms",
540     ],
543 cc_library(
544     name = "TestPass",
545     srcs = glob(["lib/Pass/*.cpp"]),
546     deps = [
547         ":TestDialect",
548         "//llvm:Support",
549         "//mlir:ConvertToSPIRV",
550         "//mlir:FuncDialect",
551         "//mlir:GPUToSPIRV",
552         "//mlir:GPUTransforms",
553         "//mlir:IR",
554         "//mlir:MemRefTransforms",
555         "//mlir:Pass",
556         "//mlir:SPIRVDialect",
557         "//mlir:SPIRVToLLVM",
558         "//mlir:SPIRVTransforms",
559         "//mlir:Support",
560     ],
563 cc_library(
564     name = "TestRewrite",
565     srcs = [
566         "lib/Rewrite/TestPDLByteCode.cpp",
567     ],
568     deps = [
569         "//mlir:IR",
570         "//mlir:PDLInterpDialect",
571         "//mlir:Pass",
572         "//mlir:Support",
573         "//mlir:TransformUtils",
574         "//mlir:Transforms",
575     ],
578 cc_library(
579     name = "TestReducer",
580     srcs = [
581         "lib/Reducer/MLIRTestReducer.cpp",
582     ],
583     deps = [
584         "//mlir:IR",
585         "//mlir:Pass",
586         "//mlir:Support",
587     ],
590 cc_library(
591     name = "TestTransforms",
592     srcs = glob(["lib/Transforms/*.cpp"]),
593     includes = ["lib/Dialect/Test"],
594     deps = [
595         ":TestDialect",
596         ":TestDialectConversionPDLLPatternsIncGen",
597         "//llvm:Support",
598         "//mlir:AffineAnalysis",
599         "//mlir:AffineDialect",
600         "//mlir:Analysis",
601         "//mlir:ArithDialect",
602         "//mlir:FuncDialect",
603         "//mlir:IR",
604         "//mlir:InliningUtils",
605         "//mlir:MathDialect",
606         "//mlir:PDLDialect",
607         "//mlir:PDLInterpDialect",
608         "//mlir:Parser",
609         "//mlir:Pass",
610         "//mlir:SCFDialect",
611         "//mlir:SPIRVDialect",
612         "//mlir:SideEffectInterfaces",
613         "//mlir:Support",
614         "//mlir:TransformUtils",
615         "//mlir:Transforms",
616     ],
619 cc_library(
620     name = "TestFuncToLLVM",
621     srcs = glob(["lib/Conversion/FuncToLLVM/*.cpp"]),
622     includes = ["lib/Dialect/Test"],
623     deps = [
624         ":TestDialect",
625         "//mlir:FuncDialect",
626         "//mlir:FuncToLLVM",
627         "//mlir:IR",
628         "//mlir:LLVMCommonConversion",
629         "//mlir:LLVMDialect",
630         "//mlir:Pass",
631     ],
634 cc_library(
635     name = "TestOneToNTypeConversion",
636     srcs = glob(["lib/Conversion/OneToNTypeConversion/*.cpp"]),
637     includes = ["lib/Dialect/Test"],
638     deps = [
639         ":TestDialect",
640         "//mlir:FuncDialect",
641         "//mlir:FuncTransforms",
642         "//mlir:IR",
643         "//mlir:Pass",
644         "//mlir:SCFDialect",
645         "//mlir:SCFTransforms",
646         "//mlir:TransformUtils",
647         "//mlir:Transforms",
648     ],
651 cc_library(
652     name = "TestVectorToSPIRV",
653     srcs = glob(["lib/Conversion/VectorToSPIRV/*.cpp"]),
654     deps = [
655         "//mlir:ArithDialect",
656         "//mlir:FuncDialect",
657         "//mlir:Pass",
658         "//mlir:SPIRVDialect",
659         "//mlir:TransformUtils",
660         "//mlir:Transforms",
661         "//mlir:VectorDialect",
662         "//mlir:VectorToSPIRV",
663     ],
666 cc_library(
667     name = "TestConvertToSPIRV",
668     srcs = glob(["lib/Conversion/ConvertToSPIRV/*.cpp"]),
669     deps = [
670         "//mlir:ArithDialect",
671         "//mlir:FuncDialect",
672         "//mlir:Pass",
673         "//mlir:SPIRVConversion",
674         "//mlir:SPIRVDialect",
675         "//mlir:TransformUtils",
676         "//mlir:Transforms",
677         "//mlir:VectorDialect",
678         "//mlir:VectorTransforms",
679     ],
682 cc_library(
683     name = "TestAffine",
684     srcs = glob([
685         "lib/Dialect/Affine/*.cpp",
686     ]),
687     deps = [
688         ":TestDialect",
689         "//llvm:Support",
690         "//mlir:AffineAnalysis",
691         "//mlir:AffineDialect",
692         "//mlir:AffineTransforms",
693         "//mlir:AffineUtils",
694         "//mlir:Analysis",
695         "//mlir:ArithTransforms",
696         "//mlir:DialectUtils",
697         "//mlir:FuncDialect",
698         "//mlir:IR",
699         "//mlir:MemRefDialect",
700         "//mlir:Pass",
701         "//mlir:SCFDialect",
702         "//mlir:Support",
703         "//mlir:TensorDialect",
704         "//mlir:TransformUtils",
705         "//mlir:Transforms",
706         "//mlir:ValueBoundsOpInterface",
707         "//mlir:VectorDialect",
708         "//mlir:VectorUtils",
709     ],
712 cc_library(
713     name = "TestDLTI",
714     srcs = glob(["lib/Dialect/DLTI/*.cpp"]),
715     includes = ["lib/Dialect/Test"],
716     deps = [
717         ":TestDialect",
718         "//mlir:Analysis",
719         "//mlir:DLTIDialect",
720         "//mlir:IR",
721         "//mlir:Pass",
722     ],
725 cc_library(
726     name = "TestGPU",
727     srcs = glob(["lib/Dialect/GPU/*.cpp"]),
728     includes = ["lib/Dialect/Test"],
729     deps = [
730         "//llvm:NVPTXCodeGen",
731         "//llvm:Support",
732         "//mlir:AffineDialect",
733         "//mlir:AffineToStandard",
734         "//mlir:ArithDialect",
735         "//mlir:ArithToLLVM",
736         "//mlir:FuncDialect",
737         "//mlir:FuncToLLVM",
738         "//mlir:GPUDialect",
739         "//mlir:GPUToGPURuntimeTransforms",
740         "//mlir:GPUToNVVMTransforms",
741         "//mlir:GPUTransforms",
742         "//mlir:IR",
743         "//mlir:IndexDialect",
744         "//mlir:IndexToLLVM",
745         "//mlir:LLVMDialect",
746         "//mlir:LinalgTransforms",
747         "//mlir:MathToLLVM",
748         "//mlir:MemRefDialect",
749         "//mlir:MemRefToLLVM",
750         "//mlir:MemRefTransforms",
751         "//mlir:NVGPUToNVVM",
752         "//mlir:NVVMToLLVM",
753         "//mlir:NVVMToLLVMIRTranslation",
754         "//mlir:Pass",
755         "//mlir:ROCDLToLLVMIRTranslation",
756         "//mlir:ReconcileUnrealizedCasts",
757         "//mlir:SCFDialect",
758         "//mlir:SCFToControlFlow",
759         "//mlir:SPIRVDialect",
760         "//mlir:ToLLVMIRTranslation",
761         "//mlir:TransformUtils",
762         "//mlir:Transforms",
763         "//mlir:VectorDialect",
764         "//mlir:VectorToLLVM",
765         "//mlir:VectorToSCF",
766     ],
769 cc_library(
770     name = "TestLinalg",
771     srcs = glob(["lib/Dialect/Linalg/*.cpp"]),
772     includes = ["lib/Dialect/Test"],
773     deps = [
774         "//llvm:Support",
775         "//mlir:AffineDialect",
776         "//mlir:ArithDialect",
777         "//mlir:ArithTransforms",
778         "//mlir:BufferizationDialect",
779         "//mlir:BufferizationTransforms",
780         "//mlir:FuncDialect",
781         "//mlir:FuncTransforms",
782         "//mlir:GPUDialect",
783         "//mlir:IR",
784         "//mlir:LinalgDialect",
785         "//mlir:LinalgTransforms",
786         "//mlir:LinalgUtils",
787         "//mlir:MemRefDialect",
788         "//mlir:Parser",
789         "//mlir:Pass",
790         "//mlir:SCFDialect",
791         "//mlir:SCFTransforms",
792         "//mlir:TensorDialect",
793         "//mlir:TensorTransforms",
794         "//mlir:TransformUtils",
795         "//mlir:Transforms",
796         "//mlir:VectorDialect",
797         "//mlir:VectorToSCF",
798         "//mlir:VectorTransforms",
799     ],
802 cc_library(
803     name = "TestLLVM",
804     srcs = glob(["lib/Dialect/LLVM/*.cpp"]),
805     includes = ["lib/Dialect/Test"],
806     deps = [
807         "//mlir:AffineToStandard",
808         "//mlir:FuncDialect",
809         "//mlir:FuncToLLVM",
810         "//mlir:IR",
811         "//mlir:IndexToLLVM",
812         "//mlir:LLVMCommonConversion",
813         "//mlir:LLVMDialect",
814         "//mlir:LinalgTransforms",
815         "//mlir:MathToLLVM",
816         "//mlir:MemRefToLLVM",
817         "//mlir:MemRefTransforms",
818         "//mlir:Pass",
819         "//mlir:ReconcileUnrealizedCasts",
820         "//mlir:SCFToControlFlow",
821         "//mlir:TransformUtils",
822         "//mlir:Transforms",
823         "//mlir:VectorToLLVM",
824         "//mlir:VectorToSCF",
825     ],
828 cc_library(
829     name = "TestMath",
830     srcs = glob(["lib/Dialect/Math/*.cpp"]),
831     includes = ["lib/Dialect/Test"],
832     deps = [
833         "//mlir:ArithDialect",
834         "//mlir:MathDialect",
835         "//mlir:MathTransforms",
836         "//mlir:Pass",
837         "//mlir:SCFDialect",
838         "//mlir:TransformUtils",
839         "//mlir:Transforms",
840         "//mlir:VectorDialect",
841         "//mlir:X86VectorDialect",
842     ],
845 cc_library(
846     name = "TestMathToVCIX",
847     srcs = glob(["lib/Conversion/MathToVCIX/*.cpp"]),
848     includes = ["lib/Dialect/Test"],
849     deps = [
850         "//mlir:ArithDialect",
851         "//mlir:FuncDialect",
852         "//mlir:IR",
853         "//mlir:MathDialect",
854         "//mlir:Pass",
855         "//mlir:TransformUtils",
856         "//mlir:Transforms",
857         "//mlir:VCIXDialect",
858         "//mlir:VectorDialect",
859     ],
862 cc_library(
863     name = "TestMemRef",
864     srcs = glob(["lib/Dialect/MemRef/*.cpp"]),
865     includes = ["lib/Dialect/Test"],
866     deps = [
867         ":TestDialect",
868         "//mlir:AffineDialect",
869         "//mlir:ArithDialect",
870         "//mlir:ArithTransforms",
871         "//mlir:FuncDialect",
872         "//mlir:MemRefDialect",
873         "//mlir:MemRefTransforms",
874         "//mlir:Pass",
875         "//mlir:TransformUtils",
876         "//mlir:Transforms",
877         "//mlir:VectorDialect",
878         "//mlir:VectorTransforms",
879     ],
882 cc_library(
883     name = "TestMesh",
884     srcs = glob(["lib/Dialect/Mesh/**/*.cpp"]),
885     includes = ["lib/Dialect/Test"],
886     deps = [
887         ":TestDialect",
888         "//mlir:ArithDialect",
889         "//mlir:DialectUtils",
890         "//mlir:FuncDialect",
891         "//mlir:IR",
892         "//mlir:MeshDialect",
893         "//mlir:MeshTransforms",
894         "//mlir:Pass",
895         "//mlir:SPIRVDialect",
896         "//mlir:Support",
897         "//mlir:TransformUtils",
898         "//mlir:Transforms",
899     ],
902 cc_library(
903     name = "TestNVGPU",
904     srcs = glob(["lib/Dialect/NVGPU/*.cpp"]),
905     includes = ["lib/Dialect/Test"],
906     deps = [
907         "//mlir:AffineDialect",
908         "//mlir:Analysis",
909         "//mlir:FuncDialect",
910         "//mlir:GPUDialect",
911         "//mlir:IR",
912         "//mlir:LLVMDialect",
913         "//mlir:LinalgDialect",
914         "//mlir:LinalgTransforms",
915         "//mlir:MemRefDialect",
916         "//mlir:NVGPUDialect",
917         "//mlir:NVGPUTransforms",
918         "//mlir:Pass",
919         "//mlir:SCFDialect",
920         "//mlir:Support",
921         "//mlir:TransformUtils",
922         "//mlir:Transforms",
923     ],
926 cc_library(
927     name = "TestSCF",
928     srcs = glob(["lib/Dialect/SCF/*.cpp"]),
929     includes = ["lib/Dialect/Test"],
930     deps = [
931         "//llvm:Support",
932         "//mlir:ArithDialect",
933         "//mlir:FuncDialect",
934         "//mlir:IR",
935         "//mlir:MathDialect",
936         "//mlir:MemRefDialect",
937         "//mlir:Pass",
938         "//mlir:SCFDialect",
939         "//mlir:SCFTransforms",
940         "//mlir:SCFUtils",
941         "//mlir:TransformUtils",
942         "//mlir:Transforms",
943     ],
946 cc_library(
947     name = "TestArith",
948     srcs = glob(["lib/Dialect/Arith/*.cpp"]),
949     includes = ["lib/Dialect/Test"],
950     deps = [
951         "//mlir:ArithDialect",
952         "//mlir:ArithTransforms",
953         "//mlir:FuncDialect",
954         "//mlir:LLVMDialect",
955         "//mlir:MathDialect",
956         "//mlir:Pass",
957         "//mlir:TransformUtils",
958         "//mlir:Transforms",
959         "//mlir:VectorDialect",
960     ],
963 cc_library(
964     name = "TestArmNeon",
965     srcs = glob(["lib/Dialect/ArmNeon/*.cpp"]),
966     includes = ["lib/Dialect/Test"],
967     deps = [
968         "//mlir:ArmNeonDialect",
969         "//mlir:ArmNeonTransforms",
970         "//mlir:FuncDialect",
971         "//mlir:IR",
972         "//mlir:Pass",
973         "//mlir:Support",
974         "//mlir:TransformUtils",
975         "//mlir:Transforms",
976     ],
979 cc_library(
980     name = "TestArmSME",
981     srcs = glob(["lib/Dialect/ArmSME/*.cpp"]),
982     includes = ["lib/Dialect/Test"],
983     deps = [
984         "//mlir:ArithToArmSME",
985         "//mlir:ArmSMEToLLVM",
986         "//mlir:ArmSMEToSCF",
987         "//mlir:ArmSMETransforms",
988         "//mlir:ArmSVETransforms",
989         "//mlir:FuncDialect",
990         "//mlir:IR",
991         "//mlir:Pass",
992         "//mlir:SCFToControlFlow",
993         "//mlir:Transforms",
994         "//mlir:VectorToArmSME",
995         "//mlir:VectorToSCF",
996     ],
999 cc_library(
1000     name = "TestBufferization",
1001     srcs = glob(["lib/Dialect/Bufferization/*.cpp"]),
1002     includes = ["lib/Dialect/Test"],
1003     deps = [
1004         "//mlir:BufferizationDialect",
1005         "//mlir:BufferizationTransforms",
1006         "//mlir:IR",
1007         "//mlir:Pass",
1008     ],
1011 cc_library(
1012     name = "TestControlFlow",
1013     srcs = glob(["lib/Dialect/ControlFlow/*.cpp"]),
1014     includes = ["lib/Dialect/Test"],
1015     deps = [
1016         "//mlir:ControlFlowDialect",
1017         "//mlir:ControlFlowToLLVM",
1018         "//mlir:FuncDialect",
1019         "//mlir:LLVMCommonConversion",
1020         "//mlir:LLVMDialect",
1021         "//mlir:Pass",
1022         "//mlir:TransformUtils",
1023         "//mlir:Transforms",
1024     ],
1027 cc_library(
1028     name = "TestShapeDialect",
1029     srcs = [
1030         "lib/Dialect/Shape/TestShapeFunctions.cpp",
1031         "lib/Dialect/Shape/TestShapeMappingAnalysis.cpp",
1032     ],
1033     deps = [
1034         "//llvm:Support",
1035         "//mlir:FuncDialect",
1036         "//mlir:IR",
1037         "//mlir:InferTypeOpInterface",
1038         "//mlir:Pass",
1039         "//mlir:ShapeDialect",
1040         "//mlir:ShapeTransforms",
1041     ],
1044 cc_library(
1045     name = "TestSPIRV",
1046     srcs = glob([
1047         "lib/Dialect/SPIRV/*.cpp",
1048     ]),
1049     deps = [
1050         "//mlir:FuncDialect",
1051         "//mlir:GPUDialect",
1052         "//mlir:IR",
1053         "//mlir:Pass",
1054         "//mlir:SPIRVConversion",
1055         "//mlir:SPIRVDialect",
1056         "//mlir:SPIRVModuleCombiner",
1057         "//mlir:Transforms",
1058     ],
1061 cc_library(
1062     name = "TestFunc",
1063     srcs = glob(["lib/Dialect/Func/*.cpp"]),
1064     includes = ["lib/Dialect/Test"],
1065     deps = [
1066         ":TestDialect",
1067         "//mlir:AffineDialect",
1068         "//mlir:FuncDialect",
1069         "//mlir:FuncTransforms",
1070         "//mlir:IR",
1071         "//mlir:Pass",
1072         "//mlir:TransformUtils",
1073         "//mlir:Transforms",
1074     ],
1077 cc_library(
1078     name = "TestTensor",
1079     srcs = glob(["lib/Dialect/Tensor/*.cpp"]),
1080     includes = ["lib/Dialect/Test"],
1081     deps = [
1082         "//mlir:ArithDialect",
1083         "//mlir:LinalgDialect",
1084         "//mlir:Pass",
1085         "//mlir:SCFDialect",
1086         "//mlir:TensorDialect",
1087         "//mlir:TensorTransforms",
1088         "//mlir:TransformDialect",
1089         "//mlir:TransformDialectInterfaces",
1090         "//mlir:TransformUtils",
1091         "//mlir:Transforms",
1092     ],
1095 cc_library(
1096     name = "TestVector",
1097     srcs = glob(["lib/Dialect/Vector/*.cpp"]),
1098     includes = ["lib/Dialect/Test"],
1099     deps = [
1100         "//mlir:AffineDialect",
1101         "//mlir:Analysis",
1102         "//mlir:ArithDialect",
1103         "//mlir:FuncDialect",
1104         "//mlir:GPUDialect",
1105         "//mlir:LLVMDialect",
1106         "//mlir:LinalgDialect",
1107         "//mlir:LinalgTransforms",
1108         "//mlir:MemRefDialect",
1109         "//mlir:NVGPUDialect",
1110         "//mlir:Pass",
1111         "//mlir:SCFDialect",
1112         "//mlir:Support",
1113         "//mlir:TensorDialect",
1114         "//mlir:TransformUtils",
1115         "//mlir:Transforms",
1116         "//mlir:VectorDialect",
1117         "//mlir:VectorToSCF",
1118         "//mlir:VectorTransforms",
1119         "//mlir:X86VectorDialect",
1120     ],
1123 cc_library(
1124     name = "TestTosaDialect",
1125     srcs = glob([
1126         "lib/Dialect/Tosa/*.cpp",
1127     ]),
1128     deps = [
1129         "//mlir:FuncDialect",
1130         "//mlir:IR",
1131         "//mlir:Pass",
1132         "//mlir:TensorDialect",
1133         "//mlir:TosaDialect",
1134         "//mlir:TransformUtils",
1135         "//mlir:Transforms",
1136     ],
1139 gentbl_cc_library(
1140     name = "TestPDLLPatternsIncGen",
1141     includes = ["lib/Dialect/Test"],
1142     strip_include_prefix = "lib",
1143     tbl_outs = [
1144         (
1145             ["-x=cpp"],
1146             "lib/Tools/PDLL/TestPDLLPatterns.h.inc",
1147         ),
1148     ],
1149     tblgen = "//mlir:mlir-pdll",
1150     td_file = "lib/Tools/PDLL/TestPDLL.pdll",
1151     deps = [
1152         ":TestDialect",
1153         ":TestOpTdFiles",
1154     ],
1157 gentbl_cc_library(
1158     name = "TestDialectConversionPDLLPatternsIncGen",
1159     includes = ["lib/Dialect/Test"],
1160     strip_include_prefix = "lib",
1161     tbl_outs = [
1162         (
1163             ["-x=cpp"],
1164             "lib/TestDialectConversionPDLLPatterns.h.inc",
1165         ),
1166     ],
1167     tblgen = "//mlir:mlir-pdll",
1168     td_file = "lib/Transforms/TestDialectConversion.pdll",
1169     deps = [
1170         ":TestDialect",
1171         ":TestOpTdFiles",
1172         "//mlir:DialectConversionPdllFiles",
1173     ],
1176 cc_library(
1177     name = "TestPDLL",
1178     srcs = ["lib/Tools/PDLL/TestPDLL.cpp"],
1179     includes = ["lib/Tools/PDLL"],
1180     deps = [
1181         ":TestDialect",
1182         ":TestPDLLPatternsIncGen",
1183         "//mlir:CastInterfaces",
1184         "//mlir:IR",
1185         "//mlir:PDLDialect",
1186         "//mlir:PDLInterpDialect",
1187         "//mlir:Parser",
1188         "//mlir:Pass",
1189         "//mlir:Support",
1190         "//mlir:TransformUtils",
1191         "//mlir:Transforms",
1192     ],