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>
147 llvm::SmallVectorImpl<pft::Evaluation *> *skipped =
nullptr);
161void setInsertionPointAfterOpenACCLoopIfInside(fir::FirOpBuilder &);
163void genEarlyReturnInOpenACCLoop(fir::FirOpBuilder &, mlir::Location);
171 mlir::Block *targetBlock);
179 Fortran::semantics::SemanticsContext &semanticsContext,
180 Fortran::lower::SymMap &localSymbols,
181 const Fortran::parser::DoConstruct &doConstruct,
pft::Evaluation &eval);
Definition AbstractConverter.h:87
Definition StatementContext.h:46
Definition SymbolMap.h:181
Definition semantics.h:71
Definition FIRBuilder.h:66
Definition ParserActions.h:24
pft::Evaluation * findNestedDoConstructEvaluation(pft::Evaluation &eval, llvm::SmallVectorImpl< pft::Evaluation * > *skipped=nullptr)
Definition OpenACC.cpp:5614
void clearIvPrivatizedDoConstructs(const pft::Evaluation &eval)
Definition OpenACC.cpp:2315
uint64_t getLoopCountForCollapseAndTile(const Fortran::parser::AccClauseList &)
Definition OpenACC.cpp:5705
bool isInsideOpenACCRoutine(fir::FirOpBuilder &)
Definition OpenACC.cpp:5634
bool isInsideOpenACCComputeConstruct(fir::FirOpBuilder &)
Definition OpenACC.cpp:5628
void materializeOpenACCRoutineBindTargets(AbstractConverter &, mlir::ModuleOp)
Definition OpenACC.cpp:5082
bool isCollapsedDoConstruct(const Fortran::parser::DoConstruct &)
Check whether a DoConstruct was absorbed by a collapse clause.
Definition OpenACC.cpp:5604
std::pair< uint64_t, bool > getCollapseSizeAndForce(const Fortran::parser::AccClauseList &)
Definition OpenACC.cpp:5719
bool genOpenACCRegionExitBranch(fir::FirOpBuilder &, mlir::Location, mlir::Block *targetBlock)
Definition OpenACC.cpp:5676
void clearCollapsedDoConstructs()
Clear the collapsed DoConstruct tracking set.
Definition OpenACC.cpp:5609
void markDoConstructAsCollapsed(const Fortran::parser::DoConstruct &)
Definition OpenACC.cpp:5599
mlir::Operation * genOpenACCLoopFromDoConstruct(AbstractConverter &converter, Fortran::semantics::SemanticsContext &semanticsContext, Fortran::lower::SymMap &localSymbols, const Fortran::parser::DoConstruct &doConstruct, pft::Evaluation &eval)
Definition OpenACC.cpp:5740
bool shouldLowerDoConstructAsAccLoop(fir::FirOpBuilder &)
Definition OpenACC.cpp:5656
bool isInOpenACCLoop(fir::FirOpBuilder &)
Checks whether the current insertion point is inside OpenACC loop.
Definition OpenACC.cpp:5590
Definition check-expression.h:19
Definition bit-population-count.h:20
Definition AbstractConverter.h:37
Definition AbstractConverter.h:32
Definition PFTBuilder.h:222
Definition parse-tree.h:5863
Definition parse-tree.h:2379
Definition parse-tree.h:6006
Definition parse-tree.h:5977
Definition parse-tree.h:5868