Home
last modified time | relevance | path

Searched refs:ElementCount (Results 1 – 25 of 161) sorted by relevance

1234567

/llvm-project/llvm/unittests/Support/
H A DTypeSizeTest.cpp15 constexpr ElementCount CEElementCount = ElementCount();
20 constexpr ElementCount CEElementCountFixed1 = ElementCount::getFixed(1);
25 constexpr ElementCount CEElementCountFixed3 = ElementCount::getFixed(3);
26 constexpr ElementCount CEElementCountFixed4 = ElementCount::getFixed(4);
35 constexpr ElementCount CEElementCountScalable4 = ElementCount::getScalable(4);
38 static_assert(!ElementCount().isScalable());
40 CEElementCountScalable4.hasKnownScalarFactor(ElementCount::getScalable(2)));
41 static_assert(ElementCount::getScalable(8).getKnownScalarFactor(
42 ElementCount::getScalable(2)) == 4);
44 static_assert(CEElementCountScalable4 == ElementCount::get(4, true));
[all …]
/llvm-project/llvm/unittests/CodeGen/
H A DLowLevelTypeTest.cpp76 {ElementCount::getFixed(2), ElementCount::getFixed(3), in TEST()
77 ElementCount::getFixed(4), ElementCount::getFixed(32), in TEST()
78 ElementCount::getFixed(0xff), ElementCount::getScalable(2), in TEST()
79 ElementCount::getScalable(3), ElementCount::getScalable(4), in TEST()
80 ElementCount::getScalable(32), ElementCount in TEST()
[all...]
H A DScalableVectorMVTsTest.cpp52 auto EltCnt = ElementCount::getScalable(2); in TEST()
57 EVT Vnx2i64 = EVT::getVectorVT(Ctx, MVT::i64, ElementCount::getScalable(2)); in TEST()
70 EVT Vnx2f64 = EVT::getVectorVT(Ctx, MVT::f64, ElementCount::getScalable(2)); in TEST()
81 EVT V4f64 = EVT::getVectorVT(Ctx, MVT::f64, ElementCount::getFixed(4)); in TEST()
95 VectorType::get(Int64Ty, ElementCount::getScalable(8)); in TEST()
115 EVT Enxv4f64 = EVT::getVectorVT(Ctx, MVT::f64, ElementCount::getScalable(4)); in TEST()
/llvm-project/llvm/lib/Transforms/Vectorize/
H A DLoopVectorizationPlanner.h294 ElementCount Width;
304 ElementCount MinProfitableTripCount;
306 VectorizationFactor(ElementCount Width, InstructionCost Cost,
312 return {ElementCount::getFixed(1), 0, 0};
330 ElementCount FixedVF;
331 ElementCount ScalableVF;
334 : FixedVF(ElementCount::getFixed(0)),
335 ScalableVF(ElementCount::getScalable(0)) {}
336 FixedScalableVFPair(const ElementCount &Max) : FixedScalableVFPair() {
339 FixedScalableVFPair(const ElementCount in LoopVectorizationPlanner()
[all...]
H A DLoopVectorize.cpp482 OptimizationRemarkEmitter *ORE, ElementCount VecWidth,
483 ElementCount MinProfitableTripCount,
624 ElementCount VF;
626 ElementCount MinProfitableTripCount;
700 ElementCount MainLoopVF = ElementCount::getFixed(0);
702 ElementCount EpilogueVF = ElementCount::getFixed(0);
712 EpilogueLoopVectorizationInfo(ElementCount MVF, unsigned MUF,
713 ElementCount EV
[all...]
H A DLoopVectorizationLegality.cpp158 getWidth() == ElementCount::getFixed(1) && getInterleave() == 1; in setAlreadyVectorized()
241 if (getWidth() == ElementCount::getFixed(1)) in vectorizeAnalysisPassName()
253 ElementCount EC = getWidth(); in allowReordering()
567 bool LoopVectorizationLegality::isUniform(Value *V, ElementCount VF) const {
601 ElementCount VF) const { in isUniformMemOp()
767 ElementCount WidestFixedVF, WidestScalableVF;
769 for (ElementCount VF = ElementCount::getFixed(2); in isTLIScalarize()
770 ElementCount::isKnownLE(VF, WidestFixedVF); VF *= 2) in isTLIScalarize()
772 for (ElementCount V in isTLIScalarize()
[all...]
/llvm-project/llvm/include/llvm/Support/
H A DTypeSize.h299 class ElementCount
300 : public details::FixedOrScalableQuantity<ElementCount, unsigned> {
301 constexpr ElementCount(ScalarTy MinVal, bool Scalable) in ElementCount() function
304 constexpr ElementCount( in ElementCount() function
305 const FixedOrScalableQuantity<ElementCount, unsigned> &V) in ElementCount() argument
309 constexpr ElementCount() : FixedOrScalableQuantity() {} in ElementCount() function
311 static constexpr ElementCount getFixed(ScalarTy MinVal) { in getFixed()
312 return ElementCount(MinVal, false); in getFixed()
314 static constexpr ElementCount getScalable(ScalarTy MinVal) { in getScalable()
315 return ElementCount(MinVal, true); in getScalable()
[all …]
/llvm-project/llvm/unittests/IR/
H A DVFABIDemanglerTest.cpp64 ElementCount &VF = Info.Shape.VF;
106 VectorType::get(Type::getInt32Ty(Ctx), ElementCount::getFixed(2)),
107 VectorType::get(Type::getInt1Ty(Ctx), ElementCount::getFixed(2)),
114 VectorType::get(Type::getInt32Ty(Ctx), ElementCount::getFixed(2)),
121 VectorType::get(Type::getInt32Ty(Ctx), ElementCount::getScalable(4)),
122 VectorType::get(Type::getInt1Ty(Ctx), ElementCount::getScalable(4)),
164 {VectorType::get(Type::getInt32Ty(Ctx), ElementCount::getFixed(2)), in TEST_F()
226 VectorType::get(Type::getInt32Ty(Ctx), ElementCount::getFixed(2)), in TEST_F()
238 EXPECT_EQ(VF, ElementCount::getFixed(2)); in TEST_F()
258 EXPECT_EQ(VF, ElementCount in TEST_F()
[all...]
H A DVectorTypesTest.cpp67 VectorType::get(Int16Ty, ElementCount::getFixed(8))); in TEST()
72 auto EltCnt = ElementCount::getFixed(4); in TEST()
130 EXPECT_EQ(SubTy->getElementCount(), ElementCount::getFixed(16)); in TEST()
165 VectorType::get(Int16Ty, ElementCount::getScalable(8))); in TEST()
170 auto EltCnt = ElementCount::getScalable(4); in TEST()
237 VectorType::get(Int16Ty, ElementCount::getScalable(4)), in TEST()
238 VectorType::get(Int16Ty, ElementCount::getFixed(4)), in TEST()
239 VectorType::get(Int16Ty, ElementCount::getScalable(2)), in TEST()
240 VectorType::get(Int16Ty, ElementCount::getFixed(2)), in TEST()
241 VectorType::get(Int32Ty, ElementCount in TEST()
[all...]
/llvm-project/llvm/lib/Transforms/Utils/
H A DInjectTLIMappings.cpp40 static void addVariantDeclaration(CallInst &CI, const ElementCount &VF,
93 auto AddVariantDecl = [&](const ElementCount &VF, bool Predicate) { in addMappingsFromTLI()
108 ElementCount WidestFixedVF, WidestScalableVF; in addMappingsFromTLI()
112 for (ElementCount VF = ElementCount::getFixed(2); in addMappingsFromTLI()
113 ElementCount::isKnownLE(VF, WidestFixedVF); VF *= 2) in addMappingsFromTLI()
116 for (ElementCount VF = ElementCount::getScalable(2); in addMappingsFromTLI()
117 ElementCount::isKnownLE(VF, WidestScalableVF); VF *= 2) in addMappingsFromTLI()
/llvm-project/llvm/include/llvm/CodeGenTypes/
H A DLowLevelType.h44 ElementCount::getFixed(0), SizeInBits, in scalar()
51 /*isScalar=*/true, ElementCount::getFixed(0), in token()
60 ElementCount::getFixed(0), SizeInBits, AddressSpace}; in pointer()
64 static constexpr LLT vector(ElementCount EC, unsigned ScalarSizeInBits) { in vector()
71 static constexpr LLT vector(ElementCount EC, LLT ScalarTy) { in vector()
102 return vector(ElementCount::getFixed(NumElements), ScalarSizeInBits); in fixed_vector()
108 return vector(ElementCount::getFixed(NumElements), ScalarTy); in fixed_vector()
115 return vector(ElementCount::getScalable(MinNumElements), ScalarSizeInBits); in scalable_vector()
121 return vector(ElementCount::getScalable(MinNumElements), ScalarTy); in scalable_vector()
124 static constexpr LLT scalarOrVector(ElementCount E
[all...]
H A DMachineValueType.h252 ElementCount NElts = getVectorElementCount(); in getScalarType()
254 NElts = ElementCount::get(NewMinCount, NElts.isScalable()); in getVectorElementType()
290 ElementCount getVectorElementCount() const { in getVectorNumElements()
291 return ElementCount::get(getVectorMinNumElements(), isScalableVector());
501 static MVT getVectorVT(MVT VT, ElementCount EC) { in vector_valuetypes()
/llvm-project/llvm/unittests/Analysis/
H A DVectorUtilsTest.cpp96 IRB.CreateVectorSplat(ElementCount::getScalable(5), ScalarC); in TEST_F()
601 VFShape Shape = {/*VF*/ ElementCount::getFixed(2), /*Parameters*/ {}}; in TEST_F()
605 void buildShape(ElementCount VF, bool HasGlobalPred) { in TEST_F()
616 buildShape(/*VF*/ ElementCount::getFixed(2), /*HasGlobalPred*/ false); in TEST_F()
617 Expected = {/*VF*/ ElementCount::getFixed(2), /*Parameters*/ { in TEST_F()
624 buildShape(/*VF*/ ElementCount::getFixed(4), /*HasGlobalPred*/ true); in TEST_F()
625 Expected = {/*VF*/ ElementCount::getFixed(4), /*Parameters*/ { in TEST_F()
633 buildShape(/*VF*/ ElementCount::getScalable(16), /*HasGlobalPred*/ false); in TEST_F()
634 Expected = {/*VF*/ ElementCount::getScalable(16), /*Parameters*/ { in TEST_F()
643 buildShape(/*VF*/ ElementCount in TEST_F()
[all...]
/llvm-project/llvm/lib/IR/
H A DVFABIDemangler.cpp304 static std::optional<ElementCount> getElementCountForTy(const VFISAKind ISA, in getElementCountForTy()
310 return ElementCount::getScalable(2); in getElementCountForTy()
312 return ElementCount::getScalable(4); in getElementCountForTy()
314 return ElementCount::getScalable(8); in getElementCountForTy()
316 return ElementCount::getScalable(16); in getElementCountForTy()
323 static std::optional<ElementCount> in getScalableECFromSignature()
327 ElementCount MinEC = in getScalableECFromSignature()
328 ElementCount::getScalable(std::numeric_limits<unsigned int>::max()); in getScalableECFromSignature()
335 std::optional<ElementCount> EC = getElementCountForTy(ISA, PTy); in getScalableECFromSignature()
342 if (ElementCount in getScalableECFromSignature()
[all...]
/llvm-project/llvm/include/llvm/Analysis/
H A DTargetLibraryInfo.h45 ElementCount VectorizationFactor;
52 ElementCount VectorizationFactor, bool Masked, StringRef VABIPrefix) in VecDesc()
59 ElementCount getVectorizationFactor() const { return VectorizationFactor; } in getVectorFnName()
201 bool isFunctionVectorizable(StringRef F, const ElementCount &VF) const {
212 StringRef getVectorizedFunction(StringRef F, const ElementCount &VF,
218 const VecDesc *getVectorMappingInfo(StringRef F, const ElementCount &VF,
266 void getWidestVF(StringRef ScalarF, ElementCount &FixedVF,
267 ElementCount &Scalable) const;
390 bool isFunctionVectorizable(StringRef F, const ElementCount &VF) const { in has()
396 StringRef getVectorizedFunction(StringRef F, const ElementCount in isFunctionVectorizable()
[all...]
H A DTensorSpec.h84 size_t getElementCount() const { return ElementCount; } in getElementCount()
88 size_t getTotalTensorBufferSize() const { return ElementCount * ElementSize; } in getTotalTensorBufferSize()
110 size_t ElementCount = 0; variable
/llvm-project/clang/lib/StaticAnalyzer/Checkers/
H A DReturnPointerRangeChecker.cpp65 DefinedOrUnknownSVal ElementCount = getDynamicElementCount( in checkPreStmt() local
70 if (Idx == ElementCount) in checkPreStmt()
74 std::tie(StInBound, StOutBound) = state->assumeInBoundDual(Idx, ElementCount); in checkPreStmt()
89 const auto ConcreteElementCount = ElementCount.getAs<nonloc::ConcreteInt>(); in checkPreStmt()
H A DArrayBoundChecker.cpp58 DefinedOrUnknownSVal ElementCount = getDynamicElementCount( in checkLocation() local
62 std::tie(StInBound, StOutBound) = state->assumeInBoundDual(Idx, ElementCount); in checkLocation()
/llvm-project/llvm/include/llvm/IR/
H A DVectorBuilder.h47 ElementCount StaticVectorLength;
70 StaticVectorLength(ElementCount::getFixed(0)) {}
87 StaticVectorLength = ElementCount::getFixed(NewFixedVL);
90 // TODO: setStaticVL(ElementCount) for scalable types.
H A DVFABIDemangler.h84 ElementCount VF; // Vectorization factor.
101 return VFShape::get(FTy, ElementCount::getFixed(1), in getScalarShape()
108 static VFShape get(const FunctionType *FTy, ElementCount EC, in get()
/llvm-project/llvm/lib/CodeGen/GlobalISel/
H A DLegalizeMutations.cpp51 ElementCount NewEltCount = in changeElementCountTo()
52 NewTy.isVector() ? NewTy.getElementCount() : ElementCount::getFixed(1); in changeElementCountTo()
61 ElementCount NewEltCount = NewEltTy.isVector() ? NewEltTy.getElementCount() in changeElementCountTo()
62 : ElementCount::getFixed(1); in changeElementCountTo()
/llvm-project/llvm/include/llvm/CodeGen/
H A DValueTypes.h84 static EVT getVectorVT(LLVMContext &Context, EVT VT, ElementCount EC) { in getVectorVT()
344 // Given a (possibly scalable) vector type, return the ElementCount in getVectorElementCount()
345 ElementCount getVectorElementCount() const { in getVectorElementCount()
474 ElementCount NElts = getVectorElementCount();
476 NElts = ElementCount::get(NewMinCount, NElts.isScalable());
540 ElementCount EC);
557 ElementCount getExtendedVectorElementCount() const LLVM_READONLY;
/llvm-project/llvm/include/llvm/Transforms/Vectorize/
H A DLoopVectorizationLegality.h137 ElementCount getWidth() const { in getWidth()
138 return ElementCount::get(Width.Value, (ScalableForceKind)Scalable.Value == in getWidth()
370 bool isUniform(Value *V, ElementCount VF) const; in getLAI()
375 bool isUniformMemOp(Instruction &I, ElementCount VF) const;
/llvm-project/mlir/include/mlir/Dialect/LLVMIR/
H A DLLVMTypes.h23 class ElementCount; variable
120 llvm::ElementCount getVectorNumElements(Type type);
132 Type getVectorType(Type elementType, const llvm::ElementCount &numElements);
/llvm-project/llvm/lib/Target/DirectX/
H A DDXILIntrinsicExpansion.cpp112 ElementCount::getFixed( in expandExpIntrinsic()
241 ElementCount::getFixed( in getMinForClamp()
279 ElementCount::getFixed(XVec->getNumElements()), in expandIntrinsic()
283 ElementCount::getFixed(XVec->getNumElements()), in expandIntrinsic()
312 ElementCount::getFixed( in run()
444 ElementCount::getFixed(XVec->getNumElements()), One);
446 ElementCount::getFixed(XVec->getNumElements()), Zero);

1234567