Lines Matching defs:entity

691     // for the top-level entity. Note that the Destroy calls below
692 // do not deallocate the top-level entity. The two clean-ups
1111 hlfir::Entity entity) {
1112 assert(!entity.isAssumedRank() &&
1114 if (entity.getRank() < 1)
1118 llvm::SmallVector<mlir::Value> lowerBounds(entity.getRank(), zero);
1186 // passed. Unless the entity is a scalar passed by raw address, a
1195 // to a non polymorphic entity because the dummy dynamic type matters for
1200 !isSimplyContiguous(*arg.entity, foldingContext));
1285 hlfir::Entity entity =
1287 if (entity.isVariable()) {
1291 entity = genSetDynamicTypeToDummyType(entity);
1298 entity.isParameter()) {
1300 auto copy = builder.create<hlfir::AsExprOp>(loc, entity);
1301 mlir::Type storageType = entity.getType();
1305 entity = hlfir::Entity{associate.getBase()};
1317 entity = genCopyIn(entity, arg.mayBeModifiedByCall());
1320 const Fortran::lower::SomeExpr *expr = arg.entity->UnwrapExpr();
1327 loc, builder, entity, storageType, "", byRefAttr);
1328 entity = hlfir::Entity{associate.getBase()};
1331 // that we pass a contiguous entity (i.e. make copy-in, if needed).
1337 entity = genSetDynamicTypeToDummyType(entity);
1338 entity = genCopyIn(entity, /*doCopyOut=*/false);
1346 addr = hlfir::genVariableBoxChar(loc, builder, entity);
1348 entity = hlfir::genVariableBox(loc, builder, entity);
1352 mlir::cast<fir::BaseBoxType>(entity.getType());
1362 bool needsZeroLowerBounds = callContext.isBindcCall() && entity.isArray();
1377 entity = hlfir::Entity{builder.create<fir::ReboxAssumedRankOp>(
1378 loc, dummyTypeWithActualRank, entity, lbModifier)};
1382 shift = getZeroLowerBounds(loc, builder, entity);
1383 entity = hlfir::Entity{builder.create<fir::ReboxOp>(
1384 loc, dummyTypeWithActualRank, entity, /*shape=*/shift,
1388 addr = entity;
1390 addr = hlfir::genVariableRawAddress(loc, builder, entity);
1482 *arg.entity) &&
1600 const Fortran::lower::SomeExpr *expr = arg.entity->UnwrapExpr();
1702 if (auto *entity = std::get_if<hlfir::EntityWithAttributes>(&loweredResult))
1703 return *entity;
1754 /// Create an optional dummy argument value from an entity that may be
1757 /// or logical scalar entity.
1758 /// If the entity is considered absent according to 15.5.2.12 point 1., the
1759 /// returned value is zero (or false), otherwise it is the value of the entity.
1760 /// \p eleType specifies the entity's Fortran element type.
1769 hlfir::Entity entity = actualGetter(loc, builder);
1770 assert(eleType == entity.getFortranElementType() &&
1772 assert(entity.isScalar() && fir::isa_trivial(eleType) &&
1775 hlfir::loadTrivialScalar(loc, builder, entity);
1787 /// Create an optional dummy argument address from \p entity that may be
1788 /// absent. If \p entity is considered absent according to 15.5.2.12 point 1.,
1790 /// entity.
1792 mlir::Location loc, hlfir::Entity entity,
1794 auto [exv, cleanup] = hlfir::translateToExtendedValue(loc, builder, entity);
1804 /// Create an optional dummy argument address from \p entity that may be
1805 /// absent. If \p entity is considered absent according to 15.5.2.12 point 1.,
1807 /// describing \p entity.
1809 mlir::Location loc, hlfir::Entity entity,
1811 auto [exv, cleanup] = hlfir::translateToExtendedValue(loc, builder, entity);
2709 if (const auto *actual = arg.entity) {