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 DialectRegistry; |
15 | class LLVMTypeConverter; |
16 | class ConversionTarget; |
17 | class MLIRContext; |
18 | class Pass; |
19 | class RewritePatternSet; |
20 | |
21 | #define GEN_PASS_DECL_CONVERTOPENMPTOLLVMPASS |
22 | #include "mlir/Conversion/Passes.h.inc" |
23 | |
24 | /// Configure dynamic conversion legality of regionless operations from OpenMP |
25 | /// to LLVM. |
26 | void configureOpenMPToLLVMConversionLegality( |
27 | ConversionTarget &target, const LLVMTypeConverter &typeConverter); |
28 | |
29 | /// Populate the given list with patterns that convert from OpenMP to LLVM. |
30 | void populateOpenMPToLLVMConversionPatterns(LLVMTypeConverter &converter, |
31 | RewritePatternSet &patterns); |
32 | |
33 | /// Registers the `ConvertToLLVMPatternInterface` interface in the `OpenMP` |
34 | /// dialect. |
35 | void registerConvertOpenMPToLLVMInterface(DialectRegistry ®istry); |
36 | } // namespace mlir |
37 | |
38 | #endif // MLIR_CONVERSION_OPENMPTOLLVM_CONVERTOPENMPTOLLVM_H |
39 | |