1# Description: 2# The MLIR "Multi-Level Intermediate Representation" Compiler Infrastructure 3 4load("@org_tensorflow//third_party/mlir:tblgen.bzl", "gentbl") 5load("@org_tensorflow//third_party/mlir:linalggen.bzl", "genlinalg") 6load("@org_tensorflow//third_party/mlir:build_defs.bzl", "cc_headers_only") 7 8package( 9 default_visibility = [":friends"], 10 licenses = ["notice"], 11) 12 13package_group( 14 name = "subpackages", 15 packages = ["//..."], 16) 17 18package_group( 19 name = "friends", 20 packages = ["//..."], 21) 22 23exports_files([ 24 "LICENSE.TXT", 25 "include/mlir/Dialect/LLVMIR/LLVMOps.td", 26 "run_lit.sh", 27]) 28 29[ 30 gentbl( 31 name = name + "IncGen", 32 strip_include_prefix = "include", 33 tbl_outs = [ 34 ( 35 "-gen-op-interface-decls", 36 "include/mlir/IR/" + name + ".h.inc", 37 ), 38 ( 39 "-gen-op-interface-defs", 40 "include/mlir/IR/" + name + ".cpp.inc", 41 ), 42 ], 43 tblgen = ":mlir-tblgen", 44 td_file = "include/mlir/IR/" + name + ".td", 45 td_srcs = [":OpBaseTdFiles"], 46 ) 47 for name in [ 48 "OpAsmInterface", 49 "RegionKindInterface", 50 "SymbolInterfaces", 51 ] 52] 53 54gentbl( 55 name = "BuiltinDialectIncGen", 56 strip_include_prefix = "include", 57 tbl_outs = [ 58 ( 59 "-gen-dialect-decls", 60 "include/mlir/IR/BuiltinDialect.h.inc", 61 ), 62 ], 63 tblgen = ":mlir-tblgen", 64 td_file = "include/mlir/IR/BuiltinDialect.td", 65 td_srcs = [":OpBaseTdFiles"], 66) 67 68gentbl( 69 name = "BuiltinOpsIncGen", 70 strip_include_prefix = "include", 71 tbl_outs = [ 72 ( 73 "-gen-op-decls", 74 "include/mlir/IR/BuiltinOps.h.inc", 75 ), 76 ( 77 "-gen-op-defs", 78 "include/mlir/IR/BuiltinOps.cpp.inc", 79 ), 80 ], 81 tblgen = ":mlir-tblgen", 82 td_file = "include/mlir/IR/BuiltinOps.td", 83 td_srcs = [ 84 "include/mlir/IR/BuiltinOps.td", 85 "include/mlir/IR/BuiltinDialect.td", 86 "include/mlir/Interfaces/CallInterfaces.td", 87 "include/mlir/Interfaces/CastInterfaces.td", 88 "include/mlir/IR/SymbolInterfaces.td", 89 ":OpBaseTdFiles", 90 ":SideEffectTdFiles", 91 ], 92) 93 94gentbl( 95 name = "BuiltinTypesIncGen", 96 strip_include_prefix = "include", 97 tbl_outs = [ 98 ( 99 "--gen-typedef-decls", 100 "include/mlir/IR/BuiltinTypes.h.inc", 101 ), 102 ( 103 "--gen-typedef-defs", 104 "include/mlir/IR/BuiltinTypes.cpp.inc", 105 ), 106 ], 107 tblgen = ":mlir-tblgen", 108 td_file = "include/mlir/IR/BuiltinTypes.td", 109 td_srcs = [ 110 "include/mlir/IR/BuiltinTypes.td", 111 "include/mlir/IR/BuiltinDialect.td", 112 ":OpBaseTdFiles", 113 ], 114) 115 116cc_library( 117 name = "IR", 118 srcs = glob([ 119 "lib/IR/*.cpp", 120 "lib/IR/*.h", 121 ]), 122 hdrs = glob([ 123 "include/mlir/IR/*.h", 124 ]) + [ 125 "include/mlir/Interfaces/CallInterfaces.h", 126 "include/mlir/Interfaces/CastInterfaces.h", 127 "include/mlir/Interfaces/SideEffectInterfaces.h", 128 "include/mlir/Interfaces/DecodeAttributesInterfaces.h", 129 "include/mlir/Interfaces/FoldInterfaces.h", 130 ], 131 includes = ["include"], 132 deps = [ 133 ":BuiltinDialectIncGen", 134 ":BuiltinOpsIncGen", 135 ":BuiltinTypesIncGen", 136 ":CallOpInterfacesIncGen", 137 ":CastOpInterfacesIncGen", 138 ":InferTypeOpInterfaceIncGen", 139 ":OpAsmInterfaceIncGen", 140 ":RegionKindInterfaceIncGen", 141 ":SideEffectInterfacesIncGen", 142 ":Support", 143 ":SymbolInterfacesIncGen", 144 "@llvm-project//llvm:Support", 145 ], 146) 147 148cc_library( 149 name = "Pass", 150 srcs = glob([ 151 "lib/Pass/*.cpp", 152 "lib/Pass/*.h", 153 ]), 154 hdrs = glob([ 155 "include/mlir/Pass/*.h", 156 ]), 157 includes = ["include"], 158 linkopts = [ 159 "-lm", 160 "-lpthread", 161 ], 162 deps = [ 163 ":IR", 164 ":Support", 165 "@llvm-project//llvm:Support", 166 ], 167) 168 169# TODO(ntv): Update these to enable simplifying the cmake and build files. 170cc_library( 171 name = "EDSC", 172 srcs = ["lib/EDSC/Builders.cpp"], 173 hdrs = ["include/mlir/EDSC/Builders.h"], 174 includes = ["include"], 175 deps = [ 176 ":IR", 177 ":Support", 178 "@llvm-project//llvm:Support", 179 ], 180) 181 182cc_library( 183 name = "CAPIIR", 184 srcs = [ 185 "lib/CAPI/Dialect/Standard.cpp", 186 "lib/CAPI/IR/AffineExpr.cpp", 187 "lib/CAPI/IR/AffineMap.cpp", 188 "lib/CAPI/IR/BuiltinAttributes.cpp", 189 "lib/CAPI/IR/BuiltinTypes.cpp", 190 "lib/CAPI/IR/Diagnostics.cpp", 191 "lib/CAPI/IR/DialectHandle.cpp", 192 "lib/CAPI/IR/IR.cpp", 193 "lib/CAPI/IR/IntegerSet.cpp", 194 "lib/CAPI/IR/Pass.cpp", 195 "lib/CAPI/IR/Support.cpp", 196 ], 197 hdrs = [ 198 "include/mlir-c/AffineExpr.h", 199 "include/mlir-c/AffineMap.h", 200 "include/mlir-c/BuiltinAttributes.h", 201 "include/mlir-c/BuiltinTypes.h", 202 "include/mlir-c/Diagnostics.h", 203 "include/mlir-c/Dialect/Standard.h", 204 "include/mlir-c/IR.h", 205 "include/mlir-c/IntegerSet.h", 206 "include/mlir-c/Pass.h", 207 "include/mlir-c/Registration.h", 208 "include/mlir-c/Support.h", 209 "include/mlir/CAPI/AffineExpr.h", 210 "include/mlir/CAPI/AffineMap.h", 211 "include/mlir/CAPI/Diagnostics.h", 212 "include/mlir/CAPI/IR.h", 213 "include/mlir/CAPI/IntegerSet.h", 214 "include/mlir/CAPI/Pass.h", 215 "include/mlir/CAPI/Registration.h", 216 "include/mlir/CAPI/Support.h", 217 "include/mlir/CAPI/Utils.h", 218 "include/mlir/CAPI/Wrap.h", 219 ], 220 includes = ["include"], 221 deps = [ 222 ":IR", 223 ":InferTypeOpInterface", 224 ":Parser", 225 ":Pass", 226 ":StandardOps", 227 ":Support", 228 "@llvm-project//llvm:Support", 229 ], 230) 231 232cc_library( 233 name = "CAPITransforms", 234 srcs = ["lib/CAPI/Transforms/Passes.cpp"], 235 hdrs = ["include/mlir-c/Transforms.h"], 236 includes = ["include"], 237 deps = [ 238 ":CAPIIR", 239 ":Pass", 240 ":Transforms", 241 ":TransformsPassIncGen", 242 ], 243) 244 245cc_library( 246 name = "MLIRBindingsPythonExtension", 247 hdrs = ["include/mlir-c/Bindings/Python/Interop.h"], 248 deps = [ 249 ":CAPIIR", 250 "//third_party/python_runtime:headers", 251 ], 252) 253 254cc_library( 255 name = "CAPIRegistration", 256 srcs = ["lib/CAPI/Registration/Registration.cpp"], 257 hdrs = ["include/mlir-c/Registration.h"], 258 includes = ["include"], 259 deps = [ 260 ":AllPassesAndDialectsNoRegistration", 261 ":CAPIIR", 262 ], 263) 264 265filegroup( 266 name = "OpBaseTdFiles", 267 srcs = [ 268 "include/mlir/Dialect/StandardOps/IR/StandardOpsBase.td", 269 "include/mlir/IR/OpBase.td", 270 ], 271) 272 273filegroup( 274 name = "SideEffectBaseTdFiles", 275 srcs = ["include/mlir/Interfaces/SideEffectInterfaceBase.td"], 276) 277 278filegroup( 279 name = "SideEffectTdFiles", 280 srcs = [ 281 "include/mlir/Interfaces/SideEffectInterfaces.td", 282 ":SideEffectBaseTdFiles", 283 ], 284) 285 286filegroup( 287 name = "VectorInterfacesTdFiles", 288 srcs = ["include/mlir/Interfaces/VectorInterfaces.td"], 289) 290 291##---------------------------------------------------------------------------## 292# Affine dialect. 293##---------------------------------------------------------------------------## 294 295filegroup( 296 name = "PassBaseTdFiles", 297 srcs = ["include/mlir/Pass/PassBase.td"], 298) 299 300filegroup( 301 name = "AffineOpsTdFiles", 302 srcs = [ 303 "include/mlir/Dialect/Affine/IR/AffineMemoryOpInterfaces.td", 304 "include/mlir/Dialect/Affine/IR/AffineOps.td", 305 "include/mlir/Interfaces/ControlFlowInterfaces.td", 306 "include/mlir/Interfaces/LoopLikeInterface.td", 307 ":OpBaseTdFiles", 308 ":SideEffectTdFiles", 309 ], 310) 311 312gentbl( 313 name = "AffineOpsIncGen", 314 strip_include_prefix = "include", 315 tbl_outs = [ 316 ( 317 "-gen-op-decls", 318 "include/mlir/Dialect/Affine/IR/AffineOps.h.inc", 319 ), 320 ( 321 "-gen-op-defs", 322 "include/mlir/Dialect/Affine/IR/AffineOps.cpp.inc", 323 ), 324 ( 325 "-gen-dialect-decls", 326 "include/mlir/Dialect/Affine/IR/AffineOpsDialect.h.inc", 327 ), 328 ], 329 tblgen = ":mlir-tblgen", 330 td_file = "include/mlir/Dialect/Affine/IR/AffineOps.td", 331 td_srcs = [":AffineOpsTdFiles"], 332) 333 334gentbl( 335 name = "AffineMemoryOpInterfacesIncGen", 336 strip_include_prefix = "include", 337 tbl_outs = [ 338 ( 339 "-gen-op-interface-decls", 340 "include/mlir/Dialect/Affine/IR/AffineMemoryOpInterfaces.h.inc", 341 ), 342 ( 343 "-gen-op-interface-defs", 344 "include/mlir/Dialect/Affine/IR/AffineMemoryOpInterfaces.cpp.inc", 345 ), 346 ], 347 tblgen = ":mlir-tblgen", 348 td_file = "include/mlir/Dialect/Affine/IR/AffineMemoryOpInterfaces.td", 349 td_srcs = [":AffineOpsTdFiles"], 350) 351 352##---------------------------------------------------------------------------## 353# Async dialect. 354##---------------------------------------------------------------------------## 355 356filegroup( 357 name = "AsyncOpsTdFiles", 358 srcs = [ 359 "include/mlir/Dialect/Async/IR/AsyncDialect.td", 360 "include/mlir/Dialect/Async/IR/AsyncOps.td", 361 "include/mlir/Dialect/Async/IR/AsyncTypes.td", 362 "include/mlir/Interfaces/ControlFlowInterfaces.td", 363 ":OpBaseTdFiles", 364 ":SideEffectTdFiles", 365 ], 366) 367 368gentbl( 369 name = "AsyncOpsIncGen", 370 strip_include_prefix = "include", 371 tbl_outs = [ 372 ( 373 "-gen-op-decls", 374 "include/mlir/Dialect/Async/IR/AsyncOps.h.inc", 375 ), 376 ( 377 "-gen-op-defs", 378 "include/mlir/Dialect/Async/IR/AsyncOps.cpp.inc", 379 ), 380 ( 381 "-gen-dialect-decls", 382 "include/mlir/Dialect/Async/IR/AsyncOpsDialect.h.inc", 383 ), 384 ( 385 "-gen-typedef-decls", 386 "include/mlir/Dialect/Async/IR/AsyncOpsTypes.h.inc", 387 ), 388 ( 389 "-gen-typedef-defs", 390 "include/mlir/Dialect/Async/IR/AsyncOpsTypes.cpp.inc", 391 ), 392 ], 393 tblgen = ":mlir-tblgen", 394 td_file = "include/mlir/Dialect/Async/IR/AsyncOps.td", 395 td_srcs = [":AsyncOpsTdFiles"], 396) 397 398gentbl( 399 name = "AsyncPassIncGen", 400 strip_include_prefix = "include", 401 tbl_outs = [ 402 ( 403 "-gen-pass-decls -name Async", 404 "include/mlir/Dialect/Async/Passes.h.inc", 405 ), 406 ], 407 tblgen = ":mlir-tblgen", 408 td_file = "include/mlir/Dialect/Async/Passes.td", 409 td_srcs = [":PassBaseTdFiles"], 410) 411 412##---------------------------------------------------------------------------## 413# ArmNeon dialect. 414##---------------------------------------------------------------------------## 415 416filegroup( 417 name = "ArmNeonTdFiles", 418 srcs = [ 419 "include/mlir/Dialect/ArmNeon/ArmNeon.td", 420 "include/mlir/Dialect/LLVMIR/LLVMOpBase.td", 421 "include/mlir/IR/OpBase.td", 422 ":SideEffectTdFiles", 423 ], 424) 425 426gentbl( 427 name = "ArmNeonIncGen", 428 strip_include_prefix = "include", 429 tbl_outs = [ 430 ( 431 "-gen-dialect-decls -dialect arm_neon", 432 "include/mlir/Dialect/ArmNeon/ArmNeonDialect.h.inc", 433 ), 434 ( 435 "-gen-op-decls", 436 "include/mlir/Dialect/ArmNeon/ArmNeon.h.inc", 437 ), 438 ( 439 "-gen-op-defs", 440 "include/mlir/Dialect/ArmNeon/ArmNeon.cpp.inc", 441 ), 442 ( 443 "-gen-op-doc", 444 "g3doc/Dialects/ArmNeon/ArmNeon.md", 445 ), 446 ], 447 tblgen = ":mlir-tblgen", 448 td_file = "include/mlir/Dialect/ArmNeon/ArmNeon.td", 449 td_srcs = [":ArmNeonTdFiles"], 450) 451 452cc_library( 453 name = "ArmNeon", 454 srcs = ["lib/Dialect/ArmNeon/IR/ArmNeonDialect.cpp"], 455 hdrs = ["include/mlir/Dialect/ArmNeon/ArmNeonDialect.h"], 456 includes = ["include"], 457 deps = [ 458 ":ArmNeonIncGen", 459 ":IR", 460 ":SideEffectInterfaces", 461 ":VectorOps", 462 "@llvm-project//llvm:Core", 463 "@llvm-project//llvm:Support", 464 ], 465) 466 467cc_library( 468 name = "ArmNeonToLLVM", 469 srcs = glob([ 470 "lib/Conversion/ArmNeonToLLVM/*.cpp", 471 ]) + ["lib/Conversion/PassDetail.h"], 472 hdrs = glob([ 473 "include/mlir/Conversion/ArmNeonToLLVM/*.h", 474 ]), 475 includes = ["include"], 476 deps = [ 477 ":ArmNeon", 478 ":ConversionPassIncGen", 479 ":EDSC", 480 ":IR", 481 ":LLVMArmNeon", 482 ":LLVMDialect", 483 ":Pass", 484 ":StandardOps", 485 ":StandardToLLVM", 486 ":Support", 487 ":Transforms", 488 ":VectorOps", 489 "@llvm-project//llvm:Core", 490 "@llvm-project//llvm:Support", 491 ], 492) 493 494filegroup( 495 name = "LLVMArmNeonTdFiles", 496 srcs = [ 497 "include/mlir/Dialect/LLVMIR/LLVMArmNeon.td", 498 ":LLVMOpsTdFiles", 499 ], 500) 501 502gentbl( 503 name = "LLVMArmNeonIncGen", 504 strip_include_prefix = "include", 505 tbl_outs = [ 506 ( 507 "-gen-dialect-decls -dialect=llvm_arm_neon", 508 "include/mlir/Dialect/LLVMIR/LLVMArmNeonDialect.h.inc", 509 ), 510 ( 511 "-gen-op-decls", 512 "include/mlir/Dialect/LLVMIR/LLVMArmNeon.h.inc", 513 ), 514 ( 515 "-gen-op-defs", 516 "include/mlir/Dialect/LLVMIR/LLVMArmNeon.cpp.inc", 517 ), 518 ( 519 "-gen-op-doc", 520 "g3doc/Dialects/LLVMIR/LLVMArmNeon.md", 521 ), 522 ], 523 tblgen = ":mlir-tblgen", 524 td_file = "include/mlir/Dialect/LLVMIR/LLVMArmNeon.td", 525 td_srcs = [":LLVMArmNeonTdFiles"], 526) 527 528cc_library( 529 name = "LLVMArmNeon", 530 srcs = ["lib/Dialect/LLVMIR/IR/LLVMArmNeonDialect.cpp"], 531 hdrs = ["include/mlir/Dialect/LLVMIR/LLVMArmNeonDialect.h"], 532 includes = ["include"], 533 deps = [ 534 ":IR", 535 ":LLVMArmNeonIncGen", 536 ":LLVMDialect", 537 "@llvm-project//llvm:Core", 538 "@llvm-project//llvm:Support", 539 ], 540) 541 542gentbl( 543 name = "LLVMArmNeonConversionIncGen", 544 strip_include_prefix = "include", 545 tbl_outs = [ 546 ( 547 "-gen-llvmir-conversions", 548 "include/mlir/Dialect/LLVMIR/LLVMArmNeonConversions.inc", 549 ), 550 ], 551 tblgen = ":mlir-tblgen", 552 td_file = "include/mlir/Dialect/LLVMIR/LLVMArmNeon.td", 553 td_srcs = [":LLVMArmNeonTdFiles"], 554) 555 556##---------------------------------------------------------------------------## 557# ArmSVE dialect. 558##---------------------------------------------------------------------------## 559 560filegroup( 561 name = "ArmSVETdFiles", 562 srcs = [ 563 "include/mlir/Dialect/ArmSVE/ArmSVE.td", 564 "include/mlir/Dialect/LLVMIR/LLVMOpBase.td", 565 "include/mlir/IR/OpBase.td", 566 ":SideEffectTdFiles", 567 ], 568) 569 570gentbl( 571 name = "ArmSVEIncGen", 572 strip_include_prefix = "include", 573 tbl_outs = [ 574 ( 575 "-gen-op-decls", 576 "include/mlir/Dialect/ArmSVE/ArmSVE.h.inc", 577 ), 578 ( 579 "-gen-op-defs", 580 "include/mlir/Dialect/ArmSVE/ArmSVE.cpp.inc", 581 ), 582 ( 583 "-gen-typedef-decls", 584 "include/mlir/Dialect/ArmSVE/ArmSVETypes.h.inc", 585 ), 586 ( 587 "-gen-typedef-defs", 588 "include/mlir/Dialect/ArmSVE/ArmSVETypes.cpp.inc", 589 ), 590 ( 591 "-gen-dialect-decls -dialect arm_sve", 592 "include/mlir/Dialect/ArmSVE/ArmSVEDialect.h.inc", 593 ), 594 ], 595 tblgen = ":mlir-tblgen", 596 td_file = "include/mlir/Dialect/ArmSVE/ArmSVE.td", 597 td_srcs = [":ArmSVETdFiles"], 598) 599 600cc_library( 601 name = "ArmSVE", 602 srcs = ["lib/Dialect/ArmSVE/IR/ArmSVEDialect.cpp"], 603 hdrs = ["include/mlir/Dialect/ArmSVE/ArmSVEDialect.h"], 604 includes = ["include"], 605 deps = [ 606 ":ArmSVEIncGen", 607 ":IR", 608 ":SideEffectInterfaces", 609 ":VectorOps", 610 "@llvm-project//llvm:Core", 611 "@llvm-project//llvm:Support", 612 ], 613) 614 615cc_library( 616 name = "ArmSVEToLLVM", 617 srcs = glob([ 618 "lib/Conversion/ArmSVEToLLVM/*.cpp", 619 ]) + ["lib/Conversion/PassDetail.h"], 620 hdrs = glob([ 621 "include/mlir/Conversion/ArmSVEToLLVM/*.h", 622 ]), 623 includes = ["include"], 624 deps = [ 625 ":ArmSVE", 626 ":ConversionPassIncGen", 627 ":EDSC", 628 ":IR", 629 ":LLVMArmSVE", 630 ":LLVMDialect", 631 ":Pass", 632 ":StandardOps", 633 ":StandardToLLVM", 634 ":Support", 635 ":Transforms", 636 ":VectorOps", 637 "@llvm-project//llvm:Core", 638 "@llvm-project//llvm:Support", 639 ], 640) 641 642filegroup( 643 name = "LLVMArmSVETdFiles", 644 srcs = [ 645 "include/mlir/Dialect/LLVMIR/LLVMArmSVE.td", 646 ":LLVMOpsTdFiles", 647 ], 648) 649 650gentbl( 651 name = "LLVMArmSVEIncGen", 652 strip_include_prefix = "include", 653 tbl_outs = [ 654 ( 655 "-gen-dialect-decls -dialect=llvm_arm_sve", 656 "include/mlir/Dialect/LLVMIR/LLVMArmSVEDialect.h.inc", 657 ), 658 ( 659 "-gen-op-decls", 660 "include/mlir/Dialect/LLVMIR/LLVMArmSVE.h.inc", 661 ), 662 ( 663 "-gen-op-defs", 664 "include/mlir/Dialect/LLVMIR/LLVMArmSVE.cpp.inc", 665 ), 666 ( 667 "-gen-op-doc", 668 "g3doc/Dialects/LLVMIR/LLVMArmSVE.md", 669 ), 670 ], 671 tblgen = ":mlir-tblgen", 672 td_file = "include/mlir/Dialect/LLVMIR/LLVMArmSVE.td", 673 td_srcs = [":LLVMArmSVETdFiles"], 674) 675 676cc_library( 677 name = "LLVMArmSVE", 678 srcs = ["lib/Dialect/LLVMIR/IR/LLVMArmSVEDialect.cpp"], 679 hdrs = ["include/mlir/Dialect/LLVMIR/LLVMArmSVEDialect.h"], 680 includes = ["include"], 681 deps = [ 682 ":IR", 683 ":LLVMArmSVEIncGen", 684 ":LLVMDialect", 685 "@llvm-project//llvm:Core", 686 "@llvm-project//llvm:Support", 687 ], 688) 689 690gentbl( 691 name = "LLVMArmSVEConversionIncGen", 692 strip_include_prefix = "include", 693 tbl_outs = [ 694 ( 695 "-gen-llvmir-conversions", 696 "include/mlir/Dialect/LLVMIR/LLVMArmSVEConversions.inc", 697 ), 698 ], 699 tblgen = ":mlir-tblgen", 700 td_file = "include/mlir/Dialect/LLVMIR/LLVMArmSVE.td", 701 td_srcs = [":LLVMArmSVETdFiles"], 702) 703 704##---------------------------------------------------------------------------## 705# AVX512 dialect. 706##---------------------------------------------------------------------------## 707 708filegroup( 709 name = "AVX512TdFiles", 710 srcs = [ 711 "include/mlir/Dialect/AVX512/AVX512.td", 712 "include/mlir/Dialect/LLVMIR/LLVMOpBase.td", 713 "include/mlir/IR/OpBase.td", 714 ":SideEffectTdFiles", 715 ], 716) 717 718gentbl( 719 name = "AVX512IncGen", 720 strip_include_prefix = "include", 721 tbl_outs = [ 722 ( 723 "-gen-dialect-decls -dialect=avx512", 724 "include/mlir/Dialect/AVX512/AVX512Dialect.h.inc", 725 ), 726 ( 727 "-gen-op-decls", 728 "include/mlir/Dialect/AVX512/AVX512.h.inc", 729 ), 730 ( 731 "-gen-op-defs", 732 "include/mlir/Dialect/AVX512/AVX512.cpp.inc", 733 ), 734 ( 735 "-gen-op-doc", 736 "g3doc/Dialects/AVX512/AVX512.md", 737 ), 738 ], 739 tblgen = ":mlir-tblgen", 740 td_file = "include/mlir/Dialect/AVX512/AVX512.td", 741 td_srcs = [":AVX512TdFiles"], 742) 743 744cc_library( 745 name = "AVX512", 746 srcs = ["lib/Dialect/AVX512/IR/AVX512Dialect.cpp"], 747 hdrs = ["include/mlir/Dialect/AVX512/AVX512Dialect.h"], 748 includes = ["include"], 749 deps = [ 750 ":AVX512IncGen", 751 ":IR", 752 ":SideEffectInterfaces", 753 ":VectorOps", 754 "@llvm-project//llvm:Core", 755 "@llvm-project//llvm:Support", 756 ], 757) 758 759cc_library( 760 name = "AVX512ToLLVM", 761 srcs = glob([ 762 "lib/Conversion/AVX512ToLLVM/*.cpp", 763 ]), 764 hdrs = ["include/mlir/Conversion/AVX512ToLLVM/ConvertAVX512ToLLVM.h"], 765 includes = ["include"], 766 deps = [ 767 ":AVX512", 768 ":ConversionPassIncGen", 769 ":EDSC", 770 ":IR", 771 ":LLVMAVX512", 772 ":LLVMDialect", 773 ":StandardOps", 774 ":StandardToLLVM", 775 ":Support", 776 ":Transforms", 777 ":VectorOps", 778 "@llvm-project//llvm:Core", 779 "@llvm-project//llvm:Support", 780 ], 781) 782 783filegroup( 784 name = "LLVMAVX512TdFiles", 785 srcs = [ 786 "include/mlir/Dialect/LLVMIR/LLVMAVX512.td", 787 ":LLVMOpsTdFiles", 788 ], 789) 790 791gentbl( 792 name = "LLVMAVX512IncGen", 793 strip_include_prefix = "include", 794 tbl_outs = [ 795 ( 796 "-gen-dialect-decls -dialect=llvm_avx512", 797 "include/mlir/Dialect/LLVMIR/LLVMAVX512Dialect.h.inc", 798 ), 799 ( 800 "-gen-op-decls", 801 "include/mlir/Dialect/LLVMIR/LLVMAVX512.h.inc", 802 ), 803 ( 804 "-gen-op-defs", 805 "include/mlir/Dialect/LLVMIR/LLVMAVX512.cpp.inc", 806 ), 807 ( 808 "-gen-op-doc", 809 "g3doc/Dialects/LLVMIR/LLVMAVX512.md", 810 ), 811 ], 812 tblgen = ":mlir-tblgen", 813 td_file = "include/mlir/Dialect/LLVMIR/LLVMAVX512.td", 814 td_srcs = [":LLVMAVX512TdFiles"], 815) 816 817cc_library( 818 name = "LLVMAVX512", 819 srcs = ["lib/Dialect/LLVMIR/IR/LLVMAVX512Dialect.cpp"], 820 hdrs = ["include/mlir/Dialect/LLVMIR/LLVMAVX512Dialect.h"], 821 includes = ["include"], 822 deps = [ 823 ":IR", 824 ":LLVMAVX512IncGen", 825 ":LLVMDialect", 826 "@llvm-project//llvm:Core", 827 "@llvm-project//llvm:Support", 828 ], 829) 830 831gentbl( 832 name = "LLVMAVX512ConversionIncGen", 833 strip_include_prefix = "include", 834 tbl_outs = [ 835 ( 836 "-gen-llvmir-conversions", 837 "include/mlir/Dialect/LLVMIR/LLVMAVX512Conversions.inc", 838 ), 839 ], 840 tblgen = ":mlir-tblgen", 841 td_file = "include/mlir/Dialect/LLVMIR/LLVMAVX512.td", 842 td_srcs = [":LLVMAVX512TdFiles"], 843) 844 845##---------------------------------------------------------------------------## 846# SCF dialect. 847##---------------------------------------------------------------------------## 848 849filegroup( 850 name = "SCFTdFiles", 851 srcs = [ 852 "include/mlir/Dialect/SCF/SCFOps.td", 853 "include/mlir/Interfaces/ControlFlowInterfaces.td", 854 "include/mlir/Interfaces/LoopLikeInterface.td", 855 ":OpBaseTdFiles", 856 ":SideEffectTdFiles", 857 ], 858) 859 860gentbl( 861 name = "SCFIncGen", 862 strip_include_prefix = "include", 863 tbl_outs = [ 864 ( 865 "-gen-op-decls", 866 "include/mlir/Dialect/SCF/SCFOps.h.inc", 867 ), 868 ( 869 "-gen-op-defs", 870 "include/mlir/Dialect/SCF/SCFOps.cpp.inc", 871 ), 872 ( 873 "-gen-dialect-decls", 874 "include/mlir/Dialect/SCF/SCFOpsDialect.h.inc", 875 ), 876 ], 877 tblgen = ":mlir-tblgen", 878 td_file = "include/mlir/Dialect/SCF/SCFOps.td", 879 td_srcs = [":SCFTdFiles"], 880) 881 882gentbl( 883 name = "SCFPassIncGen", 884 strip_include_prefix = "include", 885 tbl_outs = [ 886 ( 887 "-gen-pass-decls -name SCF", 888 "include/mlir/Dialect/SCF/Passes.h.inc", 889 ), 890 ], 891 tblgen = ":mlir-tblgen", 892 td_file = "include/mlir/Dialect/SCF/Passes.td", 893 td_srcs = [":PassBaseTdFiles"], 894) 895 896cc_library( 897 name = "SCFTransforms", 898 srcs = glob([ 899 "lib/Dialect/SCF/Transforms/*.cpp", 900 "lib/Dialect/SCF/Transforms/*.h", 901 ]), 902 hdrs = ["include/mlir/Dialect/SCF/Passes.h"], 903 includes = ["include"], 904 deps = [ 905 ":Affine", 906 ":IR", 907 ":Pass", 908 ":SCFDialect", 909 ":SCFPassIncGen", 910 ":StandardOps", 911 ":Transforms", 912 "@llvm-project//llvm:Support", 913 ], 914) 915 916filegroup( 917 name = "StdOpsTdFiles", 918 srcs = [ 919 "include/mlir/Dialect/StandardOps/IR/Ops.td", 920 "include/mlir/IR/OpAsmInterface.td", 921 "include/mlir/IR/SymbolInterfaces.td", 922 "include/mlir/Interfaces/CallInterfaces.td", 923 "include/mlir/Interfaces/CastInterfaces.td", 924 "include/mlir/Interfaces/ControlFlowInterfaces.td", 925 "include/mlir/Interfaces/ViewLikeInterface.td", 926 ":OpBaseTdFiles", 927 ":SideEffectTdFiles", 928 ":VectorInterfacesTdFiles", 929 ], 930) 931 932gentbl( 933 name = "StandardOpsIncGen", 934 strip_include_prefix = "include", 935 tbl_outs = [ 936 ( 937 "-gen-op-decls", 938 "include/mlir/Dialect/StandardOps/IR/Ops.h.inc", 939 ), 940 ( 941 "-gen-op-defs", 942 "include/mlir/Dialect/StandardOps/IR/Ops.cpp.inc", 943 ), 944 ( 945 "-gen-dialect-decls", 946 "include/mlir/Dialect/StandardOps/IR/OpsDialect.h.inc", 947 ), 948 ( 949 "-gen-enum-decls", 950 "include/mlir/Dialect/StandardOps/IR/OpsEnums.h.inc", 951 ), 952 ( 953 "-gen-enum-defs", 954 "include/mlir/Dialect/StandardOps/IR/OpsEnums.cpp.inc", 955 ), 956 ], 957 tblgen = ":mlir-tblgen", 958 td_file = "include/mlir/Dialect/StandardOps/IR/Ops.td", 959 td_srcs = [":StdOpsTdFiles"], 960) 961 962cc_library( 963 name = "Dialect", 964 srcs = glob([ 965 "lib/Dialect/*.cpp", 966 "lib/Dialect/*.h", 967 ]), 968 hdrs = glob([ 969 "include/mlir/Dialect/*.h", 970 ]), 971 includes = ["include"], 972 deps = [ 973 ":IR", 974 "@llvm-project//llvm:Support", 975 ], 976) 977 978cc_library( 979 name = "DialectUtils", 980 srcs = glob([ 981 "lib/Dialect/Utils/*.cpp", 982 "lib/Dialect/Utils/*.h", 983 ]), 984 hdrs = glob([ 985 "include/mlir/Dialect/Utils/*.h", 986 ]), 987 includes = ["include"], 988 deps = [ 989 ":IR", 990 ":Support", 991 "@llvm-project//llvm:Support", 992 ], 993) 994 995cc_library( 996 name = "Affine", 997 srcs = glob( 998 [ 999 "lib/Dialect/Affine/IR/*.cpp", 1000 "lib/Dialect/Affine/IR/*.h", 1001 "lib/Dialect/Affine/EDSC/*.cpp", 1002 ], 1003 ) + ["include/mlir/Transforms/InliningUtils.h"], 1004 hdrs = glob([ 1005 "include/mlir/Dialect/Affine/IR/*.h", 1006 "include/mlir/Dialect/Affine/EDSC/*.h", 1007 ]), 1008 includes = ["include"], 1009 deps = [ 1010 ":AffineMemoryOpInterfacesIncGen", 1011 ":AffineOpsIncGen", 1012 ":EDSC", 1013 ":IR", 1014 ":LoopLikeInterface", 1015 ":SideEffectInterfaces", 1016 ":StandardOps", 1017 ":Support", 1018 "@llvm-project//llvm:Support", 1019 ], 1020) 1021 1022cc_library( 1023 name = "Async", 1024 srcs = glob([ 1025 "lib/Dialect/Async/IR/*.cpp", 1026 ]), 1027 hdrs = glob([ 1028 "include/mlir/Dialect/Async/IR/*.h", 1029 ]), 1030 includes = ["include"], 1031 deps = [ 1032 ":AsyncOpsIncGen", 1033 ":ControlFlowInterfaces", 1034 ":Dialect", 1035 ":IR", 1036 ":SideEffectInterfaces", 1037 ":StandardOps", 1038 ":Support", 1039 "@llvm-project//llvm:Support", 1040 ], 1041) 1042 1043cc_library( 1044 name = "AsyncTransforms", 1045 srcs = glob([ 1046 "lib/Dialect/Async/Transforms/*.cpp", 1047 "lib/Dialect/Async/Transforms/*.h", 1048 ]), 1049 hdrs = ["include/mlir/Dialect/Async/Passes.h"], 1050 includes = ["include"], 1051 deps = [ 1052 ":Analysis", 1053 ":Async", 1054 ":AsyncPassIncGen", 1055 ":IR", 1056 ":Pass", 1057 ":SCFDialect", 1058 ":StandardOps", 1059 ":Support", 1060 ":TransformUtils", 1061 ":Transforms", 1062 ":TransformsPassIncGen", 1063 "@llvm-project//llvm:Core", 1064 "@llvm-project//llvm:Support", 1065 ], 1066) 1067 1068cc_library( 1069 name = "AffineUtils", 1070 srcs = glob( 1071 [ 1072 "lib/Dialect/Affine/Utils/*.cpp", 1073 "lib/Dialect/Affine/Utils/*.h", 1074 ], 1075 ), 1076 hdrs = ["include/mlir/Dialect/Affine/Utils.h"], 1077 includes = ["include"], 1078 deps = [ 1079 ":Affine", 1080 ":IR", 1081 ":Support", 1082 ":TransformUtils", 1083 "@llvm-project//llvm:Support", 1084 ], 1085) 1086 1087gentbl( 1088 name = "AffinePassIncGen", 1089 strip_include_prefix = "include", 1090 tbl_outs = [ 1091 ( 1092 "-gen-pass-decls -name Affine", 1093 "include/mlir/Dialect/Affine/Passes.h.inc", 1094 ), 1095 ], 1096 tblgen = ":mlir-tblgen", 1097 td_file = "include/mlir/Dialect/Affine/Passes.td", 1098 td_srcs = [":PassBaseTdFiles"], 1099) 1100 1101cc_library( 1102 name = "AffineTransforms", 1103 srcs = glob([ 1104 "lib/Dialect/Affine/Transforms/*.cpp", 1105 "lib/Dialect/Affine/Transforms/*.h", 1106 ]), 1107 hdrs = ["include/mlir/Dialect/Affine/Passes.h"], 1108 includes = ["include"], 1109 deps = [ 1110 ":Affine", 1111 ":AffinePassIncGen", 1112 ":AffineUtils", 1113 ":Analysis", 1114 ":IR", 1115 ":Pass", 1116 ":SCFDialect", 1117 ":StandardOps", 1118 ":Support", 1119 ":Transforms", 1120 ":VectorOps", 1121 "@llvm-project//llvm:Support", 1122 ], 1123) 1124 1125gentbl( 1126 name = "ConversionPassIncGen", 1127 strip_include_prefix = "include", 1128 tbl_outs = [ 1129 ( 1130 "-gen-pass-decls -name Conversion", 1131 "include/mlir/Conversion/Passes.h.inc", 1132 ), 1133 ], 1134 tblgen = ":mlir-tblgen", 1135 td_file = "include/mlir/Conversion/Passes.td", 1136 td_srcs = [":PassBaseTdFiles"], 1137) 1138 1139cc_library( 1140 name = "ConversionPasses", 1141 hdrs = ["include/mlir/Conversion/Passes.h"], 1142 includes = ["include"], 1143 deps = [ 1144 ":AVX512ToLLVM", 1145 ":AffineToStandard", 1146 ":ArmNeonToLLVM", 1147 ":AsyncToLLVM", 1148 ":ComplexToLLVM", 1149 ":ConversionPassIncGen", 1150 ":GPUToGPURuntimeTransforms", 1151 ":GPUToNVVMTransforms", 1152 ":GPUToROCDLTransforms", 1153 ":GPUToSPIRV", 1154 ":GPUToVulkanTransforms", 1155 ":LinalgToLLVM", 1156 ":LinalgToSPIRV", 1157 ":LinalgToStandard", 1158 ":MathToLLVM", 1159 ":OpenMPToLLVM", 1160 ":PDLToPDLInterp", 1161 ":SCFToGPUPass", 1162 ":SCFToOpenMP", 1163 ":SCFToSPIRV", 1164 ":SCFToStandard", 1165 ":SPIRVToLLVM", 1166 ":ShapeToStandard", 1167 ":StandardToLLVM", 1168 ":StandardToSPIRV", 1169 ":TosaToLinalg", 1170 ":VectorToLLVM", 1171 ":VectorToROCDL", 1172 ":VectorToSCF", 1173 ":VectorToSPIRV", 1174 ], 1175) 1176 1177cc_library( 1178 name = "AsyncToLLVM", 1179 srcs = glob([ 1180 "lib/Conversion/AsyncToLLVM/*.cpp", 1181 "lib/Conversion/AsyncToLLVM/*.h", 1182 ]) + ["lib/Conversion/PassDetail.h"], 1183 hdrs = glob(["include/mlir/Conversion/AsyncToLLVM/*.h"]), 1184 includes = ["include"], 1185 deps = [ 1186 ":Async", 1187 ":ConversionPassIncGen", 1188 ":IR", 1189 ":LLVMDialect", 1190 ":Pass", 1191 ":StandardOps", 1192 ":StandardOpsTransforms", 1193 ":StandardToLLVM", 1194 ":Support", 1195 ":Transforms", 1196 "@llvm-project//llvm:Support", 1197 ], 1198) 1199 1200cc_library( 1201 name = "AffineToStandard", 1202 srcs = glob([ 1203 "lib/Conversion/AffineToStandard/*.cpp", 1204 "lib/Conversion/AffineToStandard/*.h", 1205 ]) + ["lib/Conversion/PassDetail.h"], 1206 hdrs = glob(["include/mlir/Conversion/AffineToStandard/*.h"]), 1207 includes = ["include"], 1208 deps = [ 1209 ":Affine", 1210 ":ConversionPassIncGen", 1211 ":IR", 1212 ":Pass", 1213 ":SCFDialect", 1214 ":StandardOps", 1215 ":Support", 1216 ":Transforms", 1217 ":VectorOps", 1218 ], 1219) 1220 1221alias( 1222 name = "AffineToStandardTransforms", 1223 actual = "AffineToStandard", 1224) 1225 1226# SDBM dialect only contains attribute components that can be constructed given 1227# a dialect object, so whenever it is used it must also be registered. Therefore 1228# we don't split out the registration library for it. 1229cc_library( 1230 name = "SDBM", 1231 srcs = glob([ 1232 "lib/Dialect/SDBM/*.cpp", 1233 "lib/Dialect/SDBM/*.h", 1234 ]), 1235 hdrs = glob([ 1236 "include/mlir/Dialect/SDBM/*.h", 1237 ]), 1238 includes = ["include"], 1239 deps = [ 1240 ":IR", 1241 ":Support", 1242 "@llvm-project//llvm:Support", 1243 ], 1244) 1245 1246cc_library( 1247 name = "SCFDialect", 1248 srcs = glob( 1249 [ 1250 "lib/Dialect/SCF/*.cpp", 1251 "lib/Dialect/SCF/*.h", 1252 "lib/Dialect/SCF/EDSC/*.cpp", 1253 ], 1254 ), 1255 hdrs = glob([ 1256 "include/mlir/Dialect/SCF/*.h", 1257 "include/mlir/Dialect/SCF/EDSC/*.h", 1258 ]), 1259 includes = ["include"], 1260 deps = [ 1261 ":ControlFlowInterfaces", 1262 ":EDSC", 1263 ":IR", 1264 ":LoopLikeInterface", 1265 ":Pass", 1266 ":SCFIncGen", 1267 ":SCFPassIncGen", 1268 ":SideEffectInterfaces", 1269 ":StandardOps", 1270 ":Support", 1271 "@llvm-project//llvm:Support", 1272 ], 1273) 1274 1275cc_library( 1276 name = "LinalgInterfaces", 1277 srcs = ["lib/Dialect/Linalg/IR/LinalgInterfaces.cpp"], 1278 hdrs = ["include/mlir/Dialect/Linalg/IR/LinalgInterfaces.h"], 1279 includes = ["include"], 1280 deps = [ 1281 ":Affine", 1282 ":DialectUtils", 1283 ":IR", 1284 ":LinalgInterfacesIncGen", 1285 ":LinalgStructuredOpsIncGen", 1286 ":ViewLikeInterface", 1287 "@llvm-project//llvm:Support", 1288 ], 1289) 1290 1291cc_library( 1292 name = "LoopLikeInterface", 1293 srcs = ["lib/Interfaces/LoopLikeInterface.cpp"], 1294 hdrs = ["include/mlir/Interfaces/LoopLikeInterface.h"], 1295 includes = ["include"], 1296 deps = [ 1297 ":IR", 1298 ":LoopLikeInterfaceIncGen", 1299 ], 1300) 1301 1302cc_library( 1303 name = "VectorInterfaces", 1304 srcs = ["lib/Interfaces/VectorInterfaces.cpp"], 1305 hdrs = ["include/mlir/Interfaces/VectorInterfaces.h"], 1306 includes = ["include"], 1307 deps = [ 1308 ":IR", 1309 ":VectorInterfacesIncGen", 1310 ], 1311) 1312 1313cc_library( 1314 name = "ViewLikeInterface", 1315 srcs = ["lib/Interfaces/ViewLikeInterface.cpp"], 1316 hdrs = ["include/mlir/Interfaces/ViewLikeInterface.h"], 1317 includes = ["include"], 1318 deps = [ 1319 ":IR", 1320 ":ViewLikeInterfaceIncGen", 1321 ], 1322) 1323 1324cc_library( 1325 name = "CopyOpInterface", 1326 srcs = ["lib/Interfaces/CopyOpInterface.cpp"], 1327 hdrs = ["include/mlir/Interfaces/CopyOpInterface.h"], 1328 includes = ["include"], 1329 deps = [ 1330 ":CopyOpInterfaceIncGen", 1331 ":IR", 1332 ], 1333) 1334 1335filegroup( 1336 name = "ShapeOpsTdFiles", 1337 srcs = [ 1338 "include/mlir/Dialect/Shape/IR/ShapeBase.td", 1339 "include/mlir/Dialect/Shape/IR/ShapeOps.td", 1340 "include/mlir/Interfaces/InferTypeOpInterface.td", 1341 ":StdOpsTdFiles", 1342 ], 1343) 1344 1345gentbl( 1346 name = "ShapeOpsIncGen", 1347 strip_include_prefix = "include", 1348 tbl_outs = [ 1349 ( 1350 "-gen-op-decls", 1351 "include/mlir/Dialect/Shape/IR/ShapeOps.h.inc", 1352 ), 1353 ( 1354 "-gen-op-defs", 1355 "include/mlir/Dialect/Shape/IR/ShapeOps.cpp.inc", 1356 ), 1357 ( 1358 "-gen-dialect-decls", 1359 "include/mlir/Dialect/Shape/IR/ShapeOpsDialect.h.inc", 1360 ), 1361 ], 1362 tblgen = ":mlir-tblgen", 1363 td_file = "include/mlir/Dialect/Shape/IR/ShapeOps.td", 1364 td_srcs = [ 1365 ":StdOpsTdFiles", 1366 "include/mlir/Dialect/Shape/IR/ShapeBase.td", 1367 "include/mlir/Interfaces/InferTypeOpInterface.td", 1368 ], 1369) 1370 1371gentbl( 1372 name = "MLIRShapeCanonicalizationIncGen", 1373 strip_include_prefix = "include/mlir/Dialect/Shape/IR", 1374 tbl_outs = [ 1375 ( 1376 "-gen-rewriters", 1377 "include/mlir/Dialect/Shape/IR/ShapeCanonicalization.inc", 1378 ), 1379 ], 1380 tblgen = ":mlir-tblgen", 1381 td_file = "lib/Dialect/Shape/IR/ShapeCanonicalization.td", 1382 td_srcs = [ 1383 ":StdOpsTdFiles", 1384 ":TensorOpsTdFiles", 1385 "include/mlir/Dialect/Shape/IR/ShapeBase.td", 1386 "include/mlir/Dialect/Shape/IR/ShapeOps.td", 1387 "include/mlir/Interfaces/InferTypeOpInterface.td", 1388 ], 1389) 1390 1391cc_library( 1392 name = "Shape", 1393 srcs = glob(["lib/Dialect/Shape/IR/*.cpp"]), 1394 hdrs = ["include/mlir/Dialect/Shape/IR/Shape.h"], 1395 includes = ["include"], 1396 deps = [ 1397 ":CallOpInterfaces", 1398 ":CommonFolders", 1399 ":ControlFlowInterfaces", 1400 ":Dialect", 1401 ":IR", 1402 ":InferTypeOpInterface", 1403 ":MLIRShapeCanonicalizationIncGen", 1404 ":ShapeOpsIncGen", 1405 ":SideEffectInterfaces", 1406 ":StandardOps", 1407 ":Support", 1408 ":TensorDialect", 1409 "@llvm-project//llvm:Support", 1410 ], 1411) 1412 1413gentbl( 1414 name = "ShapeToStandardGen", 1415 strip_include_prefix = "lib/Conversion/ShapeToStandard", 1416 tbl_outs = [ 1417 ( 1418 "-gen-rewriters", 1419 "lib/Conversion/ShapeToStandard/ShapeToStandard.cpp.inc", 1420 ), 1421 ], 1422 tblgen = ":mlir-tblgen", 1423 td_file = "lib/Conversion/ShapeToStandard/ShapeToStandard.td", 1424 td_srcs = [":ShapeOpsTdFiles"], 1425) 1426 1427cc_library( 1428 name = "ShapeToStandard", 1429 srcs = glob([ 1430 "lib/Conversion/ShapeToStandard/*.cpp", 1431 "lib/Conversion/ShapeToStandard/*.h", 1432 ]) + ["lib/Conversion/PassDetail.h"], 1433 hdrs = ["include/mlir/Conversion/ShapeToStandard/ShapeToStandard.h"], 1434 includes = ["include"], 1435 deps = [ 1436 ":ConversionPassIncGen", 1437 ":IR", 1438 ":Pass", 1439 ":SCFDialect", 1440 ":Shape", 1441 ":ShapeToStandardGen", 1442 ":StandardOps", 1443 ":Support", 1444 ":TensorDialect", 1445 ":Transforms", 1446 "@llvm-project//llvm:Support", 1447 ], 1448) 1449 1450gentbl( 1451 name = "ShapeTransformsPassIncGen", 1452 strip_include_prefix = "include", 1453 tbl_outs = [( 1454 "-gen-pass-decls -name Shape", 1455 "include/mlir/Dialect/Shape/Transforms/Passes.h.inc", 1456 )], 1457 tblgen = ":mlir-tblgen", 1458 td_file = "include/mlir/Dialect/Shape/Transforms/Passes.td", 1459 td_srcs = [":PassBaseTdFiles"], 1460) 1461 1462cc_library( 1463 name = "ShapeTransforms", 1464 srcs = glob([ 1465 "lib/Dialect/Shape/Transforms/*.cpp", 1466 "lib/Dialect/Shape/Transforms/*.h", 1467 ]), 1468 hdrs = ["include/mlir/Dialect/Shape/Transforms/Passes.h"], 1469 includes = ["include"], 1470 deps = [ 1471 ":IR", 1472 ":Pass", 1473 ":Shape", 1474 ":ShapeTransformsPassIncGen", 1475 ":StandardOps", 1476 ":Transforms", 1477 ], 1478) 1479 1480cc_library( 1481 name = "StandardOps", 1482 srcs = glob( 1483 [ 1484 "lib/Dialect/StandardOps/IR/*.cpp", 1485 "lib/Dialect/StandardOps/IR/*.h", 1486 "lib/Dialect/StandardOps/EDSC/*.cpp", 1487 "lib/Dialect/StandardOps/Utils/*.cpp", 1488 ], 1489 ), 1490 hdrs = glob([ 1491 "include/mlir/Dialect/StandardOps/IR/*.h", 1492 "include/mlir/Dialect/StandardOps/EDSC/*.h", 1493 "include/mlir/Dialect/StandardOps/Utils/*.h", 1494 ]) + ["include/mlir/Transforms/InliningUtils.h"], 1495 includes = ["include"], 1496 deps = [ 1497 ":CallOpInterfaces", 1498 ":CastOpInterfaces", 1499 ":CommonFolders", 1500 ":ControlFlowInterfaces", 1501 ":EDSC", 1502 ":IR", 1503 ":SideEffectInterfaces", 1504 ":StandardOpsIncGen", 1505 ":Support", 1506 ":TensorDialect", 1507 ":VectorInterfaces", 1508 ":ViewLikeInterface", 1509 "@llvm-project//llvm:Support", 1510 ], 1511) 1512 1513gentbl( 1514 name = "StandardOpsTransformsPassIncGen", 1515 strip_include_prefix = "include", 1516 tbl_outs = [( 1517 "-gen-pass-decls -name Standard", 1518 "include/mlir/Dialect/StandardOps/Transforms/Passes.h.inc", 1519 )], 1520 tblgen = ":mlir-tblgen", 1521 td_file = "include/mlir/Dialect/StandardOps/Transforms/Passes.td", 1522 td_srcs = [":PassBaseTdFiles"], 1523) 1524 1525cc_library( 1526 name = "StandardOpsTransforms", 1527 srcs = glob([ 1528 "lib/Dialect/StandardOps/Transforms/*.cpp", 1529 "lib/Dialect/StandardOps/Transforms/*.h", 1530 ]), 1531 hdrs = glob(["include/mlir/Dialect/StandardOps/Transforms/*.h"]), 1532 includes = ["include"], 1533 deps = [ 1534 ":Analysis", 1535 ":ControlFlowInterfaces", 1536 ":IR", 1537 ":Pass", 1538 ":SCFDialect", 1539 ":StandardOps", 1540 ":StandardOpsTransformsPassIncGen", 1541 ":Support", 1542 ":TensorDialect", 1543 ":Transforms", 1544 "@llvm-project//llvm:Support", 1545 ], 1546) 1547 1548cc_library( 1549 name = "VectorOps", 1550 srcs = glob( 1551 [ 1552 "lib/Dialect/Vector/*.cpp", 1553 "lib/Dialect/Vector/*.h", 1554 "lib/Dialect/Vector/EDSC/*.cpp", 1555 "lib/Dialect/Vector/EDSC/*.h", 1556 ], 1557 ), 1558 hdrs = glob([ 1559 "include/mlir/Dialect/Vector/*.h", 1560 "include/mlir/Dialect/Vector/EDSC/*.h", 1561 ]), 1562 includes = ["include"], 1563 deps = [ 1564 ":Affine", 1565 ":Analysis", 1566 ":DialectUtils", 1567 ":EDSC", 1568 ":IR", 1569 ":LinalgOps", 1570 ":SCFDialect", 1571 ":SideEffectInterfaces", 1572 ":StandardOps", 1573 ":Support", 1574 ":VectorInterfaces", 1575 ":VectorOpsIncGen", 1576 ":ViewLikeInterface", 1577 "@llvm-project//llvm:Support", 1578 ], 1579) 1580 1581cc_library( 1582 name = "Support", 1583 srcs = glob( 1584 [ 1585 "lib/Support/*.cpp", 1586 "lib/Support/*.h", 1587 ], 1588 exclude = [ 1589 # TODO(jpienaar): Move this out, else Support depends on Analysis/ 1590 "lib/Support/MlirOptMain.cpp", 1591 ], 1592 ), 1593 hdrs = glob( 1594 ["include/mlir/Support/*.h"], 1595 exclude = ["include/mlir/Support/MlirOptMain.h"], 1596 ), 1597 includes = ["include"], 1598 deps = ["@llvm-project//llvm:Support"], 1599) 1600 1601cc_library( 1602 name = "ParserTokenKinds", 1603 # strip_include_prefix does not apply to textual_hdrs. 1604 hdrs = ["lib/Parser/TokenKinds.def"], 1605 strip_include_prefix = "lib/Parser", 1606 textual_hdrs = ["lib/Parser/TokenKinds.def"], 1607) 1608 1609cc_library( 1610 name = "Parser", 1611 srcs = glob([ 1612 "lib/Parser/*.cpp", 1613 "lib/Parser/*.h", 1614 ]), 1615 hdrs = ["include/mlir/Parser.h"], 1616 includes = ["include"], 1617 deps = [ 1618 ":IR", 1619 ":ParserTokenKinds", 1620 ":Support", 1621 "@llvm-project//llvm:Support", 1622 ], 1623) 1624 1625gentbl( 1626 name = "LLVMDialectInterfaceIncGen", 1627 strip_include_prefix = "include", 1628 tbl_outs = [ 1629 ( 1630 "-gen-op-interface-decls", 1631 "include/mlir/Dialect/LLVMIR/LLVMOpsInterfaces.h.inc", 1632 ), 1633 ( 1634 "-gen-op-interface-defs", 1635 "include/mlir/Dialect/LLVMIR/LLVMOpsInterfaces.cpp.inc", 1636 ), 1637 ], 1638 tblgen = ":mlir-tblgen", 1639 td_file = "include/mlir/Dialect/LLVMIR/LLVMOpsInterfaces.td", 1640 td_srcs = [":LLVMOpsTdFiles"], 1641) 1642 1643cc_library( 1644 name = "LLVMDialect", 1645 srcs = glob( 1646 [ 1647 "lib/Dialect/LLVMIR/IR/*.cpp", 1648 "lib/Dialect/LLVMIR/IR/*.h", 1649 ], 1650 exclude = [ 1651 "lib/Dialect/LLVMIR/IR/*AVX512*.cpp", 1652 "lib/Dialect/LLVMIR/IR/*AVX512*.h", 1653 "lib/Dialect/LLVMIR/IR/*ArmNeon*.cpp", 1654 "lib/Dialect/LLVMIR/IR/*ArmNeon*.h", 1655 "lib/Dialect/LLVMIR/IR/*ArmSVE*.cpp", 1656 "lib/Dialect/LLVMIR/IR/*ArmSVE*.h", 1657 "lib/Dialect/LLVMIR/IR/NVVM*.cpp", 1658 "lib/Dialect/LLVMIR/IR/NVVM*.h", 1659 "lib/Dialect/LLVMIR/IR/ROCDL*.cpp", 1660 "lib/Dialect/LLVMIR/IR/ROCDL*.h", 1661 ], 1662 ), 1663 hdrs = glob( 1664 ["include/mlir/Dialect/LLVMIR/*.h"], 1665 exclude = [ 1666 "include/mlir/Dialect/LLVMIR/*AVX512*.h", 1667 "include/mlir/Dialect/LLVMIR/*ArmNeon*.h", 1668 "include/mlir/Dialect/LLVMIR/*ArmSVE*.h", 1669 "include/mlir/Dialect/LLVMIR/NVVM*.h", 1670 "include/mlir/Dialect/LLVMIR/ROCDL*.h", 1671 ], 1672 ), 1673 includes = ["include"], 1674 deps = [ 1675 ":ControlFlowInterfaces", 1676 ":IR", 1677 ":LLVMDialectInterfaceIncGen", 1678 ":LLVMOpsIncGen", 1679 ":SideEffectInterfaces", 1680 ":Support", 1681 "@llvm-project//llvm:AsmParser", 1682 "@llvm-project//llvm:BitReader", 1683 "@llvm-project//llvm:BitWriter", 1684 "@llvm-project//llvm:Core", 1685 "@llvm-project//llvm:Support", 1686 ], 1687) 1688 1689gentbl( 1690 name = "LLVMPassIncGen", 1691 strip_include_prefix = "include", 1692 tbl_outs = [ 1693 ( 1694 "-gen-pass-decls -name LLVM", 1695 "include/mlir/Dialect/LLVMIR/Transforms/Passes.h.inc", 1696 ), 1697 ], 1698 tblgen = ":mlir-tblgen", 1699 td_file = "include/mlir/Dialect/LLVMIR/Transforms/Passes.td", 1700 td_srcs = [":PassBaseTdFiles"], 1701) 1702 1703cc_library( 1704 name = "LLVMIRTransforms", 1705 srcs = glob([ 1706 "lib/Dialect/LLVMIR/Transforms/*.cpp", 1707 "lib/Dialect/LLVMIR/Transforms/*.h", 1708 ]), 1709 hdrs = glob(["include/mlir/Dialect/LLVMIR/Transforms/*.h"]), 1710 includes = ["include"], 1711 deps = [ 1712 ":IR", 1713 ":LLVMDialect", 1714 ":LLVMPassIncGen", 1715 ":Pass", 1716 ], 1717) 1718 1719filegroup( 1720 name = "GPUOpsTdFiles", 1721 srcs = [ 1722 "include/mlir/Dialect/GPU/GPUBase.td", 1723 "include/mlir/Dialect/GPU/GPUOps.td", 1724 "include/mlir/Dialect/LLVMIR/LLVMOpBase.td", 1725 "include/mlir/IR/SymbolInterfaces.td", 1726 ":OpBaseTdFiles", 1727 ":SideEffectTdFiles", 1728 ], 1729) 1730 1731gentbl( 1732 name = "ParallelLoopMapperAttrGen", 1733 strip_include_prefix = "include", 1734 tbl_outs = [ 1735 ( 1736 "-gen-struct-attr-decls", 1737 "include/mlir/Dialect/GPU/ParallelLoopMapperAttr.h.inc", 1738 ), 1739 ( 1740 "-gen-struct-attr-defs", 1741 "include/mlir/Dialect/GPU/ParallelLoopMapperAttr.cpp.inc", 1742 ), 1743 ( 1744 "-gen-enum-decls", 1745 "include/mlir/Dialect/GPU/ParallelLoopMapperEnums.h.inc", 1746 ), 1747 ( 1748 "-gen-enum-defs", 1749 "include/mlir/Dialect/GPU/ParallelLoopMapperEnums.cpp.inc", 1750 ), 1751 ], 1752 tblgen = ":mlir-tblgen", 1753 td_file = "include/mlir/Dialect/GPU/ParallelLoopMapperAttr.td", 1754 td_srcs = [ 1755 ":GPUOpsTdFiles", 1756 ":AffineOpsTdFiles", 1757 ], 1758) 1759 1760gentbl( 1761 name = "GPUBaseIncGen", 1762 strip_include_prefix = "include", 1763 tbl_outs = [ 1764 ( 1765 "-gen-dialect-decls -dialect=gpu", 1766 "include/mlir/Dialect/GPU/GPUOpsDialect.h.inc", 1767 ), 1768 ( 1769 "-gen-op-interface-decls", 1770 "include/mlir/Dialect/GPU/GPUOpInterfaces.h.inc", 1771 ), 1772 ( 1773 "-gen-op-interface-defs", 1774 "include/mlir/Dialect/GPU/GPUOpInterfaces.cpp.inc", 1775 ), 1776 ], 1777 tblgen = ":mlir-tblgen", 1778 td_file = "include/mlir/Dialect/GPU/GPUBase.td", 1779 td_srcs = [":GPUOpsTdFiles"], 1780) 1781 1782gentbl( 1783 name = "GPUOpsIncGen", 1784 strip_include_prefix = "include", 1785 tbl_outs = [ 1786 ( 1787 "-gen-op-decls", 1788 "include/mlir/Dialect/GPU/GPUOps.h.inc", 1789 ), 1790 ( 1791 "-gen-op-defs", 1792 "include/mlir/Dialect/GPU/GPUOps.cpp.inc", 1793 ), 1794 ], 1795 tblgen = ":mlir-tblgen", 1796 td_file = "include/mlir/Dialect/GPU/GPUOps.td", 1797 td_srcs = [":GPUOpsTdFiles"], 1798) 1799 1800cc_library( 1801 name = "GPUDialect", 1802 srcs = glob( 1803 [ 1804 "lib/Dialect/GPU/IR/*.cpp", 1805 "lib/Dialect/GPU/IR/*.h", 1806 ], 1807 ), 1808 hdrs = glob([ 1809 "include/mlir/Dialect/GPU/GPUDialect.h", 1810 ]), 1811 includes = ["include"], 1812 deps = [ 1813 ":GPUBaseIncGen", 1814 ":GPUOpsIncGen", 1815 ":IR", 1816 ":LLVMDialect", 1817 ":SideEffectInterfaces", 1818 ":StandardOps", 1819 ":Support", 1820 "@llvm-project//llvm:Support", 1821 ], 1822) 1823 1824gentbl( 1825 name = "GPUPassIncGen", 1826 strip_include_prefix = "include", 1827 tbl_outs = [ 1828 ( 1829 "-gen-pass-decls -name GPU", 1830 "include/mlir/Dialect/GPU/Passes.h.inc", 1831 ), 1832 ], 1833 tblgen = ":mlir-tblgen", 1834 td_file = "include/mlir/Dialect/GPU/Passes.td", 1835 td_srcs = [":PassBaseTdFiles"], 1836) 1837 1838cc_library( 1839 name = "GPUTransforms", 1840 srcs = glob( 1841 [ 1842 "lib/Dialect/GPU/Transforms/*.cpp", 1843 "lib/Dialect/GPU/Transforms/*.h", 1844 ], 1845 ), 1846 hdrs = [ 1847 "include/mlir/Dialect/GPU/MemoryPromotion.h", 1848 "include/mlir/Dialect/GPU/ParallelLoopMapper.h", 1849 "include/mlir/Dialect/GPU/Passes.h", 1850 "include/mlir/Dialect/GPU/Utils.h", 1851 ], 1852 includes = ["include"], 1853 deps = [ 1854 ":Async", 1855 ":EDSC", 1856 ":GPUDialect", 1857 ":GPUPassIncGen", 1858 ":IR", 1859 ":ParallelLoopMapperAttrGen", 1860 ":Pass", 1861 ":SCFDialect", 1862 ":StandardOps", 1863 ":Support", 1864 ":Transforms", 1865 "@llvm-project//llvm:Support", 1866 ], 1867) 1868 1869filegroup( 1870 name = "LLVMOpsTdFiles", 1871 srcs = [ 1872 "include/mlir/Dialect/LLVMIR/LLVMOpBase.td", 1873 "include/mlir/Dialect/LLVMIR/LLVMOps.td", 1874 "include/mlir/Dialect/LLVMIR/LLVMOpsInterfaces.td", 1875 "include/mlir/IR/SymbolInterfaces.td", 1876 "include/mlir/Interfaces/ControlFlowInterfaces.td", 1877 ":OpBaseTdFiles", 1878 ":SideEffectTdFiles", 1879 ], 1880) 1881 1882cc_library( 1883 name = "GPUCommonTransforms", 1884 srcs = [ 1885 "lib/Conversion/GPUCommon/GPUOpsLowering.cpp", 1886 ], 1887 hdrs = [ 1888 "lib/Conversion/GPUCommon/GPUOpsLowering.h", 1889 "lib/Conversion/GPUCommon/IndexIntrinsicsOpLowering.h", 1890 "lib/Conversion/GPUCommon/OpToFuncCallLowering.h", 1891 ], 1892 deps = [ 1893 ":GPUDialect", 1894 ":IR", 1895 ":LLVMDialect", 1896 ":StandardOps", 1897 ":StandardToLLVM", 1898 "@llvm-project//llvm:Support", 1899 ], 1900) 1901 1902gentbl( 1903 name = "GPUToNVVMGen", 1904 strip_include_prefix = "lib/Conversion/GPUToNVVM", 1905 tbl_outs = [ 1906 ( 1907 "-gen-rewriters", 1908 "lib/Conversion/GPUToNVVM/GPUToNVVM.cpp.inc", 1909 ), 1910 ], 1911 tblgen = ":mlir-tblgen", 1912 td_file = "lib/Conversion/GPUToNVVM/GPUToNVVM.td", 1913 td_srcs = [ 1914 ":GPUOpsTdFiles", 1915 ":NVVMOpsTdFiles", 1916 ], 1917) 1918 1919cc_library( 1920 name = "GPUToNVVMTransforms", 1921 srcs = glob([ 1922 "lib/Conversion/GPUToNVVM/*.cpp", 1923 "lib/Conversion/GPUToNVVM/*.h", 1924 ]) + ["lib/Conversion/PassDetail.h"], 1925 hdrs = glob([ 1926 "include/mlir/Conversion/GPUToNVVM/*.h", 1927 ]), 1928 includes = ["include"], 1929 deps = [ 1930 ":ConversionPassIncGen", 1931 ":GPUCommonTransforms", 1932 ":GPUDialect", 1933 ":GPUToNVVMGen", 1934 ":GPUTransforms", 1935 ":IR", 1936 ":MathDialect", 1937 ":NVVMDialect", 1938 ":Pass", 1939 ":StandardToLLVM", 1940 ":Transforms", 1941 "@llvm-project//llvm:Support", 1942 ], 1943) 1944 1945cc_library( 1946 name = "VectorToROCDL", 1947 srcs = [ 1948 "lib/Conversion/PassDetail.h", 1949 "lib/Conversion/VectorToROCDL/VectorToROCDL.cpp", 1950 ], 1951 hdrs = ["include/mlir/Conversion/VectorToROCDL/VectorToROCDL.h"], 1952 includes = ["include"], 1953 deps = [ 1954 ":ConversionPassIncGen", 1955 ":GPUDialect", 1956 ":LLVMDialect", 1957 ":Pass", 1958 ":ROCDLDialect", 1959 ":StandardOps", 1960 ":StandardToLLVM", 1961 ":Transforms", 1962 ":VectorOps", 1963 ], 1964) 1965 1966cc_library( 1967 name = "VectorToSPIRV", 1968 srcs = glob([ 1969 "lib/Conversion/VectorToSPIRV/*.cpp", 1970 "lib/Conversion/VectorToSPIRV/*.h", 1971 ]) + ["lib/Conversion/PassDetail.h"], 1972 hdrs = glob([ 1973 "include/mlir/Conversion/VectorToSPIRV/*.h", 1974 ]), 1975 includes = ["include"], 1976 deps = [ 1977 ":ConversionPassIncGen", 1978 ":Pass", 1979 ":SPIRVConversion", 1980 ":SPIRVDialect", 1981 ":Transforms", 1982 ":VectorOps", 1983 ], 1984) 1985 1986gentbl( 1987 name = "GPUToROCDLTGen", 1988 strip_include_prefix = "lib/Conversion/GPUToROCDL", 1989 tbl_outs = [ 1990 ( 1991 "-gen-rewriters", 1992 "lib/Conversion/GPUToROCDL/GPUToROCDL.cpp.inc", 1993 ), 1994 ], 1995 tblgen = ":mlir-tblgen", 1996 td_file = "lib/Conversion/GPUToROCDL/GPUToROCDL.td", 1997 td_srcs = [ 1998 ":GPUOpsTdFiles", 1999 ":ROCDLOpsTdFiles", 2000 ], 2001) 2002 2003cc_library( 2004 name = "GPUToROCDLTransforms", 2005 srcs = [ 2006 "lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp", 2007 "lib/Conversion/PassDetail.h", 2008 ], 2009 hdrs = ["include/mlir/Conversion/GPUToROCDL/GPUToROCDLPass.h"], 2010 includes = ["include"], 2011 deps = [ 2012 ":ConversionPassIncGen", 2013 ":GPUCommonTransforms", 2014 ":GPUDialect", 2015 ":GPUToROCDLTGen", 2016 ":GPUTransforms", 2017 ":MathDialect", 2018 ":Pass", 2019 ":ROCDLDialect", 2020 ":StandardToLLVM", 2021 ":Transforms", 2022 ":VectorOps", 2023 ":VectorToLLVM", 2024 ":VectorToROCDL", 2025 ":VectorToSCF", 2026 "@llvm-project//llvm:Support", 2027 ], 2028) 2029 2030cc_library( 2031 name = "GPUToVulkanTransforms", 2032 srcs = [ 2033 "lib/Conversion/GPUToVulkan/ConvertGPULaunchFuncToVulkanLaunchFunc.cpp", 2034 "lib/Conversion/GPUToVulkan/ConvertLaunchFuncToVulkanCalls.cpp", 2035 "lib/Conversion/PassDetail.h", 2036 ], 2037 hdrs = ["include/mlir/Conversion/GPUToVulkan/ConvertGPUToVulkanPass.h"], 2038 includes = ["include"], 2039 deps = [ 2040 ":ConversionPassIncGen", 2041 ":GPUDialect", 2042 ":IR", 2043 ":LLVMDialect", 2044 ":Pass", 2045 ":SPIRVDialect", 2046 ":SPIRVSerialization", 2047 ":StandardOps", 2048 ":Support", 2049 "@llvm-project//llvm:Support", 2050 ], 2051) 2052 2053cc_library( 2054 name = "GPUToGPURuntimeTransforms", 2055 srcs = [ 2056 "lib/Conversion/GPUCommon/ConvertKernelFuncToBlob.cpp", 2057 "lib/Conversion/GPUCommon/ConvertLaunchFuncToRuntimeCalls.cpp", 2058 "lib/Conversion/PassDetail.h", 2059 ], 2060 hdrs = ["include/mlir/Conversion/GPUCommon/GPUCommonPass.h"], 2061 includes = ["include"], 2062 deps = [ 2063 ":AsyncToLLVM", 2064 ":ConversionPassIncGen", 2065 ":GPUDialect", 2066 ":IR", 2067 ":LLVMDialect", 2068 ":NVVMToLLVMIRTranslation", 2069 ":Pass", 2070 ":StandardToLLVM", 2071 ":Support", 2072 "@llvm-project//llvm:Core", 2073 "@llvm-project//llvm:NVPTXCodeGen", 2074 "@llvm-project//llvm:Support", 2075 "@llvm-project//llvm:Target", 2076 ], 2077) 2078 2079gentbl( 2080 name = "GPUToSPIRVIncGen", 2081 strip_include_prefix = "lib/Conversion/GPUToSPIRV", 2082 tbl_outs = [ 2083 ( 2084 "-gen-rewriters", 2085 "lib/Conversion/GPUToSPIRV/GPUToSPIRV.cpp.inc", 2086 ), 2087 ], 2088 tblgen = ":mlir-tblgen", 2089 td_file = "lib/Conversion/GPUToSPIRV/GPUToSPIRV.td", 2090 td_srcs = [ 2091 ":GPUOpsTdFiles", 2092 ":SPIRVOpsTdFiles", 2093 ], 2094) 2095 2096cc_library( 2097 name = "GPUToSPIRV", 2098 srcs = glob([ 2099 "lib/Conversion/GPUToSPIRV/*.cpp", 2100 "lib/Conversion/GPUToSPIRV/*.h", 2101 ]) + ["lib/Conversion/PassDetail.h"], 2102 hdrs = glob([ 2103 "include/mlir/Conversion/GPUToSPIRV/*.h", 2104 ]), 2105 includes = [ 2106 "include", 2107 "lib/Conversions/GPUToSPIRV", 2108 ], 2109 deps = [ 2110 ":ConversionPassIncGen", 2111 ":GPUDialect", 2112 ":GPUToSPIRVIncGen", 2113 ":IR", 2114 ":Pass", 2115 ":SCFDialect", 2116 ":SCFToSPIRV", 2117 ":SPIRVConversion", 2118 ":SPIRVDialect", 2119 ":StandardToSPIRV", 2120 ":Support", 2121 ":Transforms", 2122 ":VectorToSPIRV", 2123 "@llvm-project//llvm:Support", 2124 ], 2125) 2126 2127cc_library( 2128 name = "PDLToPDLInterp", 2129 srcs = glob([ 2130 "lib/Conversion/PDLToPDLInterp/*.cpp", 2131 "lib/Conversion/PDLToPDLInterp/*.h", 2132 ]) + ["lib/Conversion/PassDetail.h"], 2133 hdrs = ["include/mlir/Conversion/PDLToPDLInterp/PDLToPDLInterp.h"], 2134 includes = ["include"], 2135 deps = [ 2136 ":ConversionPassIncGen", 2137 ":IR", 2138 ":InferTypeOpInterface", 2139 ":PDLDialect", 2140 ":PDLInterpDialect", 2141 ":Pass", 2142 ":Support", 2143 "@llvm-project//llvm:Support", 2144 ], 2145) 2146 2147cc_library( 2148 name = "SPIRVToLLVM", 2149 srcs = glob([ 2150 "lib/Conversion/SPIRVToLLVM/*.cpp", 2151 ]) + ["lib/Conversion/PassDetail.h"], 2152 hdrs = glob([ 2153 "include/mlir/Conversion/SPIRVToLLVM/*.h", 2154 ]), 2155 includes = ["include"], 2156 deps = [ 2157 ":ConversionPassIncGen", 2158 ":GPUDialect", 2159 ":IR", 2160 ":LLVMDialect", 2161 ":Pass", 2162 ":SPIRVDialect", 2163 ":SPIRVUtils", 2164 ":StandardOps", 2165 ":StandardToLLVM", 2166 ":Support", 2167 ":Transforms", 2168 "@llvm-project//llvm:Support", 2169 ], 2170) 2171 2172gentbl( 2173 name = "LLVMOpsIncGen", 2174 strip_include_prefix = "include", 2175 tbl_outs = [ 2176 ( 2177 "-gen-op-decls", 2178 "include/mlir/Dialect/LLVMIR/LLVMOps.h.inc", 2179 ), 2180 ( 2181 "-gen-op-defs", 2182 "include/mlir/Dialect/LLVMIR/LLVMOps.cpp.inc", 2183 ), 2184 ( 2185 "-gen-dialect-decls", 2186 "include/mlir/Dialect/LLVMIR/LLVMOpsDialect.h.inc", 2187 ), 2188 ( 2189 "-gen-enum-decls", 2190 "include/mlir/Dialect/LLVMIR/LLVMOpsEnums.h.inc", 2191 ), 2192 ( 2193 "-gen-enum-defs", 2194 "include/mlir/Dialect/LLVMIR/LLVMOpsEnums.cpp.inc", 2195 ), 2196 ], 2197 tblgen = ":mlir-tblgen", 2198 td_file = "include/mlir/Dialect/LLVMIR/LLVMOps.td", 2199 td_srcs = [":LLVMOpsTdFiles"], 2200) 2201 2202gentbl( 2203 name = "LLVMConversionIncGen", 2204 strip_include_prefix = "include", 2205 tbl_outs = [ 2206 ( 2207 "-gen-llvmir-conversions", 2208 "include/mlir/Dialect/LLVMIR/LLVMConversions.inc", 2209 ), 2210 ( 2211 "-gen-enum-to-llvmir-conversions", 2212 "include/mlir/Dialect/LLVMIR/LLVMConversionEnumsToLLVM.inc", 2213 ), 2214 ( 2215 "-gen-enum-from-llvmir-conversions", 2216 "include/mlir/Dialect/LLVMIR/LLVMConversionEnumsFromLLVM.inc", 2217 ), 2218 ], 2219 tblgen = ":mlir-tblgen", 2220 td_file = "include/mlir/Dialect/LLVMIR/LLVMOps.td", 2221 td_srcs = [":LLVMOpsTdFiles"], 2222) 2223 2224cc_library( 2225 name = "NVVMDialect", 2226 srcs = ["lib/Dialect/LLVMIR/IR/NVVMDialect.cpp"], 2227 hdrs = ["include/mlir/Dialect/LLVMIR/NVVMDialect.h"], 2228 includes = ["include"], 2229 deps = [ 2230 ":IR", 2231 ":LLVMDialect", 2232 ":NVVMOpsIncGen", 2233 ":SideEffectInterfaces", 2234 ":StandardOps", 2235 ":Support", 2236 "@llvm-project//llvm:AsmParser", 2237 "@llvm-project//llvm:Core", 2238 "@llvm-project//llvm:Support", 2239 ], 2240) 2241 2242filegroup( 2243 name = "NVVMOpsTdFiles", 2244 srcs = [ 2245 "include/mlir/Dialect/LLVMIR/LLVMOpBase.td", 2246 "include/mlir/Dialect/LLVMIR/NVVMOps.td", 2247 ":OpBaseTdFiles", 2248 ":SideEffectTdFiles", 2249 ], 2250) 2251 2252gentbl( 2253 name = "NVVMOpsIncGen", 2254 strip_include_prefix = "include", 2255 tbl_outs = [ 2256 ( 2257 "-gen-op-decls", 2258 "include/mlir/Dialect/LLVMIR/NVVMOps.h.inc", 2259 ), 2260 ( 2261 "-gen-op-defs", 2262 "include/mlir/Dialect/LLVMIR/NVVMOps.cpp.inc", 2263 ), 2264 ( 2265 "-gen-dialect-decls -dialect=nvvm", 2266 "include/mlir/Dialect/LLVMIR/NVVMOpsDialect.h.inc", 2267 ), 2268 ], 2269 tblgen = ":mlir-tblgen", 2270 td_file = "include/mlir/Dialect/LLVMIR/NVVMOps.td", 2271 td_srcs = [":NVVMOpsTdFiles"], 2272) 2273 2274gentbl( 2275 name = "NVVMConversionIncGen", 2276 strip_include_prefix = "include", 2277 tbl_outs = [ 2278 ( 2279 "-gen-llvmir-conversions", 2280 "include/mlir/Dialect/LLVMIR/NVVMConversions.inc", 2281 ), 2282 ], 2283 tblgen = ":mlir-tblgen", 2284 td_file = "include/mlir/Dialect/LLVMIR/NVVMOps.td", 2285 td_srcs = [":NVVMOpsTdFiles"], 2286) 2287 2288cc_library( 2289 name = "ROCDLDialect", 2290 srcs = ["lib/Dialect/LLVMIR/IR/ROCDLDialect.cpp"], 2291 hdrs = ["include/mlir/Dialect/LLVMIR/ROCDLDialect.h"], 2292 includes = ["include"], 2293 deps = [ 2294 ":IR", 2295 ":LLVMDialect", 2296 ":ROCDLOpsIncGen", 2297 ":SideEffectInterfaces", 2298 ":StandardOps", 2299 ":Support", 2300 "@llvm-project//llvm:AsmParser", 2301 "@llvm-project//llvm:Core", 2302 "@llvm-project//llvm:Support", 2303 ], 2304) 2305 2306filegroup( 2307 name = "ROCDLOpsTdFiles", 2308 srcs = [ 2309 "include/mlir/Dialect/LLVMIR/LLVMOpBase.td", 2310 "include/mlir/Dialect/LLVMIR/ROCDLOps.td", 2311 ":OpBaseTdFiles", 2312 ":SideEffectTdFiles", 2313 ], 2314) 2315 2316gentbl( 2317 name = "ROCDLOpsIncGen", 2318 strip_include_prefix = "include", 2319 tbl_outs = [ 2320 ( 2321 "-gen-op-decls", 2322 "include/mlir/Dialect/LLVMIR/ROCDLOps.h.inc", 2323 ), 2324 ( 2325 "-gen-op-defs", 2326 "include/mlir/Dialect/LLVMIR/ROCDLOps.cpp.inc", 2327 ), 2328 ( 2329 "-gen-dialect-decls -dialect=rocdl", 2330 "include/mlir/Dialect/LLVMIR/ROCDLOpsDialect.h.inc", 2331 ), 2332 ], 2333 tblgen = ":mlir-tblgen", 2334 td_file = "include/mlir/Dialect/LLVMIR/ROCDLOps.td", 2335 td_srcs = [":ROCDLOpsTdFiles"], 2336) 2337 2338gentbl( 2339 name = "ROCDLConversionIncGen", 2340 strip_include_prefix = "include", 2341 tbl_outs = [ 2342 ( 2343 "-gen-llvmir-conversions", 2344 "include/mlir/Dialect/LLVMIR/ROCDLConversions.inc", 2345 ), 2346 ], 2347 tblgen = ":mlir-tblgen", 2348 td_file = "include/mlir/Dialect/LLVMIR/ROCDLOps.td", 2349 td_srcs = [":ROCDLOpsTdFiles"], 2350) 2351 2352cc_library( 2353 name = "PDLDialect", 2354 srcs = glob([ 2355 "lib/Dialect/PDL/IR/*.cpp", 2356 "lib/Dialect/PDL/IR/*.h", 2357 ]), 2358 hdrs = glob([ 2359 "include/mlir/Dialect/PDL/IR/*.h", 2360 ]), 2361 includes = ["include"], 2362 deps = [ 2363 ":IR", 2364 ":InferTypeOpInterface", 2365 ":PDLOpsIncGen", 2366 ":PDLTypesIncGen", 2367 ":SideEffects", 2368 ":Support", 2369 "@llvm-project//llvm:Support", 2370 ], 2371) 2372 2373filegroup( 2374 name = "PDLOpsTdFiles", 2375 srcs = [ 2376 "include/mlir/Dialect/PDL/IR/PDLDialect.td", 2377 "include/mlir/Dialect/PDL/IR/PDLOps.td", 2378 "include/mlir/Dialect/PDL/IR/PDLTypes.td", 2379 "include/mlir/IR/SymbolInterfaces.td", 2380 ":OpBaseTdFiles", 2381 ":SideEffectTdFiles", 2382 ], 2383) 2384 2385gentbl( 2386 name = "PDLOpsIncGen", 2387 strip_include_prefix = "include", 2388 tbl_outs = [ 2389 ( 2390 "-gen-op-decls", 2391 "include/mlir/Dialect/PDL/IR/PDLOps.h.inc", 2392 ), 2393 ( 2394 "-gen-op-defs", 2395 "include/mlir/Dialect/PDL/IR/PDLOps.cpp.inc", 2396 ), 2397 ( 2398 "-gen-dialect-decls", 2399 "include/mlir/Dialect/PDL/IR/PDLOpsDialect.h.inc", 2400 ), 2401 ], 2402 tblgen = ":mlir-tblgen", 2403 td_file = "include/mlir/Dialect/PDL/IR/PDLOps.td", 2404 td_srcs = [":PDLOpsTdFiles"], 2405) 2406 2407gentbl( 2408 name = "PDLTypesIncGen", 2409 strip_include_prefix = "include", 2410 tbl_outs = [ 2411 ( 2412 "-gen-typedef-decls", 2413 "include/mlir/Dialect/PDL/IR/PDLOpsTypes.h.inc", 2414 ), 2415 ( 2416 "-gen-typedef-defs", 2417 "include/mlir/Dialect/PDL/IR/PDLOpsTypes.cpp.inc", 2418 ), 2419 ], 2420 tblgen = ":mlir-tblgen", 2421 td_file = "include/mlir/Dialect/PDL/IR/PDLTypes.td", 2422 td_srcs = [ 2423 ":OpBaseTdFiles", 2424 "include/mlir/Dialect/PDL/IR/PDLDialect.td", 2425 "include/mlir/Dialect/PDL/IR/PDLTypes.td", 2426 ], 2427) 2428 2429cc_library( 2430 name = "PDLInterpDialect", 2431 srcs = glob([ 2432 "lib/Dialect/PDLInterp/IR/*.cpp", 2433 "lib/Dialect/PDLInterp/IR/*.h", 2434 ]), 2435 hdrs = glob([ 2436 "include/mlir/Dialect/PDLInterp/IR/*.h", 2437 ]), 2438 includes = ["include"], 2439 deps = [ 2440 ":IR", 2441 ":InferTypeOpInterface", 2442 ":PDLDialect", 2443 ":PDLInterpOpsIncGen", 2444 ":SideEffects", 2445 ":Support", 2446 "@llvm-project//llvm:Support", 2447 ], 2448) 2449 2450filegroup( 2451 name = "PDLInterpOpsTdFiles", 2452 srcs = [ 2453 "include/mlir/Dialect/PDL/IR/PDLDialect.td", 2454 "include/mlir/Dialect/PDL/IR/PDLTypes.td", 2455 "include/mlir/Dialect/PDLInterp/IR/PDLInterpOps.td", 2456 ":OpBaseTdFiles", 2457 ":SideEffectTdFiles", 2458 ], 2459) 2460 2461gentbl( 2462 name = "PDLInterpOpsIncGen", 2463 strip_include_prefix = "include", 2464 tbl_outs = [ 2465 ( 2466 "-gen-op-decls", 2467 "include/mlir/Dialect/PDLInterp/IR/PDLInterpOps.h.inc", 2468 ), 2469 ( 2470 "-gen-op-defs", 2471 "include/mlir/Dialect/PDLInterp/IR/PDLInterpOps.cpp.inc", 2472 ), 2473 ( 2474 "-gen-dialect-decls -dialect=pdl_interp", 2475 "include/mlir/Dialect/PDLInterp/IR/PDLInterpOpsDialect.h.inc", 2476 ), 2477 ], 2478 tblgen = ":mlir-tblgen", 2479 td_file = "include/mlir/Dialect/PDLInterp/IR/PDLInterpOps.td", 2480 td_srcs = [":PDLInterpOpsTdFiles"], 2481) 2482 2483# TODO(gcmn): Update SPIRV dependencies so that they map better to cmake files. 2484filegroup( 2485 name = "SPIRVOpsTdFiles", 2486 srcs = [ 2487 "include/mlir/IR/SymbolInterfaces.td", 2488 "include/mlir/Interfaces/CallInterfaces.td", 2489 "include/mlir/Interfaces/ControlFlowInterfaces.td", 2490 ":SideEffectTdFiles", 2491 ":OpBaseTdFiles", 2492 ] + glob(["include/mlir/Dialect/SPIRV/IR/*.td"]), 2493) 2494 2495gentbl( 2496 name = "SPIRVOpsIncGen", 2497 strip_include_prefix = "include", 2498 tbl_outs = [ 2499 ( 2500 "-gen-op-decls", 2501 "include/mlir/Dialect/SPIRV/IR/SPIRVOps.h.inc", 2502 ), 2503 ( 2504 "-gen-op-defs", 2505 "include/mlir/Dialect/SPIRV/IR/SPIRVOps.cpp.inc", 2506 ), 2507 ( 2508 "-gen-dialect-decls", 2509 "include/mlir/Dialect/SPIRV/IR/SPIRVOpsDialect.h.inc", 2510 ), 2511 ( 2512 "-gen-op-doc", 2513 "g3doc/Dialects/SPIRV/SPIRVOps.md", 2514 ), 2515 ( 2516 "-gen-enum-decls", 2517 "include/mlir/Dialect/SPIRV/IR/SPIRVEnums.h.inc", 2518 ), 2519 ( 2520 "-gen-enum-defs", 2521 "include/mlir/Dialect/SPIRV/IR/SPIRVEnums.cpp.inc", 2522 ), 2523 ( 2524 "-gen-spirv-enum-avail-decls", 2525 "include/mlir/Dialect/SPIRV/IR/SPIRVEnumAvailability.h.inc", 2526 ), 2527 ( 2528 "-gen-spirv-enum-avail-defs", 2529 "include/mlir/Dialect/SPIRV/IR/SPIRVEnumAvailability.cpp.inc", 2530 ), 2531 ( 2532 "-gen-spirv-capability-implication", 2533 "include/mlir/Dialect/SPIRV/IR/SPIRVCapabilityImplication.inc", 2534 ), 2535 ], 2536 tblgen = ":mlir-tblgen", 2537 td_file = "include/mlir/Dialect/SPIRV/IR/SPIRVOps.td", 2538 td_srcs = [":SPIRVOpsTdFiles"], 2539) 2540 2541gentbl( 2542 name = "SPIRVCanonicalizationIncGen", 2543 strip_include_prefix = "lib/Dialect/SPIRV/IR", 2544 tbl_outs = [ 2545 ( 2546 "-gen-rewriters", 2547 "lib/Dialect/SPIRV/IR/SPIRVCanonicalization.inc", 2548 ), 2549 ], 2550 tblgen = ":mlir-tblgen", 2551 td_file = "lib/Dialect/SPIRV/IR/SPIRVCanonicalization.td", 2552 td_srcs = [ 2553 ":SPIRVOpsTdFiles", 2554 "lib/Dialect/SPIRV/IR/SPIRVCanonicalization.td", 2555 ], 2556) 2557 2558gentbl( 2559 name = "SPIRVAvailabilityIncGen", 2560 strip_include_prefix = "include", 2561 tbl_outs = [ 2562 ( 2563 "-gen-avail-interface-decls", 2564 "include/mlir/Dialect/SPIRV/IR/SPIRVAvailability.h.inc", 2565 ), 2566 ( 2567 "-gen-avail-interface-defs", 2568 "include/mlir/Dialect/SPIRV/IR/SPIRVAvailability.cpp.inc", 2569 ), 2570 ( 2571 "-gen-spirv-avail-impls", 2572 "include/mlir/Dialect/SPIRV/IR/SPIRVOpAvailabilityImpl.inc", 2573 ), 2574 ], 2575 tblgen = ":mlir-tblgen", 2576 td_file = "include/mlir/Dialect/SPIRV/IR/SPIRVOps.td", 2577 td_srcs = [":SPIRVOpsTdFiles"], 2578) 2579 2580gentbl( 2581 name = "SPIRVTargetAndABIStructGen", 2582 tbl_outs = [ 2583 ( 2584 "-gen-struct-attr-decls", 2585 "include/mlir/Dialect/SPIRV/IR/TargetAndABI.h.inc", 2586 ), 2587 ( 2588 "-gen-struct-attr-defs", 2589 "include/mlir/Dialect/SPIRV/IR/TargetAndABI.cpp.inc", 2590 ), 2591 ], 2592 tblgen = ":mlir-tblgen", 2593 td_file = "include/mlir/Dialect/SPIRV/IR/TargetAndABI.td", 2594 td_srcs = [ 2595 ":SPIRVOpsTdFiles", 2596 ":StdOpsTdFiles", 2597 ], 2598) 2599 2600gentbl( 2601 name = "SPIRVAttrUtilsGen", 2602 strip_include_prefix = "include", 2603 tbl_outs = [ 2604 ( 2605 "-gen-spirv-attr-utils", 2606 "include/mlir/Dialect/SPIRV/IR/SPIRVAttrUtils.inc", 2607 ), 2608 ], 2609 tblgen = ":mlir-tblgen", 2610 td_file = "include/mlir/Dialect/SPIRV/IR/SPIRVBase.td", 2611 td_srcs = [ 2612 ":SPIRVOpsTdFiles", 2613 ":SPIRVAvailabilityIncGen", 2614 ], 2615) 2616 2617gentbl( 2618 name = "SPIRVSerializationGen", 2619 strip_include_prefix = "include", 2620 tbl_outs = [ 2621 ( 2622 "-gen-spirv-serialization", 2623 "include/mlir/Dialect/SPIRV/IR/SPIRVSerialization.inc", 2624 ), 2625 ], 2626 tblgen = ":mlir-tblgen", 2627 td_file = "include/mlir/Dialect/SPIRV/IR/SPIRVOps.td", 2628 td_srcs = [":SPIRVOpsTdFiles"], 2629) 2630 2631cc_library( 2632 name = "SPIRVDialect", 2633 srcs = glob([ 2634 "lib/Dialect/SPIRV/IR/*.cpp", 2635 "lib/Dialect/SPIRV/IR/*.h", 2636 ]) + ["include/mlir/Transforms/InliningUtils.h"], 2637 hdrs = glob([ 2638 "include/mlir/Dialect/SPIRV/IR/*.h", 2639 ]), 2640 includes = ["include"], 2641 deps = [ 2642 ":CommonFolders", 2643 ":ControlFlowInterfaces", 2644 ":IR", 2645 ":Parser", 2646 ":Pass", 2647 ":SPIRVAttrUtilsGen", 2648 ":SPIRVAvailabilityIncGen", 2649 ":SPIRVCanonicalizationIncGen", 2650 ":SPIRVOpsIncGen", 2651 ":SPIRVSerializationGen", 2652 ":SPIRVTargetAndABIStructGen", 2653 ":SideEffectInterfaces", 2654 ":Support", 2655 ":Transforms", 2656 "@llvm-project//llvm:Support", 2657 ], 2658) 2659 2660gentbl( 2661 name = "SPIRVPassIncGen", 2662 strip_include_prefix = "include", 2663 tbl_outs = [ 2664 ( 2665 "-gen-pass-decls -name SPIRV", 2666 "include/mlir/Dialect/SPIRV/Transforms/Passes.h.inc", 2667 ), 2668 ], 2669 tblgen = ":mlir-tblgen", 2670 td_file = "include/mlir/Dialect/SPIRV/Transforms/Passes.td", 2671 td_srcs = [":PassBaseTdFiles"], 2672) 2673 2674cc_library( 2675 name = "SPIRVUtils", 2676 srcs = glob([ 2677 "lib/Dialect/SPIRV/Utils/*.cpp", 2678 ]), 2679 hdrs = glob([ 2680 "include/mlir/Dialect/SPIRV/Utils/*.h", 2681 ]), 2682 includes = ["include"], 2683 deps = [ 2684 ":SPIRVDialect", 2685 ":Support", 2686 "@llvm-project//llvm:Support", 2687 ], 2688) 2689 2690cc_library( 2691 name = "SPIRVConversion", 2692 srcs = ["lib/Dialect/SPIRV/Transforms/SPIRVConversion.cpp"], 2693 hdrs = ["include/mlir/Dialect/SPIRV/Transforms/SPIRVConversion.h"], 2694 includes = ["include"], 2695 deps = [ 2696 ":SPIRVDialect", 2697 ":Support", 2698 ":TransformUtils", 2699 "@llvm-project//llvm:Support", 2700 ], 2701) 2702 2703cc_library( 2704 name = "SPIRVTransforms", 2705 srcs = glob( 2706 [ 2707 "lib/Dialect/SPIRV/Transforms/*.cpp", 2708 "lib/Dialect/SPIRV/Transforms/*.h", 2709 ], 2710 exclude = ["lib/Dialect/SPIRV/Transforms/SPIRVConversion.cpp"], 2711 ), 2712 hdrs = glob( 2713 ["include/mlir/Dialect/SPIRV/Transforms/*.h"], 2714 exclude = ["include/mlir/Dialect/SPIRV/Transforms/SPIRVConversion.h"], 2715 ), 2716 includes = ["include"], 2717 deps = [ 2718 ":IR", 2719 ":Pass", 2720 ":SPIRVConversion", 2721 ":SPIRVDialect", 2722 ":SPIRVPassIncGen", 2723 ":SPIRVUtils", 2724 ":Support", 2725 ":Transforms", 2726 "@llvm-project//llvm:Support", 2727 ], 2728) 2729 2730cc_library( 2731 name = "StandardToSPIRV", 2732 srcs = glob([ 2733 "lib/Conversion/StandardToSPIRV/*.cpp", 2734 "lib/Conversion/StandardToSPIRV/*.h", 2735 ]) + ["lib/Conversion/PassDetail.h"], 2736 hdrs = glob([ 2737 "include/mlir/Conversion/StandardToSPIRV/*.h", 2738 ]), 2739 includes = [ 2740 "include", 2741 "lib/Conversion/StandardToSPIRV", 2742 ], 2743 deps = [ 2744 ":ConversionPassIncGen", 2745 ":IR", 2746 ":MathDialect", 2747 ":Pass", 2748 ":SPIRVConversion", 2749 ":SPIRVDialect", 2750 ":SPIRVUtils", 2751 ":StandardOps", 2752 ":Support", 2753 ":Transforms", 2754 ":VectorOps", 2755 "@llvm-project//llvm:Support", 2756 ], 2757) 2758 2759cc_library( 2760 name = "SPIRVBinaryUtils", 2761 srcs = ["lib/Target/SPIRV/SPIRVBinaryUtils.cpp"], 2762 hdrs = ["include/mlir/Target/SPIRV/SPIRVBinaryUtils.h"], 2763 includes = ["include"], 2764 deps = [ 2765 ":IR", 2766 ":SPIRVAttrUtilsGen", 2767 ":SPIRVDialect", 2768 ":SPIRVOpsIncGen", 2769 ":Support", 2770 "@llvm-project//llvm:Support", 2771 ], 2772) 2773 2774cc_library( 2775 name = "SPIRVSerialization", 2776 srcs = [ 2777 "lib/Target/SPIRV/Serialization/Serialization.cpp", 2778 "lib/Target/SPIRV/Serialization/SerializeOps.cpp", 2779 "lib/Target/SPIRV/Serialization/Serializer.cpp", 2780 "lib/Target/SPIRV/Serialization/Serializer.h", 2781 ], 2782 hdrs = ["include/mlir/Target/SPIRV/Serialization.h"], 2783 includes = ["include"], 2784 deps = [ 2785 ":IR", 2786 ":SPIRVAttrUtilsGen", 2787 ":SPIRVBinaryUtils", 2788 ":SPIRVDialect", 2789 ":SPIRVOpsIncGen", 2790 ":SPIRVSerializationGen", 2791 ":Support", 2792 ":Transforms", 2793 "@llvm-project//llvm:Support", 2794 ], 2795) 2796 2797cc_library( 2798 name = "SPIRVDeserialization", 2799 srcs = glob([ 2800 "lib/Target/SPIRV/Deserialization/*.cpp", 2801 "lib/Target/SPIRV/Deserialization/*.h", 2802 ]), 2803 hdrs = ["include/mlir/Target/SPIRV/Deserialization.h"], 2804 includes = ["include"], 2805 deps = [ 2806 ":IR", 2807 ":SPIRVAttrUtilsGen", 2808 ":SPIRVBinaryUtils", 2809 ":SPIRVDialect", 2810 ":SPIRVOpsIncGen", 2811 ":SPIRVSerializationGen", 2812 ":Support", 2813 ":Transforms", 2814 "@llvm-project//llvm:Support", 2815 ], 2816) 2817 2818cc_library( 2819 name = "SPIRVModuleCombiner", 2820 srcs = glob( 2821 ["lib/Dialect/SPIRV/Linking/ModuleCombiner/*.cpp"], 2822 ), 2823 hdrs = ["include/mlir/Dialect/SPIRV/Linking/ModuleCombiner.h"], 2824 includes = ["include"], 2825 deps = [ 2826 ":IR", 2827 ":SPIRVDialect", 2828 ":Support", 2829 "@llvm-project//llvm:Support", 2830 ], 2831) 2832 2833cc_library( 2834 name = "SPIRVTranslateRegistration", 2835 srcs = ["lib/Target/SPIRV/TranslateRegistration.cpp"], 2836 includes = ["include"], 2837 deps = [ 2838 ":IR", 2839 ":Parser", 2840 ":SPIRVDeserialization", 2841 ":SPIRVDialect", 2842 ":SPIRVSerialization", 2843 ":Support", 2844 ":Translation", 2845 "@llvm-project//llvm:Support", 2846 ], 2847) 2848 2849filegroup( 2850 name = "TensorOpsTdFiles", 2851 srcs = [ 2852 "include/mlir/Dialect/Tensor/IR/TensorBase.td", 2853 "include/mlir/Dialect/Tensor/IR/TensorOps.td", 2854 "include/mlir/Interfaces/CastInterfaces.td", 2855 "include/mlir/Interfaces/ControlFlowInterfaces.td", 2856 ":OpBaseTdFiles", 2857 ":SideEffectTdFiles", 2858 ], 2859) 2860 2861gentbl( 2862 name = "TensorBaseIncGen", 2863 strip_include_prefix = "include", 2864 tbl_outs = [ 2865 ( 2866 "-gen-dialect-decls -dialect=tensor", 2867 "include/mlir/Dialect/Tensor/IR/TensorOpsDialect.h.inc", 2868 ), 2869 ], 2870 tblgen = ":mlir-tblgen", 2871 td_file = "include/mlir/Dialect/Tensor/IR/TensorBase.td", 2872 td_srcs = [":TensorOpsTdFiles"], 2873) 2874 2875gentbl( 2876 name = "TensorOpsIncGen", 2877 strip_include_prefix = "include", 2878 tbl_outs = [ 2879 ( 2880 "-gen-op-decls", 2881 "include/mlir/Dialect/Tensor/IR/TensorOps.h.inc", 2882 ), 2883 ( 2884 "-gen-op-defs", 2885 "include/mlir/Dialect/Tensor/IR/TensorOps.cpp.inc", 2886 ), 2887 ], 2888 tblgen = ":mlir-tblgen", 2889 td_file = "include/mlir/Dialect/Tensor/IR/TensorOps.td", 2890 td_srcs = [":TensorOpsTdFiles"], 2891) 2892 2893cc_library( 2894 name = "TensorDialect", 2895 srcs = glob( 2896 [ 2897 "lib/Dialect/Tensor/IR/*.cpp", 2898 "lib/Dialect/Tensor/IR/*.h", 2899 ], 2900 ) + ["include/mlir/Transforms/InliningUtils.h"], 2901 hdrs = ["include/mlir/Dialect/Tensor/IR/Tensor.h"], 2902 includes = ["include"], 2903 deps = [ 2904 ":CastOpInterfaces", 2905 ":ControlFlowInterfaces", 2906 ":IR", 2907 ":SideEffectInterfaces", 2908 ":Support", 2909 ":TensorBaseIncGen", 2910 ":TensorOpsIncGen", 2911 "@llvm-project//llvm:Support", 2912 ], 2913) 2914 2915gentbl( 2916 name = "TensorPassIncGen", 2917 strip_include_prefix = "include", 2918 tbl_outs = [ 2919 ( 2920 "-gen-pass-decls -name Tensor", 2921 "include/mlir/Dialect/Tensor/Transforms/Passes.h.inc", 2922 ), 2923 ], 2924 tblgen = ":mlir-tblgen", 2925 td_file = "include/mlir/Dialect/Tensor/Transforms/Passes.td", 2926 td_srcs = [":PassBaseTdFiles"], 2927) 2928 2929cc_library( 2930 name = "TensorTransforms", 2931 srcs = glob( 2932 [ 2933 "lib/Dialect/Tensor/Transforms/*.cpp", 2934 "lib/Dialect/Tensor/Transforms/*.h", 2935 ], 2936 ), 2937 hdrs = ["include/mlir/Dialect/Tensor/Transforms/Passes.h"], 2938 includes = ["include"], 2939 deps = [ 2940 ":Async", 2941 ":EDSC", 2942 ":IR", 2943 ":ParallelLoopMapperAttrGen", 2944 ":Pass", 2945 ":SCFDialect", 2946 ":StandardOps", 2947 ":Support", 2948 ":TensorDialect", 2949 ":TensorPassIncGen", 2950 ":Transforms", 2951 "@llvm-project//llvm:Support", 2952 ], 2953) 2954 2955cc_library( 2956 name = "Rewrite", 2957 srcs = glob([ 2958 "lib/Rewrite/*.cpp", 2959 "lib/Rewrite/*.h", 2960 ]), 2961 hdrs = glob(["include/mlir/Rewrite/*.h"]), 2962 includes = ["include"], 2963 deps = [ 2964 ":Analysis", 2965 ":IR", 2966 ":PDLDialect", 2967 ":PDLInterpDialect", 2968 ":PDLToPDLInterp", 2969 ":Pass", 2970 ":SideEffectInterfaces", 2971 "@llvm-project//llvm:Support", 2972 ], 2973) 2974 2975cc_library( 2976 name = "TransformUtils", 2977 srcs = glob([ 2978 "lib/Transforms/Utils/*.cpp", 2979 "lib/Transforms/Utils/*.h", 2980 ]), 2981 hdrs = glob([ 2982 "include/mlir/Transforms/*.h", 2983 ]), 2984 includes = ["include"], 2985 deps = [ 2986 ":Affine", 2987 ":Analysis", 2988 ":ControlFlowInterfaces", 2989 ":IR", 2990 ":Pass", 2991 ":Rewrite", 2992 ":SCFDialect", 2993 ":SideEffectInterfaces", 2994 ":StandardOps", 2995 ":Support", 2996 ":TransformsPassIncGen", 2997 "@llvm-project//llvm:Support", 2998 ], 2999) 3000 3001gentbl( 3002 name = "DerivedAttributeOpInterfaceIncGen", 3003 strip_include_prefix = "include", 3004 tbl_outs = [ 3005 ( 3006 "-gen-op-interface-decls", 3007 "include/mlir/Interfaces/DerivedAttributeOpInterface.h.inc", 3008 ), 3009 ( 3010 "-gen-op-interface-defs", 3011 "include/mlir/Interfaces/DerivedAttributeOpInterface.cpp.inc", 3012 ), 3013 ], 3014 tblgen = ":mlir-tblgen", 3015 td_file = "include/mlir/Interfaces/DerivedAttributeOpInterface.td", 3016 td_srcs = [":OpBaseTdFiles"], 3017) 3018 3019cc_library( 3020 name = "DerivedAttributeOpInterface", 3021 srcs = ["lib/Interfaces/DerivedAttributeOpInterface.cpp"], 3022 hdrs = ["include/mlir/Interfaces/DerivedAttributeOpInterface.h"], 3023 includes = ["include"], 3024 deps = [ 3025 ":DerivedAttributeOpInterfaceIncGen", 3026 ":IR", 3027 ":Support", 3028 "@llvm-project//llvm:Support", 3029 ], 3030) 3031 3032gentbl( 3033 name = "LoopLikeInterfaceIncGen", 3034 strip_include_prefix = "include", 3035 tbl_outs = [ 3036 ( 3037 "-gen-op-interface-decls", 3038 "include/mlir/Interfaces/LoopLikeInterface.h.inc", 3039 ), 3040 ( 3041 "-gen-op-interface-defs", 3042 "include/mlir/Interfaces/LoopLikeInterface.cpp.inc", 3043 ), 3044 ], 3045 tblgen = ":mlir-tblgen", 3046 td_file = "include/mlir/Interfaces/LoopLikeInterface.td", 3047 td_srcs = [":OpBaseTdFiles"], 3048) 3049 3050gentbl( 3051 name = "VectorInterfacesIncGen", 3052 strip_include_prefix = "include", 3053 tbl_outs = [ 3054 ( 3055 "-gen-op-interface-decls", 3056 "include/mlir/Interfaces/VectorInterfaces.h.inc", 3057 ), 3058 ( 3059 "-gen-op-interface-defs", 3060 "include/mlir/Interfaces/VectorInterfaces.cpp.inc", 3061 ), 3062 ], 3063 tblgen = ":mlir-tblgen", 3064 td_file = "include/mlir/Interfaces/VectorInterfaces.td", 3065 td_srcs = [":OpBaseTdFiles"], 3066) 3067 3068gentbl( 3069 name = "ViewLikeInterfaceIncGen", 3070 strip_include_prefix = "include", 3071 tbl_outs = [ 3072 ( 3073 "-gen-op-interface-decls", 3074 "include/mlir/Interfaces/ViewLikeInterface.h.inc", 3075 ), 3076 ( 3077 "-gen-op-interface-defs", 3078 "include/mlir/Interfaces/ViewLikeInterface.cpp.inc", 3079 ), 3080 ], 3081 tblgen = ":mlir-tblgen", 3082 td_file = "include/mlir/Interfaces/ViewLikeInterface.td", 3083 td_srcs = [":OpBaseTdFiles"], 3084) 3085 3086gentbl( 3087 name = "CopyOpInterfaceIncGen", 3088 strip_include_prefix = "include", 3089 tbl_outs = [ 3090 ( 3091 "-gen-op-interface-decls", 3092 "include/mlir/Interfaces/CopyOpInterface.h.inc", 3093 ), 3094 ( 3095 "-gen-op-interface-defs", 3096 "include/mlir/Interfaces/CopyOpInterface.cpp.inc", 3097 ), 3098 ], 3099 tblgen = ":mlir-tblgen", 3100 td_file = "include/mlir/Interfaces/CopyOpInterface.td", 3101 td_srcs = [":OpBaseTdFiles"], 3102) 3103 3104gentbl( 3105 name = "TransformsPassIncGen", 3106 strip_include_prefix = "include", 3107 tbl_outs = [ 3108 ( 3109 "-gen-pass-decls -name Transforms", 3110 "include/mlir/Transforms/Passes.h.inc", 3111 ), 3112 ( 3113 "-gen-pass-capi-header --prefix Transforms", 3114 "include/mlir/Transforms/Transforms.capi.h.inc", 3115 ), 3116 ( 3117 "-gen-pass-capi-impl --prefix Transforms", 3118 "include/mlir/Transforms/Transforms.capi.cpp.inc", 3119 ), 3120 ], 3121 tblgen = ":mlir-tblgen", 3122 td_file = "include/mlir/Transforms/Passes.td", 3123 td_srcs = [":PassBaseTdFiles"], 3124) 3125 3126cc_library( 3127 name = "Transforms", 3128 srcs = glob([ 3129 "lib/Transforms/*.cpp", 3130 "lib/Transforms/*.h", 3131 ]), 3132 hdrs = glob(["include/mlir/Transforms/*.h"]), 3133 includes = ["include"], 3134 deps = [ 3135 ":Affine", 3136 ":Analysis", 3137 ":ControlFlowInterfaces", 3138 ":CopyOpInterface", 3139 ":IR", 3140 ":LinalgOps", 3141 ":LoopLikeInterface", 3142 ":Pass", 3143 ":Rewrite", 3144 ":SCFDialect", 3145 ":SideEffectInterfaces", 3146 ":StandardOps", 3147 ":Support", 3148 ":TransformUtils", 3149 ":TransformsPassIncGen", 3150 "@llvm-project//llvm:Support", 3151 ], 3152) 3153 3154cc_library( 3155 name = "CommonFolders", 3156 srcs = [ 3157 ], 3158 hdrs = ["include/mlir/Dialect/CommonFolders.h"], 3159 includes = ["include"], 3160 deps = [ 3161 ":IR", 3162 "@llvm-project//llvm:Support", 3163 ], 3164) 3165 3166cc_library( 3167 name = "SCFToGPU", 3168 srcs = ["lib/Conversion/SCFToGPU/SCFToGPU.cpp"], 3169 hdrs = ["include/mlir/Conversion/SCFToGPU/SCFToGPU.h"], 3170 includes = ["include"], 3171 deps = [ 3172 ":Affine", 3173 ":AffineToStandard", 3174 ":ConversionPassIncGen", 3175 ":GPUDialect", 3176 ":GPUTransforms", 3177 ":IR", 3178 ":Pass", 3179 ":SCFDialect", 3180 ":StandardOps", 3181 ":Support", 3182 ":TransformUtils", 3183 ":Transforms", 3184 "@llvm-project//llvm:Support", 3185 ], 3186) 3187 3188cc_library( 3189 name = "SCFToGPUPass", 3190 srcs = [ 3191 "lib/Conversion/PassDetail.h", 3192 "lib/Conversion/SCFToGPU/SCFToGPUPass.cpp", 3193 ], 3194 hdrs = ["include/mlir/Conversion/SCFToGPU/SCFToGPUPass.h"], 3195 includes = ["include"], 3196 deps = [ 3197 ":Affine", 3198 ":ComplexDialect", 3199 ":ConversionPassIncGen", 3200 ":GPUDialect", 3201 ":Pass", 3202 ":SCFDialect", 3203 ":SCFToGPU", 3204 ":StandardOps", 3205 ":Support", 3206 ":Transforms", 3207 "@llvm-project//llvm:Support", 3208 ], 3209) 3210 3211cc_library( 3212 name = "SCFToSPIRV", 3213 srcs = glob([ 3214 "lib/Conversion/SCFToSPIRV/*.cpp", 3215 "lib/Conversion/SCFToSPIRV/*.h", 3216 ]) + ["lib/Conversion/PassDetail.h"], 3217 hdrs = glob([ 3218 "include/mlir/Conversion/SCFToSPIRV/*.h", 3219 ]), 3220 includes = ["include"], 3221 deps = [ 3222 ":Affine", 3223 ":ConversionPassIncGen", 3224 ":IR", 3225 ":Pass", 3226 ":SCFDialect", 3227 ":SPIRVConversion", 3228 ":SPIRVDialect", 3229 ":StandardOps", 3230 ":StandardToSPIRV", 3231 ":Support", 3232 ":TransformUtils", 3233 ":Transforms", 3234 "@llvm-project//llvm:Support", 3235 ], 3236) 3237 3238cc_library( 3239 name = "SCFToOpenMP", 3240 srcs = [ 3241 "lib/Conversion/PassDetail.h", 3242 "lib/Conversion/SCFToOpenMP/SCFToOpenMP.cpp", 3243 ], 3244 hdrs = ["include/mlir/Conversion/SCFToOpenMP/SCFToOpenMP.h"], 3245 includes = ["include"], 3246 deps = [ 3247 ":ConversionPassIncGen", 3248 ":IR", 3249 ":OpenMPDialect", 3250 ":Pass", 3251 ":SCFDialect", 3252 ":Support", 3253 ":Transforms", 3254 ], 3255) 3256 3257cc_library( 3258 name = "SCFToStandard", 3259 srcs = [ 3260 "lib/Conversion/PassDetail.h", 3261 "lib/Conversion/SCFToStandard/SCFToStandard.cpp", 3262 ], 3263 hdrs = ["include/mlir/Conversion/SCFToStandard/SCFToStandard.h"], 3264 includes = ["include"], 3265 deps = [ 3266 ":ConversionPassIncGen", 3267 ":IR", 3268 ":LLVMDialect", 3269 ":Pass", 3270 ":SCFDialect", 3271 ":StandardOps", 3272 ":Support", 3273 ":TransformUtils", 3274 ":Transforms", 3275 ], 3276) 3277 3278alias( 3279 name = "CFGTransforms", 3280 actual = "SCFToStandard", 3281) 3282 3283cc_library( 3284 name = "StandardToLLVM", 3285 srcs = [ 3286 "lib/Conversion/PassDetail.h", 3287 "lib/Conversion/StandardToLLVM/StandardToLLVM.cpp", 3288 ], 3289 hdrs = [ 3290 "include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h", 3291 "include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVMPass.h", 3292 ], 3293 includes = ["include"], 3294 deps = [ 3295 ":ConversionPassIncGen", 3296 ":IR", 3297 ":LLVMDialect", 3298 ":MathDialect", 3299 ":Parser", 3300 ":Pass", 3301 ":StandardOps", 3302 ":StandardOpsTransforms", 3303 ":Support", 3304 ":TransformUtils", 3305 ":Transforms", 3306 "@llvm-project//llvm:Core", 3307 "@llvm-project//llvm:Support", 3308 ], 3309) 3310 3311alias( 3312 name = "LLVMTransforms", 3313 actual = "StandardToLLVM", 3314) 3315 3316gentbl( 3317 name = "CallOpInterfacesIncGen", 3318 strip_include_prefix = "include", 3319 tbl_outs = [ 3320 ( 3321 "-gen-op-interface-decls", 3322 "include/mlir/Interfaces/CallInterfaces.h.inc", 3323 ), 3324 ( 3325 "-gen-op-interface-defs", 3326 "include/mlir/Interfaces/CallInterfaces.cpp.inc", 3327 ), 3328 ], 3329 tblgen = ":mlir-tblgen", 3330 td_file = "include/mlir/Interfaces/CallInterfaces.td", 3331 td_srcs = [":OpBaseTdFiles"], 3332) 3333 3334cc_library( 3335 name = "CallOpInterfaces", 3336 srcs = ["lib/Interfaces/CallInterfaces.cpp"], 3337 hdrs = ["include/mlir/Interfaces/CallInterfaces.h"], 3338 includes = ["include"], 3339 deps = [ 3340 ":CallOpInterfacesIncGen", 3341 ":IR", 3342 ":Support", 3343 "@llvm-project//llvm:Support", 3344 ], 3345) 3346 3347gentbl( 3348 name = "CastOpInterfacesIncGen", 3349 strip_include_prefix = "include", 3350 tbl_outs = [ 3351 ( 3352 "-gen-op-interface-decls", 3353 "include/mlir/Interfaces/CastInterfaces.h.inc", 3354 ), 3355 ( 3356 "-gen-op-interface-defs", 3357 "include/mlir/Interfaces/CastInterfaces.cpp.inc", 3358 ), 3359 ], 3360 tblgen = ":mlir-tblgen", 3361 td_file = "include/mlir/Interfaces/CastInterfaces.td", 3362 td_srcs = [":OpBaseTdFiles"], 3363) 3364 3365cc_library( 3366 name = "CastOpInterfaces", 3367 srcs = ["lib/Interfaces/CastInterfaces.cpp"], 3368 hdrs = ["include/mlir/Interfaces/CastInterfaces.h"], 3369 includes = ["include"], 3370 deps = [ 3371 ":CastOpInterfacesIncGen", 3372 ":IR", 3373 ":Support", 3374 "@llvm-project//llvm:Support", 3375 ], 3376) 3377 3378gentbl( 3379 name = "ControlFlowInterfacesIncGen", 3380 strip_include_prefix = "include", 3381 tbl_outs = [ 3382 ( 3383 "-gen-op-interface-decls", 3384 "include/mlir/Interfaces/ControlFlowInterfaces.h.inc", 3385 ), 3386 ( 3387 "-gen-op-interface-defs", 3388 "include/mlir/Interfaces/ControlFlowInterfaces.cpp.inc", 3389 ), 3390 ], 3391 tblgen = ":mlir-tblgen", 3392 td_file = "include/mlir/Interfaces/ControlFlowInterfaces.td", 3393 td_srcs = [":OpBaseTdFiles"], 3394) 3395 3396cc_library( 3397 name = "ControlFlowInterfaces", 3398 srcs = ["lib/Interfaces/ControlFlowInterfaces.cpp"], 3399 hdrs = ["include/mlir/Interfaces/ControlFlowInterfaces.h"], 3400 includes = ["include"], 3401 deps = [ 3402 ":ControlFlowInterfacesIncGen", 3403 ":IR", 3404 ":Support", 3405 "@llvm-project//llvm:Support", 3406 ], 3407) 3408 3409gentbl( 3410 name = "InferTypeOpInterfaceIncGen", 3411 strip_include_prefix = "include", 3412 tbl_outs = [ 3413 ( 3414 "-gen-op-interface-decls", 3415 "include/mlir/Interfaces/InferTypeOpInterface.h.inc", 3416 ), 3417 ( 3418 "-gen-op-interface-defs", 3419 "include/mlir/Interfaces/InferTypeOpInterface.cpp.inc", 3420 ), 3421 ], 3422 tblgen = ":mlir-tblgen", 3423 td_file = "include/mlir/Interfaces/InferTypeOpInterface.td", 3424 td_srcs = [":OpBaseTdFiles"], 3425) 3426 3427cc_library( 3428 name = "InferTypeOpInterface", 3429 srcs = ["lib/Interfaces/InferTypeOpInterface.cpp"], 3430 hdrs = ["include/mlir/Interfaces/InferTypeOpInterface.h"], 3431 includes = ["include"], 3432 deps = [ 3433 ":IR", 3434 ":InferTypeOpInterfaceIncGen", 3435 ":Support", 3436 "@llvm-project//llvm:Support", 3437 ], 3438) 3439 3440gentbl( 3441 name = "SideEffectInterfacesIncGen", 3442 strip_include_prefix = "include", 3443 tbl_outs = [ 3444 ( 3445 "-gen-op-interface-decls", 3446 "include/mlir/Interfaces/SideEffectInterfaces.h.inc", 3447 ), 3448 ( 3449 "-gen-op-interface-defs", 3450 "include/mlir/Interfaces/SideEffectInterfaces.cpp.inc", 3451 ), 3452 ], 3453 tblgen = ":mlir-tblgen", 3454 td_file = "include/mlir/Interfaces/SideEffectInterfaces.td", 3455 td_srcs = [ 3456 ":OpBaseTdFiles", 3457 ":SideEffectBaseTdFiles", 3458 ], 3459) 3460 3461cc_library( 3462 name = "SideEffectInterfaces", 3463 srcs = ["lib/Interfaces/SideEffectInterfaces.cpp"], 3464 hdrs = ["include/mlir/Interfaces/SideEffectInterfaces.h"], 3465 includes = ["include"], 3466 deps = [ 3467 ":IR", 3468 ":SideEffectInterfacesIncGen", 3469 ":Support", 3470 "@llvm-project//llvm:Support", 3471 ], 3472) 3473 3474alias( 3475 name = "SideEffects", 3476 actual = "SideEffectInterfaces", 3477) 3478 3479cc_library( 3480 name = "Analysis", 3481 srcs = glob( 3482 [ 3483 "lib/Analysis/*.cpp", 3484 "lib/Analysis/*.h", 3485 "lib/Analysis/*/*.cpp", 3486 "lib/Analysis/*/*.h", 3487 ], 3488 exclude = [ 3489 "lib/Analysis/Vector*.cpp", 3490 "lib/Analysis/Vector*.h", 3491 ], 3492 ), 3493 hdrs = glob( 3494 [ 3495 "include/mlir/Analysis/*.h", 3496 "include/mlir/Analysis/*/*.h", 3497 ], 3498 exclude = ["include/mlir/Analysis/Vector*.h"], 3499 ), 3500 includes = ["include"], 3501 deps = [ 3502 ":Affine", 3503 ":CallOpInterfaces", 3504 ":ControlFlowInterfaces", 3505 ":IR", 3506 ":LinalgOps", 3507 ":SCFDialect", 3508 ":SideEffectInterfaces", 3509 ":StandardOps", 3510 ":Support", 3511 ":ViewLikeInterface", 3512 "@llvm-project//llvm:Support", 3513 ], 3514) 3515 3516cc_library( 3517 name = "Translation", 3518 srcs = glob([ 3519 "lib/Translation/*.cpp", 3520 "lib/Translation/*.h", 3521 ]), 3522 hdrs = ["include/mlir/Translation.h"], 3523 includes = ["include"], 3524 deps = [ 3525 ":Analysis", 3526 ":IR", 3527 ":Parser", 3528 ":Support", 3529 "@llvm-project//llvm:Support", 3530 ], 3531) 3532 3533cc_library( 3534 name = "LLVMIRModuleTranslation", 3535 srcs = [ 3536 "lib/Target/LLVMIR/DebugTranslation.cpp", 3537 "lib/Target/LLVMIR/DebugTranslation.h", 3538 "lib/Target/LLVMIR/ModuleTranslation.cpp", 3539 "lib/Target/LLVMIR/TypeTranslation.cpp", 3540 ], 3541 hdrs = [ 3542 "include/mlir/Target/LLVMIR/Export.h", 3543 "include/mlir/Target/LLVMIR/LLVMTranslationInterface.h", 3544 "include/mlir/Target/LLVMIR/ModuleTranslation.h", 3545 "include/mlir/Target/LLVMIR/TypeTranslation.h", 3546 ], 3547 includes = ["include"], 3548 deps = [ 3549 ":IR", 3550 ":LLVMConversionIncGen", 3551 ":LLVMDialect", 3552 ":LLVMIRTransforms", 3553 ":OpenMPDialect", 3554 ":Support", 3555 "@llvm-project//llvm:Core", 3556 "@llvm-project//llvm:FrontendOpenMP", 3557 "@llvm-project//llvm:Support", 3558 "@llvm-project//llvm:TransformUtils", 3559 ], 3560) 3561 3562cc_library( 3563 name = "LLVMAVX512ToLLVMIRTranslation", 3564 srcs = glob(["lib/Target/LLVMIR/Dialect/LLVMAVX512/*.cpp"]), 3565 hdrs = glob(["include/mlir/Target/LLVMIR/Dialect/LLVMAVX512/*.h"]), 3566 includes = ["include"], 3567 deps = [ 3568 ":IR", 3569 ":LLVMAVX512", 3570 ":LLVMAVX512ConversionIncGen", 3571 ":LLVMIRModuleTranslation", 3572 ":Support", 3573 "@llvm-project//llvm:Core", 3574 "@llvm-project//llvm:Support", 3575 ], 3576) 3577 3578cc_library( 3579 name = "LLVMArmNeonToLLVMIRTranslation", 3580 srcs = glob(["lib/Target/LLVMIR/Dialect/LLVMArmNeon/*.cpp"]), 3581 hdrs = glob(["include/mlir/Target/LLVMIR/Dialect/LLVMArmNeon/*.h"]), 3582 includes = ["include"], 3583 deps = [ 3584 ":IR", 3585 ":LLVMArmNeon", 3586 ":LLVMArmNeonConversionIncGen", 3587 ":LLVMArmNeonIncGen", 3588 ":LLVMIRModuleTranslation", 3589 ":Support", 3590 "@llvm-project//llvm:Core", 3591 "@llvm-project//llvm:Support", 3592 ], 3593) 3594 3595cc_library( 3596 name = "LLVMArmSVEToLLVMIRTranslation", 3597 srcs = glob(["lib/Target/LLVMIR/Dialect/LLVMArmSVE/*.cpp"]), 3598 hdrs = glob(["include/mlir/Target/LLVMIR/Dialect/LLVMArmSVE/*.h"]), 3599 includes = ["include"], 3600 deps = [ 3601 ":IR", 3602 ":LLVMArmSVE", 3603 ":LLVMArmSVEConversionIncGen", 3604 ":LLVMIRModuleTranslation", 3605 ":Support", 3606 "@llvm-project//llvm:Core", 3607 "@llvm-project//llvm:Support", 3608 ], 3609) 3610 3611cc_library( 3612 name = "NVVMToLLVMIRTranslation", 3613 srcs = glob(["lib/Target/LLVMIR/Dialect/NVVM/*.cpp"]), 3614 hdrs = glob(["include/mlir/Target/LLVMIR/Dialect/NVVM/*.h"]), 3615 includes = ["include"], 3616 deps = [ 3617 ":IR", 3618 ":LLVMIRModuleTranslation", 3619 ":NVVMConversionIncGen", 3620 ":NVVMDialect", 3621 ":Support", 3622 "@llvm-project//llvm:Core", 3623 "@llvm-project//llvm:Support", 3624 ], 3625) 3626 3627cc_library( 3628 name = "ROCDLToLLVMIRTranslation", 3629 srcs = glob(["lib/Target/LLVMIR/Dialect/ROCDL/*.cpp"]), 3630 hdrs = glob(["include/mlir/Target/LLVMIR/Dialect/ROCDL/*.h"]), 3631 includes = ["include"], 3632 deps = [ 3633 ":IR", 3634 ":LLVMIRModuleTranslation", 3635 ":ROCDLConversionIncGen", 3636 ":ROCDLDialect", 3637 ":Support", 3638 "@llvm-project//llvm:Core", 3639 "@llvm-project//llvm:Support", 3640 ], 3641) 3642 3643cc_library( 3644 name = "LLVMToLLVMIRTranslation", 3645 srcs = glob(["lib/Target/LLVMIR/Dialect/LLVMIR/*.cpp"]), 3646 hdrs = glob(["include/mlir/Target/LLVMIR/Dialect/LLVMIR/*.h"]), 3647 includes = ["include"], 3648 deps = [ 3649 ":IR", 3650 ":LLVMConversionIncGen", 3651 ":LLVMDialect", 3652 ":LLVMIRModuleTranslation", 3653 ":Support", 3654 "@llvm-project//llvm:Core", 3655 "@llvm-project//llvm:Support", 3656 ], 3657) 3658 3659cc_library( 3660 name = "OpenMPToLLVMIRTranslation", 3661 srcs = glob(["lib/Target/LLVMIR/Dialect/OpenMP/*.cpp"]), 3662 hdrs = glob(["include/mlir/Target/LLVMIR/Dialect/OpenMP/*.h"]), 3663 includes = ["include"], 3664 deps = [ 3665 ":IR", 3666 ":LLVMIRModuleTranslation", 3667 ":OpenMPDialect", 3668 ":Support", 3669 "@llvm-project//llvm:Core", 3670 "@llvm-project//llvm:FrontendOpenMP", 3671 "@llvm-project//llvm:Support", 3672 ], 3673) 3674 3675cc_library( 3676 name = "TargetLLVMIR", 3677 srcs = [ 3678 "lib/Target/LLVMIR/ConvertFromLLVMIR.cpp", 3679 "lib/Target/LLVMIR/ConvertToLLVMIR.cpp", 3680 ], 3681 hdrs = ["include/mlir/Target/LLVMIR.h"], 3682 includes = ["include"], 3683 deps = [ 3684 ":IR", 3685 ":LLVMAVX512", 3686 ":LLVMAVX512ToLLVMIRTranslation", 3687 ":LLVMArmNeon", 3688 ":LLVMArmNeonToLLVMIRTranslation", 3689 ":LLVMArmSVE", 3690 ":LLVMArmSVEToLLVMIRTranslation", 3691 ":LLVMConversionIncGen", 3692 ":LLVMDialect", 3693 ":LLVMIRModuleTranslation", 3694 ":LLVMToLLVMIRTranslation", 3695 ":NVVMDialect", 3696 ":NVVMToLLVMIRTranslation", 3697 ":OpenMPDialect", 3698 ":OpenMPToLLVMIRTranslation", 3699 ":ROCDLDialect", 3700 ":ROCDLToLLVMIRTranslation", 3701 ":Support", 3702 ":Translation", 3703 "@llvm-project//llvm:Core", 3704 "@llvm-project//llvm:IRReader", 3705 "@llvm-project//llvm:Support", 3706 ], 3707) 3708 3709cc_library( 3710 name = "ExecutionEngine", 3711 srcs = [ 3712 "include/mlir/ExecutionEngine/CRunnerUtils.h", 3713 "lib/ExecutionEngine/ExecutionEngine.cpp", 3714 ], 3715 hdrs = [ 3716 "include/mlir/ExecutionEngine/ExecutionEngine.h", 3717 "include/mlir/ExecutionEngine/MemRefUtils.h", 3718 ], 3719 includes = ["include"], 3720 deps = [ 3721 ":IR", 3722 ":LLVMDialect", 3723 ":LLVMIRModuleTranslation", 3724 ":Support", 3725 ":TargetLLVMIR", 3726 ":Translation", 3727 "@llvm-project//llvm:BitReader", 3728 "@llvm-project//llvm:BitWriter", 3729 "@llvm-project//llvm:Core", 3730 "@llvm-project//llvm:ExecutionEngine", 3731 "@llvm-project//llvm:MC", 3732 "@llvm-project//llvm:OrcJIT", 3733 "@llvm-project//llvm:Support", 3734 "@llvm-project//llvm:Target", # fixdeps: keep 3735 "@llvm-project//llvm:TransformUtils", 3736 "@llvm-project//llvm:X86CodeGen", # fixdeps: keep 3737 "@llvm-project//llvm:X86Disassembler", # fixdeps: keep 3738 ], 3739) 3740 3741cc_library( 3742 name = "ExecutionEngineUtils", 3743 srcs = ["lib/ExecutionEngine/OptUtils.cpp"], 3744 hdrs = ["include/mlir/ExecutionEngine/OptUtils.h"], 3745 includes = ["include"], 3746 deps = [ 3747 "@llvm-project//llvm:Analysis", 3748 "@llvm-project//llvm:Core", 3749 "@llvm-project//llvm:Coroutines", 3750 "@llvm-project//llvm:IPO", 3751 "@llvm-project//llvm:Support", 3752 "@llvm-project//llvm:Target", 3753 ], 3754) 3755 3756# TODO(jpienaar): Update this. 3757cc_library( 3758 name = "MlirOptLib", 3759 srcs = ["lib/Support/MlirOptMain.cpp"], 3760 hdrs = ["include/mlir/Support/MlirOptMain.h"], 3761 includes = ["include"], 3762 deps = [ 3763 ":Analysis", 3764 ":ConversionPasses", 3765 ":GPUToGPURuntimeTransforms", 3766 ":GPUToNVVMTransforms", 3767 ":GPUToROCDLTransforms", 3768 ":GPUToSPIRV", 3769 ":GPUTransforms", 3770 ":IR", 3771 ":Parser", 3772 ":Pass", 3773 ":SCFTransforms", 3774 ":ShapeToStandard", 3775 ":ShapeTransforms", 3776 ":StandardOpsTransforms", 3777 ":StandardToLLVM", 3778 ":StandardToSPIRV", 3779 ":Support", 3780 "@llvm-project//llvm:Support", 3781 ], 3782) 3783 3784cc_library( 3785 name = "AllTranslations", 3786 hdrs = ["include/mlir/InitAllTranslations.h"], 3787 deps = [ 3788 ":LLVMAVX512ToLLVMIRTranslation", 3789 ":LLVMArmNeonToLLVMIRTranslation", 3790 ":LLVMArmSVEToLLVMIRTranslation", 3791 ":LLVMToLLVMIRTranslation", 3792 ":NVVMToLLVMIRTranslation", 3793 ":ROCDLToLLVMIRTranslation", 3794 ":SPIRVTranslateRegistration", 3795 ":TargetLLVMIR", 3796 ], 3797) 3798 3799cc_library( 3800 name = "MlirTranslateMain", 3801 srcs = ["tools/mlir-translate/mlir-translate.cpp"], 3802 deps = [ 3803 ":AllPassesAndDialectsNoRegistration", 3804 ":AllTranslations", 3805 ":IR", 3806 ":Parser", 3807 ":Support", 3808 ":Translation", 3809 "@llvm-project//llvm:Support", 3810 ], 3811) 3812 3813cc_binary( 3814 name = "mlir-translate", 3815 deps = [":MlirTranslateMain"], 3816) 3817 3818cc_library( 3819 name = "AllPassesAndDialectsNoRegistration", 3820 hdrs = [ 3821 "include/mlir/InitAllDialects.h", 3822 "include/mlir/InitAllPasses.h", 3823 ], 3824 defines = ["MLIR_CUDA_CONVERSIONS_ENABLED"], 3825 deps = [ 3826 ":AVX512", 3827 ":AVX512ToLLVM", 3828 ":Affine", 3829 ":AffinePassIncGen", 3830 ":AffineToStandard", 3831 ":AffineTransforms", 3832 ":ArmNeon", 3833 ":ArmNeonToLLVM", 3834 ":ArmSVE", 3835 ":ArmSVEToLLVM", 3836 ":Async", 3837 ":AsyncPassIncGen", 3838 ":AsyncToLLVM", 3839 ":AsyncTransforms", 3840 ":ComplexDialect", 3841 ":ComplexToLLVM", 3842 ":ConversionPasses", 3843 ":GPUDialect", 3844 ":GPUPassIncGen", 3845 ":GPUToGPURuntimeTransforms", 3846 ":GPUToNVVMTransforms", 3847 ":GPUToROCDLTransforms", 3848 ":GPUToSPIRV", 3849 ":GPUToVulkanTransforms", 3850 ":GPUTransforms", 3851 ":IR", 3852 ":LLVMAVX512", 3853 ":LLVMArmNeon", 3854 ":LLVMArmSVE", 3855 ":LLVMDialect", 3856 ":LLVMIRTransforms", 3857 ":LLVMPassIncGen", 3858 ":LinalgOps", 3859 ":LinalgPassIncGen", 3860 ":LinalgToLLVM", 3861 ":LinalgToSPIRV", 3862 ":LinalgToStandard", 3863 ":LinalgTransforms", 3864 ":MathDialect", 3865 ":MathToLLVM", 3866 ":MathTransforms", 3867 ":NVVMDialect", 3868 ":OpenACCDialect", 3869 ":OpenMPDialect", 3870 ":OpenMPToLLVM", 3871 ":PDLDialect", 3872 ":PDLInterpDialect", 3873 ":PDLToPDLInterp", 3874 ":QuantOps", 3875 ":QuantPassIncGen", 3876 ":ROCDLDialect", 3877 ":SCFDialect", 3878 ":SCFPassIncGen", 3879 ":SCFToGPUPass", 3880 ":SCFToStandard", 3881 ":SCFTransforms", 3882 ":SDBM", 3883 ":SPIRVDialect", 3884 ":SPIRVPassIncGen", 3885 ":SPIRVToLLVM", 3886 ":SPIRVTransforms", 3887 ":Shape", 3888 ":ShapeToStandard", 3889 ":ShapeTransforms", 3890 ":ShapeTransformsPassIncGen", 3891 ":StandardOps", 3892 ":StandardOpsTransforms", 3893 ":StandardOpsTransformsPassIncGen", 3894 ":StandardToLLVM", 3895 ":StandardToSPIRV", 3896 ":TensorDialect", 3897 ":TensorTransforms", 3898 ":TosaDialect", 3899 ":Transforms", 3900 ":TransformsPassIncGen", 3901 ":VectorOps", 3902 ":VectorToLLVM", 3903 ":VectorToROCDL", 3904 ":VectorToSCF", 3905 ":VectorToSPIRV", 3906 ], 3907) 3908 3909cc_library( 3910 name = "AllPassesAndDialects", 3911 deps = [":AllPassesAndDialectsNoRegistration"], 3912) 3913 3914cc_binary( 3915 name = "mlir-opt", 3916 srcs = ["tools/mlir-opt/mlir-opt.cpp"], 3917 copts = ["-DMLIR_INCLUDE_TESTS"], 3918 deps = [ 3919 ":AllPassesAndDialectsNoRegistration", 3920 ":Analysis", 3921 ":IR", 3922 ":MlirOptLib", 3923 ":OpenMPDialect", 3924 ":Pass", 3925 ":QuantOps", 3926 ":SCFToGPUPass", 3927 ":Support", 3928 ":Transforms", 3929 "@llvm-project//llvm:AllTargetsCodeGens", 3930 "@llvm-project//llvm:Support", 3931 "@llvm-project//mlir/test:TestAffine", 3932 "@llvm-project//mlir/test:TestAnalysis", 3933 "@llvm-project//mlir/test:TestDialect", 3934 "@llvm-project//mlir/test:TestIR", 3935 "@llvm-project//mlir/test:TestPass", 3936 "@llvm-project//mlir/test:TestReducer", 3937 "@llvm-project//mlir/test:TestRewrite", 3938 "@llvm-project//mlir/test:TestSPIRV", 3939 "@llvm-project//mlir/test:TestShapeDialect", 3940 "@llvm-project//mlir/test:TestTosaDialect", 3941 "@llvm-project//mlir/test:TestTransforms", 3942 "@llvm-project//mlir/test:TestTypeDialect", 3943 ], 3944) 3945 3946cc_library( 3947 name = "MlirJitRunner", 3948 srcs = ["lib/ExecutionEngine/JitRunner.cpp"], 3949 hdrs = [ 3950 "include/mlir/ExecutionEngine/JitRunner.h", 3951 ], 3952 includes = ["include"], 3953 deps = [ 3954 ":AllPassesAndDialectsNoRegistration", 3955 ":ExecutionEngine", 3956 ":ExecutionEngineUtils", 3957 ":IR", 3958 ":LLVMDialect", 3959 ":LLVMToLLVMIRTranslation", 3960 ":OpenMPToLLVMIRTranslation", 3961 ":Parser", 3962 ":Pass", 3963 ":SCFToStandard", 3964 ":Support", 3965 "@llvm-project//llvm:Core", 3966 "@llvm-project//llvm:OrcJIT", 3967 "@llvm-project//llvm:Support", 3968 ], 3969) 3970 3971cc_library( 3972 name = "mlir_c_runner_utils", 3973 srcs = [ 3974 "lib/ExecutionEngine/CRunnerUtils.cpp", 3975 "lib/ExecutionEngine/SparseUtils.cpp", 3976 ], 3977 hdrs = ["include/mlir/ExecutionEngine/CRunnerUtils.h"], 3978 includes = ["include"], 3979) 3980 3981cc_library( 3982 name = "mlir_async_runtime_api", 3983 hdrs = ["include/mlir/ExecutionEngine/AsyncRuntime.h"], 3984 includes = ["include"], 3985) 3986 3987cc_library( 3988 name = "mlir_async_runtime", 3989 srcs = ["lib/ExecutionEngine/AsyncRuntime.cpp"], 3990 copts = ["-Dmlir_async_runtime_EXPORTS"], 3991 deps = [ 3992 ":mlir_async_runtime_api", 3993 "@llvm-project//llvm:Support", 3994 ], 3995) 3996 3997cc_library( 3998 name = "mlir_runner_utils", 3999 srcs = ["lib/ExecutionEngine/RunnerUtils.cpp"], 4000 hdrs = ["include/mlir/ExecutionEngine/RunnerUtils.h"], 4001 includes = ["include"], 4002 deps = [":mlir_c_runner_utils"], 4003) 4004 4005cc_binary( 4006 name = "mlir-cpu-runner", 4007 srcs = ["tools/mlir-cpu-runner/mlir-cpu-runner.cpp"], 4008 linkopts = ["-ldl"], 4009 deps = [ 4010 ":ExecutionEngineUtils", 4011 ":IR", 4012 ":LLVMDialect", 4013 ":MlirJitRunner", 4014 ":OpenMPDialect", 4015 ":OpenMPToLLVMIRTranslation", 4016 ":TargetLLVMIR", 4017 "@llvm-project//llvm:AsmParser", 4018 "@llvm-project//llvm:Support", 4019 "@llvm-project//llvm:X86AsmParser", 4020 ], 4021) 4022 4023# This target provides the headers from LLVM's Support target without any of 4024# the symbols. In particular, it does not contain the static registration code 4025# which may be executed by at most one shared library loaded by ORCJit. Direct 4026# dependencies need to avoid requiring symbols from LLVMSupport by adding 4027# copts = ["-DLLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING=1"]. 4028# 4029# Bazel links the dependencies' object files instead of the archives, which 4030# means that symbols are linked in even if none are used. The LLVM cmake build 4031# on the other hand links archives (or shared libraries, depending on 4032# BUILD_SHARED_LIBS), skipping them if none of the symbols are used. 4033# See also https://reviews.llvm.org/D95613. 4034cc_headers_only( 4035 name = "LLVMSupportHeaders", 4036 src = "@llvm-project//llvm:Support", 4037) 4038 4039cc_binary( 4040 name = "tools/libcuda-runtime-wrappers.so", 4041 srcs = ["tools/mlir-cuda-runner/cuda-runtime-wrappers.cpp"], 4042 # Prevent needing EnableABIBreakingChecks symbol from LLVMSupport. 4043 copts = ["-DLLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING=1"], 4044 linkshared = True, 4045 deps = [ 4046 ":LLVMSupportHeaders", 4047 ":mlir_c_runner_utils", 4048 "//third_party/gpus/cuda:cuda_headers", 4049 "//third_party/gpus/cuda:libcuda", 4050 ], 4051) 4052 4053cc_library( 4054 name = "VulkanRuntime", 4055 srcs = ["tools/mlir-vulkan-runner/VulkanRuntime.cpp"], 4056 hdrs = ["tools/mlir-vulkan-runner/VulkanRuntime.h"], 4057 deps = [ 4058 ":IR", 4059 ":Pass", 4060 ":SPIRVDialect", 4061 ":SideEffectInterfaces", 4062 ":StandardOps", 4063 ":Support", 4064 "@llvm-project//llvm:Support", 4065 "@vulkan_headers", 4066 "@vulkan_sdk//:sdk", 4067 ], 4068) 4069 4070cc_binary( 4071 name = "tools/libvulkan-runtime-wrappers.so", 4072 srcs = ["tools/mlir-vulkan-runner/vulkan-runtime-wrappers.cpp"], 4073 linkshared = True, 4074 deps = [ 4075 ":VulkanRuntime", 4076 "@llvm-project//llvm:Support", 4077 ], 4078) 4079 4080cc_binary( 4081 name = "mlir-cuda-runner", 4082 srcs = ["tools/mlir-cuda-runner/mlir-cuda-runner.cpp"], 4083 deps = [ 4084 ":Async", 4085 ":AsyncToLLVM", 4086 ":AsyncTransforms", 4087 ":ExecutionEngineUtils", 4088 ":GPUDialect", 4089 ":GPUToGPURuntimeTransforms", 4090 ":GPUToNVVMTransforms", 4091 ":GPUToROCDLTransforms", 4092 ":GPUTransforms", 4093 ":IR", 4094 ":LLVMDialect", 4095 ":LLVMIRModuleTranslation", 4096 ":MlirJitRunner", 4097 ":NVVMDialect", 4098 ":NVVMToLLVMIRTranslation", 4099 ":Pass", 4100 ":StandardOps", 4101 ":StandardToLLVM", 4102 ":TargetLLVMIR", 4103 ":Transforms", 4104 "//devtools/build/runtime:get_runfiles_dir", 4105 "//third_party/gpus/cuda:cuda_headers", 4106 "//third_party/gpus/cuda:cuda_runtime", 4107 "//third_party/gpus/cuda:libcuda", 4108 "@llvm-project//llvm:Support", 4109 ], 4110) 4111 4112cc_binary( 4113 name = "mlir-vulkan-runner", 4114 srcs = ["tools/mlir-vulkan-runner/mlir-vulkan-runner.cpp"], 4115 deps = [ 4116 ":ExecutionEngineUtils", 4117 ":GPUDialect", 4118 ":GPUToSPIRV", 4119 ":GPUToVulkanTransforms", 4120 ":GPUTransforms", 4121 ":LLVMDialect", 4122 ":LLVMIRModuleTranslation", 4123 ":MlirJitRunner", 4124 ":Pass", 4125 ":SPIRVDialect", 4126 ":SPIRVTransforms", 4127 ":StandardOps", 4128 ":StandardToLLVM", 4129 ":StandardToSPIRV", 4130 ":TargetLLVMIR", 4131 "@llvm-project//llvm:Support", 4132 ], 4133) 4134 4135cc_binary( 4136 name = "mlir-spirv-cpu-runner", 4137 srcs = ["tools/mlir-spirv-cpu-runner/mlir-spirv-cpu-runner.cpp"], 4138 deps = [ 4139 ":ExecutionEngineUtils", 4140 ":GPUDialect", 4141 ":GPUToSPIRV", 4142 ":GPUTransforms", 4143 ":IR", 4144 ":LLVMDialect", 4145 ":LLVMIRModuleTranslation", 4146 ":MlirJitRunner", 4147 ":Pass", 4148 ":SPIRVConversion", 4149 ":SPIRVDialect", 4150 ":SPIRVToLLVM", 4151 ":SPIRVTransforms", 4152 ":StandardOps", 4153 ":StandardToLLVM", 4154 ":TargetLLVMIR", 4155 "@llvm-project//llvm:Core", 4156 "@llvm-project//llvm:Linker", 4157 "@llvm-project//llvm:Support", 4158 ], 4159) 4160 4161cc_library( 4162 name = "TableGen", 4163 srcs = glob(["lib/TableGen/*.cpp"]), 4164 hdrs = glob(["include/mlir/TableGen/*.h"]), 4165 includes = ["include"], 4166 deps = [ 4167 ":Support", 4168 "@llvm-project//llvm:Support", 4169 "@llvm-project//llvm:TableGen", 4170 ], 4171) 4172 4173cc_library( 4174 name = "MlirTableGenMain", 4175 srcs = ["tools/mlir-tblgen/mlir-tblgen.cpp"], 4176 includes = ["include"], 4177 deps = [ 4178 ":Support", 4179 ":TableGen", 4180 "@llvm-project//llvm:Support", 4181 "@llvm-project//llvm:TableGen", 4182 "@llvm-project//llvm:config", 4183 ], 4184) 4185 4186cc_binary( 4187 name = "mlir-tblgen", 4188 srcs = glob([ 4189 "tools/mlir-tblgen/*.h", 4190 "tools/mlir-tblgen/*.cpp", 4191 ]), 4192 linkopts = [ 4193 "-lm", 4194 "-lpthread", 4195 ], 4196 deps = [ 4197 ":MlirTableGenMain", 4198 ":Support", 4199 ":TableGen", 4200 "@llvm-project//llvm:Support", 4201 "@llvm-project//llvm:TableGen", 4202 "@llvm-project//llvm:config", 4203 ], 4204) 4205 4206cc_binary( 4207 name = "mlir-linalg-ods-gen", 4208 srcs = glob([ 4209 "tools/mlir-linalg-ods-gen/mlir-linalg-ods-gen.cpp", 4210 ]), 4211 linkopts = [ 4212 "-lm", 4213 "-lpthread", 4214 ], 4215 deps = [ 4216 ":IR", 4217 ":Support", 4218 "@llvm-project//llvm:Support", 4219 "@llvm-project//llvm:TableGen", 4220 "@llvm-project//llvm:config", 4221 ], 4222) 4223 4224## OpenACC dialect 4225 4226gentbl( 4227 name = "AccCommonGen", 4228 strip_include_prefix = "include", 4229 tbl_outs = [ 4230 ( 4231 "-gen-directive-decl", 4232 "include/mlir/Dialect/OpenACC/AccCommon.td", 4233 ), 4234 ], 4235 tblgen = ":mlir-tblgen", 4236 td_file = "@llvm-project//llvm:include/llvm/Frontend/OpenACC/ACC.td", 4237 td_includes = ["external/llvm-project/llvm/include"], 4238 td_srcs = ["@llvm-project//llvm:acc_td_files"], 4239) 4240 4241gentbl( 4242 name = "OpenACCOpsIncGen", 4243 strip_include_prefix = "include", 4244 tbl_outs = [ 4245 ( 4246 "-gen-dialect-decls -dialect=acc", 4247 "include/mlir/Dialect/OpenACC/OpenACCOpsDialect.h.inc", 4248 ), 4249 ( 4250 "-gen-op-decls", 4251 "include/mlir/Dialect/OpenACC/OpenACCOps.h.inc", 4252 ), 4253 ( 4254 "-gen-op-defs", 4255 "include/mlir/Dialect/OpenACC/OpenACCOps.cpp.inc", 4256 ), 4257 ( 4258 "-gen-enum-decls", 4259 "include/mlir/Dialect/OpenACC/OpenACCOpsEnums.h.inc", 4260 ), 4261 ( 4262 "-gen-enum-defs", 4263 "include/mlir/Dialect/OpenACC/OpenACCOpsEnums.cpp.inc", 4264 ), 4265 ( 4266 "-gen-op-doc", 4267 "g3doc/Dialects/OpenACC/OpenACCOps.md", 4268 ), 4269 ], 4270 tblgen = ":mlir-tblgen", 4271 td_file = "include/mlir/Dialect/OpenACC/OpenACCOps.td", 4272 td_srcs = [ 4273 ":OpBaseTdFiles", 4274 ":OmpCommonTdGen", 4275 "include/mlir/Dialect/OpenACC/AccCommon.td", 4276 ], 4277) 4278 4279cc_library( 4280 name = "OpenACCDialect", 4281 srcs = glob( 4282 [ 4283 "lib/Dialect/OpenACC/IR/*.cpp", 4284 "lib/Dialect/OpenACC/IR/*.h", 4285 ], 4286 ), 4287 hdrs = glob([ 4288 "include/mlir/Dialect/OpenACC/*.h", 4289 ]), 4290 includes = ["include"], 4291 deps = [ 4292 ":IR", 4293 ":OpenACCOpsIncGen", 4294 ":StandardOps", 4295 "@llvm-project//llvm:Support", 4296 ], 4297) 4298 4299## OpenMP dialect 4300gentbl( 4301 name = "OmpCommonTdGen", 4302 strip_include_prefix = "include", 4303 tbl_outs = [ 4304 ( 4305 "-gen-directive-decl", 4306 "include/mlir/Dialect/OpenMP/OmpCommon.td", 4307 ), 4308 ], 4309 tblgen = ":mlir-tblgen", 4310 td_file = "@llvm-project//llvm:include/llvm/Frontend/OpenMP/OMP.td", 4311 td_includes = ["external/llvm-project/llvm/include"], 4312 td_srcs = [ 4313 "@llvm-project//llvm:omp_td_files", 4314 ":OpBaseTdFiles", 4315 ], 4316) 4317 4318gentbl( 4319 name = "OpenMPOpsIncGen", 4320 strip_include_prefix = "include", 4321 tbl_outs = [ 4322 ( 4323 "-gen-op-decls", 4324 "include/mlir/Dialect/OpenMP/OpenMPOps.h.inc", 4325 ), 4326 ( 4327 "-gen-op-defs", 4328 "include/mlir/Dialect/OpenMP/OpenMPOps.cpp.inc", 4329 ), 4330 ( 4331 "-gen-enum-decls", 4332 "include/mlir/Dialect/OpenMP/OpenMPOpsEnums.h.inc", 4333 ), 4334 ( 4335 "-gen-enum-defs", 4336 "include/mlir/Dialect/OpenMP/OpenMPOpsEnums.cpp.inc", 4337 ), 4338 ( 4339 "-gen-dialect-decls -dialect=omp", 4340 "include/mlir/Dialect/OpenMP/OpenMPOpsDialect.h.inc", 4341 ), 4342 ( 4343 "-gen-op-doc", 4344 "g3doc/Dialects/OpenMP/OpenMPOps.md", 4345 ), 4346 ], 4347 tblgen = ":mlir-tblgen", 4348 td_file = "include/mlir/Dialect/OpenMP/OpenMPOps.td", 4349 td_srcs = [ 4350 ":OpBaseTdFiles", 4351 ":OmpCommonTdGen", 4352 ":SideEffectTdFiles", 4353 "include/mlir/Dialect/LLVMIR/LLVMOpBase.td", 4354 "include/mlir/Dialect/OpenMP/OmpCommon.td", 4355 "include/mlir/Interfaces/ControlFlowInterfaces.td", 4356 ], 4357) 4358 4359cc_library( 4360 name = "OpenMPDialect", 4361 srcs = glob( 4362 [ 4363 "lib/Dialect/OpenMP/IR/*.cpp", 4364 "lib/Dialect/OpenMP/IR/*.h", 4365 ], 4366 ), 4367 hdrs = glob([ 4368 "include/mlir/Dialect/OpenMP/*.h", 4369 ]), 4370 includes = ["include"], 4371 deps = [ 4372 ":ControlFlowInterfaces", 4373 ":IR", 4374 ":LLVMDialect", 4375 ":OpenMPOpsIncGen", 4376 ":SideEffectInterfaces", 4377 ":StandardOps", 4378 "@llvm-project//llvm:Support", 4379 ], 4380) 4381 4382cc_library( 4383 name = "OpenMPToLLVM", 4384 srcs = glob([ 4385 "lib/Conversion/OpenMPToLLVM/*.cpp", 4386 "lib/Conversion/OpenMPToLLVM/*.h", 4387 ]) + ["lib/Conversion/PassDetail.h"], 4388 hdrs = glob([ 4389 "include/mlir/Conversion/OpenMPToLLVM/*.h", 4390 ]), 4391 includes = ["include"], 4392 deps = [ 4393 ":ConversionPassIncGen", 4394 ":IR", 4395 ":LLVMDialect", 4396 ":OpenMPDialect", 4397 ":Pass", 4398 ":StandardOps", 4399 ":StandardToLLVM", 4400 ":Transforms", 4401 "@llvm-project//llvm:Core", 4402 "@llvm-project//llvm:Support", 4403 ], 4404) 4405 4406## QuantOps dialect 4407filegroup( 4408 name = "QuantizationOpsTdFiles", 4409 srcs = [ 4410 "include/mlir/Dialect/Quant/QuantOps.td", 4411 "include/mlir/Dialect/Quant/QuantOpsBase.td", 4412 ":OpBaseTdFiles", 4413 ":SideEffectTdFiles", 4414 ], 4415) 4416 4417gentbl( 4418 name = "QuantOpsIncGen", 4419 strip_include_prefix = "include", 4420 tbl_outs = [ 4421 ( 4422 "-gen-op-decls", 4423 "include/mlir/Dialect/Quant/QuantOps.h.inc", 4424 ), 4425 ( 4426 "-gen-op-defs", 4427 "include/mlir/Dialect/Quant/QuantOps.cpp.inc", 4428 ), 4429 ( 4430 "-gen-dialect-decls", 4431 "include/mlir/Dialect/Quant/QuantOpsDialect.h.inc", 4432 ), 4433 ( 4434 "-gen-op-doc", 4435 "g3doc/Dialects/QuantOps/QuantOps.md", 4436 ), 4437 ], 4438 tblgen = ":mlir-tblgen", 4439 td_file = "include/mlir/Dialect/Quant/QuantOps.td", 4440 td_srcs = [":QuantizationOpsTdFiles"], 4441) 4442 4443gentbl( 4444 name = "QuantPassIncGen", 4445 strip_include_prefix = "include", 4446 tbl_outs = [ 4447 ( 4448 "-gen-pass-decls -name Quant", 4449 "include/mlir/Dialect/Quant/Passes.h.inc", 4450 ), 4451 ], 4452 tblgen = ":mlir-tblgen", 4453 td_file = "include/mlir/Dialect/Quant/Passes.td", 4454 td_srcs = [":PassBaseTdFiles"], 4455) 4456 4457cc_library( 4458 name = "QuantOps", 4459 srcs = [ 4460 "lib/Dialect/Quant/IR/QuantOps.cpp", 4461 "lib/Dialect/Quant/IR/QuantTypes.cpp", 4462 "lib/Dialect/Quant/IR/TypeDetail.h", 4463 "lib/Dialect/Quant/IR/TypeParser.cpp", 4464 "lib/Dialect/Quant/Transforms/ConvertConst.cpp", 4465 "lib/Dialect/Quant/Transforms/ConvertSimQuant.cpp", 4466 "lib/Dialect/Quant/Transforms/PassDetail.h", 4467 "lib/Dialect/Quant/Utils/FakeQuantSupport.cpp", 4468 "lib/Dialect/Quant/Utils/QuantizeUtils.cpp", 4469 "lib/Dialect/Quant/Utils/UniformSupport.cpp", 4470 ], 4471 hdrs = [ 4472 "include/mlir/Dialect/Quant/FakeQuantSupport.h", 4473 "include/mlir/Dialect/Quant/Passes.h", 4474 "include/mlir/Dialect/Quant/QuantOps.h", 4475 "include/mlir/Dialect/Quant/QuantTypes.h", 4476 "include/mlir/Dialect/Quant/QuantizeUtils.h", 4477 "include/mlir/Dialect/Quant/UniformSupport.h", 4478 ], 4479 includes = ["include"], 4480 deps = [ 4481 ":IR", 4482 ":Pass", 4483 ":QuantOpsIncGen", 4484 ":QuantPassIncGen", 4485 ":SideEffectInterfaces", 4486 ":StandardOps", 4487 ":TransformUtils", 4488 "@llvm-project//llvm:Support", 4489 ], 4490) 4491 4492filegroup( 4493 name = "LinalgOpsTdFiles", 4494 srcs = [ 4495 "include/mlir/Dialect/Linalg/IR/LinalgBase.td", 4496 "include/mlir/Dialect/Linalg/IR/LinalgOps.td", 4497 "include/mlir/Interfaces/CopyOpInterface.td", 4498 "include/mlir/Interfaces/ViewLikeInterface.td", 4499 ":AffineOpsTdFiles", 4500 ":OpBaseTdFiles", 4501 ], 4502) 4503 4504gentbl( 4505 name = "LinalgOpsIncGen", 4506 strip_include_prefix = "include", 4507 tbl_outs = [ 4508 ( 4509 "-gen-op-decls", 4510 "include/mlir/Dialect/Linalg/IR/LinalgOps.h.inc", 4511 ), 4512 ( 4513 "-gen-op-defs", 4514 "include/mlir/Dialect/Linalg/IR/LinalgOps.cpp.inc", 4515 ), 4516 ( 4517 "-gen-dialect-decls -dialect=linalg", 4518 "include/mlir/Dialect/Linalg/IR/LinalgOpsDialect.h.inc", 4519 ), 4520 ], 4521 tblgen = ":mlir-tblgen", 4522 td_file = "include/mlir/Dialect/Linalg/IR/LinalgOps.td", 4523 td_srcs = [":LinalgOpsTdFiles"], 4524) 4525 4526genlinalg( 4527 name = "LinalgNamedStructuredOpsIncGen", 4528 src = "include/mlir/Dialect/Linalg/IR/LinalgNamedStructuredOpsSpec.tc", 4529 linalg_outs = [ 4530 ( 4531 "-gen-impl", 4532 "include/mlir/Dialect/Linalg/IR/LinalgNamedStructuredOps.cpp.inc", 4533 ), 4534 ( 4535 "-gen-ods-decl", 4536 "include/mlir/Dialect/Linalg/IR/LinalgNamedStructuredOps.td", 4537 ), 4538 ], 4539 linalggen = ":mlir-linalg-ods-gen", 4540) 4541 4542filegroup( 4543 name = "LinalgStructuredOpsTdFiles", 4544 srcs = [ 4545 "include/mlir/Dialect/Linalg/IR/LinalgInterfaces.td", 4546 "include/mlir/Dialect/Linalg/IR/LinalgNamedStructuredOps.td", 4547 "include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td", 4548 "include/mlir/Interfaces/CopyOpInterface.td", 4549 "include/mlir/Interfaces/ViewLikeInterface.td", 4550 ":AffineOpsTdFiles", 4551 ":LinalgOpsTdFiles", 4552 ":OpBaseTdFiles", 4553 ], 4554) 4555 4556gentbl( 4557 name = "LinalgStructuredOpsIncGen", 4558 strip_include_prefix = "include", 4559 tbl_outs = [ 4560 ( 4561 "-gen-op-decls", 4562 "include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.h.inc", 4563 ), 4564 ( 4565 "-gen-op-defs", 4566 "include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.cpp.inc", 4567 ), 4568 ], 4569 tblgen = ":mlir-tblgen", 4570 td_file = "include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td", 4571 td_srcs = [ 4572 ":LinalgStructuredOpsTdFiles", 4573 "include/mlir/Dialect/Linalg/IR/LinalgNamedStructuredOps.td", 4574 ], 4575) 4576 4577filegroup( 4578 name = "LinalgSparseOpsTdFiles", 4579 srcs = [ 4580 "include/mlir/Dialect/Linalg/IR/LinalgBase.td", 4581 "include/mlir/Dialect/Linalg/IR/LinalgSparseOps.td", 4582 "include/mlir/Interfaces/ViewLikeInterface.td", 4583 ":OpBaseTdFiles", 4584 ], 4585) 4586 4587gentbl( 4588 name = "LinalgSparseOpsIncGen", 4589 strip_include_prefix = "include", 4590 tbl_outs = [ 4591 ( 4592 "-gen-op-decls", 4593 "include/mlir/Dialect/Linalg/IR/LinalgSparseOps.h.inc", 4594 ), 4595 ( 4596 "-gen-op-defs", 4597 "include/mlir/Dialect/Linalg/IR/LinalgSparseOps.cpp.inc", 4598 ), 4599 ], 4600 tblgen = ":mlir-tblgen", 4601 td_file = "include/mlir/Dialect/Linalg/IR/LinalgSparseOps.td", 4602 td_srcs = [":LinalgSparseOpsTdFiles"], 4603) 4604 4605gentbl( 4606 name = "LinalgInterfacesIncGen", 4607 strip_include_prefix = "include", 4608 tbl_outs = [ 4609 ( 4610 "-gen-op-interface-decls", 4611 "include/mlir/Dialect/Linalg/IR/LinalgInterfaces.h.inc", 4612 ), 4613 ( 4614 "-gen-op-interface-defs", 4615 "include/mlir/Dialect/Linalg/IR/LinalgInterfaces.cpp.inc", 4616 ), 4617 ], 4618 tblgen = ":mlir-tblgen", 4619 td_file = "include/mlir/Dialect/Linalg/IR/LinalgInterfaces.td", 4620 td_srcs = [":LinalgStructuredOpsTdFiles"], 4621) 4622 4623filegroup( 4624 name = "LinalgDocTdFiles", 4625 srcs = [ 4626 "include/mlir/Dialect/Linalg/IR/LinalgDoc.td", 4627 ":LinalgOpsTdFiles", 4628 ":LinalgStructuredOpsTdFiles", 4629 ], 4630) 4631 4632gentbl( 4633 name = "LinalgDocIncGen", 4634 strip_include_prefix = "include", 4635 tbl_outs = [ 4636 ( 4637 "-gen-op-doc", 4638 "g3doc/Dialects/Linalg/LinalgOps.md", 4639 ), 4640 ], 4641 tblgen = ":mlir-tblgen", 4642 td_file = "include/mlir/Dialect/Linalg/IR/LinalgDoc.td", 4643 td_srcs = [":LinalgDocTdFiles"], 4644) 4645 4646cc_library( 4647 name = "LinalgToLLVM", 4648 srcs = glob([ 4649 "lib/Conversion/LinalgToLLVM/*.cpp", 4650 "lib/Conversion/LinalgToLLVM/*.h", 4651 ]) + ["lib/Conversion/PassDetail.h"], 4652 hdrs = glob([ 4653 "include/mlir/Conversion/LinalgToLLVM/*.h", 4654 ]), 4655 includes = ["include"], 4656 deps = [ 4657 ":AffineToStandard", 4658 ":Analysis", 4659 ":ConversionPassIncGen", 4660 ":EDSC", 4661 ":IR", 4662 ":LLVMDialect", 4663 ":LinalgOps", 4664 ":LinalgTransforms", 4665 ":Pass", 4666 ":SCFDialect", 4667 ":SCFToStandard", 4668 ":StandardOps", 4669 ":StandardToLLVM", 4670 ":Support", 4671 ":Transforms", 4672 ":VectorToLLVM", 4673 ":VectorToSCF", 4674 "@llvm-project//llvm:Core", 4675 "@llvm-project//llvm:Support", 4676 ], 4677) 4678 4679cc_library( 4680 name = "LinalgToStandard", 4681 srcs = glob([ 4682 "lib/Conversion/LinalgToStandard/*.cpp", 4683 "lib/Conversion/LinalgToStandard/*.h", 4684 ]) + ["lib/Conversion/PassDetail.h"], 4685 hdrs = glob([ 4686 "include/mlir/Conversion/LinalgToStandard/*.h", 4687 ]), 4688 includes = ["include"], 4689 deps = [ 4690 ":Affine", 4691 ":ConversionPassIncGen", 4692 ":IR", 4693 ":LinalgOps", 4694 ":LinalgTransforms", 4695 ":Pass", 4696 ":SCFDialect", 4697 ":StandardOps", 4698 ":Support", 4699 ":Transforms", 4700 "@llvm-project//llvm:Core", 4701 "@llvm-project//llvm:Support", 4702 ], 4703) 4704 4705cc_library( 4706 name = "LinalgToSPIRV", 4707 srcs = glob([ 4708 "lib/Conversion/LinalgToSPIRV/*.cpp", 4709 "lib/Conversion/LinalgToSPIRV/*.h", 4710 ]) + ["lib/Conversion/PassDetail.h"], 4711 hdrs = glob([ 4712 "include/mlir/Conversion/LinalgToSPIRV/*.h", 4713 ]), 4714 includes = ["include"], 4715 deps = [ 4716 ":ConversionPassIncGen", 4717 ":DialectUtils", 4718 ":IR", 4719 ":LinalgOps", 4720 ":LinalgTransforms", 4721 ":Pass", 4722 ":SPIRVConversion", 4723 ":SPIRVDialect", 4724 ":StandardOps", 4725 ":TransformUtils", 4726 ], 4727) 4728 4729cc_library( 4730 name = "LinalgOps", 4731 srcs = [ 4732 "lib/Dialect/Linalg/IR/LinalgOps.cpp", 4733 "lib/Dialect/Linalg/IR/LinalgTypes.cpp", 4734 ], 4735 hdrs = [ 4736 "include/mlir/Dialect/Linalg/EDSC/Intrinsics.h", 4737 "include/mlir/Dialect/Linalg/IR/LinalgOps.h", 4738 "include/mlir/Dialect/Linalg/IR/LinalgTypes.h", 4739 ], 4740 includes = ["include"], 4741 deps = [ 4742 ":Affine", 4743 ":CopyOpInterface", 4744 ":DialectUtils", 4745 ":IR", 4746 ":LinalgInterfaces", 4747 ":LinalgInterfacesIncGen", 4748 ":LinalgNamedStructuredOpsIncGen", 4749 ":LinalgOpsIncGen", 4750 ":LinalgSparseOpsIncGen", 4751 ":LinalgStructuredOpsIncGen", 4752 ":Parser", 4753 ":SideEffectInterfaces", 4754 ":StandardOps", 4755 ":Support", 4756 ":TensorDialect", 4757 ":ViewLikeInterface", 4758 "@llvm-project//llvm:Support", 4759 ], 4760) 4761 4762gentbl( 4763 name = "LinalgPassIncGen", 4764 strip_include_prefix = "include", 4765 tbl_outs = [ 4766 ( 4767 "-gen-pass-decls -name Linalg", 4768 "include/mlir/Dialect/Linalg/Passes.h.inc", 4769 ), 4770 ], 4771 tblgen = ":mlir-tblgen", 4772 td_file = "include/mlir/Dialect/Linalg/Passes.td", 4773 td_srcs = [":PassBaseTdFiles"], 4774) 4775 4776cc_library( 4777 name = "LinalgTransforms", 4778 srcs = glob([ 4779 "lib/Dialect/Linalg/Transforms/*.cpp", 4780 "lib/Dialect/Linalg/Transforms/*.h", 4781 ]) + [ 4782 "lib/Dialect/Linalg/Analysis/DependenceAnalysis.cpp", 4783 "lib/Dialect/Linalg/EDSC/Builders.cpp", 4784 "lib/Dialect/Linalg/Utils/Utils.cpp", 4785 ], 4786 hdrs = [ 4787 "include/mlir/Dialect/Linalg/Analysis/DependenceAnalysis.h", 4788 "include/mlir/Dialect/Linalg/EDSC/Builders.h", 4789 "include/mlir/Dialect/Linalg/EDSC/FoldedIntrinsics.h", 4790 "include/mlir/Dialect/Linalg/Passes.h", 4791 "include/mlir/Dialect/Linalg/Transforms/CodegenStrategy.h", 4792 "include/mlir/Dialect/Linalg/Transforms/Hoisting.h", 4793 "include/mlir/Dialect/Linalg/Transforms/Transforms.h", 4794 "include/mlir/Dialect/Linalg/Utils/Utils.h", 4795 ], 4796 includes = ["include"], 4797 deps = [ 4798 ":Affine", 4799 ":AffineToStandard", 4800 ":AffineUtils", 4801 ":Analysis", 4802 ":DialectUtils", 4803 ":EDSC", 4804 ":IR", 4805 ":LLVMDialect", 4806 ":LinalgOps", 4807 ":LinalgPassIncGen", 4808 ":LinalgSparseOpsIncGen", 4809 ":LinalgStructuredOpsIncGen", 4810 ":MathDialect", 4811 ":Pass", 4812 ":SCFDialect", 4813 ":SCFToStandard", 4814 ":SCFTransforms", 4815 ":StandardOps", 4816 ":StandardOpsTransforms", 4817 ":StandardToLLVM", 4818 ":Support", 4819 ":TensorDialect", 4820 ":TransformUtils", 4821 ":Transforms", 4822 ":TransformsPassIncGen", 4823 ":VectorOps", 4824 ":VectorToSCF", 4825 "@llvm-project//llvm:Core", 4826 "@llvm-project//llvm:Support", 4827 ], 4828) 4829 4830filegroup( 4831 name = "VectorOpsTdFiles", 4832 srcs = [ 4833 "include/mlir/Dialect/Vector/VectorOps.td", 4834 "include/mlir/Interfaces/ViewLikeInterface.td", 4835 ":AffineOpsTdFiles", 4836 ":OpBaseTdFiles", 4837 ":VectorInterfacesTdFiles", 4838 ], 4839) 4840 4841gentbl( 4842 name = "VectorOpsIncGen", 4843 strip_include_prefix = "include", 4844 tbl_outs = [ 4845 ( 4846 "-gen-op-decls", 4847 "include/mlir/Dialect/Vector/VectorOps.h.inc", 4848 ), 4849 ( 4850 "-gen-op-defs", 4851 "include/mlir/Dialect/Vector/VectorOps.cpp.inc", 4852 ), 4853 ( 4854 "-gen-dialect-decls -dialect=vector", 4855 "include/mlir/Dialect/Vector/VectorOpsDialect.h.inc", 4856 ), 4857 ( 4858 "-gen-enum-decls", 4859 "include/mlir/Dialect/Vector/VectorOpsEnums.h.inc", 4860 ), 4861 ( 4862 "-gen-enum-defs", 4863 "include/mlir/Dialect/Vector/VectorOpsEnums.cpp.inc", 4864 ), 4865 ( 4866 "-gen-op-doc", 4867 "g3doc/Dialects/Vector/VectorOps.md", 4868 ), 4869 ], 4870 tblgen = ":mlir-tblgen", 4871 td_file = "include/mlir/Dialect/Vector/VectorOps.td", 4872 td_srcs = [":VectorOpsTdFiles"], 4873) 4874 4875cc_library( 4876 name = "VectorToLLVM", 4877 srcs = glob([ 4878 "lib/Conversion/VectorToLLVM/*.cpp", 4879 "lib/Conversion/VectorToLLVM/*.h", 4880 ]) + ["lib/Conversion/PassDetail.h"], 4881 hdrs = glob([ 4882 "include/mlir/Conversion/VectorToLLVM/*.h", 4883 ]), 4884 includes = ["include"], 4885 deps = [ 4886 ":AVX512", 4887 ":AVX512ToLLVM", 4888 ":ArmNeon", 4889 ":ArmNeonToLLVM", 4890 ":ArmSVE", 4891 ":ArmSVEToLLVM", 4892 ":ConversionPassIncGen", 4893 ":DialectUtils", 4894 ":EDSC", 4895 ":IR", 4896 ":LLVMAVX512", 4897 ":LLVMArmNeon", 4898 ":LLVMArmSVE", 4899 ":LLVMDialect", 4900 ":LLVMIRModuleTranslation", 4901 ":Pass", 4902 ":StandardOps", 4903 ":StandardToLLVM", 4904 ":Support", 4905 ":Transforms", 4906 ":VectorOps", 4907 "@llvm-project//llvm:Core", 4908 "@llvm-project//llvm:Support", 4909 ], 4910) 4911 4912cc_library( 4913 name = "VectorToSCF", 4914 srcs = glob([ 4915 "lib/Conversion/VectorToSCF/*.cpp", 4916 "lib/Conversion/VectorToSCF/*.h", 4917 ]) + ["lib/Conversion/PassDetail.h"], 4918 hdrs = glob([ 4919 "include/mlir/Conversion/VectorToSCF/*.h", 4920 ]), 4921 includes = ["include"], 4922 deps = [ 4923 ":Affine", 4924 ":ConversionPassIncGen", 4925 ":EDSC", 4926 ":IR", 4927 ":LLVMDialect", 4928 ":Pass", 4929 ":SCFDialect", 4930 ":StandardOps", 4931 ":StandardToLLVM", 4932 ":Support", 4933 ":Transforms", 4934 ":VectorOps", 4935 "@llvm-project//llvm:Core", 4936 "@llvm-project//llvm:Support", 4937 ], 4938) 4939 4940filegroup( 4941 name = "TosaDialectTdFiles", 4942 srcs = glob(["include/mlir/Dialect/Tosa/IR/*.td"]) + [ 4943 "include/mlir/Interfaces/LoopLikeInterface.td", 4944 ":OpBaseTdFiles", 4945 ":QuantizationOpsTdFiles", 4946 ":SideEffectTdFiles", 4947 ], 4948) 4949 4950gentbl( 4951 name = "TosaDialectIncGen", 4952 strip_include_prefix = "include", 4953 tbl_outs = [ 4954 ( 4955 "-gen-op-decls", 4956 "include/mlir/Dialect/Tosa/IR/TosaOps.h.inc", 4957 ), 4958 ( 4959 "-gen-op-defs", 4960 "include/mlir/Dialect/Tosa/IR/TosaOps.cpp.inc", 4961 ), 4962 ( 4963 "-gen-struct-attr-decls", 4964 "include/mlir/Dialect/Tosa/IR/TosaStructs.h.inc", 4965 ), 4966 ( 4967 "-gen-struct-attr-defs", 4968 "include/mlir/Dialect/Tosa/IR/TosaStructs.cpp.inc", 4969 ), 4970 ( 4971 "-gen-dialect-decls", 4972 "include/mlir/Dialect/Tosa/IR/TosaOpsDialect.h.inc", 4973 ), 4974 ( 4975 "-gen-op-doc", 4976 "g3doc/Dialects/Tosa/TosaOps.md", 4977 ), 4978 ], 4979 tblgen = ":mlir-tblgen", 4980 td_file = "include/mlir/Dialect/Tosa/IR/TosaOps.td", 4981 td_srcs = [ 4982 ":OpBaseTdFiles", 4983 "include/mlir/Dialect/Tosa/IR/TosaOpBase.td", 4984 "include/mlir/Dialect/Tosa/IR/TosaInterfaces.td", 4985 "include/mlir/Dialect/Tosa/IR/TosaTypesBase.td", 4986 ":SideEffectTdFiles", 4987 "include/mlir/Interfaces/LoopLikeInterface.td", 4988 ], 4989) 4990 4991gentbl( 4992 name = "TosaInterfacesIncGen", 4993 strip_include_prefix = "include", 4994 tbl_outs = [ 4995 ( 4996 "-gen-op-interface-decls", 4997 "include/mlir/Dialect/Tosa/IR/TosaInterfaces.h.inc", 4998 ), 4999 ( 5000 "-gen-op-interface-defs", 5001 "include/mlir/Dialect/Tosa/IR/TosaInterfaces.cpp.inc", 5002 ), 5003 ], 5004 tblgen = ":mlir-tblgen", 5005 td_file = "include/mlir/Dialect/Tosa/IR/TosaInterfaces.td", 5006 td_srcs = [":OpBaseTdFiles"], 5007) 5008 5009gentbl( 5010 name = "TosaPassIncGen", 5011 strip_include_prefix = "include", 5012 tbl_outs = [ 5013 ( 5014 "-gen-pass-decls -name TosaOpt", 5015 "include/mlir/Dialect/Tosa/Transforms/Passes.h.inc", 5016 ), 5017 ], 5018 tblgen = ":mlir-tblgen", 5019 td_file = "include/mlir/Dialect/Tosa/Transforms/Passes.td", 5020 td_srcs = [":PassBaseTdFiles"], 5021) 5022 5023cc_library( 5024 name = "TosaDialect", 5025 srcs = glob([ 5026 "lib/Dialect/Tosa/IR/*.cpp", 5027 "lib/Dialect/Tosa/IR/*.h", 5028 "lib/Dialect/Tosa/Utils/*.cpp", 5029 "lib/Dialect/Tosa/Transforms/*.cpp", 5030 ]), 5031 hdrs = glob([ 5032 "include/mlir/Dialect/Tosa/IR/*.h", 5033 "include/mlir/Dialect/Tosa/Utils/*.h", 5034 "include/mlir/Dialect/Tosa/Transforms/*.h", 5035 ]), 5036 includes = ["include"], 5037 deps = [ 5038 ":Dialect", 5039 ":IR", 5040 ":LoopLikeInterface", 5041 ":Pass", 5042 ":QuantOps", 5043 ":SideEffectInterfaces", 5044 ":StandardOps", 5045 ":TosaDialectIncGen", 5046 ":TosaInterfacesIncGen", 5047 ":TosaPassIncGen", 5048 ":TransformUtils", 5049 ], 5050) 5051 5052cc_library( 5053 name = "TosaToLinalg", 5054 srcs = glob([ 5055 "lib/Conversion/TosaToLinalg/*.cpp", 5056 "lib/Conversion/TosaToLinalg/*.h", 5057 ]) + ["lib/Conversion/PassDetail.h"], 5058 hdrs = glob([ 5059 "include/mlir/Conversion/TosaToLinalg/*.h", 5060 ]), 5061 includes = [ 5062 "include", 5063 "lib/Conversion/TosaToLinalg", 5064 ], 5065 deps = [ 5066 ":ConversionPassIncGen", 5067 ":IR", 5068 ":LinalgOps", 5069 ":MathDialect", 5070 ":Pass", 5071 ":StandardOps", 5072 ":TosaDialect", 5073 ":Transforms", 5074 ], 5075) 5076 5077filegroup( 5078 name = "ComplexOpsTdFiles", 5079 srcs = [ 5080 "include/mlir/Dialect/Complex/IR/ComplexBase.td", 5081 "include/mlir/Dialect/Complex/IR/ComplexOps.td", 5082 ":OpBaseTdFiles", 5083 ":SideEffectTdFiles", 5084 ":VectorInterfacesTdFiles", 5085 ], 5086) 5087 5088gentbl( 5089 name = "ComplexBaseIncGen", 5090 strip_include_prefix = "include", 5091 tbl_outs = [ 5092 ( 5093 "-gen-dialect-decls -dialect=complex", 5094 "include/mlir/Dialect/Complex/IR/ComplexOpsDialect.h.inc", 5095 ), 5096 ], 5097 tblgen = ":mlir-tblgen", 5098 td_file = "include/mlir/Dialect/Complex/IR/ComplexBase.td", 5099 td_srcs = [":ComplexOpsTdFiles"], 5100) 5101 5102gentbl( 5103 name = "ComplexOpsIncGen", 5104 strip_include_prefix = "include", 5105 tbl_outs = [ 5106 ( 5107 "-gen-op-decls", 5108 "include/mlir/Dialect/Complex/IR/ComplexOps.h.inc", 5109 ), 5110 ( 5111 "-gen-op-defs", 5112 "include/mlir/Dialect/Complex/IR/ComplexOps.cpp.inc", 5113 ), 5114 ], 5115 tblgen = ":mlir-tblgen", 5116 td_file = "include/mlir/Dialect/Complex/IR/ComplexOps.td", 5117 td_srcs = [":ComplexOpsTdFiles"], 5118) 5119 5120cc_library( 5121 name = "ComplexDialect", 5122 srcs = glob( 5123 [ 5124 "lib/Dialect/Complex/IR/*.cpp", 5125 "lib/Dialect/Complex/IR/*.h", 5126 ], 5127 ), 5128 hdrs = ["include/mlir/Dialect/Complex/IR/Complex.h"], 5129 includes = ["include"], 5130 deps = [ 5131 ":ComplexBaseIncGen", 5132 ":ComplexOpsIncGen", 5133 ":IR", 5134 ":SideEffectInterfaces", 5135 ":Support", 5136 ":VectorInterfaces", 5137 "@llvm-project//llvm:Support", 5138 ], 5139) 5140 5141cc_library( 5142 name = "ComplexToLLVM", 5143 srcs = glob([ 5144 "lib/Conversion/ComplexToLLVM/*.cpp", 5145 "lib/Conversion/ComplexToLLVM/*.h", 5146 ]) + ["lib/Conversion/PassDetail.h"], 5147 hdrs = glob([ 5148 "include/mlir/Conversion/ComplexToLLVM/*.h", 5149 ]), 5150 includes = ["include"], 5151 deps = [ 5152 ":ComplexDialect", 5153 ":ConversionPassIncGen", 5154 ":IR", 5155 ":LLVMDialect", 5156 ":Pass", 5157 ":StandardToLLVM", 5158 ":Support", 5159 ":Transforms", 5160 "@llvm-project//llvm:Core", 5161 "@llvm-project//llvm:Support", 5162 ], 5163) 5164 5165exports_files( 5166 [ 5167 "include/mlir/Bindings/Python/Attributes.td", 5168 "include/mlir/Interfaces/CallInterfaces.h", 5169 "include/mlir/Interfaces/CallInterfaces.td", 5170 "include/mlir/Interfaces/CastInterfaces.h", 5171 "include/mlir/Interfaces/CastInterfaces.td", 5172 "include/mlir/Interfaces/ControlFlowInterfaces.h", 5173 "include/mlir/Interfaces/ControlFlowInterfaces.td", 5174 "include/mlir/Interfaces/CopyOpInterface.td", 5175 "include/mlir/Interfaces/InferTypeOpInterface.td", 5176 "include/mlir/Interfaces/LoopLikeInterface.td", 5177 "include/mlir/Interfaces/SideEffectInterfaceBase.td", 5178 "include/mlir/Interfaces/SideEffectInterfaces.td", 5179 "include/mlir/Interfaces/VectorInterfaces.td", 5180 "include/mlir/Interfaces/ViewLikeInterface.td", 5181 "include/mlir/Dialect/LLVMIR/LLVMOpBase.td", 5182 "include/mlir/Dialect/StandardOps/IR/Ops.td", 5183 "include/mlir/Dialect/Shape/IR/ShapeOps.td", 5184 "include/mlir/Dialect/Shape/IR/ShapeBase.td", 5185 "include/mlir/IR/OpAsmInterface.td", 5186 "include/mlir/IR/OpBase.td", 5187 "include/mlir/IR/RegionKindInterface.td", 5188 "include/mlir/IR/SymbolInterfaces.td", 5189 "include/mlir/Transforms/InliningUtils.h", 5190 ], 5191 visibility = [":friends"], 5192) 5193 5194filegroup( 5195 name = "MathOpsTdFiles", 5196 srcs = [ 5197 "include/mlir/Dialect/Math/IR/MathBase.td", 5198 "include/mlir/Dialect/Math/IR/MathOps.td", 5199 ":OpBaseTdFiles", 5200 ":SideEffectTdFiles", 5201 ":VectorInterfacesTdFiles", 5202 ], 5203) 5204 5205gentbl( 5206 name = "MathBaseIncGen", 5207 strip_include_prefix = "include", 5208 tbl_outs = [ 5209 ( 5210 "-gen-dialect-decls -dialect=math", 5211 "include/mlir/Dialect/Math/IR/MathOpsDialect.h.inc", 5212 ), 5213 ], 5214 tblgen = ":mlir-tblgen", 5215 td_file = "include/mlir/Dialect/Math/IR/MathBase.td", 5216 td_srcs = [ 5217 ":MathOpsTdFiles", 5218 ], 5219) 5220 5221gentbl( 5222 name = "MathOpsIncGen", 5223 strip_include_prefix = "include", 5224 tbl_outs = [ 5225 ( 5226 "-gen-op-decls", 5227 "include/mlir/Dialect/Math/IR/MathOps.h.inc", 5228 ), 5229 ( 5230 "-gen-op-defs", 5231 "include/mlir/Dialect/Math/IR/MathOps.cpp.inc", 5232 ), 5233 ], 5234 tblgen = ":mlir-tblgen", 5235 td_file = "include/mlir/Dialect/Math/IR/MathOps.td", 5236 td_srcs = [ 5237 ":MathOpsTdFiles", 5238 ], 5239) 5240 5241cc_library( 5242 name = "MathDialect", 5243 srcs = glob( 5244 [ 5245 "lib/Dialect/Math/IR/*.cpp", 5246 "lib/Dialect/Math/IR/*.h", 5247 ], 5248 ), 5249 hdrs = [ 5250 "include/mlir/Dialect/Math/EDSC/Intrinsics.h", 5251 "include/mlir/Dialect/Math/IR/Math.h", 5252 "include/mlir/Transforms/InliningUtils.h", 5253 ], 5254 includes = ["include"], 5255 deps = [ 5256 ":EDSC", 5257 ":IR", 5258 ":MathBaseIncGen", 5259 ":MathOpsIncGen", 5260 ":SideEffectInterfaces", 5261 ":Support", 5262 ":VectorInterfaces", 5263 "@llvm-project//llvm:Support", 5264 ], 5265) 5266 5267cc_library( 5268 name = "MathTransforms", 5269 srcs = glob([ 5270 "lib/Dialect/Math/Transforms/*.cpp", 5271 "lib/Dialect/Math/Transforms/*.h", 5272 ]), 5273 hdrs = glob(["include/mlir/Dialect/Math/Transforms/*.h"]), 5274 includes = ["include"], 5275 deps = [ 5276 ":IR", 5277 ":MathDialect", 5278 ":Pass", 5279 ":SCFDialect", 5280 ":StandardOps", 5281 ":Support", 5282 ":Transforms", 5283 "@llvm-project//llvm:Support", 5284 ], 5285) 5286 5287cc_library( 5288 name = "MathToLLVM", 5289 srcs = glob([ 5290 "lib/Conversion/MathToLLVM/*.cpp", 5291 "lib/Conversion/MathToLLVM/*.h", 5292 ]) + ["lib/Conversion/PassDetail.h"], 5293 hdrs = glob([ 5294 "include/mlir/Conversion/MathToLLVM/*.h", 5295 ]), 5296 includes = ["include"], 5297 deps = [ 5298 ":ConversionPassIncGen", 5299 ":IR", 5300 ":LLVMDialect", 5301 ":MathDialect", 5302 ":Pass", 5303 ":StandardToLLVM", 5304 ":Support", 5305 ":Transforms", 5306 "@llvm-project//llvm:Core", 5307 "@llvm-project//llvm:Support", 5308 ], 5309) 5310