13#ifndef FORTRAN_LOWER_OPENACC_H
14#define FORTRAN_LOWER_OPENACC_H
16#include "mlir/Dialect/OpenACC/OpenACC.h"
19template <
typename T,
unsigned N>
70static constexpr llvm::StringRef declarePostAllocSuffix =
71 "_acc_declare_post_alloc";
72static constexpr llvm::StringRef declarePreDeallocSuffix =
73 "_acc_declare_pre_dealloc";
74static constexpr llvm::StringRef declarePostDeallocSuffix =
75 "_acc_declare_post_dealloc";
77static constexpr llvm::StringRef privatizationRecipePrefix =
"privatization";
80 Fortran::semantics::SemanticsContext &,
82 const parser::OpenACCConstruct &,
83 Fortran::lower::SymMap &localSymbols);
84void genOpenACCDeclarativeConstruct(
87void genOpenACCRoutineConstruct(
89 const std::vector<Fortran::semantics::OpenACCRoutineInfo> &);
91void declareExternalAccModuleDeclareActionRecipes(
93 const Fortran::semantics::Symbol &);
101 const Fortran::semantics::Symbol &);
103 mlir::Value beginOpValue,
104 const Fortran::semantics::Symbol &);
106 const Fortran::semantics::Symbol &);
108void genOpenACCTerminator(fir::FirOpBuilder &, mlir::Operation *,
118std::pair<uint64_t, bool>
142 llvm::SmallVectorImpl<pft::Evaluation *> *skipped =
nullptr);
156void setInsertionPointAfterOpenACCLoopIfInside(fir::FirOpBuilder &);
158void genEarlyReturnInOpenACCLoop(fir::FirOpBuilder &, mlir::Location);
166 mlir::Block *targetBlock);
174 Fortran::semantics::SemanticsContext &semanticsContext,
175 Fortran::lower::SymMap &localSymbols,
176 const Fortran::parser::DoConstruct &doConstruct,
pft::Evaluation &eval);
Definition AbstractConverter.h:87
Definition StatementContext.h:46
Definition SymbolMap.h:181
Definition semantics.h:67
Definition FIRBuilder.h:66
Definition ParserActions.h:24
pft::Evaluation * findNestedDoConstructEvaluation(pft::Evaluation &eval, llvm::SmallVectorImpl< pft::Evaluation * > *skipped=nullptr)
Definition OpenACC.cpp:5501
uint64_t getLoopCountForCollapseAndTile(const Fortran::parser::AccClauseList &)
Definition OpenACC.cpp:5592
bool isInsideOpenACCRoutine(fir::FirOpBuilder &)
Definition OpenACC.cpp:5521
bool isInsideOpenACCComputeConstruct(fir::FirOpBuilder &)
Definition OpenACC.cpp:5515
void materializeOpenACCRoutineBindTargets(AbstractConverter &, mlir::ModuleOp)
Definition OpenACC.cpp:4964
bool isCollapsedDoConstruct(const Fortran::parser::DoConstruct &)
Check whether a DoConstruct was absorbed by a collapse clause.
Definition OpenACC.cpp:5491
std::pair< uint64_t, bool > getCollapseSizeAndForce(const Fortran::parser::AccClauseList &)
Definition OpenACC.cpp:5606
bool genOpenACCRegionExitBranch(fir::FirOpBuilder &, mlir::Location, mlir::Block *targetBlock)
Definition OpenACC.cpp:5563
void clearCollapsedDoConstructs()
Clear the collapsed DoConstruct tracking set.
Definition OpenACC.cpp:5496
void markDoConstructAsCollapsed(const Fortran::parser::DoConstruct &)
Definition OpenACC.cpp:5486
mlir::Operation * genOpenACCLoopFromDoConstruct(AbstractConverter &converter, Fortran::semantics::SemanticsContext &semanticsContext, Fortran::lower::SymMap &localSymbols, const Fortran::parser::DoConstruct &doConstruct, pft::Evaluation &eval)
Definition OpenACC.cpp:5627
bool shouldLowerDoConstructAsAccLoop(fir::FirOpBuilder &)
Definition OpenACC.cpp:5543
bool isInOpenACCLoop(fir::FirOpBuilder &)
Checks whether the current insertion point is inside OpenACC loop.
Definition OpenACC.cpp:5477
Definition check-expression.h:19
Definition bit-population-count.h:20
Definition AbstractConverter.h:37
Definition AbstractConverter.h:32
Definition PFTBuilder.h:221
Definition parse-tree.h:5852
Definition parse-tree.h:2379
Definition parse-tree.h:5995
Definition parse-tree.h:5966
Definition parse-tree.h:5857