| /llvm-project-15.0.7/mlir/lib/Conversion/MathToLibm/ |
| H A D | MathToLibm.cpp | 64 auto vecType = opType.template dyn_cast<VectorType>(); in matchAndRewrite() local 66 if (!vecType) in matchAndRewrite() 68 if (!vecType.hasRank()) in matchAndRewrite() 70 auto shape = vecType.getShape(); in matchAndRewrite() 71 int64_t numElements = vecType.getNumElements(); in matchAndRewrite() 75 vecType, FloatAttr::get(vecType.getElementType(), 0.0))); in matchAndRewrite() 85 rewriter.create<Op>(loc, vecType.getElementType(), operands); in matchAndRewrite()
|
| /llvm-project-15.0.7/mlir/lib/Interfaces/ |
| H A D | VectorInterfaces.cpp | 13 VectorType mlir::vector::detail::transferMaskType(VectorType vecType, in transferMaskType() argument 17 for (int64_t i = 0; i < vecType.getRank(); ++i) { in transferMaskType() 20 shape.push_back(vecType.getDimSize(i)); in transferMaskType()
|
| H A D | DataLayoutInterfaces.cpp | 78 if (auto vecType = type.dyn_cast<VectorType>()) in getDefaultTypeSizeInBits() local 79 return vecType.getNumElements() / vecType.getShape().back() * in getDefaultTypeSizeInBits() 80 llvm::PowerOf2Ceil(vecType.getShape().back()) * in getDefaultTypeSizeInBits() 81 dataLayout.getTypeSize(vecType.getElementType()) * 8; in getDefaultTypeSizeInBits()
|
| /llvm-project-15.0.7/mlir/lib/Conversion/VectorToGPU/ |
| H A D | VectorToGPU.cpp | 156 auto vecType = constantOp.getType().dyn_cast<VectorType>(); in constantSupportsMMAMatrixType() local 157 if (!vecType || vecType.getRank() != 2) in constantSupportsMMAMatrixType() 437 if (auto vecType = elType.dyn_cast<VectorType>()) in getMmaSyncVectorOperandType() local 438 elType = vecType.getElementType(); in getMmaSyncVectorOperandType() 567 if (auto vecType = loadedElType.dyn_cast<VectorType>()) { in createNonLdMatrixLoads() local 568 loadedElType = vecType.getElementType(); in createNonLdMatrixLoads() 706 auto vecType = op.getType().cast<VectorType>(); in convertConstantOp() local 708 vecType.getShape(), vecType.getElementType(), llvm::StringRef(fragType)); in convertConstantOp() 720 auto vecType = op.getVectorType(); in convertBroadcastOp() local 722 vecType.getShape(), vecType.getElementType(), llvm::StringRef(fragType)); in convertBroadcastOp()
|
| /llvm-project-15.0.7/mlir/lib/Dialect/Vector/Transforms/ |
| H A D | VectorDropLeadUnitDim.cpp | 411 auto vecType = op->getResultTypes()[0].dyn_cast<VectorType>(); in matchAndRewrite() local 412 if (!vecType) in matchAndRewrite() 414 VectorType newVecType = trimLeadingOneDims(vecType); in matchAndRewrite() 415 if (newVecType == vecType) in matchAndRewrite() 417 int64_t dropDim = vecType.getRank() - newVecType.getRank(); in matchAndRewrite() 430 rewriter.replaceOpWithNewOp<vector::BroadcastOp>(op, vecType, in matchAndRewrite()
|
| H A D | VectorUnrollDistribute.cpp | 511 auto vecType = operand.get().getType().template dyn_cast<VectorType>(); in matchAndRewrite() local 512 if (!vecType) { in matchAndRewrite() 552 auto vecType = operand.get().getType().template dyn_cast<VectorType>(); in matchAndRewrite() local 553 if (!vecType) { in matchAndRewrite() 560 vecType.getElementType()), in matchAndRewrite() 593 auto vecType = operand.getType().cast<VectorType>(); in matchAndRewrite() local 594 SmallVector<int64_t> operandShape(vecType.getShape().begin(), in matchAndRewrite() 595 vecType.getShape().end()); in matchAndRewrite() 606 VectorType::get(operandShape, vecType.getElementType()); in matchAndRewrite()
|
| H A D | VectorDistribute.cpp | 391 VectorType vecType = writeOp.getVectorType(); in tryExtractOp() local 395 if (vecType.getNumElements() != 1) in tryExtractOp() 405 SmallVector<Type> retTypes = {vecType}; in tryExtractOp() 494 if (auto vecType = distributedVal.getType().dyn_cast<VectorType>()) { in matchAndRewrite() local 498 VectorType::get(vecType.getShape(), operandType.getElementType()); in matchAndRewrite()
|
| H A D | VectorTransforms.cpp | 1376 dstElementType = vecType.getElementType(); in matchAndRewrite() 1474 auto vecType = elementType.dyn_cast<VectorType>(); in promote() local 1475 if (vecType) in promote() 1476 elementType = vecType.getElementType(); in promote() 1480 if (vecType) in promote() 2131 auto vecType = loadOp.getVectorType(); in matchAndRewrite() local 2132 if (vecType.getNumElements() != 1) in matchAndRewrite() 2149 auto vecType = storeOp.getVectorType(); in matchAndRewrite() local 2150 if (vecType.getNumElements() != 1) in matchAndRewrite() 2153 if (vecType.getRank() == 0) { in matchAndRewrite() [all …]
|
| /llvm-project-15.0.7/mlir/lib/Conversion/GPUToNVVM/ |
| H A D | WmmaOpsToNvvm.cpp | 259 if (auto vecType = type.getBody()[0].dyn_cast<VectorType>()) { in matchAndRewrite() local 260 Value vecCst = rewriter.create<LLVM::UndefOp>(loc, vecType); in matchAndRewrite() 261 for (int64_t vecEl = 0; vecEl < vecType.getNumElements(); vecEl++) { in matchAndRewrite() 265 vecCst = rewriter.create<LLVM::InsertElementOp>(loc, vecType, vecCst, in matchAndRewrite() 284 if (auto vecType = lhs.getType().dyn_cast<VectorType>()) in createMinMaxF() local 285 i1Type = VectorType::get(vecType.getShape(), i1Type); in createMinMaxF()
|
| /llvm-project-15.0.7/mlir/include/mlir/Interfaces/ |
| H A D | VectorInterfaces.h | 26 VectorType transferMaskType(VectorType vecType, AffineMap map);
|
| /llvm-project-15.0.7/mlir/lib/Dialect/LLVMIR/IR/ |
| H A D | LLVMTypes.cpp | 790 if (auto vecType = type.dyn_cast<VectorType>()) in isCompatibleOuterType() local 791 return vecType.getRank() == 1; in isCompatibleOuterType() 814 .Case<VectorType>([&](auto vecType) { in isCompatibleImpl() argument 815 return vecType.getRank() == 1 && in isCompatibleImpl() 816 isCompatible(vecType.getElementType()); in isCompatibleImpl() 876 if (auto vecType = type.dyn_cast<VectorType>()) { in isCompatibleVectorType() local 877 if (vecType.getRank() != 1) in isCompatibleVectorType() 879 Type elementType = vecType.getElementType(); in isCompatibleVectorType()
|
| /llvm-project-15.0.7/mlir/lib/Conversion/VectorToSCF/ |
| H A D | VectorToSCF.cpp | 404 auto vecType = bufferType.getElementType().dyn_cast<VectorType>(); in rewriteOp() local 407 loc, vecType, xferOp.getSource(), xferIndices, in rewriteOp() 428 auto vecType = bufferType.getElementType().dyn_cast<VectorType>(); in handleOutOfBoundsDim() local 429 auto vec = b.create<vector::SplatOp>(loc, vecType, xferOp.getPadding()); in handleOutOfBoundsDim() 903 auto vecType = vec.getType().dyn_cast<VectorType>(); in matchAndRewrite() local 915 rewriter, xferOp, iv, unpackedDim(xferOp), TypeRange(vecType), in matchAndRewrite() 1239 auto vecType = xferOp.getVectorType(); in matchAndRewrite() local 1242 rewriter.create<arith::ConstantIndexOp>(loc, vecType.getDimSize(0)); in matchAndRewrite()
|
| /llvm-project-15.0.7/mlir/lib/Conversion/SPIRVToLLVM/ |
| H A D | SPIRVToLLVM.cpp | 39 if (auto vecType = type.dyn_cast<VectorType>()) in isSignedIntegerOrVector() local 40 return vecType.getElementType().isSignedInteger(); in isSignedIntegerOrVector() 48 if (auto vecType = type.dyn_cast<VectorType>()) in isUnsignedIntegerOrVector() local 49 return vecType.getElementType().isUnsignedInteger(); in isUnsignedIntegerOrVector() 59 auto vecType = type.dyn_cast<VectorType>(); in getBitWidth() local 60 auto elementType = vecType.getElementType(); in getBitWidth() 76 if (auto vecType = type.dyn_cast<VectorType>()) { in minusOneIntegerAttribute() local 100 if (auto vecType = srcType.dyn_cast<VectorType>()) { in createFPConstant() local 101 auto floatType = vecType.getElementType().cast<FloatType>(); in createFPConstant() 104 SplatElementsAttr::get(vecType, in createFPConstant() [all …]
|
| /llvm-project-15.0.7/mlir/test/lib/Dialect/Vector/ |
| H A D | TestVectorTransforms.cpp | 87 auto vecType = extract.getResult().getType().cast<VectorType>(); in getShape() local 88 if (dstVec && dstVec != vecType) in getShape() 90 dstVec = vecType; in getShape() 396 if (auto vecType = op.getType().dyn_cast<VectorType>()) { in runOnOperation() local 404 for (unsigned i = 0, e = vecType.getRank(); i < e; i++) { in runOnOperation() 405 if (i < m.size() && m[i] != 1 && vecType.getDimSize(i) % m[i] == 0) { in runOnOperation()
|
| /llvm-project-15.0.7/mlir/lib/Dialect/SPIRV/Transforms/ |
| H A D | SPIRVConversion.cpp | 206 if (auto vecType = type.dyn_cast<VectorType>()) { in getTypeNumBytes() local 207 auto elementSize = getTypeNumBytes(options, vecType.getElementType()); in getTypeNumBytes() 210 return vecType.getNumElements() * *elementSize; in getTypeNumBytes() 442 if (auto vecType = elementType.dyn_cast<VectorType>()) { in convertMemrefType() local 444 convertVectorType(targetEnv, options, vecType, storageClass); in convertMemrefType()
|
| /llvm-project-15.0.7/mlir/lib/Dialect/SPIRV/IR/ |
| H A D | SPIRVCanonicalization.cpp | 40 if (auto vecType = type.cast<VectorType>()) { in getScalarOrSplatBoolAttr() local 41 if (vecType.getElementType().isInteger(1)) in getScalarOrSplatBoolAttr()
|
| H A D | SPIRVOps.cpp | 932 if (auto vecType = operandType.dyn_cast<VectorType>()) in getUnaryOpResultType() local 933 return VectorType::get(vecType.getNumElements(), resultType); in getUnaryOpResultType() 952 if (auto vecType = lhs.getType().dyn_cast<VectorType>()) in buildLogicalBinaryOp() local 953 boolType = VectorType::get(vecType.getShape(), boolType); in buildLogicalBinaryOp() 962 if (auto vecType = value.getType().dyn_cast<VectorType>()) in buildLogicalUnaryOp() local 963 boolType = VectorType::get(vecType.getShape(), boolType); in buildLogicalUnaryOp() 1992 if (auto vecType = type.dyn_cast<VectorType>()) { in getAsmResultNames() local 1994 specialName << vecType.getDimSize(0); in getAsmResultNames() 1996 Type elementType = vecType.getElementType(); in getAsmResultNames()
|
| /llvm-project-15.0.7/mlir/lib/Dialect/Linalg/Transforms/ |
| H A D | Vectorization.cpp | 736 auto vecType = VectorType::get(vecShape, sourceType.getElementType()); in tryVectorizeCopy() local 740 vecType.getRank(), in tryVectorizeCopy() 743 padOp.getLoc(), vecType, padOp.getSource(), readIndices, padValue, in tryVectorizeCopy() 1043 auto vecType = VectorType::get(padOp.getType().getShape(), in rewriteUser() local 1045 unsigned vecRank = vecType.getRank(); in rewriteUser() 1051 expectedSizes.append(vecType.getShape().begin(), vecType.getShape().end()); in rewriteUser() 1067 padOp.getLoc(), vecType, padOp.getSource(), readIndices, padValue); in rewriteUser()
|
| /llvm-project-15.0.7/mlir/lib/Conversion/ArithmeticToSPIRV/ |
| H A D | ArithmeticToSPIRV.cpp | 274 if (auto vecType = type.dyn_cast<VectorType>()) in isBoolScalarOrVector() local 275 return vecType.getElementType().isInteger(1); in isBoolScalarOrVector() 286 else if (auto vecType = type.dyn_cast<VectorType>()) in hasSameBitwidth() local 287 bw = vecType.getElementTypeBitWidth() * vecType.getNumElements(); in hasSameBitwidth()
|
| /llvm-project-15.0.7/clang/lib/Sema/ |
| H A D | SemaExprMember.cpp | 306 const ExtVectorType *vecType = baseType->getAs<ExtVectorType>(); in CheckExtVectorComponent() local 331 (Idx = vecType->getPointAccessorIdx(*compStr)) != -1) { in CheckExtVectorComponent() 340 } while (*compStr && (Idx = vecType->getPointAccessorIdx(*compStr)) != -1); in CheckExtVectorComponent() 353 while ((Idx = vecType->getNumericAccessorIdx(*compStr)) != -1) { in CheckExtVectorComponent() 377 if (!vecType->isAccessorWithinNumElements(*compStr++, HexSwizzle)) { in CheckExtVectorComponent() 405 unsigned CompSize = HalvingSwizzle ? (vecType->getNumElements() + 1) / 2 in CheckExtVectorComponent() 411 return vecType->getElementType(); in CheckExtVectorComponent() 416 QualType VT = S.Context.getExtVectorType(vecType->getElementType(), CompSize); in CheckExtVectorComponent()
|
| /llvm-project-15.0.7/mlir/lib/Conversion/MemRefToSPIRV/ |
| H A D | MemRefToSPIRV.cpp | 110 if (auto vecType = elementType.dyn_cast<VectorType>()) in isAllocationSupported() local 111 elementType = vecType.getElementType(); in isAllocationSupported()
|
| /llvm-project-15.0.7/llvm/lib/Target/NVPTX/ |
| H A D | NVPTXISelDAGToDAG.cpp | 892 unsigned vecType = NVPTX::PTXLdStInstCode::Scalar; in tryLoad() local 924 getI32Imm(vecType, dl), getI32Imm(fromType, dl), in tryLoad() 936 getI32Imm(vecType, dl), getI32Imm(fromType, dl), in tryLoad() 954 getI32Imm(vecType, dl), getI32Imm(fromType, dl), in tryLoad() 972 getI32Imm(vecType, dl), getI32Imm(fromType, dl), in tryLoad() 1740 unsigned vecType = NVPTX::PTXLdStInstCode::Scalar; in tryStore() local 1781 getI32Imm(vecType, dl), in tryStore() 1799 getI32Imm(vecType, dl), in tryStore() 1825 getI32Imm(vecType, dl), in tryStore() 1849 getI32Imm(vecType, dl), in tryStore()
|
| /llvm-project-15.0.7/clang/lib/AST/ |
| H A D | ASTContext.cpp | 4012 assert(vecType->isBuiltinType()); in getVectorType() 4025 if (!vecType.isCanonical()) { in getVectorType() 4033 VectorType(vecType, NumElts, Canonical, VecKind); in getVectorType() 4082 assert(vecType->isBuiltinType() || vecType->isDependentType()); in getExtVectorType() 4086 VectorType::Profile(ID, vecType, NumElts, Type::ExtVector, in getExtVectorType() 4095 if (!vecType.isCanonical()) { in getExtVectorType() 4103 ExtVectorType(vecType, NumElts, Canonical); in getExtVectorType() 4110 ASTContext::getDependentSizedExtVectorType(QualType vecType, in getDependentSizedExtVectorType() argument 4128 QualType CanonVecTy = getCanonicalType(vecType); in getDependentSizedExtVectorType() 4129 if (CanonVecTy == vecType) { in getDependentSizedExtVectorType() [all …]
|
| H A D | Type.cpp | 330 VectorType::VectorType(QualType vecType, unsigned nElements, QualType canonType, in VectorType() argument 332 : VectorType(Vector, vecType, nElements, canonType, vecKind) {} in VectorType() 334 VectorType::VectorType(TypeClass tc, QualType vecType, unsigned nElements, in VectorType() argument 336 : Type(tc, canonType, vecType->getDependence()), ElementType(vecType) { in VectorType()
|
| /llvm-project-15.0.7/mlir/lib/Conversion/VectorToLLVM/ |
| H A D | ConvertVectorToLLVM.cpp | 403 if (auto vecType = lhs.getType().dyn_cast<VectorType>()) in createMinMaxF() local 404 i1Type = VectorType::get(vecType.getShape(), i1Type); in createMinMaxF()
|