MLIR  22.0.0git
RegisterAllPasses.cpp
Go to the documentation of this file.
1 //===- RegisterAllPasses.cpp - 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 passes to the
10 // system.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #include "mlir/InitAllPasses.h"
15 
16 #include "mlir/Conversion/Passes.h"
49 #include "mlir/Transforms/Passes.h"
50 
51 // This function may be called to register the MLIR passes with the
52 // global registry.
53 // If you're building a compiler, you likely don't need this: you would build a
54 // pipeline programmatically without the need to register with the global
55 // registry, since it would already be calling the creation routine of the
56 // individual passes.
57 // The global registry is interesting to interact with the command-line tools.
59  // General passes
60  registerTransformsPasses();
61 
62  // Conversion passes
63  registerConversionPasses();
64 
65  // Dialect passes
66  acc::registerOpenACCPasses();
67  affine::registerAffinePasses();
68  amdgpu::registerAMDGPUPasses();
69  registerAsyncPasses();
70  arith::registerArithPasses();
71  bufferization::registerBufferizationPasses();
72  func::registerFuncPasses();
73  registerGPUPasses();
74  registerLinalgPasses();
75  registerNVGPUPasses();
76  registerSparseTensorPasses();
77  LLVM::registerLLVMPasses();
78  LLVM::registerTargetLLVMIRTransformsPasses();
79  math::registerMathPasses();
80  memref::registerMemRefPasses();
81  shard::registerShardPasses();
82  ml_program::registerMLProgramPasses();
83  quant::registerQuantPasses();
84  registerSCFPasses();
85  registerShapePasses();
86  spirv::registerSPIRVPasses();
87  tensor::registerTensorPasses();
88  tosa::registerTosaOptPasses();
89  transform::registerTransformPasses();
90  vector::registerVectorPasses();
91  arm_sme::registerArmSMEPasses();
92  arm_sve::registerArmSVEPasses();
93  emitc::registerEmitCPasses();
94  xegpu::registerXeGPUPasses();
95 
96  // Dialect pipelines
101 }
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".
void registerAllPasses()