13#ifndef FORTRAN_LOWER_OPENACC_H
14#define FORTRAN_LOWER_OPENACC_H
16#include "mlir/Dialect/OpenACC/OpenACC.h"
19template <
typename T,
unsigned N>
68static constexpr llvm::StringRef declarePostAllocSuffix =
69 "_acc_declare_post_alloc";
70static constexpr llvm::StringRef declarePreDeallocSuffix =
71 "_acc_declare_pre_dealloc";
72static constexpr llvm::StringRef declarePostDeallocSuffix =
73 "_acc_declare_post_dealloc";
75static constexpr llvm::StringRef privatizationRecipePrefix =
"privatization";
78 Fortran::semantics::SemanticsContext &,
80 const parser::OpenACCConstruct &,
81 Fortran::lower::SymMap &localSymbols);
82void genOpenACCDeclarativeConstruct(
85void genOpenACCRoutineConstruct(
87 const std::vector<Fortran::semantics::OpenACCRoutineInfo> &);
90 const Fortran::semantics::Symbol &);
92 mlir::Value beginOpValue,
93 const Fortran::semantics::Symbol &);
95 const Fortran::semantics::Symbol &);
97void genOpenACCTerminator(fir::FirOpBuilder &, mlir::Operation *,
107std::pair<uint64_t, bool>
135void setInsertionPointAfterOpenACCLoopIfInside(fir::FirOpBuilder &);
137void genEarlyReturnInOpenACCLoop(fir::FirOpBuilder &, mlir::Location);
145 mlir::Block *targetBlock);
153 Fortran::semantics::SemanticsContext &semanticsContext,
154 Fortran::lower::SymMap &localSymbols,
155 const Fortran::parser::DoConstruct &doConstruct,
pft::Evaluation &eval);
Definition AbstractConverter.h:87
Definition StatementContext.h:46
Definition SymbolMap.h:182
Definition semantics.h:68
Definition FIRBuilder.h:58
Definition ParserActions.h:24
uint64_t getLoopCountForCollapseAndTile(const Fortran::parser::AccClauseList &)
Definition OpenACC.cpp:4912
bool isInsideOpenACCRoutine(fir::FirOpBuilder &)
Definition OpenACC.cpp:4841
bool isInsideOpenACCComputeConstruct(fir::FirOpBuilder &)
Definition OpenACC.cpp:4835
bool isCollapsedDoConstruct(const Fortran::parser::DoConstruct &)
Check whether a DoConstruct was absorbed by a collapse clause.
Definition OpenACC.cpp:4826
std::pair< uint64_t, bool > getCollapseSizeAndForce(const Fortran::parser::AccClauseList &)
Definition OpenACC.cpp:4926
bool genOpenACCRegionExitBranch(fir::FirOpBuilder &, mlir::Location, mlir::Block *targetBlock)
Definition OpenACC.cpp:4883
void clearCollapsedDoConstructs()
Clear the collapsed DoConstruct tracking set.
Definition OpenACC.cpp:4831
void markDoConstructAsCollapsed(const Fortran::parser::DoConstruct &)
Definition OpenACC.cpp:4821
mlir::Operation * genOpenACCLoopFromDoConstruct(AbstractConverter &converter, Fortran::semantics::SemanticsContext &semanticsContext, Fortran::lower::SymMap &localSymbols, const Fortran::parser::DoConstruct &doConstruct, pft::Evaluation &eval)
Definition OpenACC.cpp:4947
bool shouldLowerDoConstructAsAccLoop(fir::FirOpBuilder &)
Definition OpenACC.cpp:4863
bool isInOpenACCLoop(fir::FirOpBuilder &)
Checks whether the current insertion point is inside OpenACC loop.
Definition OpenACC.cpp:4812
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:5633
Definition parse-tree.h:2325
Definition parse-tree.h:5776
Definition parse-tree.h:5747
Definition parse-tree.h:5638