Lines Matching refs:lower

69   explicit IncrementLoopInfo(Fortran::semantics::Symbol &sym, const T &lower,  in IncrementLoopInfo()
72 : loopVariableSym{sym}, lowerExpr{Fortran::semantics::GetExpr(lower)}, in IncrementLoopInfo()
88 const Fortran::lower::SomeExpr *lowerExpr;
89 const Fortran::lower::SomeExpr *upperExpr;
90 const Fortran::lower::SomeExpr *stepExpr;
91 const Fortran::lower::SomeExpr *maskExpr = nullptr;
130 void registerTypeInfoSymbol(Fortran::lower::AbstractConverter &converter, in registerTypeInfoSymbol()
145 Fortran::lower::createRuntimeTypeInfoGlobal(converter, loc, in registerTypeInfoSymbol()
149 void createTypeInfoGlobals(Fortran::lower::AbstractConverter &converter) { in createTypeInfoGlobals()
152 Fortran::lower::createRuntimeTypeInfoGlobal(converter, info.loc, in createTypeInfoGlobals()
180 class FirConverter : public Fortran::lower::AbstractConverter {
182 explicit FirConverter(Fortran::lower::LoweringBridge &bridge) in FirConverter()
187 void run(Fortran::lower::pft::Program &pft) { in run()
203 for (Fortran::lower::pft::Program::Units &u : pft.getUnits()) { in run()
205 [&](Fortran::lower::pft::FunctionLikeUnit &f) { in run()
208 [&](Fortran::lower::pft::ModuleLikeUnit &m) { in run()
210 for (Fortran::lower::pft::FunctionLikeUnit &f : in run()
214 [&](Fortran::lower::pft::BlockDataUnit &b) {}, in run()
215 [&](Fortran::lower::pft::CompilerDirectiveUnit &d) {}, in run()
221 for (Fortran::lower::pft::Program::Units &u : pft.getUnits()) { in run()
224 [&](Fortran::lower::pft::FunctionLikeUnit &f) { lowerFunc(f); }, in run()
225 [&](Fortran::lower::pft::ModuleLikeUnit &m) { lowerMod(m); }, in run()
226 [&](Fortran::lower::pft::BlockDataUnit &b) {}, in run()
227 [&](Fortran::lower::pft::CompilerDirectiveUnit &d) { in run()
245 void declareFunction(Fortran::lower::pft::FunctionLikeUnit &funit) { in declareFunction()
258 Fortran::lower::CalleeInterface{funit, *this}; in declareFunction()
264 for (Fortran::lower::pft::FunctionLikeUnit &f : funit.nestedFunctions) in declareFunction()
269 for (Fortran::lower::pft::FunctionLikeUnit &f : funit.nestedFunctions) in declareFunction()
277 Fortran::lower::pft::FunctionLikeUnit &funit, in collectHostAssociatedVariables()
310 Fortran::lower::pft::visitAllSymbols(funit, addToListIfEscapee); in collectHostAssociatedVariables()
317 mlir::Value getSymbolAddress(Fortran::lower::SymbolRef sym) override final { in getSymbolAddress()
323 Fortran::lower::SymbolBox sb = localSymbols.lookupSymbol(sym); in getSymbolExtendedValue()
335 void copySymbolBinding(Fortran::lower::SymbolRef src, in copySymbolBinding()
336 Fortran::lower::SymbolRef target) override final { in copySymbolBinding()
342 bool bindIfNewSymbol(Fortran::lower::SymbolRef sym, in bindIfNewSymbol()
350 void bindSymbol(Fortran::lower::SymbolRef sym, in bindSymbol()
355 bool lookupLabelSet(Fortran::lower::SymbolRef sym, in lookupLabelSet()
356 Fortran::lower::pft::LabelSet &labelSet) override final { in lookupLabelSet()
357 Fortran::lower::pft::FunctionLikeUnit &owningProc = in lookupLabelSet()
366 Fortran::lower::pft::Evaluation *
367 lookupLabel(Fortran::lower::pft::Label label) override final { in lookupLabel()
368 Fortran::lower::pft::FunctionLikeUnit &owningProc = in lookupLabel()
376 fir::ExtendedValue genExprAddr(const Fortran::lower::SomeExpr &expr, in genExprAddr()
377 Fortran::lower::StatementContext &context, in genExprAddr()
379 return Fortran::lower::createSomeExtendedAddress( in genExprAddr()
383 genExprValue(const Fortran::lower::SomeExpr &expr, in genExprValue()
384 Fortran::lower::StatementContext &context, in genExprValue()
386 return Fortran::lower::createSomeExtendedExpression( in genExprValue()
391 genExprBox(mlir::Location loc, const Fortran::lower::SomeExpr &expr, in genExprBox()
392 Fortran::lower::StatementContext &stmtCtx) override final { in genExprBox()
393 return Fortran::lower::createBoxValue(loc, *this, expr, localSymbols, in genExprBox()
401 mlir::Type genType(const Fortran::lower::SomeExpr &expr) override final { in genType()
402 return Fortran::lower::translateSomeExprToFIRType(*this, expr); in genType()
404 mlir::Type genType(const Fortran::lower::pft::Variable &var) override final { in genType()
405 return Fortran::lower::translateVariableToFIRType(*this, var); in genType()
407 mlir::Type genType(Fortran::lower::SymbolRef sym) override final { in genType()
408 return Fortran::lower::translateSymbolToFIRType(*this, sym); in genType()
413 return Fortran::lower::getFIRType(&getMLIRContext(), tc, kind, in genType()
418 return Fortran::lower::translateDerivedTypeToFIRType(*this, tySpec); in genType()
421 return Fortran::lower::getFIRType( in genType()
433 Fortran::lower::SymbolBox hsb = lookupSymbol(hsym); in createHostAssociateVarClone()
503 Fortran::lower::SymbolBox hsb = lookupOneLevelUpSymbol(hsym); in copyHostAssociateVar()
508 Fortran::lower::SymbolBox sb = shallowLookupSymbol(sym); in copyHostAssociateVar()
534 Fortran::lower::StatementContext stmtCtx; in copyHostAssociateVar()
535 Fortran::lower::createSomeArrayAssignment(*this, lhs, rhs, localSymbols, in copyHostAssociateVar()
556 Fortran::lower::pft::Evaluation &eval, in collectSymbolSet()
566 Fortran::lower::pft::visitAllSymbols(eval, addToList); in collectSymbolSet()
603 return Fortran::lower::mangle::mangleName(symbol); in mangleName()
620 Fortran::lower::SymbolRef typeInfoSym) override final { in registerRuntimeTypeInfo()
634 const Fortran::lower::SomeExpr *expr, in createFIRExpr()
635 Fortran::lower::StatementContext &stmtCtx) { in createFIRExpr()
640 Fortran::lower::SymbolBox
642 if (Fortran::lower::SymbolBox v = localSymbols.lookupSymbol(sym)) in lookupSymbol()
648 Fortran::lower::SymbolBox
650 if (Fortran::lower::SymbolBox v = localSymbols.shallowLookupSymbol(sym)) in shallowLookupSymbol()
657 Fortran::lower::SymbolBox
659 if (Fortran::lower::SymbolBox v = localSymbols.lookupOneLevelUpSymbol(sym)) in lookupOneLevelUpSymbol()
685 fir::ExtendedValue getExtendedValue(Fortran::lower::SymbolBox sb) { in getExtendedValue()
687 [&](const Fortran::lower::SymbolBox::PointerOrAllocatable &box) { in getExtendedValue()
713 Fortran::lower::StatementContext stmtCtx; in genLoopVariableAddress()
742 mlir::Block *blockOfLabel(Fortran::lower::pft::Evaluation &eval, in blockOfLabel()
744 const Fortran::lower::pft::LabelEvalMap &labelEvaluationMap = in blockOfLabel()
768 Fortran::lower::pft::Evaluation *trueTarget, in genFIRConditionalBranch()
769 Fortran::lower::pft::Evaluation *falseTarget) { in genFIRConditionalBranch()
775 Fortran::lower::StatementContext stmtCtx; in genFIRConditionalBranch()
782 Fortran::lower::pft::Evaluation *trueTarget, in genFIRConditionalBranch()
783 Fortran::lower::pft::Evaluation *falseTarget) { in genFIRConditionalBranch()
784 Fortran::lower::StatementContext stmtCtx; in genFIRConditionalBranch()
810 Fortran::lower::SymbolBox resultSymBox = lookupSymbol(resultSym); in genReturnSymbol()
844 void genFIRProcedureExit(Fortran::lower::pft::FunctionLikeUnit &funit, in genFIRProcedureExit()
872 Fortran::lower::StatementContext stmtCtx; in genIfCondition()
897 Fortran::lower::StatementContext stmtCtx; in genFIR()
898 Fortran::lower::pft::Evaluation &eval = getEval(); in genFIR()
902 mlir::Value res = Fortran::lower::createSubroutineCall( in genFIR()
927 Fortran::lower::StatementContext stmtCtx; in genFIR()
928 Fortran::lower::pft::Evaluation &eval = getEval(); in genFIR()
949 Fortran::lower::StatementContext stmtCtx; in genFIR()
950 Fortran::lower::pft::Evaluation &eval = getEval(); in genFIR()
1007 Fortran::lower::pft::Evaluation &eval = getEval(); in genFIR()
1008 const Fortran::lower::pft::SymbolLabelMap &symbolLabelMap = in genFIR()
1083 Fortran::lower::pft::Evaluation &eval = getEval(); in genFIR()
1085 Fortran::lower::pft::Evaluation &doStmtEval = in genFIR()
1120 *bounds->name.thing.symbol, bounds->lower, bounds->upper, in genFIR()
1167 for (Fortran::lower::pft::Evaluation &e : eval.getNestedEvaluations()) in genFIR()
1181 auto genControlValue = [&](const Fortran::lower::SomeExpr *expr, in genFIRIncrementLoopBegin()
1185 Fortran::lower::StatementContext stmtCtx; in genFIRIncrementLoopBegin()
1231 Fortran::lower::StatementContext stmtCtx; in genFIRIncrementLoopBegin()
1289 Fortran::lower::StatementContext stmtCtx; in genFIRIncrementLoopBegin()
1359 Fortran::lower::pft::Evaluation &eval = getEval(); in genFIR()
1363 for (Fortran::lower::pft::Evaluation &e : eval.getNestedEvaluations()) { in genFIR()
1390 for (Fortran::lower::pft::Evaluation &e : eval.getNestedEvaluations()) { in genFIR()
1414 for (Fortran::lower::pft::Evaluation &e : getEval().getNestedEvaluations()) in genFIR()
1435 Fortran::lower::getAdaptToByRefAttr(*builder)}); in forceControlVariableBinding()
1455 Fortran::lower::StatementContext &stmtCtx = in genFIR()
1462 const Fortran::lower::SomeExpr *lo = in genFIR()
1464 const Fortran::lower::SomeExpr *hi = in genFIR()
1483 Fortran::lower::StatementContext &stmtCtx = in genFIR()
1505 const Fortran::lower::SomeExpr *lo = in genFIR()
1507 const Fortran::lower::SomeExpr *hi = in genFIR()
1626 for (Fortran::lower::pft::Evaluation &e : getEval().getNestedEvaluations()) in genFIR()
1634 for (Fortran::lower::pft::Evaluation &e : getEval().getNestedEvaluations()) in genFIR()
1653 Fortran::lower::pft::Evaluation *curEval = &getEval(); in genFIR()
1659 Fortran::lower::getCollapseValue(*loopOpClauseList); in genFIR()
1667 for (Fortran::lower::pft::Evaluation &e : curEval->getNestedEvaluations()) in genFIR()
1680 for (Fortran::lower::pft::Evaluation &e : getEval().getNestedEvaluations()) in genFIR()
1688 Fortran::lower::pft::Evaluation &eval = getEval(); in genFIR()
1691 Fortran::lower::StatementContext stmtCtx; in genFIR()
1692 const Fortran::lower::SomeExpr *expr = Fortran::semantics::GetExpr( in genFIR()
1696 auto charValue = [&](const Fortran::lower::SomeExpr *expr) { in genFIR()
1723 const Fortran::lower::SomeExpr *expr = in genFIR()
1734 for (Fortran::lower::pft::Evaluation *e = eval.controlSuccessor; e; in genFIR()
1757 if (caseRange.lower && caseRange.upper) { in genFIR()
1759 addValue(*caseRange.lower); in genFIR()
1761 } else if (caseRange.lower) { in genFIR()
1763 addValue(*caseRange.lower); in genFIR()
1865 genAssociateSelector(const Fortran::lower::SomeExpr &selector, in genAssociateSelector()
1866 Fortran::lower::StatementContext &stmtCtx) { in genAssociateSelector()
1867 return Fortran::lower::isArraySectionWithoutVectorSubscript(selector) in genAssociateSelector()
1868 ? Fortran::lower::createSomeArrayBox(*this, selector, in genAssociateSelector()
1874 Fortran::lower::StatementContext stmtCtx; in genFIR()
1875 Fortran::lower::pft::Evaluation &eval = getEval(); in genFIR()
1876 for (Fortran::lower::pft::Evaluation &e : eval.getNestedEvaluations()) { in genFIR()
1885 const Fortran::lower::SomeExpr &selector = in genFIR()
2005 void genIoConditionBranches(Fortran::lower::pft::Evaluation &eval, in genIoConditionBranches()
2060 Fortran::lower::genAllocateStmt(*this, stmt, toLocation()); in genFIR()
2064 Fortran::lower::genDeallocateStmt(*this, stmt, toLocation()); in genFIR()
2074 const Fortran::lower::SomeExpr *expr = in genFIR()
2101 genInitializerExprValue(const Fortran::lower::SomeExpr &expr, in genInitializerExprValue()
2102 Fortran::lower::StatementContext &stmtCtx) { in genInitializerExprValue()
2103 return Fortran::lower::createSomeInitializerExpression( in genInitializerExprValue()
2125 Fortran::lower::StatementContext &stmtCtx, in genArrayAssignment()
2128 if (Fortran::lower::isWholeAllocatable(assign.lhs)) { in genArrayAssignment()
2131 Fortran::lower::createAllocatableArrayAssignment( in genArrayAssignment()
2139 if (!Fortran::lower::isWholePointer(assign.lhs)) in genArrayAssignment()
2142 Fortran::lower::createArrayOfPointerAssignment( in genArrayAssignment()
2151 Fortran::lower::createSomeArrayAssignment(*this, assign.lhs, assign.rhs, in genArrayAssignment()
2165 Fortran::lower::createAnyMaskedArrayAssignment( in genArrayAssignment()
2173 static bool isFuncResultDesignator(const Fortran::lower::SomeExpr &expr) { in isFuncResultDesignator()
2182 const Fortran::lower::SomeExpr &expr) override final { in genExprMutableBox()
2183 return Fortran::lower::createMutableBox(loc, *this, expr, localSymbols); in genExprMutableBox()
2188 Fortran::lower::StatementContext stmtCtx; in genAssignment()
2191 Fortran::lower::createArrayLoads(*this, explicitIterSpace, localSymbols); in genAssignment()
2210 Fortran::lower::isWholeAllocatable(assign.lhs)) in genAssignment()
2232 Fortran::lower::isWholeAllocatable(assign.lhs); in genAssignment()
2294 Fortran::lower::StatementContext &ctx = in genAssignment()
2297 Fortran::lower::createSubroutineCall( in genAssignment()
2327 Fortran::lower::associateMutableBox(*this, loc, lhs, assign.rhs, in genAssignment()
2370 Fortran::lower::isArraySectionWithoutVectorSubscript( in genAssignment()
2372 ? Fortran::lower::createSomeArrayBox( in genAssignment()
2386 Fortran::lower::createArrayMergeStores(*this, explicitIterSpace); in genAssignment()
2458 Fortran::lower::StatementContext stmtCtx; in genFIR()
2526 Fortran::lower::pft::FunctionLikeUnit *funit = in genFIR()
2541 Fortran::lower::StatementContext stmtCtx; in genFIR()
2542 const Fortran::lower::SomeExpr *expr = in genFIR()
2594 void genFIR(Fortran::lower::pft::Evaluation &eval, in genFIR()
2610 Fortran::lower::pft::Evaluation *successor{}; in genFIR()
2625 void mapDummiesAndResults(Fortran::lower::pft::FunctionLikeUnit &funit, in mapDummiesAndResults()
2626 const Fortran::lower::CalleeInterface &callee) { in mapDummiesAndResults()
2628 using PassBy = Fortran::lower::CalleeInterface::PassEntityBy; in mapDummiesAndResults()
2648 for (const Fortran::lower::CalleeInterface::PassedEntity &arg : in mapDummiesAndResults()
2651 if (std::optional<Fortran::lower::CalleeInterface::PassedEntity> in mapDummiesAndResults()
2664 void instantiateVar(const Fortran::lower::pft::Variable &var, in instantiateVar()
2665 Fortran::lower::AggregateStoreMap &storeMap) { in instantiateVar()
2666 Fortran::lower::instantiateVariable(*this, var, localSymbols, storeMap); in instantiateVar()
2670 Fortran::lower::genThreadprivateOp(*this, var); in instantiateVar()
2674 void startNewFunction(Fortran::lower::pft::FunctionLikeUnit &funit) { in startNewFunction()
2676 Fortran::lower::CalleeInterface callee(funit, *this); in startNewFunction()
2687 llvm::SmallVector<Fortran::lower::pft::Variable> deferredFuncResultList; in startNewFunction()
2692 Fortran::lower::SymbolBox resultArg; in startNewFunction()
2693 if (std::optional<Fortran::lower::CalleeInterface::PassedEntity> in startNewFunction()
2697 Fortran::lower::AggregateStoreMap storeMap; in startNewFunction()
2703 if (auto *module = Fortran::lower::pft::getAncestor< in startNewFunction()
2704 Fortran::lower::pft::ModuleLikeUnit>(funit)) in startNewFunction()
2705 for (const Fortran::lower::pft::Variable &var : in startNewFunction()
2710 for (const Fortran::lower::pft::Variable &var : in startNewFunction()
2724 Fortran::lower::SymbolBox hostBox = in startNewFunction()
2745 for (const Fortran::lower::pft::Variable &altResult : in startNewFunction()
2747 if (std::optional<Fortran::lower::CalleeInterface::PassedEntity> in startNewFunction()
2750 Fortran::lower::StatementContext stmtCtx; in startNewFunction()
2751 Fortran::lower::mapSymbolAttributes(*this, altResult, localSymbols, in startNewFunction()
2781 if (Fortran::lower::pft::Evaluation *alternateEntryEval = in startNewFunction()
2797 std::list<Fortran::lower::pft::Evaluation> &evaluationList) { in createEmptyBlocks()
2799 for (Fortran::lower::pft::Evaluation &eval : evaluationList) { in createEmptyBlocks()
2807 Fortran::lower::pft::Evaluation &constructStmt = in createEmptyBlocks()
2845 void endNewFunction(Fortran::lower::pft::FunctionLikeUnit &funit) { in endNewFunction()
2846 setCurrentPosition(Fortran::lower::pft::stmtSourceLoc(funit.endStmt)); in endNewFunction()
2888 void lowerBlockData(Fortran::lower::pft::BlockDataUnit &bdunit) { in lowerBlockData()
2890 Fortran::lower::AggregateStoreMap fakeMap; in lowerBlockData()
2893 Fortran::lower::pft::Variable var(*sym, true); in lowerBlockData()
2904 [&]() { Fortran::lower::defineCommonBlocks(*this, commonBlocks); }); in lowerCommonBlocks()
2908 void lowerFunc(Fortran::lower::pft::FunctionLikeUnit &funit) { in lowerFunc()
2922 for (Fortran::lower::pft::Evaluation &eval : funit.evaluationList) in lowerFunc()
2927 for (Fortran::lower::pft::FunctionLikeUnit &f : funit.nestedFunctions) in lowerFunc()
2933 void lowerModuleDeclScope(Fortran::lower::pft::ModuleLikeUnit &mod) { in lowerModuleDeclScope()
2936 for (const Fortran::lower::pft::Variable &var : in lowerModuleDeclScope()
2941 Fortran::lower::defineModuleVariable(*this, var); in lowerModuleDeclScope()
2949 void lowerMod(Fortran::lower::pft::ModuleLikeUnit &mod) { in lowerMod()
2950 for (Fortran::lower::pft::FunctionLikeUnit &f : mod.nestedFunctions) in lowerMod()
2978 void setCurrentEval(Fortran::lower::pft::Evaluation &eval) { in setCurrentEval()
2981 Fortran::lower::pft::Evaluation &getEval() { in getEval()
2987 getShape(const Fortran::lower::SomeExpr &expr) { in getShape()
3014 auto analyzeAssign = [&](const Fortran::lower::SomeExpr &lhs, in analyzeExplicitSpace()
3015 const Fortran::lower::SomeExpr &rhs) { in analyzeExplicitSpace()
3024 const Fortran::lower::SomeExpr *lhs = in analyzeExplicitSpace()
3026 const Fortran::lower::SomeExpr *rhs = in analyzeExplicitSpace()
3065 const Fortran::lower::SomeExpr *exp = Fortran::semantics::GetExpr( in analyzeExplicitSpace()
3091 const Fortran::lower::SomeExpr *exp = Fortran::semantics::GetExpr( in analyzeExplicitSpace()
3103 const Fortran::lower::SomeExpr *exp = Fortran::semantics::GetExpr( in analyzeExplicitSpace()
3155 void addMaskVariable(Fortran::lower::FrontEndExpr exp) { in addMaskVariable()
3197 Fortran::lower::LoweringBridge &bridge;
3200 Fortran::lower::pft::Evaluation *evalPtr = nullptr;
3201 Fortran::lower::SymMap localSymbols;
3206 Fortran::lower::ImplicitIterSpace implicitIterSpace;
3209 Fortran::lower::ExplicitIterSpace explicitIterSpace;
3218 Fortran::lower::LoweringBridge::createFoldingContext() const { in createFoldingContext()
3222 void Fortran::lower::LoweringBridge::lower( in lower() function in Fortran::lower::LoweringBridge
3225 std::unique_ptr<Fortran::lower::pft::Program> pft = in lower()
3226 Fortran::lower::createPFT(prg, semanticsContext); in lower()
3228 Fortran::lower::dumpPFT(llvm::errs(), *pft); in lower()
3233 void Fortran::lower::LoweringBridge::parseSourceFile(llvm::SourceMgr &srcMgr) { in parseSourceFile()
3240 Fortran::lower::LoweringBridge::LoweringBridge( in LoweringBridge()