9#ifndef FORTRAN_LOWER_OPENMPUTILS_H
10#define FORTRAN_LOWER_OPENMPUTILS_H
12#include "flang/Lower/OpenMP/Clauses.h"
13#include "mlir/Dialect/OpenMP/OpenMPDialect.h"
14#include "mlir/IR/Location.h"
15#include "mlir/IR/Value.h"
16#include "llvm/Support/CommandLine.h"
19extern llvm::cl::opt<bool> treatIndexAsSection;
36class StatementContext;
41class AbstractConverter;
46 mlir::omp::DeclareTargetCaptureClause clause;
52 : clause(c), automap(a), symbol(s) {}
106 bool isDuplicateMemberMapInfo(llvm::SmallVectorImpl<int64_t> &memberIndices) {
107 return llvm::find_if(memberPlacementIndices, [&](
auto &memberData) {
108 return llvm::equal(memberIndices, memberData);
109 }) != memberPlacementIndices.end();
112 void addChildIndexAndMapToParent(
const omp::Object &
object,
113 mlir::omp::MapInfoOp &mapOp,
117void insertChildMapInfoIntoParent(
121 std::map<Object, OmpMapParentAndMemberData> &parentMemberIndices,
122 llvm::SmallVectorImpl<mlir::Value> &mapOperands,
123 llvm::SmallVectorImpl<const semantics::Symbol *> &mapSyms);
125void generateMemberPlacementIndices(
126 const Object &
object, llvm::SmallVectorImpl<int64_t> &indices,
129bool isMemberOrParentAllocatableOrPointer(
132mlir::Value createParentSymAndGenIntermediateMaps(
135 omp::ObjectList &objectList, llvm::SmallVectorImpl<int64_t> &indices,
137 llvm::omp::OpenMPOffloadMappingFlags mapTypeBits);
139omp::ObjectList gatherObjectsOf(omp::Object derivedTypeMember,
143 std::size_t loopVarTypeSize);
148void gatherFuncAndVarSyms(
149 const ObjectList &objects, mlir::omp::DeclareTargetCaptureClause clause,
150 llvm::SmallVectorImpl<DeclareTargetCaptureInfo> &symbolAndClause,
151 bool automap =
false);
153int64_t getCollapseValue(
const List<Clause> &clauses);
155void genObjectList(
const ObjectList &objects,
157 llvm::SmallVectorImpl<mlir::Value> &operands);
159void lastprivateModifierNotSupported(
const omp::clause::Lastprivate &lastp,
162bool collectLoopRelatedInfo(
165 mlir::omp::LoopRelatedClauseOps &result,
166 llvm::SmallVectorImpl<const semantics::Symbol *> &iv);
Definition: AbstractConverter.h:85
Definition: StatementContext.h:46
Definition: semantics.h:67
Definition: bit-population-count.h:20
Definition: AbstractConverter.h:34
Definition: PFTBuilder.h:221