MLIR  16.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"
37 #include "mlir/Transforms/Passes.h"
38 
39 #include <cstdlib>
40 
41 namespace mlir {
42 
43 // This function may be called to register the MLIR passes with the
44 // global registry.
45 // If you're building a compiler, you likely don't need this: you would build a
46 // pipeline programmatically without the need to register with the global
47 // registry, since it would already be calling the creation routine of the
48 // individual passes.
49 // The global registry is interesting to interact with the command-line tools.
50 inline void registerAllPasses() {
51  // General passes
52  registerTransformsPasses();
53 
54  // Conversion passes
55  registerConversionPasses();
56 
57  // Dialect passes
58  registerAffinePasses();
59  registerAsyncPasses();
60  arith::registerArithmeticPasses();
61  bufferization::registerBufferizationPasses();
62  func::registerFuncPasses();
63  registerGPUPasses();
66  registerLinalgPasses();
67  registerNVGPUPasses();
68  registerSparseTensorPasses();
69  LLVM::registerLLVMPasses();
70  memref::registerMemRefPasses();
71  registerSCFPasses();
72  registerShapePasses();
73  spirv::registerSPIRVPasses();
74  tensor::registerTensorPasses();
75  tosa::registerTosaOptPasses();
76  transform::registerTransformPasses();
77  vector::registerVectorPasses();
78 
79  // Dialect pipelines
81 }
82 
83 } // namespace mlir
84 
85 #endif // MLIR_INITALLPASSES_H_
Include the generated interface declarations.
void registerSparseTensorPipelines()
Registers all pipelines for the sparse_tensor dialect.
void registerAllPasses()
Definition: InitAllPasses.h:50
void registerGpuSerializeToHsacoPass()
Register pass to serialize GPU kernel functions to a HSAco binary annotation.
void registerGpuSerializeToCubinPass()
Register pass to serialize GPU kernel functions to a CUBIN binary annotation.