Lines Matching refs:semantics
85 PFTBuilder(const semantics::SemanticsContext &semanticsContext) in PFTBuilder()
295 const semantics::SemanticsContext &semanticsContext) { in enterFunction()
424 const semantics::Symbol *sym = in addEvaluation()
426 if (auto *details = sym->detailsIf<semantics::GenericDetails>()) in addEvaluation()
428 assert(sym->has<semantics::SubprogramDetails>() && in addEvaluation()
575 if (semantics::ExprHasTypeCategory(*semantics::GetExpr(*expr), in analyzeIoBranches()
1010 unit->getSubprogramSymbol().get<semantics::SubprogramDetails>(); in processEntryPoints()
1012 const semantics::Symbol *resultSym = &details.result(); in processEntryPoints()
1024 const semantics::SemanticsContext &semanticsContext;
1222 static const semantics::Symbol *getSymbol(A &beginStmt) { in getSymbol()
1225 -> const semantics::Symbol * { return stmt.statement.v.symbol; }, in getSymbol()
1227 -> const semantics::Symbol * { in getSymbol()
1231 -> const semantics::Symbol * { in getSymbol()
1235 -> const semantics::Symbol * { return stmt.statement.v.symbol; }, in getSymbol()
1237 -> const semantics::Symbol * { return stmt.statement.v.symbol; }, in getSymbol()
1239 -> const semantics::Symbol * { in getSymbol()
1242 [](const auto &) -> const semantics::Symbol * { in getSymbol()
1267 bool Fortran::lower::definedInCommonBlock(const semantics::Symbol &sym) { in definedInCommonBlock()
1268 return semantics::FindCommonBlockContaining(sym); in definedInCommonBlock()
1271 static bool isReentrant(const Fortran::semantics::Scope &scope) { in isReentrant()
1272 if (scope.kind() == Fortran::semantics::Scope::Kind::MainProgram) in isReentrant()
1274 if (scope.kind() == Fortran::semantics::Scope::Kind::Subprogram) { in isReentrant()
1275 const Fortran::semantics::Symbol *sym = scope.symbol(); in isReentrant()
1277 return sym->attrs().test(semantics::Attr::RECURSIVE) || in isReentrant()
1278 (!sym->attrs().test(semantics::Attr::NON_RECURSIVE) && in isReentrant()
1281 if (scope.kind() == Fortran::semantics::Scope::Kind::Module) in isReentrant()
1287 bool Fortran::lower::symbolIsGlobal(const semantics::Symbol &sym) { in symbolIsGlobal()
1288 if (const auto *details = sym.detailsIf<semantics::ObjectEntityDetails>()) { in symbolIsGlobal()
1294 if (const Fortran::semantics::DeclTypeSpec *symTy = sym.GetType()) in symbolIsGlobal()
1295 if (symTy->category() == semantics::DeclTypeSpec::Character) in symbolIsGlobal()
1302 sym.owner().kind() == Fortran::semantics::Scope::Kind::MainProgram) in symbolIsGlobal()
1305 return semantics::IsSaved(sym) || lower::definedInCommonBlock(sym) || in symbolIsGlobal()
1306 semantics::IsNamedConstant(sym); in symbolIsGlobal()
1319 void analyzeAliasesInCurrentScope(const semantics::Scope &scope) { in analyzeAliasesInCurrentScope()
1329 const semantics::Scope *parentScope = &scope; in analyzeAliasesInCurrentScope()
1336 const semantics::Symbol &ultimate = iter.second.get().GetUltimate(); in analyzeAliasesInCurrentScope()
1349 inline static std::size_t offsetWidth(const Fortran::semantics::Symbol &sym) { in offsetWidth()
1358 void analyzeAliases(const semantics::Scope &scope) { in analyzeAliases()
1366 std::list<std::list<semantics::SymbolRef>> aggregates = in analyzeAliases()
1367 Fortran::semantics::GetStorageAssociations(scope); in analyzeAliases()
1368 for (std::list<semantics::SymbolRef> aggregate : aggregates) { in analyzeAliases()
1369 const Fortran::semantics::Symbol *aggregateSym = nullptr; in analyzeAliases()
1371 const semantics::Symbol &first = *aggregate.front(); in analyzeAliases()
1374 const Fortran::semantics::Symbol *namingSym = nullptr; in analyzeAliases()
1375 for (semantics::SymbolRef symRef : aggregate) { in analyzeAliases()
1376 const semantics::Symbol &sym = *symRef; in analyzeAliases()
1378 if (sym.test(Fortran::semantics::Symbol::Flag::CompilerCreated)) { in analyzeAliases()
1401 int analyze(const semantics::Symbol &sym) { in analyze()
1407 semantics::IsProcedurePointer(sym) || in analyze()
1408 (semantics::IsProcedure(sym) && IsDummy(sym)); in analyze()
1412 if (semantics::IsProcedure(sym) && !isProcedurePointerOrDummy) in analyze()
1414 semantics::Symbol ultimate = sym.GetUltimate(); in analyze()
1416 ultimate.detailsIf<semantics::NamelistDetails>()) { in analyze()
1418 for (const semantics::SymbolRef &s : details->objects()) in analyze()
1422 if (!ultimate.has<semantics::ObjectEntityDetails>() && in analyze()
1426 if (sym.has<semantics::DerivedTypeDetails>()) in analyze()
1436 if (const auto *details = sym.detailsIf<semantics::ObjectEntityDetails>()) { in analyze()
1437 const semantics::DeclTypeSpec *symTy = sym.GetType(); in analyze()
1440 if (symTy->category() == semantics::DeclTypeSpec::Character) in analyze()
1447 semantics::SomeExpr e{*bound.GetExplicit()}; in analyze()
1453 for (const semantics::ShapeSpec &subs : details->shape()) { in analyze()
1458 for (const semantics::ShapeSpec &subs : details->coshape()) { in analyze()
1470 if (semantics::IsAllocatable(sym)) in analyze()
1472 if (semantics::IsPointer(sym)) in analyze()
1474 if (ultimate.attrs().test(semantics::Attr::TARGET)) in analyze()
1494 const semantics::Symbol &ultimate = sym.GetUltimate(); in findStoreIfAlias()
1495 const semantics::Scope &scope = ultimate.owner(); in findStoreIfAlias()
1532 bool skipSymbol(const semantics::Symbol &sym) { in skipSymbol()
1536 return !sym.has<semantics::ObjectEntityDetails>() || in skipSymbol()
1546 llvm::SmallSet<const semantics::Symbol *, 32> seen;
1548 llvm::SmallSet<const semantics::Symbol *, 32> aliasSyms;
1550 llvm::SmallSet<const semantics::Scope *, 4> analyzedScopes;
1556 const semantics::Scope &scope, in processSymbolTable()
1571 const semantics::SemanticsContext &semanticsContext) in FunctionLikeUnit()
1579 const semantics::Symbol *symbol = getSymbol(*beginStmt);
1592 const semantics::SemanticsContext &) in FunctionLikeUnit()
1596 const semantics::Symbol *symbol = getSymbol(*beginStmt);
1603 const semantics::SemanticsContext &) in FunctionLikeUnit()
1607 const semantics::Symbol *symbol = getSymbol(*beginStmt);
1614 const lower::pft::PftNode &parent, const semantics::SemanticsContext &) in FunctionLikeUnit()
1618 const semantics::Symbol *symbol = getSymbol(*beginStmt);
1653 const semantics::Symbol *symbol = getSymbol(beginStmt);
1662 const semantics::Symbol *symbol = getSymbol(beginStmt);
1670 const Fortran::semantics::Scope &
1672 const Fortran::semantics::Symbol *symbol = getSymbol(beginStmt); in getScope()
1684 const semantics::SemanticsContext &semanticsContext) in BlockDataUnit()
1692 const semantics::SemanticsContext &semanticsContext) { in createPFT()
1762 const Fortran::semantics::Symbol &symbol) { in buildFuncResultDependencyList()
1787 if (const auto *expr = Fortran::semantics::GetExpr(nullptr, x)) in Pre()
1793 if (const semantics::Symbol *symbol = name.symbol) in Pre()
1800 for (const semantics::Symbol &symbol : in visitExpr()
1805 void visitSymbol(const Fortran::semantics::Symbol &symbol) { in visitSymbol()
1811 symbol.detailsIf<Fortran::semantics::SubprogramDetails>()) { in visitSymbol()
1817 const Fortran::semantics::Symbol &result = in visitSymbol()
1820 result.detailsIf<Fortran::semantics::ObjectEntityDetails>()) in visitSymbol()
1822 for (const Fortran::semantics::ShapeSpec &shapeSpec : in visitSymbol()
1830 if (Fortran::semantics::IsProcedure(symbol)) { in visitSymbol()
1838 } else if (const Fortran::semantics::DerivedTypeSpec *derivedTypeSpec = in visitSymbol()
1841 if (const Fortran::semantics::MaybeIntExpr &expr = in visitSymbol()
1852 const std::function<void(const Fortran::semantics::Symbol &)> &callBack;
1858 const std::function<void(const Fortran::semantics::Symbol &)> callBack) { in visitAllSymbols()
1867 const std::function<void(const Fortran::semantics::Symbol &)> callBack) { in visitAllSymbols()