MLIR  16.0.0git
ConvertOpenMPToLLVM.h
Go to the documentation of this file.
1 //===- OpenMPToLLVM.h - Utils to convert from the OpenMP 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_OPENMPTOLLVM_CONVERTOPENMPTOLLVM_H
9 #define MLIR_CONVERSION_OPENMPTOLLVM_CONVERTOPENMPTOLLVM_H
10 
11 #include <memory>
12 
13 namespace mlir {
14 class LLVMTypeConverter;
15 class ConversionTarget;
16 class MLIRContext;
17 class ModuleOp;
18 template <typename T>
19 class OperationPass;
20 class RewritePatternSet;
21 
22 #define GEN_PASS_DECL_CONVERTOOPENMPTOLLVM
23 #include "mlir/Conversion/Passes.h.inc"
24 
25 /// Configure dynamic conversion legality of regionless operations from OpenMP
26 /// to LLVM.
27 void configureOpenMPToLLVMConversionLegality(ConversionTarget &target,
28  LLVMTypeConverter &typeConverter);
29 
30 /// Populate the given list with patterns that convert from OpenMP to LLVM.
31 void populateOpenMPToLLVMConversionPatterns(LLVMTypeConverter &converter,
32  RewritePatternSet &patterns);
33 
34 /// Create a pass to convert OpenMP operations to the LLVMIR dialect.
35 std::unique_ptr<OperationPass<ModuleOp>> createConvertOpenMPToLLVMPass();
36 
37 } // namespace mlir
38 
39 #endif // MLIR_CONVERSION_OPENMPTOLLVM_CONVERTOPENMPTOLLVM_H
Include the generated interface declarations.
void populateOpenMPToLLVMConversionPatterns(LLVMTypeConverter &converter, RewritePatternSet &patterns)
Populate the given list with patterns that convert from OpenMP to LLVM.
void configureOpenMPToLLVMConversionLegality(ConversionTarget &target, LLVMTypeConverter &typeConverter)
Configure dynamic conversion legality of regionless operations from OpenMP to LLVM.
std::unique_ptr< OperationPass< ModuleOp > > createConvertOpenMPToLLVMPass()
Create a pass to convert OpenMP operations to the LLVMIR dialect.