|
7 | 7 | //===----------------------------------------------------------------------===// |
8 | 8 |
|
9 | 9 | #include "flang/Support/OpenMP-utils.h" |
10 | | -#include "flang/Optimizer/Dialect/FIROps.h" |
11 | | -#include "flang/Optimizer/Dialect/FIRType.h" |
12 | 10 |
|
13 | | -#include "mlir/Dialect/OpenMP/OpenMPDialect.h" |
14 | 11 | #include "mlir/IR/OpDefinition.h" |
15 | 12 |
|
16 | 13 | namespace Fortran::common::openmp { |
@@ -50,35 +47,4 @@ mlir::Block *genEntryBlock(mlir::OpBuilder &builder, const EntryBlockArgs &args, |
50 | 47 |
|
51 | 48 | return builder.createBlock(®ion, {}, types, locs); |
52 | 49 | } |
53 | | - |
54 | | -mlir::omp::MapInfoOp createMapInfoOp(mlir::OpBuilder &builder, |
55 | | - mlir::Location loc, mlir::Value baseAddr, mlir::Value varPtrPtr, |
56 | | - llvm::StringRef name, llvm::ArrayRef<mlir::Value> bounds, |
57 | | - llvm::ArrayRef<mlir::Value> members, mlir::ArrayAttr membersIndex, |
58 | | - uint64_t mapType, mlir::omp::VariableCaptureKind mapCaptureType, |
59 | | - mlir::Type retTy, bool partialMap, mlir::FlatSymbolRefAttr mapperId) { |
60 | | - |
61 | | - if (auto boxTy = llvm::dyn_cast<fir::BaseBoxType>(baseAddr.getType())) { |
62 | | - baseAddr = fir::BoxAddrOp::create(builder, loc, baseAddr); |
63 | | - retTy = baseAddr.getType(); |
64 | | - } |
65 | | - |
66 | | - mlir::TypeAttr varType = mlir::TypeAttr::get( |
67 | | - llvm::cast<mlir::omp::PointerLikeType>(retTy).getElementType()); |
68 | | - |
69 | | - // For types with unknown extents such as <2x?xi32> we discard the incomplete |
70 | | - // type info and only retain the base type. The correct dimensions are later |
71 | | - // recovered through the bounds info. |
72 | | - if (auto seqType = llvm::dyn_cast<fir::SequenceType>(varType.getValue())) |
73 | | - if (seqType.hasDynamicExtents()) |
74 | | - varType = mlir::TypeAttr::get(seqType.getEleTy()); |
75 | | - |
76 | | - mlir::omp::MapInfoOp op = |
77 | | - mlir::omp::MapInfoOp::create(builder, loc, retTy, baseAddr, varType, |
78 | | - builder.getIntegerAttr(builder.getIntegerType(64, false), mapType), |
79 | | - builder.getAttr<mlir::omp::VariableCaptureKindAttr>(mapCaptureType), |
80 | | - varPtrPtr, members, membersIndex, bounds, mapperId, |
81 | | - builder.getStringAttr(name), builder.getBoolAttr(partialMap)); |
82 | | - return op; |
83 | | -} |
84 | 50 | } // namespace Fortran::common::openmp |
0 commit comments