| /llvm-project-15.0.7/flang/lib/Optimizer/Builder/ |
| H A D | MutableBox.cpp | 36 if (!extents.empty()) { in createNewFirBox() 155 extents.push_back(extent); in readShape() 157 return extents; in readShape() 164 extents = readShape(&lbounds); in read() 251 lbounds, extents, lengths); in syncMutablePropertiesFromIRBox() 288 llvm::zip(extents, mutableProperties.extents)) in updateMutableProperties() 546 extents.emplace_back( in associateMutableBoxWithRemap() 553 extents.emplace_back(cast); in associateMutableBoxWithRemap() 556 const auto newRank = extents.size(); in associateMutableBoxWithRemap() 689 for (mlir::Value extent : extents) in genInlinedAllocation() [all …]
|
| H A D | BoxValue.cpp | 136 if (!box.extents.empty()) { in operator <<() 138 llvm::interleaveComma(box.extents, os); in operator <<() 160 if (!properties.extents.empty()) { in operator <<() 162 llvm::interleaveComma(properties.extents, os); in operator <<() 214 if (!extents.empty() && !(isDerived() || isUnlimitedPolymorphic())) in verify() 216 if (!extents.empty() && extents.size() != rank()) in verify() 229 auto extents = fir::factory::getExtents(loc, builder, exv); in getExtentAtDimension() local 230 if (dim < extents.size()) in getExtentAtDimension() 231 return extents[dim]; in getExtentAtDimension()
|
| H A D | FIRBuilder.cpp | 418 for (auto v : extents) { in createSlice() 425 for (auto [lbnd, extent] : llvm::zip(lbounds, extents)) { in createSlice() 445 return fullShape(box.getLBounds(), extents); in createSlice() 862 llvm::SmallVector<mlir::Value> extents; in createExtents() local 865 extents.emplace_back( in createExtents() 869 return extents; in createExtents() 911 llvm::SmallVector<mlir::Value> extents; in componentToExtendedValue() local 927 if (!extents.empty()) in componentToExtendedValue() 928 return fir::CharArrayBoxValue{component, len, extents}; in componentToExtendedValue() 935 if (!extents.empty()) in componentToExtendedValue() [all …]
|
| /llvm-project-15.0.7/flang/unittests/Runtime/ |
| H A D | Ragged.cpp | 17 int64_t *extents = new int64_t[2]; in TEST() local 18 extents[0] = 10; in TEST() 19 extents[1] = 100; in TEST() 21 &header, false, rank, 32, extents); in TEST() 24 EXPECT_EQ(extents, ret->extentPointer); in TEST()
|
| /llvm-project-15.0.7/flang/include/flang/Optimizer/Builder/ |
| H A D | BoxValue.h | 106 AbstractArrayBox(llvm::ArrayRef<mlir::Value> extents, in AbstractArrayBox() argument 108 : extents{extents.begin(), extents.end()}, lbounds{lbounds.begin(), in AbstractArrayBox() 113 return extents; in getExtents() 123 std::size_t rank() const { return extents.size(); } in rank() 126 llvm::SmallVector<mlir::Value, 4> extents; 139 return {newBase, extents, lbounds}; in clone() 151 llvm::ArrayRef<mlir::Value> extents, 156 return {newBase, len, extents, lbounds}; in clone() 194 llvm::ArrayRef<mlir::Value> extents) in AbstractIrBox() argument 281 return {newBox, lbounds, explicitParams, extents}; in clone() [all …]
|
| H A D | Array.h | 20 inline bool isAssumedSize(const llvm::SmallVectorImpl<mlir::Value> &extents) { in isAssumedSize() argument 21 return !extents.empty() && in isAssumedSize() 22 mlir::isa_and_nonnull<UndefOp>(extents.back().getDefiningOp()); in isAssumedSize()
|
| /llvm-project-15.0.7/flang/lib/Evaluate/ |
| H A D | fold-designator.cpp | 34 if (which < GetSize(*extents)) { in DEFINE_DEFAULT_CONSTRUCTORS_AND_ASSIGNMENTS() 51 if (auto extents{GetConstantExtents(context_, array)}) { in FoldDesignator() local 71 ConstantSubscript extent{extents->at(dim)}; in FoldDesignator() 208 auto extents{AsConstantExtents(context, shape)}; in OffsetToArrayRef() local 217 lower->size() == extents->size()); in OffsetToArrayRef() 222 auto extent{(*extents)[dim]}; in OffsetToArrayRef() 363 auto extents{GetConstantExtents(context, expr)}; in From() local 364 CHECK(extents); in From() 365 std::size_t elements{TotalElementCount(*extents)}; in From() 367 int rank{GetRank(*extents)}; in From() [all …]
|
| H A D | fold.cpp | 243 std::optional<ConstantSubscripts> extents; in FoldTransfer() local 247 extents = ConstantSubscripts{}; // empty extents (scalar result) in FoldTransfer() 252 extents = ConstantSubscripts{ in FoldTransfer() 261 extents = ConstantSubscripts{*sizeValue}; in FoldTransfer() 265 if (sourceBytes && IsActuallyConstant(*source) && moldType && extents) { in FoldTransfer() 270 return image.AsConstant(context, *moldType, *extents, true /*pad with 0*/); in FoldTransfer()
|
| H A D | initial-image.cpp | 74 const ConstantSubscripts &extents, const InitialImage &image, in AsConstantHelper() argument 76 : context_{context}, type_{type}, image_{image}, extents_{extents}, in AsConstantHelper() 190 const DynamicType &type, const ConstantSubscripts &extents, in AsConstant() argument 193 AsConstantHelper{context, type, extents, *this, padWithZero, offset}); in AsConstant()
|
| /llvm-project-15.0.7/flang/unittests/Evaluate/ |
| H A D | ISO-Fortran-binding.cpp | 84 CFI_rank_t rank, const CFI_index_t extents[]) { in check_CFI_establish() argument 159 CFI_index_t extents[CFI_MAX_RANK]; in run_CFI_establish_tests() local 161 extents[i] = i + 66; in run_CFI_establish_tests() 173 CFI_index_t *extentCases[]{extents, nullptr}; in run_CFI_establish_tests() 199 rank3d, extents); in run_CFI_establish_tests() 232 CFI_index_t extents[CFI_MAX_RANK]; in run_CFI_address_tests() local 251 extents[i] = i + 2; in run_CFI_address_tests() 264 CFI_MAX_RANK, extents); in run_CFI_address_tests() 608 CFI_index_t extents[rank]; in run_CFI_setpointer_tests() local 611 extents[i] = 2; in run_CFI_setpointer_tests() [all …]
|
| /llvm-project-15.0.7/flang/lib/Optimizer/Builder/Runtime/ |
| H A D | Ragged.cpp | 20 mlir::ValueRange extents) { in genRaggedArrayAllocate() argument 22 auto rank = extents.size(); in genRaggedArrayAllocate() 45 for (auto i : llvm::enumerate(extents)) { in genRaggedArrayAllocate()
|
| /llvm-project-15.0.7/flang/lib/Lower/ |
| H A D | ConvertVariable.cpp | 1393 auto populateLBoundsExtents = [&](auto &lbounds, auto &extents, in mapSymbolAttributes() 1407 extents.emplace_back(dimInfo.getResult(1)); in mapSymbolAttributes() 1556 llvm::SmallVector<mlir::Value> extents; in mapSymbolAttributes() local 1607 llvm::SmallVector<mlir::Value> extents; in mapSymbolAttributes() local 1609 populateLBoundsExtents(lbounds, extents, x.bounds, argBox); in mapSymbolAttributes() 1617 createNewLocal(converter, loc, var, preAlloc, extents); in mapSymbolAttributes() 1618 symMap.addSymbolWithBounds(sym, local, extents, lbounds); in mapSymbolAttributes() 1657 llvm::SmallVector<mlir::Value> extents; in mapSymbolAttributes() local 1729 llvm::SmallVector<mlir::Value> extents; in mapSymbolAttributes() local 1795 llvm::SmallVector<mlir::Value> extents; in mapSymbolAttributes() local [all …]
|
| H A D | ConvertExpr.cpp | 1616 llvm::SmallVector<mlir::Value> extents; in genArrayLit() local 1707 llvm::SmallVector<mlir::Value> extents; in genArrayLit() local 2377 return fir::ArrayBoxValue(base, extents); in toExtendedValue() 2411 llvm::SmallVector<mlir::Value> extents = in genArrayTempFromMold() local 2431 return fir::ArrayBoxValue{temp, extents}; in genArrayTempFromMold() 2494 llvm::SmallVector<mlir::Value> extents; in genCallOpAndResult() local 3507 return fir::ArrayBoxValue(val, extents); in convertToArrayBoxValue() 4445 llvm::SmallVector<mlir::Value> extents; in prepareRaggedArrays() local 4563 destShape = extents; in genMasks() 5517 llvm::SmallVector<mlir::Value> extents; in genarr() local [all …]
|
| H A D | Allocatable.cpp | 335 llvm::SmallVector<mlir::Value> extents; in genInlinedAllocation() local 359 extents.emplace_back( in genInlinedAllocation() 362 extents.emplace_back(ub); in genInlinedAllocation() 365 fir::factory::genInlinedAllocation(builder, loc, box, lbounds, extents, in genInlinedAllocation() 634 mutableProperties.extents.emplace_back(extentVar); in createMutableProperties()
|
| /llvm-project-15.0.7/mlir/lib/Dialect/ |
| H A D | Traits.cpp | 18 SmallVector<SmallVector<int64_t, 6>, 2> extents; in staticallyKnownBroadcastable() local 19 extents.emplace_back(shape1.begin(), shape1.end()); in staticallyKnownBroadcastable() 20 extents.emplace_back(shape2.begin(), shape2.end()); in staticallyKnownBroadcastable() 21 return staticallyKnownBroadcastable(extents); in staticallyKnownBroadcastable()
|
| /llvm-project-15.0.7/flang/lib/Optimizer/Transforms/ |
| H A D | AffinePromotion.cpp | 352 auto extents = shape.getExtents(); in populateIndexArgs() local 353 for (auto i = extents.begin(); i < extents.end(); i++) { in populateIndexArgs() 365 auto extents = shape.getPairs(); in populateIndexArgs() local 366 for (auto i = extents.begin(); i < extents.end();) { in populateIndexArgs() 376 auto extents = slice.getTriples(); in populateIndexArgs() local 377 for (auto i = extents.begin(); i < extents.end();) { in populateIndexArgs()
|
| H A D | ArrayValueCopy.cpp | 947 llvm::SmallVector<mlir::Value> extents; in genArrayCopy() local 949 getAdjustedExtents(loc, rewriter, arrLoad, extents, shapeOp); in genArrayCopy() 952 for (auto sh : llvm::reverse(extents)) { in genArrayCopy() 1016 llvm::ArrayRef<mlir::Value> extents) { in findNonconstantExtents() argument 1020 for (auto [s, x] : llvm::zip(seqTy.getShape(), extents)) in findNonconstantExtents() 1023 if (extents.size() > seqTy.getShape().size()) in findNonconstantExtents() 1024 for (auto x : extents.drop_front(seqTy.getShape().size())) in findNonconstantExtents() 1042 findNonconstantExtents(baseType, extents); in allocateArrayTemp() 1102 llvm::SmallVector<mlir::Value> extents; in referenceToClone() local 1107 allocateArrayTemp(loc, rewriter, load, extents, shapeOp); in referenceToClone() [all …]
|
| /llvm-project-15.0.7/flang/unittests/Optimizer/Builder/ |
| H A D | FIRBuilderTest.cpp | 359 llvm::SmallVector<mlir::Value> extents = {c10, c100}; in TEST_F() local 360 auto shape = builder.genShape(loc, extents); in TEST_F() 371 llvm::SmallVector<mlir::Value> extents = {c10, c100}; in TEST_F() local 372 auto shape = builder.genShape(loc, shifts, extents); in TEST_F() 386 llvm::SmallVector<mlir::Value> extents = {c10, c100}; in TEST_F() local 387 fir::AbstractArrayBox aab(extents, {}); in TEST_F() 411 llvm::SmallVector<mlir::Value> extents = {c10, c100}; in TEST_F() local 415 fir::ArrayBoxValue aab(array, extents, {}); in TEST_F() 484 llvm::SmallVector<mlir::Value> extents( in TEST_F() local 487 arrays.emplace_back(fir::ArrayBoxValue(ptrValArray, extents)); in TEST_F()
|
| /llvm-project-15.0.7/flang/include/flang/Lower/ |
| H A D | SymbolMap.h | 248 llvm::ArrayRef<mlir::Value> extents, 251 makeSym(sym, SymbolBox::FullDim(value, extents, lbounds), force); 262 llvm::ArrayRef<mlir::Value> extents, 265 makeSym(sym, SymbolBox::CharFullDim(value, len, extents, lbounds), force);
|
| /llvm-project-15.0.7/flang/runtime/ |
| H A D | ISO_Fortran_binding.cpp | 241 CFI_rank_t rank, const CFI_index_t extents[]) { in CFI_establish() argument 252 if (rank > 0 && base_addr && !extents) { in CFI_establish() 282 descriptor->dim[j].extent = extents[j]; in CFI_establish() 284 byteSize *= extents[j]; in CFI_establish()
|
| /llvm-project-15.0.7/mlir/include/mlir/Dialect/Shape/IR/ |
| H A D | ShapeOps.td | 80 In case the resulting shape is undefined, i.e. if corresponding extents are 221 let summary = "Creates a shape from extents"; 223 Creates a shape from multiple SSA values representing the extents of 233 let arguments = (ins Variadic<Shape_SizeOrIndexType>:$extents); 236 let assemblyFormat = "$extents attr-dict `:` type($extents)"; 242 let summary = "Creates a shape from a tensor of extents"; 244 Creates a shape from a 1D integral tensor of extents. The rank of the 246 extents match the values of the elements. 318 extents of the shape. 541 extents are then aggregated as defined by the associated region. [all …]
|
| /llvm-project-15.0.7/flang/include/flang/Optimizer/Builder/Runtime/ |
| H A D | Ragged.h | 31 mlir::Value eleSize, mlir::ValueRange extents);
|
| /llvm-project-15.0.7/flang/lib/Semantics/ |
| H A D | data-to-inits.cpp | 504 if (auto extents{evaluate::GetConstantExtents(foldingContext, symbol)}) { in PopulateWithComponentDefaults() local 511 for (auto elements{evaluate::GetSize(*extents)}; elements-- > 0; in PopulateWithComponentDefaults() 542 if (auto extents{evaluate::GetConstantExtents( in PopulateWithComponentDefaults() local 545 *extents, false /*don't pad*/, componentOffset)}) { in PopulateWithComponentDefaults() 880 if (auto extents{evaluate::GetConstantExtents(context, symbol)}) { in ConstructInitializer() local 882 initialization.image.AsConstant(context, *symbolType, *extents)); in ConstructInitializer()
|
| /llvm-project-15.0.7/llvm/test/CodeGen/PowerPC/ |
| H A D | 2007-11-04-CoalescerCrash.ll | 98 …%extents.0.reg2mem.0 = phi %struct.HDescriptor* [ null, %cond_next942 ], [ %tmp977978, %cond_next9… 105 %tmp974975 = bitcast %struct.HDescriptor* %extents.0.reg2mem.0 to i8* ; <i8*> [#uses=1]
|
| /llvm-project-15.0.7/mlir/lib/Dialect/Shape/IR/ |
| H A D | Shape.cpp | 976 SmallVector<SmallVector<int64_t, 6>, 6> extents; in fold() local 980 extents.push_back(llvm::to_vector<6>( in fold() 983 return OpTrait::util::staticallyKnownBroadcastable(extents); in fold() 990 SmallVector<SmallVector<int64_t, 6>, 6> extents; in fold() local 992 extents.emplace_back(); in fold() 993 if (failed(getShapeVec(shapeValue, extents.back()))) in fold() 996 return OpTrait::util::staticallyKnownBroadcastable(extents); in fold() 1151 SmallVector<int64_t, 6> extents; in fold() local 1153 extents.push_back(attr.cast<IntegerAttr>().getInt()); in fold() 1155 return builder.getIndexTensorAttr(extents); in fold()
|