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"
48 #include "mlir/Transforms/Passes.h"
49 
50 #include <cstdlib>
51 
52 namespace mlir {
53 
54 // This function may be called to register the MLIR passes with the
55 // global registry.
56 // If you're building a compiler, you likely don't need this: you would build a
57 // pipeline programmatically without the need to register with the global
58 // registry, since it would already be calling the creation routine of the
59 // individual passes.
60 // The global registry is interesting to interact with the command-line tools.
61 inline void registerAllPasses() {
62  // General passes
63  registerTransformsPasses();
64 
65  // Conversion passes
66  registerConversionPasses();
67 
68  // Dialect passes
69  acc::registerOpenACCPasses();
70  affine::registerAffinePasses();
71  amdgpu::registerAMDGPUPasses();
72  registerAsyncPasses();
73  arith::registerArithPasses();
74  bufferization::registerBufferizationPasses();
75  func::registerFuncPasses();
76  registerGPUPasses();
77  registerLinalgPasses();
78  registerNVGPUPasses();
79  registerSparseTensorPasses();
80  LLVM::registerLLVMPasses();
81  math::registerMathPasses();
82  memref::registerMemRefPasses();
83  mesh::registerMeshPasses();
84  ml_program::registerMLProgramPasses();
85  registerSCFPasses();
86  registerShapePasses();
87  spirv::registerSPIRVPasses();
88  tensor::registerTensorPasses();
89  tosa::registerTosaOptPasses();
90  transform::registerTransformPasses();
91  vector::registerVectorPasses();
92  arm_sme::registerArmSMEPasses();
93  arm_sve::registerArmSVEPasses();
94  emitc::registerEmitCPasses();
95 
96  // Dialect pipelines
100 #if MLIR_ENABLE_CUDA_CONVERSIONS
102 #endif
103 }
104 
105 } // namespace mlir
106 
107 #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:61