Lines Matching defs:lbounds

29                 mlir::ValueRange lbounds, mlir::ValueRange extents,
37 if (lbounds.empty()) {
41 for (auto [lb, extent] : llvm::zip(lbounds, extents)) {
131 auto lb = builder.create<fir::LoadOp>(loc, mutableProperties.lbounds[dim]);
150 /// Read and return all extents. If \p lbounds vector is provided, lbounds are
153 readShape(llvm::SmallVectorImpl<mlir::Value> *lbounds = nullptr) {
158 if (lbounds)
159 lbounds->push_back(lb);
166 mlir::Value read(llvm::SmallVectorImpl<mlir::Value> &lbounds,
169 extents = readShape(&lbounds);
184 void getLowerBounds(llvm::SmallVectorImpl<mlir::Value> &lbounds) {
187 lbounds.push_back(std::get<0>(readShape(dim)));
206 /// Extents and lbounds must all have index type.
207 /// lbounds can be empty in which case all ones is assumed.
210 void updateMutableBox(mlir::Value addr, mlir::ValueRange lbounds,
214 updateMutableProperties(addr, lbounds, extents, lengths);
216 updateIRBox(addr, lbounds, extents, lengths, tdesc);
255 llvm::SmallVector<mlir::Value> lbounds;
260 lbounds, extents, lengths);
261 updateMutableProperties(addr, lbounds, extents, lengths);
268 llvm::SmallVector<mlir::Value> lbounds;
271 auto addr = MutablePropertyReader{builder, loc, box}.read(lbounds, extents,
273 updateIRBox(addr, lbounds, extents, lengths);
278 void updateIRBox(mlir::Value addr, mlir::ValueRange lbounds,
282 mlir::Value irBox = createNewFirBox(builder, loc, box, addr, lbounds,
288 void updateMutableProperties(mlir::Value addr, mlir::ValueRange lbounds,
301 if (!mutableProperties.lbounds.empty()) {
302 if (lbounds.empty()) {
305 for (auto lboundVar : mutableProperties.lbounds)
309 llvm::zip(lbounds, mutableProperties.lbounds))
362 loc, fir::ArrayBoxValue{nullAddr, extents, /*lbounds=*/std::nullopt});
434 llvm::SmallVector<mlir::Value> lbounds;
440 reader.getLowerBounds(lbounds);
441 return fir::BoxValue{reader.getIrBox(), lbounds,
447 MutablePropertyReader(builder, loc, box).read(lbounds, extents, lengths);
449 lbounds.clear();
454 return fir::CharArrayBoxValue{addr, len, extents, lbounds};
461 return fir::ArrayBoxValue{addr, extents, lbounds, sourceBox};
514 mlir::ValueRange lbounds) {
521 writer.updateMutableBox(p.getAddr(), /*lbounds=*/std::nullopt,
526 writer.updateMutableBox(addr, /*lbounds=*/std::nullopt,
531 writer.updateMutableBox(ch.getAddr(), /*lbounds=*/std::nullopt,
536 lbounds.empty() ? arr.getLBounds() : lbounds,
541 lbounds.empty() ? arr.getLBounds() : lbounds,
547 mlir::ValueRange newLbounds = lbounds.empty()
549 : mlir::ValueRange{lbounds};
599 mlir::ValueRange lbounds, mlir::ValueRange ubounds) {
603 if (!lbounds.empty()) {
605 for (auto [lb, ub] : llvm::zip(lbounds, ubounds)) {
613 // lbounds are default. Upper bounds and extents are the same.
633 writer.updateMutableBox(cast(p.getAddr()), lbounds, extents,
637 writer.updateMutableBox(cast(addr), lbounds, extents,
641 writer.updateMutableBox(cast(ch.getAddr()), lbounds, extents,
645 writer.updateMutableBox(cast(arr.getAddr()), lbounds, extents,
649 writer.updateMutableBox(cast(arr.getAddr()), lbounds, extents,
666 writer.updateMutableBox(rawAddr, lbounds, extents, lenParams);
672 for (auto [lbnd, ext] : llvm::zip(lbounds, extents)) {
764 const fir::MutableBoxValue &box, mlir::ValueRange lbounds,
774 heap, lbounds, safeExtents, lengths);
922 mlir::ValueRange lbounds,
932 takeLboundsIfRealloc ? lbounds : mlir::ValueRange{previousLbounds};