1 //===- LinalgToLLVM.h - Utils to convert from the linalg dialect ----------===//
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 #ifndef MLIR_CONVERSION_LINALGTOLLVM_LINALGTOLLVM_H_
9 #define MLIR_CONVERSION_LINALGTOLLVM_LINALGTOLLVM_H_
10 
11 #include "mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h"
12 #include "mlir/Transforms/DialectConversion.h"
13 
14 namespace mlir {
15 class MLIRContext;
16 class ModuleOp;
17 template <typename T> class OperationPass;
18 
19 /// Populate the given list with patterns that convert from Linalg to LLVM.
20 void populateLinalgToLLVMConversionPatterns(LLVMTypeConverter &converter,
21                                             OwningRewritePatternList &patterns,
22                                             MLIRContext *ctx);
23 
24 /// Create a pass to convert Linalg operations to the LLVMIR dialect.
25 std::unique_ptr<OperationPass<ModuleOp>> createConvertLinalgToLLVMPass();
26 
27 } // namespace mlir
28 
29 #endif // MLIR_CONVERSION_LINALGTOLLVM_LINALGTOLLVM_H_
30