Home
last modified time | relevance | path

Searched refs:getNumElements (Results 1 – 25 of 329) sorted by relevance

12345678910>>...14

/llvm-project-15.0.7/mlir/lib/IR/
H A DBuiltinTypeInterfaces.cpp29 int64_t ShapedType::getNumElements(ArrayRef<int64_t> shape) { in getNumElements() function in ShapedType
44 return elementType.getIntOrFloatBitWidth() * getNumElements(); in getSizeInBits()
48 return elementType.getIntOrFloatBitWidth() * getNumElements() * 2; in getSizeInBits()
50 return getNumElements() * elementType.cast<ShapedType>().getSizeInBits(); in getSizeInBits()
H A DBuiltinAttributeInterfaces.cpp35 int64_t ElementsAttr::getNumElements(Attribute elementsAttr) { in getNumElements() function in ElementsAttr
36 return elementsAttr.getType().cast<ShapedType>().getNumElements(); in getNumElements()
/llvm-project-15.0.7/llvm/unittests/AsmParser/
H A DAsmParserTest.cpp206 ASSERT_TRUE(ST->getNumElements() == 2); in TEST()
207 for (unsigned i = 0, e = ST->getNumElements(); i != e; ++i) { in TEST()
220 ASSERT_TRUE(ST->getNumElements() == 4); in TEST()
221 for (unsigned i = 0, e = ST->getNumElements(); i != e; ++i) { in TEST()
234 ASSERT_TRUE(VT->getNumElements() == 5); in TEST()
329 ASSERT_TRUE(ST->getNumElements() == 2); in TEST()
330 for (unsigned i = 0, e = ST->getNumElements(); i != e; ++i) { in TEST()
344 ASSERT_TRUE(ST->getNumElements() == 4); in TEST()
345 for (unsigned i = 0, e = ST->getNumElements(); i != e; ++i) { in TEST()
359 ASSERT_TRUE(VT->getNumElements() == 5); in TEST()
/llvm-project-15.0.7/llvm/unittests/IR/
H A DVectorTypesTest.cpp47 EXPECT_EQ(V16Int8Ty->getNumElements(), 16U); in TEST()
53 EXPECT_EQ(V8Int32Ty->getNumElements(), 8U); in TEST()
69 EXPECT_EQ(V8Int16Ty->getNumElements(), 8U); in TEST()
75 EXPECT_EQ(V4Int64Ty->getNumElements(), 4U); in TEST()
81 EXPECT_EQ(V2Int64Ty->getNumElements(), 2U); in TEST()
87 EXPECT_EQ(V8Int64Ty->getNumElements(), 8U); in TEST()
99 EXPECT_EQ(ExtTy->getNumElements(), 8U); in TEST()
105 EXPECT_EQ(TruncTy->getNumElements(), 8U); in TEST()
111 EXPECT_EQ(HalvedTy->getNumElements(), 2U); in TEST()
117 EXPECT_EQ(DoubledTy->getNumElements(), 8U); in TEST()
[all …]
/llvm-project-15.0.7/mlir/include/mlir/Dialect/
H A DCommonFolders.h73 elementResults.reserve(lhs.getNumElements()); in constFoldBinaryOpConditional()
74 for (size_t i = 0, e = lhs.getNumElements(); i < e; ++i, ++lhsIt, ++rhsIt) { in constFoldBinaryOpConditional()
134 elementResults.reserve(op.getNumElements()); in constFoldUnaryOpConditional()
135 for (size_t i = 0, e = op.getNumElements(); i < e; ++i, ++opIt) { in constFoldUnaryOpConditional()
193 elementResults.reserve(op.getNumElements()); in constFoldCastOp()
194 for (size_t i = 0, e = op.getNumElements(); i < e; ++i, ++opIt) { in constFoldCastOp()
/llvm-project-15.0.7/mlir/lib/Dialect/SPIRV/Utils/
H A DLayoutUtils.cpp31 if (structType.getNumElements() == 0) { in decorateType()
42 for (uint32_t i = 0, e = structType.getNumElements(); i < e; ++i) { in decorateType()
104 const auto numElements = vectorType.getNumElements(); in decorateType()
123 const auto numElements = arrayType.getNumElements(); in decorateType()
176 return structType.hasOffset() || !structType.getNumElements(); in isLegalType()
/llvm-project-15.0.7/llvm/lib/Target/ARM/
H A DMVEGatherScatterLowering.cpp278 cast<FixedVectorType>(Offsets->getType())->getNumElements(); in decomposeGEP()
280 assert(Ty->getNumElements() == OffsetsElemCount); in decomposeGEP()
315 if (BCTy->getNumElements() == BCSrcTy->getNumElements()) { in lookThroughBitcast()
459 if (Ty->getNumElements() != 4 || Ty->getScalarSizeInBits() != 32) in tryCreateMaskedGatherBase()
690 128 / cast<FixedVectorType>(InputTy)->getNumElements()); in tryCreateMaskedScatterOffset()
789 Ty->getNumElements(), in tryCreateIncrementingGatScat()
1153 unsigned TargetElemSize = 128 / XElType->getNumElements(); in CheckAndCreateOffsetAdd()
1154 for (unsigned i = 0; i < XElType->getNumElements(); i++) { in CheckAndCreateOffsetAdd()
1168 XElType->getNumElements(), in CheckAndCreateOffsetAdd()
1171 YElType->getNumElements(), in CheckAndCreateOffsetAdd()
[all …]
/llvm-project-15.0.7/mlir/lib/Conversion/VectorToSPIRV/
H A DVectorToSPIRV.cpp69 SmallVector<Value, 4> source(broadcastOp.getVectorType().getNumElements(), in matchAndRewrite()
86 if (resultVectorType && resultVectorType.getNumElements() > 1) in matchAndRewrite()
166 insertOp.getDestVectorType().getNumElements() == 1) { in matchAndRewrite()
237 dstVector.getType().cast<VectorType>().getNumElements(); in matchAndRewrite()
239 srcVector.getType().cast<VectorType>().getNumElements(); in matchAndRewrite()
331 SmallVector<Value, 4> source(dstVecType.getNumElements(), in matchAndRewrite()
353 if (oldSourceType.getNumElements() > 1) { in matchAndRewrite()
366 newOperands.reserve(oldResultType.getNumElements()); in matchAndRewrite()
/llvm-project-15.0.7/llvm/lib/Transforms/InstCombine/
H A DInstCombineVectorOps.cpp523 ->getNumElements(); in visitExtractElementInst()
668 unsigned NumInsElts = InsVecType->getNumElements(); in replaceExtractElements()
669 unsigned NumExtElts = ExtVecType->getNumElements(); in replaceExtractElements()
804 ->getNumElements(); in collectShuffleElements()
1597 unsigned VWidth = VecTy->getNumElements(); in visitInsertElementInst()
2039 cast<FixedVectorType>(Shuf.getType())->getNumElements(); in canonicalizeInsertSplat()
2197 cast<FixedVectorType>(SrcType)->getNumElements() != in foldTruncShuffle()
2198 cast<FixedVectorType>(DestType)->getNumElements() || in foldTruncShuffle()
2242 cast<FixedVectorType>(Shuf.getType())->getNumElements(); in narrowVectorSelect()
2590 unsigned XNumElts = XType->getNumElements(); in visitShuffleVectorInst()
[all …]
/llvm-project-15.0.7/llvm/lib/Transforms/Scalar/
H A DScalarizer.cpp292 Size = cast<FixedVectorType>(Ty)->getNumElements(); in INITIALIZE_PASS_DEPENDENCY()
510 unsigned NumElems = cast<FixedVectorType>(VT)->getNumElements(); in splitUnary()
530 unsigned NumElems = cast<FixedVectorType>(VT)->getNumElements(); in splitBinary()
573 unsigned NumElems = cast<FixedVectorType>(VT)->getNumElements(); in splitCall()
630 unsigned NumElems = cast<FixedVectorType>(VT)->getNumElements(); in visitSelectInst()
684 unsigned NumElems = cast<FixedVectorType>(VT)->getNumElements(); in visitGetElementPtrInst()
729 unsigned NumElems = cast<FixedVectorType>(VT)->getNumElements(); in visitCastInst()
802 unsigned NumElems = cast<FixedVectorType>(VT)->getNumElements(); in visitInsertElementInst()
837 unsigned NumSrcElems = cast<FixedVectorType>(VT)->getNumElements(); in visitExtractElementInst()
869 unsigned NumElems = cast<FixedVectorType>(VT)->getNumElements(); in visitShuffleVectorInst()
[all …]
/llvm-project-15.0.7/llvm/lib/Transforms/Utils/
H A DFunctionComparator.cpp318 uint64_t NumElementsL = cast<ArrayType>(TyL)->getNumElements(); in cmpConstants()
319 uint64_t NumElementsR = cast<ArrayType>(TyR)->getNumElements(); in cmpConstants()
332 unsigned NumElementsL = cast<StructType>(TyL)->getNumElements(); in cmpConstants()
333 unsigned NumElementsR = cast<StructType>(TyR)->getNumElements(); in cmpConstants()
346 unsigned NumElementsL = cast<FixedVectorType>(TyL)->getNumElements(); in cmpConstants()
347 unsigned NumElementsR = cast<FixedVectorType>(TyR)->getNumElements(); in cmpConstants()
462 if (STyL->getNumElements() != STyR->getNumElements()) in cmpTypes()
463 return cmpNumbers(STyL->getNumElements(), STyR->getNumElements()); in cmpTypes()
468 for (unsigned i = 0, e = STyL->getNumElements(); i != e; ++i) { in cmpTypes()
497 if (STyL->getNumElements() != STyR->getNumElements()) in cmpTypes()
[all …]
/llvm-project-15.0.7/mlir/lib/Target/LLVMIR/
H A DTypeToLLVM.cpp91 type.getNumElements()); in translate()
144 type.getNumElements()); in translate()
146 type.getNumElements()); in translate()
152 type.getNumElements()); in translate()
/llvm-project-15.0.7/mlir/lib/Dialect/SPIRV/IR/
H A DSPIRVTypes.cpp82 return (*size + getArrayStride()) * getNumElements(); in getSizeInBytes()
98 switch (type.getNumElements()) { in isValid()
122 unsigned CompositeType::getNumElements() const { in getNumElements() function in CompositeType
124 return arrayType.getNumElements(); in getNumElements()
128 return structType.getNumElements(); in getNumElements()
130 return vectorType.getNumElements(); in getNumElements()
168 auto vecSize = getNumElements(); in getCapabilities()
190 return *elementSize * vectorType.getNumElements(); in getSizeInBytes()
1005 assert(getNumElements() > index && "member index out of range"); in getElementType()
1011 getNumElements()); in getElementTypes()
[all …]
/llvm-project-15.0.7/llvm/lib/Target/X86/
H A DX86PartialReduction.cpp110 if (cast<FixedVectorType>(Op->getType())->getNumElements() < 8) in tryMAddReplacement()
186 unsigned NumElts = MulTy->getNumElements(); in tryMAddReplacement()
266 unsigned NumElts = OpTy->getNumElements(); in trySADReplacement()
319 cast<FixedVectorType>(Ops[0]->getType())->getNumElements() * 2; in trySADReplacement()
329 NumElts = cast<FixedVectorType>(OpTy)->getNumElements(); in trySADReplacement()
336 cast<FixedVectorType>(Ops[0]->getType())->getNumElements(); in trySADReplacement()
368 unsigned NumElems = cast<FixedVectorType>(BO->getType())->getNumElements(); in matchAddReduction()
H A DX86InstCombineIntrinsic.cpp205 unsigned VWidth = VT->getNumElements(); in simplifyX86immShift()
352 int NumElts = VT->getNumElements(); in simplifyX86varShift()
449 unsigned NumSrcElts = ArgTy->getNumElements(); in simplifyX86pack()
522 unsigned NumElts = ArgTy->getNumElements(); in simplifyX86movmsk()
809 unsigned NumElts = VecTy->getNumElements(); in simplifyX86pshufb()
854 unsigned NumElts = VecTy->getNumElements(); in simplifyX86vpermilvar()
901 unsigned Size = VecTy->getNumElements(); in simplifyX86vpermv()
1421 cast<FixedVectorType>(Arg0->getType())->getNumElements(); in instCombineIntrinsic()
1638 cast<FixedVectorType>(Mask->getType())->getNumElements(); in instCombineIntrinsic()
1640 cast<FixedVectorType>(II.getType())->getNumElements(); in instCombineIntrinsic()
[all …]
/llvm-project-15.0.7/mlir/lib/Dialect/Vector/Transforms/
H A DVectorTransferOpTransforms.cpp272 if (sourceType.getNumElements() != vectorType.getNumElements()) in matchAndRewrite()
315 if (sourceType.getNumElements() != vectorType.getNumElements()) in matchAndRewrite()
431 getContiguousInnerDim(sourceType, vectorType.getNumElements()); in matchAndRewrite()
456 VectorType flatVectorType = VectorType::get({vectorType.getNumElements()}, in matchAndRewrite()
489 getContiguousInnerDim(sourceType, vectorType.getNumElements()); in matchAndRewrite()
514 VectorType flatVectorType = VectorType::get({vectorType.getNumElements()}, in matchAndRewrite()
/llvm-project-15.0.7/llvm/lib/CodeGen/
H A DInterleavedLoadCombinePass.cpp678 EI = new ElementInfo[VTy->getNumElements()]; in VectorInfo()
683 unsigned getDimension() const { return VTy->getNumElements(); } in getDimension()
741 if (Result.VTy->getNumElements() % VTy->getNumElements()) in computeFromBCI()
744 unsigned Factor = Result.VTy->getNumElements() / VTy->getNumElements(); in computeFromBCI()
755 for (unsigned i = 0; i < Result.VTy->getNumElements(); i += Factor) { in computeFromBCI()
836 assert((i < 2 * (signed)ArgTy->getNumElements()) && in computeFromSVI()
841 else if (i < (signed)ArgTy->getNumElements()) { in computeFromSVI()
848 Result.EI[j] = RHS.EI[i - ArgTy->getNumElements()]; in computeFromSVI()
1204 ->getNumElements(); in combine()
H A DExpandReductions.cpp127 cast<FixedVectorType>(Vec->getType())->getNumElements())) in expandReductions()
147 cast<FixedVectorType>(Vec->getType())->getNumElements())) in expandReductions()
159 cast<FixedVectorType>(Vec->getType())->getNumElements()) || in expandReductions()
/llvm-project-15.0.7/mlir/include/mlir/IR/
H A DBuiltinAttributes.h406 ElementIterator<T>(rawData, splat, getNumElements())};
418 return ElementIterator<T>(getRawData().data(), isSplat(), getNumElements());
435 ElementIterator<T>(rawData, splat, getNumElements())};
462 ElementIterator<StringRef>(ptr, splat, getNumElements())};
472 return ElementIterator<StringRef>(ptr, isSplat(), getNumElements());
490 return AttributeElementIterator(*this, getNumElements());
534 BoolElementIterator(*this, getNumElements())};
544 return BoolElementIterator(*this, getNumElements());
638 int64_t getNumElements() const;
641 int64_t size() const { return getNumElements(); }
[all …]
/llvm-project-15.0.7/llvm/include/llvm/IR/
H A DDerivedTypes.h327 unsigned getNumElements() const { return NumContainedTys; } in getNumElements() function
336 bool indexValid(unsigned Idx) const { return Idx < getNumElements(); } in indexValid()
349 return cast<StructType>(this)->getNumElements(); in getStructNumElements()
369 uint64_t getNumElements() const { return NumElements; } in getNumElements() function
385 return cast<ArrayType>(this)->getNumElements(); in getArrayNumElements()
534 return get(ElementType, FVTy->getNumElements()); in get()
568 unsigned getNumElements() const { return ElementQuantity; } in getNumElements() function
/llvm-project-15.0.7/mlir/lib/Conversion/NVGPUToNVVM/
H A DNVGPUToNVVM.cpp33 ctx, SmallVector<Type>(a.getNumElements(), f16x2Ty)); in inferIntrinsicResultType()
38 SmallVector<Type>(static_cast<size_t>(a.getNumElements()) * 2, i32Ty)); in inferIntrinsicResultType()
46 SmallVector<Type>(static_cast<size_t>(a.getNumElements()) * 2, f32Ty)); in inferIntrinsicResultType()
50 ctx, SmallVector<Type>(static_cast<size_t>(a.getNumElements()), f32Ty)); in inferIntrinsicResultType()
154 for (unsigned i = 0, e = arrayTy.getNumElements(); i < e; ++i) { in unpackOperandVector()
176 for (unsigned idx = 0, innerSize = innerArrayTy.getNumElements(); in unpackOperandVector()
383 int64_t numElements = adaptor.getNumElements().getZExtValue(); in matchAndRewrite()
/llvm-project-15.0.7/llvm/lib/CodeGen/GlobalISel/
H A DMachineIRBuilder.cpp225 assert((ResTy.getNumElements() > Op0Ty.getNumElements()) && in buildPadVectorWithUndefElements()
233 unsigned NumberOfPadElts = ResTy.getNumElements() - Regs.size(); in buildPadVectorWithUndefElements()
248 assert((ResTy.getNumElements() < Op0Ty.getNumElements()) && in buildDeleteTrailingVectorElements()
253 for (unsigned i = 0; i < ResTy.getNumElements(); ++i) in buildDeleteTrailingVectorElements()
678 SmallVector<int, 16> ZeroMask(DstTy.getNumElements()); in buildShuffleSplat()
689 assert((size_t)(Src1Ty.getNumElements() + Src2Ty.getNumElements()) >= in buildShuffleVector()
992 assert(SrcTy.getNumElements() == DstTy.getNumElements() && in validateTruncExt()
1017 TstTy.getNumElements() == Op0Ty.getNumElements())) && in validateSelectOp()
1133 DstTy.getNumElements() == Op0Ty.getNumElements(); in buildInstr()
1196 assert(DstOps[0].getLLTTy(*getMRI()).getNumElements() == in buildInstr()
[all …]
/llvm-project-15.0.7/mlir/lib/Dialect/Tosa/Utils/
H A DQuantUtils.cpp285 if (minElems.getNumElements() != maxElems.getNumElements()) in buildQTypeFromMinMax()
287 min.reserve(minElems.getNumElements()); in buildQTypeFromMinMax()
288 max.reserve(maxElems.getNumElements()); in buildQTypeFromMinMax()
/llvm-project-15.0.7/clang/lib/CodeGen/
H A DPatternInit.cpp67 ArrTy->getNumElements(), in initializationPatternFor()
79 llvm::SmallVector<llvm::Constant *, 8> Struct(StructTy->getNumElements()); in initializationPatternFor()
/llvm-project-15.0.7/llvm/tools/llvm-diff/lib/
H A DDifferenceEngine.cpp467 if (CVL->getType()->getNumElements() != CVR->getType()->getNumElements()) in equivalentAsOperands()
469 for (unsigned i = 0; i < CVL->getType()->getNumElements(); i++) { in equivalentAsOperands()
482 if (CAL->getType()->getNumElements() != CAR->getType()->getNumElements()) in equivalentAsOperands()
485 for (unsigned I = 0; I < CAL->getType()->getNumElements(); ++I) { in equivalentAsOperands()
505 if (LTy->getNumElements() != RTy->getNumElements() || in equivalentAsOperands()
509 for (unsigned I = 0; I < LTy->getNumElements(); I++) { in equivalentAsOperands()

12345678910>>...14