#include "mlir/Conversion/OpenMPToLLVM/ConvertOpenMPToLLVM.h"
#include "mlir/Conversion/ArithToLLVM/ArithToLLVM.h"
#include "mlir/Conversion/ControlFlowToLLVM/ControlFlowToLLVM.h"
#include "mlir/Conversion/ConvertToLLVM/ToLLVMInterface.h"
#include "mlir/Conversion/FuncToLLVM/ConvertFuncToLLVM.h"
#include "mlir/Conversion/FuncToLLVM/ConvertFuncToLLVMPass.h"
#include "mlir/Conversion/LLVMCommon/ConversionTarget.h"
#include "mlir/Conversion/LLVMCommon/Pattern.h"
#include "mlir/Conversion/MemRefToLLVM/MemRefToLLVM.h"
#include "mlir/Dialect/LLVMIR/LLVMDialect.h"
#include "mlir/Dialect/OpenMP/OpenMPDialect.h"
#include "mlir/Pass/Pass.h"
namespace mlir {
#define GEN_PASS_DEF_CONVERTOPENMPTOLLVMPASS
#include "mlir/Conversion/Passes.h.inc"
}
usingnamespacemlir;
namespace {
template <typename OpType>
struct RegionOpConversion : public ConvertOpToLLVMPattern<OpType> { … };
template <typename T>
struct RegionLessOpWithVarOperandsConversion
: public ConvertOpToLLVMPattern<T> { … };
template <typename T>
struct RegionOpWithVarOperandsConversion : public ConvertOpToLLVMPattern<T> { … };
template <typename T>
struct RegionLessOpConversion : public ConvertOpToLLVMPattern<T> { … };
struct AtomicReadOpConversion
: public ConvertOpToLLVMPattern<omp::AtomicReadOp> { … };
struct MapInfoOpConversion : public ConvertOpToLLVMPattern<omp::MapInfoOp> { … };
template <typename OpType>
struct MultiRegionOpConversion : public ConvertOpToLLVMPattern<OpType> { … };
template <>
void MultiRegionOpConversion<omp::PrivateClauseOp>::forwardOpAttrs(
omp::PrivateClauseOp curOp, omp::PrivateClauseOp newOp) const { … }
}
void mlir::configureOpenMPToLLVMConversionLegality(
ConversionTarget &target, const LLVMTypeConverter &typeConverter) { … }
void mlir::populateOpenMPToLLVMConversionPatterns(LLVMTypeConverter &converter,
RewritePatternSet &patterns) { … }
namespace {
struct ConvertOpenMPToLLVMPass
: public impl::ConvertOpenMPToLLVMPassBase<ConvertOpenMPToLLVMPass> { … };
}
void ConvertOpenMPToLLVMPass::runOnOperation() { … }
namespace {
struct OpenMPToLLVMDialectInterface : public ConvertToLLVMPatternInterface { … };
}
void mlir::registerConvertOpenMPToLLVMInterface(DialectRegistry ®istry) { … }