Lines Matching refs:lower
86 : pgm{std::make_unique<lower::pft::Program>( in PFTBuilder()
89 lower::pft::PftNode pftRoot{*pgm.get()};
94 std::unique_ptr<lower::pft::Program> result() { return std::move(pgm); } in result()
98 if constexpr (lower::pft::isFunctionLike<A>) { in Pre()
100 } else if constexpr (lower::pft::isConstruct<A> || in Pre()
101 lower::pft::isDirective<A>) { in Pre()
109 if constexpr (lower::pft::isConstructStmt<T> || in Pre()
110 lower::pft::isOtherStmt<T>) { in Pre()
111 addEvaluation(lower::pft::Evaluation{ in Pre()
122 addEvaluation(lower::pft::Evaluation{ in Pre()
157 lower::pft::Evaluation{ifStmt, pftParentStack.back(), position, label}); in convertIfStmt()
161 lower::pft::Evaluation{endIfStmt, pftParentStack.back(), {}, {}}); in convertIfStmt()
167 if constexpr (lower::pft::isFunctionLike<A>) { in Post()
169 } else if constexpr (lower::pft::isConstruct<A> || in Post()
170 lower::pft::isDirective<A>) { in Post()
184 addUnit(lower::pft::BlockDataUnit{node, pftParentStack.back(), in Pre()
193 return lower::pft::Evaluation{x, pftParentStack.back(), in Pre()
205 addEvaluation(lower::pft::Evaluation{stmt.statement, in Pre()
220 if (pftParentStack.back().isA<lower::pft::Program>()) { in Pre()
222 lower::pft::CompilerDirectiveUnit(directive, pftParentStack.back())); in Pre()
232 Fortran::lower::pft::ModuleLikeUnit &unit = in enterModule()
233 addUnit(lower::pft::ModuleLikeUnit{func, pftParentStack.back()}); in enterModule()
256 pftParentStack.back().get<lower::pft::FunctionLikeUnit>().endStmt; in endFunctionBody()
259 addEvaluation(lower::pft::Evaluation{ in endFunctionBody()
263 addEvaluation(lower::pft::Evaluation{ in endFunctionBody()
267 addEvaluation(lower::pft::Evaluation{ in endFunctionBody()
271 addEvaluation(lower::pft::Evaluation{ in endFunctionBody()
288 if (pftParentStack.back().isA<lower::pft::ModuleLikeUnit>()) in cleanModuleEvaluationList()
298 Fortran::lower::pft::FunctionLikeUnit &unit = in enterFunction()
299 addFunction(lower::pft::FunctionLikeUnit{func, pftParentStack.back(), in enterFunction()
324 Fortran::lower::pft::Evaluation &eval = addEvaluation( in enterConstructOrDirective()
325 lower::pft::Evaluation{constructOrDirective, pftParentStack.back()}); in enterConstructOrDirective()
326 eval.evaluationList.reset(new lower::pft::EvaluationList); in enterConstructOrDirective()
339 Fortran::lower::pft::EvaluationList &evaluationList = in exitConstructOrDirective()
344 lower::pft::Evaluation{exitTarget, pftParentStack.back(), {}, {}}); in exitConstructOrDirective()
356 [&](lower::pft::FunctionLikeUnit &p) { in resetFunctionState()
361 [&](lower::pft::ModuleLikeUnit &p) { in resetFunctionState()
386 lower::pft::Evaluation
393 return lower::pft::Evaluation{ in makeEvaluationAction()
401 lower::pft::Evaluation &addEvaluation(lower::pft::Evaluation &&eval) { in addEvaluation()
408 lower::pft::Evaluation *p = &evaluationListStack.back()->back(); in addEvaluation()
438 void pushEvaluationList(lower::pft::EvaluationList *evaluationList) { in pushEvaluationList()
495 lower::pft::EvaluationList::iterator ifConstructIt; in rewriteIfGotos()
510 auto firstStmt = [](lower::pft::Evaluation *e) { in rewriteIfGotos()
513 const Fortran::lower::pft::Evaluation &targetEval = *firstStmt(&eval); in rewriteIfGotos()
526 lower::pft::EvaluationList::iterator ifConstructIt = in rewriteIfGotos()
528 lower::pft::EvaluationList::iterator successorIt = in rewriteIfGotos()
531 Fortran::lower::pft::EvaluationList &ifBodyList = in rewriteIfGotos()
533 lower::pft::EvaluationList::iterator branchStmtIt = in rewriteIfGotos()
539 lower::pft::Evaluation &ifStmt = *ifBodyList.begin(); in rewriteIfGotos()
542 lower::pft::EvaluationList::iterator endIfStmtIt = in rewriteIfGotos()
572 void analyzeIoBranches(lower::pft::Evaluation &eval, const A &stmt) { in analyzeIoBranches()
624 void setConstructExit(lower::pft::Evaluation &eval) { in setConstructExit()
629 void markBranchTarget(lower::pft::Evaluation &sourceEvaluation, in markBranchTarget()
630 lower::pft::Evaluation &targetEvaluation) { in markBranchTarget()
638 lower::pft::Evaluation *sourceConstruct = sourceEvaluation.parentConstruct; in markBranchTarget()
639 lower::pft::Evaluation *targetConstruct = targetEvaluation.parentConstruct; in markBranchTarget()
648 for (lower::pft::Evaluation *eval = &targetEvaluation; eval; in markBranchTarget()
661 void markBranchTarget(lower::pft::Evaluation &sourceEvaluation, in markBranchTarget()
664 lower::pft::Evaluation *targetEvaluation{ in markBranchTarget()
671 void markSuccessorAsNewBlock(lower::pft::Evaluation &eval) { in markSuccessorAsNewBlock()
715 lower::pft::Evaluation *parentConstruct) { in insertConstructName()
724 void analyzeBranches(lower::pft::Evaluation *parentConstruct, in analyzeBranches()
725 std::list<lower::pft::Evaluation> &evaluationList) { in analyzeBranches()
726 lower::pft::Evaluation *lastConstructStmtEvaluation{}; in analyzeBranches()
743 lower::pft::Evaluation *construct{name.empty() in analyzeBranches()
751 lower::pft::Evaluation *construct{name.empty() in analyzeBranches()
790 lower::pft::Evaluation *target{ in analyzeBranches()
797 lower::pft::LabelSet labelSet{}; in analyzeBranches()
865 lower::pft::Evaluation &doEval = evaluationList.front(); in analyzeBranches()
991 lower::pft::Evaluation *initialEval = &evaluationListStack.back()->front(); in processEntryPoints()
992 lower::pft::FunctionLikeUnit *unit = initialEval->getOwningProcedure(); in processEntryPoints()
1022 std::unique_ptr<lower::pft::Program> pgm;
1023 std::vector<lower::pft::PftNode> pftParentStack;
1028 std::list<lower::pft::FunctionLikeUnit> *functionList{};
1029 std::vector<lower::pft::Evaluation *> constructAndDirectiveStack{};
1030 std::vector<lower::pft::Evaluation *> doConstructStack{};
1032 std::vector<lower::pft::EvaluationList *> evaluationListStack{};
1033 llvm::DenseMap<parser::Label, lower::pft::Evaluation *> *labelEvaluationMap{};
1034 lower::pft::SymbolLabelMap *assignSymbolLabelMap{};
1035 std::map<std::string, lower::pft::Evaluation *> constructNameMap{};
1036 lower::pft::Evaluation *lastLexicalEvaluation{};
1042 const lower::pft::Program &pft) { in dumpPFT()
1045 [&](const lower::pft::BlockDataUnit &unit) { in dumpPFT()
1050 [&](const lower::pft::FunctionLikeUnit &func) { in dumpPFT()
1053 [&](const lower::pft::ModuleLikeUnit &unit) { in dumpPFT()
1056 [&](const lower::pft::CompilerDirectiveUnit &unit) { in dumpPFT()
1064 llvm::StringRef evaluationName(const lower::pft::Evaluation &eval) { in evaluationName()
1071 const lower::pft::Evaluation &eval, in dumpEvaluation()
1103 const lower::pft::Evaluation &eval) { in dumpEvaluation()
1108 const lower::pft::EvaluationList &evaluationList, in dumpEvaluationList()
1112 for (const lower::pft::Evaluation &eval : evaluationList) in dumpEvaluationList()
1118 const lower::pft::FunctionLikeUnit &functionLikeUnit) { in dumpFunctionLikeUnit()
1157 for (const lower::pft::FunctionLikeUnit &func : in dumpFunctionLikeUnit()
1166 const lower::pft::ModuleLikeUnit &moduleLikeUnit) { in dumpModuleLikeUnit()
1171 for (const lower::pft::FunctionLikeUnit &func : in dumpModuleLikeUnit()
1180 const lower::pft::CompilerDirectiveUnit &directive) { in dumpCompilerDirectiveUnit()
1197 std::size_t getNodeIndex(const lower::pft::Program &) { return 0; } in getNodeIndex()
1207 static lower::pft::FunctionLikeUnit::FunctionStatement
1209 lower::pft::FunctionLikeUnit::FunctionStatement result{ in getFunctionStmt()
1215 static lower::pft::ModuleLikeUnit::ModuleStatement getModuleStmt(const T &mod) { in getModuleStmt()
1216 lower::pft::ModuleLikeUnit::ModuleStatement result{ in getModuleStmt()
1250 bool Fortran::lower::pft::Evaluation::lowerAsStructured() const { in lowerAsStructured()
1254 bool Fortran::lower::pft::Evaluation::lowerAsUnstructured() const { in lowerAsUnstructured()
1258 lower::pft::FunctionLikeUnit *
1259 Fortran::lower::pft::Evaluation::getOwningProcedure() const { in getOwningProcedure()
1261 [](lower::pft::FunctionLikeUnit &c) { return &c; }, in getOwningProcedure()
1262 [&](lower::pft::Evaluation &c) { return c.getOwningProcedure(); }, in getOwningProcedure()
1263 [](auto &) -> lower::pft::FunctionLikeUnit * { return nullptr; }, in getOwningProcedure()
1267 bool Fortran::lower::definedInCommonBlock(const semantics::Symbol &sym) { in definedInCommonBlock()
1279 Fortran::lower::defaultRecursiveFunctionSetting()); in isReentrant()
1287 bool Fortran::lower::symbolIsGlobal(const semantics::Symbol &sym) { in symbolIsGlobal()
1305 return semantics::IsSaved(sym) || lower::definedInCommonBlock(sym) || in symbolIsGlobal()
1316 std::vector<std::vector<lower::pft::Variable>> &vars) in SymbolDependenceDepth()
1381 isGlobal |= lower::symbolIsGlobal(sym); in analyzeAliases()
1391 Fortran::lower::pft::Variable::Interval{start, end - start}, in analyzeAliases()
1468 bool global = lower::symbolIsGlobal(sym); in analyze()
1479 if (lower::pft::Variable::AggregateStore *store = findStoreIfAlias(sym)) in analyze()
1492 Fortran::lower::pft::Variable::AggregateStore *
1503 for (lower::pft::Variable::AggregateStore &v : stores) { in findStoreIfAlias()
1517 for (lower::pft::Variable::AggregateStore &v : stores) { in findStoreIfAlias()
1537 lower::definedInCommonBlock(sym) || sym.name()[0] == '.'; in skipSymbol()
1547 std::vector<std::vector<lower::pft::Variable>> &vars;
1551 std::vector<Fortran::lower::pft::Variable::AggregateStore> stores;
1557 std::vector<std::vector<Fortran::lower::pft::Variable>> &varList) { in processSymbolTable()
1569 Fortran::lower::pft::FunctionLikeUnit::FunctionLikeUnit( in FunctionLikeUnit()
1570 const parser::MainProgram &func, const lower::pft::PftNode &parent, in FunctionLikeUnit()
1590 Fortran::lower::pft::FunctionLikeUnit::FunctionLikeUnit( in FunctionLikeUnit()
1591 const parser::FunctionSubprogram &func, const lower::pft::PftNode &parent, in FunctionLikeUnit()
1601 Fortran::lower::pft::FunctionLikeUnit::FunctionLikeUnit( in FunctionLikeUnit()
1602 const parser::SubroutineSubprogram &func, const lower::pft::PftNode &parent, in FunctionLikeUnit()
1612 Fortran::lower::pft::FunctionLikeUnit::FunctionLikeUnit( in FunctionLikeUnit()
1614 const lower::pft::PftNode &parent, const semantics::SemanticsContext &) in FunctionLikeUnit()
1623 Fortran::lower::HostAssociations &
1624 Fortran::lower::pft::FunctionLikeUnit::parentHostAssoc() { in parentHostAssoc()
1630 bool Fortran::lower::pft::FunctionLikeUnit::parentHasHostAssoc() { in parentHasHostAssoc()
1637 Fortran::lower::pft::FunctionLikeUnit::getStartingSourceLoc() const { in getStartingSourceLoc()
1649 Fortran::lower::pft::ModuleLikeUnit::ModuleLikeUnit( in ModuleLikeUnit()
1650 const parser::Module &m, const lower::pft::PftNode &parent) in ModuleLikeUnit()
1657 Fortran::lower::pft::ModuleLikeUnit::ModuleLikeUnit( in ModuleLikeUnit()
1658 const parser::Submodule &m, const lower::pft::PftNode &parent) in ModuleLikeUnit()
1667 Fortran::lower::pft::ModuleLikeUnit::getStartingSourceLoc() const { in getStartingSourceLoc()
1671 Fortran::lower::pft::ModuleLikeUnit::getScope() const { in getScope()
1682 Fortran::lower::pft::BlockDataUnit::BlockDataUnit( in BlockDataUnit()
1683 const parser::BlockData &bd, const lower::pft::PftNode &parent, in BlockDataUnit()
1690 std::unique_ptr<lower::pft::Program>
1691 Fortran::lower::createPFT(const parser::Program &root, in createPFT()
1702 bool Fortran::lower::defaultRecursiveFunctionSetting() { in defaultRecursiveFunctionSetting()
1706 void Fortran::lower::dumpPFT(llvm::raw_ostream &outputStream, in dumpPFT()
1707 const lower::pft::Program &pft) { in dumpPFT()
1711 void Fortran::lower::pft::Program::dump() const { in dump()
1715 void Fortran::lower::pft::Evaluation::dump() const { in dump()
1719 void Fortran::lower::pft::Variable::dump() const { in dump()
1747 void Fortran::lower::pft::FunctionLikeUnit::dump() const { in dump()
1751 void Fortran::lower::pft::ModuleLikeUnit::dump() const { in dump()
1756 void Fortran::lower::pft::BlockDataUnit::dump() const { in dump()
1760 std::vector<Fortran::lower::pft::Variable>
1761 Fortran::lower::pft::buildFuncResultDependencyList( in buildFuncResultDependencyList()
1856 void Fortran::lower::pft::visitAllSymbols( in visitAllSymbols()
1857 const Fortran::lower::pft::FunctionLikeUnit &funit, in visitAllSymbols()
1865 void Fortran::lower::pft::visitAllSymbols( in visitAllSymbols()
1866 const Fortran::lower::pft::Evaluation &eval, in visitAllSymbols()