MLIR  20.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/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  quant::registerQuantPasses();
87  registerSCFPasses();
88  registerShapePasses();
89  spirv::registerSPIRVPasses();
90  tensor::registerTensorPasses();
91  tosa::registerTosaOptPasses();
92  transform::registerTransformPasses();
93  vector::registerVectorPasses();
94  arm_sme::registerArmSMEPasses();
95  arm_sve::registerArmSVEPasses();
96  emitc::registerEmitCPasses();
97  xegpu::registerXeGPUPasses();
98 
99  // Dialect pipelines
104 }
105 
106 } // namespace mlir
107 
108 #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