/external/llvm/lib/IR/ |
D | Instructions.cpp | 2004 Type* SrcTy = getOperand(0)->getType(); in isLosslessCast() local 2006 if (SrcTy == DstTy) in isLosslessCast() 2010 if (SrcTy->isPointerTy()) in isLosslessCast() 2024 Type *SrcTy, in isNoopCast() argument 2048 SrcTy->getScalarSizeInBits(); in isNoopCast() 2080 Type *SrcTy, Type *MidTy, Type *DstTy, Type *SrcIntPtrTy, Type *MidIntPtrTy, in isEliminableCastPair() argument 2139 bool chainedBitcast = (SrcTy == DstTy && isFirstBitcast && isSecondBitcast); in isEliminableCastPair() 2142 if ((isFirstBitcast && isa<VectorType>(SrcTy) != isa<VectorType>(MidTy)) || in isEliminableCastPair() 2163 if (!SrcTy->isVectorTy() && DstTy->isIntegerTy()) in isEliminableCastPair() 2175 if (SrcTy->isIntegerTy()) in isEliminableCastPair() [all …]
|
D | Verifier.cpp | 1847 Type *SrcTy = I.getOperand(0)->getType(); in visitTruncInst() local 1851 unsigned SrcBitSize = SrcTy->getScalarSizeInBits(); in visitTruncInst() 1854 Assert(SrcTy->isIntOrIntVectorTy(), "Trunc only operates on integer", &I); in visitTruncInst() 1856 Assert(SrcTy->isVectorTy() == DestTy->isVectorTy(), in visitTruncInst() 1865 Type *SrcTy = I.getOperand(0)->getType(); in visitZExtInst() local 1869 Assert(SrcTy->isIntOrIntVectorTy(), "ZExt only operates on integer", &I); in visitZExtInst() 1871 Assert(SrcTy->isVectorTy() == DestTy->isVectorTy(), in visitZExtInst() 1873 unsigned SrcBitSize = SrcTy->getScalarSizeInBits(); in visitZExtInst() 1883 Type *SrcTy = I.getOperand(0)->getType(); in visitSExtInst() local 1887 unsigned SrcBitSize = SrcTy->getScalarSizeInBits(); in visitSExtInst() [all …]
|
D | AutoUpgrade.cpp | 874 Type *SrcTy = V->getType(); in UpgradeBitCastInst() local 875 if (SrcTy->isPtrOrPtrVectorTy() && DestTy->isPtrOrPtrVectorTy() && in UpgradeBitCastInst() 876 SrcTy->getPointerAddressSpace() != DestTy->getPointerAddressSpace()) { in UpgradeBitCastInst() 894 Type *SrcTy = C->getType(); in UpgradeBitCastExpr() local 895 if (SrcTy->isPtrOrPtrVectorTy() && DestTy->isPtrOrPtrVectorTy() && in UpgradeBitCastExpr() 896 SrcTy->getPointerAddressSpace() != DestTy->getPointerAddressSpace()) { in UpgradeBitCastExpr()
|
D | ConstantFold.cpp | 87 Type *SrcTy = Op->getOperand(0)->getType(); in foldConstantCastPair() local 98 return CastInst::isEliminableCastPair(firstOp, secondOp, SrcTy, MidTy, DstTy, in foldConstantCastPair() 103 Type *SrcTy = V->getType(); in FoldBitCast() local 104 if (SrcTy == DestTy) in FoldBitCast() 142 if (VectorType *SrcTy = dyn_cast<VectorType>(V->getType())) { in FoldBitCast() local 143 assert(DestPTy->getBitWidth() == SrcTy->getBitWidth() && in FoldBitCast() 145 SrcTy = nullptr; in FoldBitCast()
|
/external/llvm/lib/Transforms/InstCombine/ |
D | InstCombineCasts.cpp | 239 Type *SrcTy = CI->getOperand(0)->getType(); // A from above in isEliminableCastPair() local 246 SrcTy->isPtrOrPtrVectorTy() ? DL.getIntPtrType(SrcTy) : nullptr; in isEliminableCastPair() 251 unsigned Res = CastInst::isEliminableCastPair(firstOp, secondOp, SrcTy, MidTy, in isEliminableCastPair() 257 if ((Res == Instruction::IntToPtr && SrcTy != DstIntPtrTy) || in isEliminableCastPair() 444 Type *DestTy = CI.getType(), *SrcTy = Src->getType(); in visitTrunc() local 450 if ((DestTy->isVectorTy() || ShouldChangeType(SrcTy, DestTy)) && in visitTrunc() 773 Type *SrcTy = Src->getType(), *DestTy = CI.getType(); in visitZExt() local 780 if ((DestTy->isVectorTy() || ShouldChangeType(SrcTy, DestTy)) && in visitZExt() 782 assert(BitsToClear < SrcTy->getScalarSizeInBits() && in visitZExt() 791 uint32_t SrcBitsKept = SrcTy->getScalarSizeInBits()-BitsToClear; in visitZExt() [all …]
|
D | InstCombineVectorOps.cpp | 988 VectorType *SrcTy = cast<VectorType>(V->getType()); in visitShuffleVectorInst() local 989 unsigned VecBitWidth = SrcTy->getBitWidth(); in visitShuffleVectorInst() 990 unsigned SrcElemBitWidth = DL.getTypeSizeInBits(SrcTy->getElementType()); in visitShuffleVectorInst() 992 unsigned SrcNumElems = SrcTy->getNumElements(); in visitShuffleVectorInst()
|
/external/llvm/lib/Linker/ |
D | LinkModules.cpp | 69 void addTypeMapping(Type *DstTy, Type *SrcTy); 77 Type *get(Type *SrcTy); 78 Type *get(Type *SrcTy, SmallPtrSet<StructType *, 8> &Visited); 98 Type *remapType(Type *SrcTy) override { return get(SrcTy); } in remapType() argument 100 bool areTypesIsomorphic(Type *DstTy, Type *SrcTy); 104 void TypeMapTy::addTypeMapping(Type *DstTy, Type *SrcTy) { in addTypeMapping() argument 110 if (!areTypesIsomorphic(DstTy, SrcTy)) { in addTypeMapping() 132 bool TypeMapTy::areTypesIsomorphic(Type *DstTy, Type *SrcTy) { in areTypesIsomorphic() argument 134 if (DstTy->getTypeID() != SrcTy->getTypeID()) in areTypesIsomorphic() 138 Type *&Entry = MappedTypes[SrcTy]; in areTypesIsomorphic() [all …]
|
/external/llvm/lib/Target/NVPTX/ |
D | NVPTXFavorNonGenericAddrSpaces.cpp | 96 PointerType *SrcTy = cast<PointerType>(Src->getType()); in IsEliminableAddrSpaceCast() local 102 if (SrcTy->getElementType() != DestTy->getElementType()) in IsEliminableAddrSpaceCast() 107 return (SrcTy->getAddressSpace() != AddressSpace::ADDRESS_SPACE_GENERIC && in IsEliminableAddrSpaceCast()
|
/external/llvm/lib/Target/ARM/ |
D | ARMTargetTransformInfo.cpp | 70 EVT SrcTy = TLI->getValueType(Src); in getCastInstrCost() local 73 if (!SrcTy.isSimple() || !DstTy.isSimple()) in getCastInstrCost() 155 if (SrcTy.isVector() && ST->hasNEON()) { in getCastInstrCost() 157 DstTy.getSimpleVT(), SrcTy.getSimpleVT()); in getCastInstrCost() 186 if (SrcTy.isFloatingPoint() && ST->hasNEON()) { in getCastInstrCost() 188 DstTy.getSimpleVT(), SrcTy.getSimpleVT()); in getCastInstrCost() 218 if (SrcTy.isInteger() && ST->hasNEON()) { in getCastInstrCost() 220 DstTy.getSimpleVT(), SrcTy.getSimpleVT()); in getCastInstrCost() 238 if (SrcTy.isInteger()) { in getCastInstrCost() 240 DstTy.getSimpleVT(), SrcTy.getSimpleVT()); in getCastInstrCost()
|
/external/llvm/lib/ExecutionEngine/Interpreter/ |
D | Execution.cpp | 1221 Type *SrcTy = SrcVal->getType(); in executeTruncInst() local 1222 if (SrcTy->isVectorTy()) { in executeTruncInst() 1240 const Type *SrcTy = SrcVal->getType(); in executeSExtInst() local 1242 if (SrcTy->isVectorTy()) { in executeSExtInst() 1260 const Type *SrcTy = SrcVal->getType(); in executeZExtInst() local 1262 if (SrcTy->isVectorTy()) { in executeZExtInst() 1326 Type *SrcTy = SrcVal->getType(); in executeFPToUIInst() local 1329 if (SrcTy->getTypeID() == Type::VectorTyID) { in executeFPToUIInst() 1331 const Type *SrcVecTy = SrcTy->getScalarType(); in executeFPToUIInst() 1350 assert(SrcTy->isFloatingPointTy() && "Invalid FPToUI instruction"); in executeFPToUIInst() [all …]
|
/external/clang/lib/CodeGen/ |
D | CGExprScalar.cpp | 150 Value *EmitScalarConversion(Value *Src, QualType SrcTy, QualType DstTy); 156 QualType SrcTy, QualType DstTy); 606 llvm::Type *SrcTy = Src->getType(); in EmitFloatConversionCheck() local 609 if (llvm::IntegerType *IntTy = dyn_cast<llvm::IntegerType>(SrcTy)) { in EmitFloatConversionCheck() 746 llvm::Type *SrcTy = Src->getType(); in EmitScalarConversion() local 775 SrcTy = CGF.FloatTy; in EmitScalarConversion() 780 if (SrcTy == DstTy) in EmitScalarConversion() 788 if (isa<llvm::PointerType>(SrcTy)) in EmitScalarConversion() 802 if (isa<llvm::PointerType>(SrcTy)) { in EmitScalarConversion() 820 if (isa<llvm::VectorType>(SrcTy) || in EmitScalarConversion() [all …]
|
D | CGCall.cpp | 852 llvm::Type *SrcTy = in EnterStructPointerForCoercedAccess() local 854 if (llvm::StructType *SrcSTy = dyn_cast<llvm::StructType>(SrcTy)) in EnterStructPointerForCoercedAccess() 923 llvm::Type *SrcTy = in CreateCoercedLoad() local 927 if (SrcTy == Ty) in CreateCoercedLoad() 932 if (llvm::StructType *SrcSTy = dyn_cast<llvm::StructType>(SrcTy)) { in CreateCoercedLoad() 934 SrcTy = cast<llvm::PointerType>(SrcPtr->getType())->getElementType(); in CreateCoercedLoad() 937 uint64_t SrcSize = CGF.CGM.getDataLayout().getTypeAllocSize(SrcTy); in CreateCoercedLoad() 942 (isa<llvm::IntegerType>(SrcTy) || isa<llvm::PointerType>(SrcTy))) { in CreateCoercedLoad() 1010 llvm::Type *SrcTy = Src->getType(); in CreateCoercedStore() local 1013 if (SrcTy == DstTy) { in CreateCoercedStore() [all …]
|
D | CGObjC.cpp | 2888 QualType SrcTy = Ty; in GenerateObjCAtomicSetterCopyHelperFunction() local 2889 SrcTy.addConst(); in GenerateObjCAtomicSetterCopyHelperFunction() 2890 SrcTy = C.getPointerType(SrcTy); in GenerateObjCAtomicSetterCopyHelperFunction() 2895 ImplicitParamDecl srcDecl(getContext(), FD, SourceLocation(), nullptr, SrcTy); in GenerateObjCAtomicSetterCopyHelperFunction() 2915 DeclRefExpr SrcExpr(&srcDecl, false, SrcTy, in GenerateObjCAtomicSetterCopyHelperFunction() 2917 UnaryOperator SRC(&SrcExpr, UO_Deref, SrcTy->getPointeeType(), in GenerateObjCAtomicSetterCopyHelperFunction() 2967 QualType SrcTy = Ty; in GenerateObjCAtomicGetterCopyHelperFunction() local 2968 SrcTy.addConst(); in GenerateObjCAtomicGetterCopyHelperFunction() 2969 SrcTy = C.getPointerType(SrcTy); in GenerateObjCAtomicGetterCopyHelperFunction() 2974 ImplicitParamDecl srcDecl(getContext(), FD, SourceLocation(), nullptr, SrcTy); in GenerateObjCAtomicGetterCopyHelperFunction() [all …]
|
D | CGObjCMac.cpp | 4103 llvm::Type * SrcTy = src->getType(); in EmitObjCWeakAssign() local 4104 if (!isa<llvm::PointerType>(SrcTy)) { in EmitObjCWeakAssign() 4105 unsigned Size = CGM.getDataLayout().getTypeAllocSize(SrcTy); in EmitObjCWeakAssign() 4125 llvm::Type * SrcTy = src->getType(); in EmitObjCGlobalAssign() local 4126 if (!isa<llvm::PointerType>(SrcTy)) { in EmitObjCGlobalAssign() 4127 unsigned Size = CGM.getDataLayout().getTypeAllocSize(SrcTy); in EmitObjCGlobalAssign() 4152 llvm::Type * SrcTy = src->getType(); in EmitObjCIvarAssign() local 4153 if (!isa<llvm::PointerType>(SrcTy)) { in EmitObjCIvarAssign() 4154 unsigned Size = CGM.getDataLayout().getTypeAllocSize(SrcTy); in EmitObjCIvarAssign() 4172 llvm::Type * SrcTy = src->getType(); in EmitObjCStrongCastAssign() local [all …]
|
/external/llvm/lib/Analysis/ |
D | ConstantFolding.cpp | 494 Type *SrcTy = C->getType(); in ConstantFoldLoadThroughBitcast() local 498 if (DL.getTypeSizeInBits(DestTy) == DL.getTypeSizeInBits(SrcTy)) { in ConstantFoldLoadThroughBitcast() 502 if (SrcTy->isIntegerTy() && DestTy->isPointerTy()) in ConstantFoldLoadThroughBitcast() 504 else if (SrcTy->isPointerTy() && DestTy->isIntegerTy()) in ConstantFoldLoadThroughBitcast() 513 if (!SrcTy->isAggregateType()) in ConstantFoldLoadThroughBitcast() 674 static Constant *CastGEPIndices(Type *SrcTy, ArrayRef<Constant *> Ops, in CastGEPIndices() argument 701 Constant *C = ConstantExpr::getGetElementPtr(SrcTy, Ops[0], NewIdxs); in CastGEPIndices() 727 static Constant *SymbolicallyEvaluateGEP(Type *SrcTy, ArrayRef<Constant *> Ops, in SymbolicallyEvaluateGEP() argument 869 Constant *C = ConstantExpr::getGetElementPtr(SrcTy, Ptr, NewIdxs); in SymbolicallyEvaluateGEP() 1090 Type *SrcTy = nullptr; in ConstantFoldInstOperands() local [all …]
|
D | CostModel.cpp | 457 Type *SrcTy = I->getOperand(0)->getType(); in getInstructionCost() local 458 return TTI->getCastInstrCost(I->getOpcode(), I->getType(), SrcTy); in getInstructionCost()
|
D | ScalarEvolution.cpp | 3316 Type *SrcTy = V->getType(); in getTruncateOrZeroExtend() local 3317 assert((SrcTy->isIntegerTy() || SrcTy->isPointerTy()) && in getTruncateOrZeroExtend() 3320 if (getTypeSizeInBits(SrcTy) == getTypeSizeInBits(Ty)) in getTruncateOrZeroExtend() 3322 if (getTypeSizeInBits(SrcTy) > getTypeSizeInBits(Ty)) in getTruncateOrZeroExtend() 3333 Type *SrcTy = V->getType(); in getTruncateOrSignExtend() local 3334 assert((SrcTy->isIntegerTy() || SrcTy->isPointerTy()) && in getTruncateOrSignExtend() 3337 if (getTypeSizeInBits(SrcTy) == getTypeSizeInBits(Ty)) in getTruncateOrSignExtend() 3339 if (getTypeSizeInBits(SrcTy) > getTypeSizeInBits(Ty)) in getTruncateOrSignExtend() 3349 Type *SrcTy = V->getType(); in getNoopOrZeroExtend() local 3350 assert((SrcTy->isIntegerTy() || SrcTy->isPointerTy()) && in getNoopOrZeroExtend() [all …]
|
D | InstructionSimplify.cpp | 2363 Type *SrcTy = SrcOp->getType(); in SimplifyICmpInst() local 2369 Q.DL.getTypeSizeInBits(SrcTy) == DstTy->getPrimitiveSizeInBits()) { in SimplifyICmpInst() 2373 ConstantExpr::getIntToPtr(RHSC, SrcTy), in SimplifyICmpInst() 2377 if (RI->getOperand(0)->getType() == SrcTy) in SimplifyICmpInst() 2389 if (MaxRecurse && SrcTy == RI->getOperand(0)->getType()) in SimplifyICmpInst() 2401 Constant *Trunc = ConstantExpr::getTrunc(CI, SrcTy); in SimplifyICmpInst() 2449 if (MaxRecurse && SrcTy == RI->getOperand(0)->getType()) in SimplifyICmpInst() 2460 Constant *Trunc = ConstantExpr::getTrunc(CI, SrcTy); in SimplifyICmpInst() 2499 Constant::getNullValue(SrcTy), in SimplifyICmpInst() 2508 Constant::getNullValue(SrcTy), in SimplifyICmpInst() [all …]
|
/external/llvm/include/llvm/IR/ |
D | InstrTypes.h | 557 Type *SrcTy, ///< The Type from which the value should be cast. 563 Type *SrcTy, ///< The Type from which the value should be cast. 573 Type *SrcTy, ///< The Type from which the value should be cast. 612 Type *SrcTy, ///< SrcTy of cast 636 Type *SrcTy, ///< SrcTy of 1st cast
|
/external/llvm/include/llvm/Transforms/Utils/ |
D | ValueMapper.h | 34 virtual Type *remapType(Type *SrcTy) = 0;
|
/external/llvm/lib/Target/X86/ |
D | X86TargetTransformInfo.cpp | 534 EVT SrcTy = TLI->getValueType(Src); in getCastInstrCost() local 538 if (!SrcTy.isSimple() || !DstTy.isSimple()) in getCastInstrCost() 646 DstTy.getSimpleVT(), SrcTy.getSimpleVT()); in getCastInstrCost() 653 SrcTy.getSimpleVT()); in getCastInstrCost() 815 unsigned X86TTIImpl::getMaskedMemoryOpCost(unsigned Opcode, Type *SrcTy, in getMaskedMemoryOpCost() argument 818 VectorType *SrcVTy = dyn_cast<VectorType>(SrcTy); in getMaskedMemoryOpCost() 821 return getMemoryOpCost(Opcode, SrcTy, Alignment, AddressSpace); in getMaskedMemoryOpCost()
|
/external/llvm/lib/Target/AArch64/ |
D | AArch64TargetTransformInfo.cpp | 184 EVT SrcTy = TLI->getValueType(Src); in getCastInstrCost() local 187 if (!SrcTy.isSimple() || !DstTy.isSimple()) in getCastInstrCost() 255 SrcTy.getSimpleVT()); in getCastInstrCost()
|
/external/llvm/lib/Transforms/IPO/ |
D | MergeFunctions.cpp | 1286 Type *SrcTy = V->getType(); in createCast() local 1287 if (SrcTy->isStructTy()) { in createCast() 1289 assert(SrcTy->getStructNumElements() == DestTy->getStructNumElements()); in createCast() 1291 for (unsigned int I = 0, E = SrcTy->getStructNumElements(); I < E; ++I) { in createCast() 1302 if (SrcTy->isIntegerTy() && DestTy->isPointerTy()) in createCast() 1304 else if (SrcTy->isPointerTy() && DestTy->isIntegerTy()) in createCast()
|
D | ArgumentPromotion.cpp | 648 Type *SrcTy; in DoPromotion() local 650 SrcTy = L->getType(); in DoPromotion() 652 SrcTy = cast<GetElementPtrInst>(UI)->getSourceElementType(); in DoPromotion() 664 ArgIndices.insert(std::make_pair(SrcTy, Indices)); in DoPromotion()
|
/external/clang/lib/Sema/ |
D | SemaCast.cpp | 1657 QualType SrcTy, DestTy; in CheckCompatibleReinterpretCast() local 1662 SrcTy = SrcType->getPointeeType(); in CheckCompatibleReinterpretCast() 1668 SrcTy = SrcType; in CheckCompatibleReinterpretCast() 1673 if (Context.hasSameUnqualifiedType(DestTy, SrcTy)) { in CheckCompatibleReinterpretCast() 1678 SrcTy->isAnyCharacterType() || SrcTy->isVoidType()) { in CheckCompatibleReinterpretCast() 1682 if (SrcTy->getAs<TagType>() || DestTy->getAs<TagType>()) { in CheckCompatibleReinterpretCast() 1687 if ((SrcTy->isUnsignedIntegerType() && DestTy->isSignedIntegerType()) || in CheckCompatibleReinterpretCast() 1688 (SrcTy->isSignedIntegerType() && DestTy->isUnsignedIntegerType())) { in CheckCompatibleReinterpretCast() 1689 if (Context.getTypeSize(DestTy) == Context.getTypeSize(SrcTy)) { in CheckCompatibleReinterpretCast()
|