Lines Matching full:semantics

22 #include "flang/Semantics/tools.h"
28 const semantics::Symbol *symbol, lower::pft::Evaluation &eval) const {
38 lower::AbstractConverter &converter, semantics::SemanticsContext &semaCtx,
82 for (const semantics::Symbol *sym : allPrivatizedSymbols)
83 if (semantics::IsAllocatable(sym->GetUltimate())) {
113 void DataSharingProcessor::cloneSymbol(const semantics::Symbol *sym) {
114 bool isFirstPrivate = sym->test(semantics::Symbol::Flag::OmpFirstPrivate);
140 const semantics::Symbol *sym, mlir::OpBuilder::InsertPoint *copyAssignIP) {
141 if (sym->test(semantics::Symbol::Flag::OmpFirstPrivate))
146 const semantics::Symbol *sym, mlir::OpBuilder::InsertPoint *lastPrivIP) {
147 if (sym->test(semantics::Symbol::Flag::OmpLastPrivate))
153 llvm::SetVector<const semantics::Symbol *> &symbolSet) {
185 for (const semantics::Symbol *sym : allPrivatizedSymbols) {
186 if (sym->test(semantics::Symbol::Flag::OmpLastPrivate) &&
187 (sym->test(semantics::Symbol::Flag::OmpFirstPrivate) || callsInitClone))
283 getSource(const semantics::SemanticsContext &semaCtx,
321 lower::pft::Evaluation &eval, semantics::Symbol::Flag flag,
322 llvm::SetVector<const semantics::Symbol *> &symbolsInNestedRegions) {
345 semantics::Symbol::Flag flag,
346 llvm::SetVector<const semantics::Symbol *> &symbols) {
348 llvm::SetVector<const semantics::Scope *> clauseScopes;
349 std::function<void(const semantics::Scope *)> collectScopes =
350 [&](const semantics::Scope *scope) {
352 for (const semantics::Scope &child : scope->children())
357 const semantics::Scope *curScope = nullptr;
364 llvm::SetVector<const semantics::Symbol *> allSymbols;
369 llvm::SetVector<const semantics::Symbol *> symbolsInNestedRegions;
377 bool collectImplicit = flag == semantics::Symbol::Flag::OmpImplicit;
378 bool collectPreDetermined = flag == semantics::Symbol::Flag::OmpPreDetermined;
380 auto isPrivatizable = [](const semantics::Symbol &sym) -> bool {
381 return !semantics::IsProcedure(sym) &&
382 !sym.GetUltimate().has<semantics::DerivedTypeDetails>() &&
383 !sym.GetUltimate().has<semantics::NamelistDetails>() &&
384 !semantics::IsImpliedDoIndex(sym.GetUltimate()) &&
385 !semantics::IsStmtFunction(sym);
388 auto shouldCollectSymbol = [&](const semantics::Symbol *sym) {
390 return sym->test(semantics::Symbol::Flag::OmpImplicit);
393 return sym->test(semantics::Symbol::Flag::OmpPreDetermined);
395 return !sym->test(semantics::Symbol::Flag::OmpImplicit) &&
396 !sym->test(semantics::Symbol::Flag::OmpPreDetermined);
416 collectSymbols(semantics::Symbol::Flag::OmpPrivate, defaultSymbols);
418 collectSymbols(semantics::Symbol::Flag::OmpFirstPrivate,
427 collectSymbols(semantics::Symbol::Flag::OmpImplicit, implicitSymbols);
432 collectSymbols(semantics::Symbol::Flag::OmpPreDetermined,
437 for (const semantics::Symbol *sym : allPrivatizedSymbols) {
439 sym->detailsIf<semantics::CommonBlockDetails>()) {
449 for (const semantics::Symbol *sym : allPrivatizedSymbols)
451 sym->detailsIf<semantics::CommonBlockDetails>()) {
460 void DataSharingProcessor::doPrivatize(const semantics::Symbol *sym,
474 bool isFirstPrivate = sym->test(semantics::Symbol::Flag::OmpFirstPrivate);