MLIR  19.0.0git
InitAllPasses.h
Go to the documentation of this file.
1 //===- LinkAllPassesAndDialects.h - MLIR Registration -----------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file defines a helper to trigger the registration of all dialects and
10 // passes to the system.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef MLIR_INITALLPASSES_H_
15 #define MLIR_INITALLPASSES_H_
16 
17 #include "mlir/Config/mlir-config.h"
18 #include "mlir/Conversion/Passes.h"
49 #include "mlir/Transforms/Passes.h"
50 
51 #include <cstdlib>
52 
53 namespace mlir {
54 
55 // This function may be called to register the MLIR passes with the
56 // global registry.
57 // If you're building a compiler, you likely don't need this: you would build a
58 // pipeline programmatically without the need to register with the global
59 // registry, since it would already be calling the creation routine of the
60 // individual passes.
61 // The global registry is interesting to interact with the command-line tools.
62 inline void registerAllPasses() {
63  // General passes
64  registerTransformsPasses();
65 
66  // Conversion passes
67  registerConversionPasses();
68 
69  // Dialect passes
70  acc::registerOpenACCPasses();
71  affine::registerAffinePasses();
72  amdgpu::registerAMDGPUPasses();
73  registerAsyncPasses();
74  arith::registerArithPasses();
75  bufferization::registerBufferizationPasses();
76  func::registerFuncPasses();
77  registerGPUPasses();
78  registerLinalgPasses();
79  registerNVGPUPasses();
80  registerSparseTensorPasses();
81  LLVM::registerLLVMPasses();
82  math::registerMathPasses();
83  memref::registerMemRefPasses();
84  mesh::registerMeshPasses();
85  ml_program::registerMLProgramPasses();
86  registerSCFPasses();
87  registerShapePasses();
88  spirv::registerSPIRVPasses();
89  tensor::registerTensorPasses();
90  tosa::registerTosaOptPasses();
91  transform::registerTransformPasses();
92  vector::registerVectorPasses();
93  arm_sme::registerArmSMEPasses();
94  arm_sve::registerArmSVEPasses();
95  emitc::registerEmitCPasses();
96  xegpu::registerXeGPUPasses();
97 
98  // Dialect pipelines
102 #if MLIR_ENABLE_CUDA_CONVERSIONS
104 #endif
105 }
106 
107 } // namespace mlir
108 
109 #endif // MLIR_INITALLPASSES_H_
void registerBufferizationPipelines()
Registers all pipelines for the bufferization dialect.
void registerGPUToNVVMPipeline()
Register all pipeleines for the gpu dialect.
void registerSparseTensorPipelines()
Registers all pipelines for the sparse_tensor dialect.
void registerTosaToLinalgPipelines()
Populates TOSA to linalg pipelines Currently, this includes only the "tosa-to-linalg-pipeline".
Include the generated interface declarations.
void registerAllPasses()
Definition: InitAllPasses.h:62