MLIR  16.0.0git
ControlFlowToLLVM.h
Go to the documentation of this file.
1 //===- ControlFlowToLLVM.h - ControlFlow to LLVM -----------*- 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 // Define conversions from the ControlFlow dialect to the LLVM IR dialect.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef MLIR_CONVERSION_CONTROLFLOWTOLLVM_CONTROLFLOWTOLLVM_H
14 #define MLIR_CONVERSION_CONTROLFLOWTOLLVM_CONTROLFLOWTOLLVM_H
15 
16 #include <memory>
17 
18 namespace mlir {
19 class LLVMTypeConverter;
20 class RewritePatternSet;
21 class Pass;
22 
23 namespace cf {
24 /// Collect the patterns to convert from the ControlFlow dialect to LLVM. The
25 /// conversion patterns capture the LLVMTypeConverter by reference meaning the
26 /// references have to remain alive during the entire pattern lifetime.
28  RewritePatternSet &patterns);
29 
30 /// Creates a pass to convert the ControlFlow dialect into the LLVMIR dialect.
31 std::unique_ptr<Pass> createConvertControlFlowToLLVMPass();
32 } // namespace cf
33 } // namespace mlir
34 
35 #endif // MLIR_CONVERSION_CONTROLFLOWTOLLVM_CONTROLFLOWTOLLVM_H
Include the generated interface declarations.
Conversion from types to the LLVM IR dialect.
Definition: TypeConverter.h:30
std::unique_ptr< Pass > createConvertControlFlowToLLVMPass()
Creates a pass to convert the ControlFlow dialect into the LLVMIR dialect.
void populateControlFlowToLLVMConversionPatterns(LLVMTypeConverter &converter, RewritePatternSet &patterns)
Collect the patterns to convert from the ControlFlow dialect to LLVM.