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 <memory>
12 
13 namespace mlir {
14 class LLVMTypeConverter;
15 class MLIRContext;
16 class ModuleOp;
17 template <typename T>
18 class OperationPass;
19 class RewritePatternSet;
20 
21 /// Populate the given list with patterns that convert from Linalg to LLVM.
22 void populateLinalgToLLVMConversionPatterns(LLVMTypeConverter &converter,
23                                             RewritePatternSet &patterns);
24 
25 /// Create a pass to convert Linalg operations to the LLVMIR dialect.
26 std::unique_ptr<OperationPass<ModuleOp>> createConvertLinalgToLLVMPass();
27 
28 } // namespace mlir
29 
30 #endif // MLIR_CONVERSION_LINALGTOLLVM_LINALGTOLLVM_H_
31