Lines Matching +defs:arg +defs:gen

80     "gen-array-coor",
140 /// REAL ELEMENTAL FUNCTION f1(arg) ! array -> array
141 /// FUNCTION f2(arg) ! array -> array
157 /// `arg` is declared as C-like pass-by-value, VALUE, INTENT(?), or ALLOCATABLE/
534 for (const std::optional<Fortran::evaluate::ActualArgument> &arg :
536 if (arg && arg->Rank() != 0)
690 return gen(expr);
698 ExtValue result = gen(expr);
868 ExtValue gen(Fortran::semantics::SymbolRef sym) {
881 ExtValue var = gen(sym);
898 ExtValue ptr = gen(ptrSym);
902 ExtValue pte = gen(sym);
959 ExtValue from = gen(expr);
1032 ExtValue exv = desc.base().IsSymbol() ? gen(getLastSym(desc.base()))
1033 : gen(desc.base().GetComponent());
1239 fir::ExtendedValue lhs = gen(x.left());
1376 ExtValue gen(const Fortran::evaluate::ComplexPart &x) {
1379 ExtValue exv = gen(x.complex());
1392 return genLoad(gen(x));
1396 ExtValue gen(const Fortran::evaluate::Substring &s) {
1400 [&](const Fortran::evaluate::DataRef &x) { return gen(x); },
1440 return gen(ss);
1456 ExtValue gen(const Fortran::evaluate::DataRef &dref) {
1457 return Fortran::common::visit([&](const auto &x) { return gen(x); },
1494 ExtValue obj = gen(*base);
1517 ExtValue gen(const Fortran::evaluate::Component &cmpt) {
1518 // Components may be pointer or allocatable. In the gen() path, the mutable
1529 return genLoad(gen(cmpt));
1599 fir::ExtendedValue ptr = gen(ptrSym);
1736 ExtValue gen(const Fortran::evaluate::ArrayRef &aref) {
1737 ExtValue base = aref.base().IsSymbol() ? gen(getFirstSym(aref.base()))
1738 : gen(aref.base().GetComponent());
1757 return genLoad(gen(aref));
1760 ExtValue gen(const Fortran::evaluate::CoarrayRef &coref) {
1771 ExtValue gen(const Fortran::evaluate::Designator<A> &des) {
1772 return Fortran::common::visit([&](const auto &x) { return gen(x); }, des.u);
1800 ExtValue gen(const Fortran::evaluate::FunctionRef<A> &funcRef) {
1816 return gen(expr);
1872 operands.emplace_back(gen(expr), std::nullopt);
1904 for (const auto &arg : llvm::enumerate(procRef.arguments())) {
1906 Fortran::evaluate::UnwrapExpr<Fortran::lower::SomeExpr>(arg.value());
1908 if (!expr && arg.value() && arg.value()->GetAssumedTypeDummy()) {
1911 arg.value()->GetAssumedTypeDummy();
1917 fir::lowerIntrinsicArgumentAs(*argLowering, arg.index());
1943 fir::lowerIntrinsicArgumentAs(*argLowering, arg.index());
1972 operands.emplace_back(gen(*expr));
2010 for (auto [arg, bind] :
2012 assert(arg && "alternate return in statement function");
2023 if (const Fortran::semantics::DeclTypeSpec *type = arg->GetType())
2030 symMap.addSymbol(*arg,
2031 replaceScalarCharacterLength(gen(*expr), len));
2034 symMap.addSymbol(*arg, gen(*expr));
2044 symMap.addSymbol(*sym, gen(details->symbol()));
2185 /// Generate a contiguous temp to pass \p actualArg as argument \p arg. The
2190 const Fortran::lower::CallerInterface::PassedEntity &arg,
2194 const bool doCopyOut = !byValue && arg.mayBeModifiedByCall();
2210 if (!arg.mayBeReadByCall() &&
2217 !arg.mayRequireIntentoutFinalization() &&
2223 !arg.hasAllocatableAttribute()) {
2437 ExtValue actualArg = gen(expr);
2493 const Fortran::lower::CallerInterface::PassedEntity &arg,
2519 if (arg.isOptional() &&
2527 return {genCopyIn(actualArg, arg, copyOutPairs, isPresent, byValue),
2556 return {genCopyIn(box, arg, copyOutPairs,
2612 Fortran::lower::CallerInterface>::PassedEntity &arg :
2614 const auto *actual = arg.entity;
2615 mlir::Type argTy = callSiteType.getInput(arg.firArgument);
2618 caller.placeInput(arg, builder.genAbsentOp(loc, argTy));
2625 if (arg.passBy == PassBy::Value) {
2630 caller.placeInput(arg, fir::getBase(argVal));
2634 if (arg.passBy == PassBy::MutableBox) {
2651 caller.placeInput(arg, boxStorage);
2668 caller.placeInput(arg, irBox);
2673 if (fir::isAllocatableType(argTy) && arg.isIntentOut() &&
2678 caller.placeInput(arg, irBox);
2679 if (arg.mayBeModifiedByCall())
2683 if (arg.passBy == PassBy::BaseAddress || arg.passBy == PassBy::BoxChar ||
2684 arg.passBy == PassBy::BaseAddressValueAttribute ||
2685 arg.passBy == PassBy::CharBoxValueAttribute) {
2686 const bool byValue = arg.passBy == PassBy::BaseAddressValueAttribute ||
2687 arg.passBy == PassBy::CharBoxValueAttribute;
2689 prepareActualToBaseAddressLike(*expr, arg, copyOutPairs, byValue)
2691 if (arg.passBy == PassBy::BaseAddress ||
2692 arg.passBy == PassBy::BaseAddressValueAttribute) {
2693 caller.placeInput(arg, fir::getBase(argAddr));
2695 assert(arg.passBy == PassBy::BoxChar ||
2696 arg.passBy == PassBy::CharBoxValueAttribute);
2733 caller.placeInput(arg, boxChar);
2735 } else if (arg.passBy == PassBy::Box) {
2736 if (arg.mustBeMadeContiguous() &&
2758 prepareActualToBaseAddressLike(*expr, arg, copyOutPairs, byValue);
2763 caller.placeInput(arg,
2767 caller.placeInput(arg, builder.createBox(loc, argAddr));
2770 } else if (arg.isOptional() &&
2811 caller.placeInput(arg, builder.create<mlir::arith::SelectOp>(
2825 arg.isOptional()) {
2858 if (arg.isOptional()) {
2892 caller.placeInput(arg, box);
2894 } else if (arg.passBy == PassBy::AddressAndLength) {
2896 caller.placeAddressAndLengthInput(arg, fir::getBase(argRef),
2898 } else if (arg.passBy == PassBy::CharProcTuple) {
2902 caller.placeInput(arg, tuple);
3008 ExtValue gen(const Fortran::evaluate::Expr<A> &x) {
3053 return gen(a);
3073 return gen(x);
3713 for (const std::optional<Fortran::evaluate::ActualArgument> &arg :
3715 if (arg && arg->isPassedObject())
3716 return arg;
3723 for (const auto &arg : caller.characterize().dummyArguments) {
3726 &arg.u))
4576 return ScalarExprLowering{getLoc(), converter, symMap, stmtCtx}.gen(x);
4706 for (const auto &arg : llvm::enumerate(procRef.arguments())) {
4708 Fortran::evaluate::UnwrapExpr<Fortran::lower::SomeExpr>(arg.value());
4719 fir::lowerIntrinsicArgumentAs(*argLowering, arg.index());
4783 Fortran::lower::CallerInterface>::PassedEntity &arg :
4787 if (arg.mayBeModifiedByCall())
4789 const auto *actual = arg.entity;
4790 mlir::Type argTy = callSiteType.getInput(arg.firArgument);
4802 << "argument: " << arg.firArgument << " = [")
4804 if (arg.isOptional() &&
4808 switch (arg.passBy) {
4930 auto arg = exv.match(
4936 caller.placeInput(argIface, arg);
5440 return base.IsSymbol() ? sel.gen(getFirstSym(base))
5441 : sel.gen(base.GetComponent());
7380 return ScalarExprLowering(loc, converter, symMap, stmtCtx).gen(expr);
7390 .gen(expr);
7646 auto exv = ScalarExprLowering{loc, converter, symMap, stmtCtx}.gen(*x);