/external/swiftshader/third_party/llvm-7.0/llvm/include/llvm/CodeGen/GlobalISel/ |
D | MIPatternMatch.h | 243 template <typename SrcTy, unsigned Opcode> struct UnaryOp_match { 244 SrcTy L; 246 UnaryOp_match(const SrcTy &LHS) : L(LHS) {} 258 template <typename SrcTy> 259 inline UnaryOp_match<SrcTy, TargetOpcode::G_ANYEXT> 260 m_GAnyExt(const SrcTy &Src) { 261 return UnaryOp_match<SrcTy, TargetOpcode::G_ANYEXT>(Src); 264 template <typename SrcTy> 265 inline UnaryOp_match<SrcTy, TargetOpcode::G_SEXT> m_GSExt(const SrcTy &Src) { 266 return UnaryOp_match<SrcTy, TargetOpcode::G_SEXT>(Src); [all …]
|
/external/swiftshader/third_party/LLVM/lib/Linker/ |
D | LinkModules.cpp | 49 void addTypeMapping(Type *DstTy, Type *SrcTy); 57 Type *get(Type *SrcTy); 64 Type *remapType(Type *SrcTy) { in remapType() argument 65 return get(SrcTy); in remapType() 68 bool areTypesIsomorphic(Type *DstTy, Type *SrcTy); 72 void TypeMapTy::addTypeMapping(Type *DstTy, Type *SrcTy) { in addTypeMapping() argument 73 Type *&Entry = MappedTypes[SrcTy]; in addTypeMapping() 76 if (DstTy == SrcTy) { in addTypeMapping() 83 if (!areTypesIsomorphic(DstTy, SrcTy)) { in addTypeMapping() 94 bool TypeMapTy::areTypesIsomorphic(Type *DstTy, Type *SrcTy) { in areTypesIsomorphic() argument [all …]
|
/external/swiftshader/third_party/llvm-7.0/llvm/lib/IR/ |
D | Instructions.cpp | 2184 Type *SrcTy = getOperand(0)->getType(); in isLosslessCast() local 2186 if (SrcTy == DstTy) in isLosslessCast() 2190 if (SrcTy->isPointerTy()) in isLosslessCast() 2204 Type *SrcTy, in isNoopCast() argument 2224 return DL.getIntPtrType(SrcTy)->getScalarSizeInBits() == in isNoopCast() 2228 SrcTy->getScalarSizeInBits(); in isNoopCast() 2246 Type *SrcTy, Type *MidTy, Type *DstTy, Type *SrcIntPtrTy, Type *MidIntPtrTy, in isEliminableCastPair() argument 2310 if ((IsFirstBitcast && isa<VectorType>(SrcTy) != isa<VectorType>(MidTy)) || in isEliminableCastPair() 2331 if (!SrcTy->isVectorTy() && DstTy->isIntegerTy()) in isEliminableCastPair() 2343 if (SrcTy->isIntegerTy()) in isEliminableCastPair() [all …]
|
D | Verifier.cpp | 2421 Type *SrcTy = I.getOperand(0)->getType(); in visitTruncInst() local 2425 unsigned SrcBitSize = SrcTy->getScalarSizeInBits(); in visitTruncInst() 2428 Assert(SrcTy->isIntOrIntVectorTy(), "Trunc only operates on integer", &I); in visitTruncInst() 2430 Assert(SrcTy->isVectorTy() == DestTy->isVectorTy(), in visitTruncInst() 2439 Type *SrcTy = I.getOperand(0)->getType(); in visitZExtInst() local 2443 Assert(SrcTy->isIntOrIntVectorTy(), "ZExt only operates on integer", &I); in visitZExtInst() 2445 Assert(SrcTy->isVectorTy() == DestTy->isVectorTy(), in visitZExtInst() 2447 unsigned SrcBitSize = SrcTy->getScalarSizeInBits(); in visitZExtInst() 2457 Type *SrcTy = I.getOperand(0)->getType(); in visitSExtInst() local 2461 unsigned SrcBitSize = SrcTy->getScalarSizeInBits(); in visitSExtInst() [all …]
|
/external/swiftshader/third_party/LLVM/lib/VMCore/ |
D | Verifier.cpp | 854 Type *SrcTy = I.getOperand(0)->getType(); in visitTruncInst() local 858 unsigned SrcBitSize = SrcTy->getScalarSizeInBits(); in visitTruncInst() 861 Assert1(SrcTy->isIntOrIntVectorTy(), "Trunc only operates on integer", &I); in visitTruncInst() 863 Assert1(SrcTy->isVectorTy() == DestTy->isVectorTy(), in visitTruncInst() 872 Type *SrcTy = I.getOperand(0)->getType(); in visitZExtInst() local 876 Assert1(SrcTy->isIntOrIntVectorTy(), "ZExt only operates on integer", &I); in visitZExtInst() 878 Assert1(SrcTy->isVectorTy() == DestTy->isVectorTy(), in visitZExtInst() 880 unsigned SrcBitSize = SrcTy->getScalarSizeInBits(); in visitZExtInst() 890 Type *SrcTy = I.getOperand(0)->getType(); in visitSExtInst() local 894 unsigned SrcBitSize = SrcTy->getScalarSizeInBits(); in visitSExtInst() [all …]
|
D | Instructions.cpp | 2021 Type* SrcTy = getOperand(0)->getType(); in isLosslessCast() local 2023 if (SrcTy == DstTy) in isLosslessCast() 2027 if (SrcTy->isPointerTy()) in isLosslessCast() 2041 Type *SrcTy, in isNoopCast() argument 2064 SrcTy->getScalarSizeInBits(); in isNoopCast() 2083 Type *SrcTy, Type *MidTy, Type *DstTy, Type *IntPtrTy) { 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 …]
|
/external/llvm/lib/Transforms/InstCombine/ |
D | InstCombineCasts.cpp | 238 Type *SrcTy = CI->getOperand(0)->getType(); // A from above in isEliminableCastPair() local 245 SrcTy->isPtrOrPtrVectorTy() ? DL.getIntPtrType(SrcTy) : nullptr; in isEliminableCastPair() 250 unsigned Res = CastInst::isEliminableCastPair(firstOp, secondOp, SrcTy, MidTy, in isEliminableCastPair() 256 if ((Res == Instruction::IntToPtr && SrcTy != DstIntPtrTy) || in isEliminableCastPair() 496 Type *DestTy = CI.getType(), *SrcTy = Src->getType(); in visitTrunc() local 502 if ((DestTy->isVectorTy() || ShouldChangeType(SrcTy, DestTy)) && in visitTrunc() 516 Constant *One = ConstantInt::get(SrcTy, 1); in visitTrunc() 567 if (Src->hasOneUse() && isa<IntegerType>(SrcTy) && in visitTrunc() 568 ShouldChangeType(SrcTy, DestTy) && in visitTrunc() 848 Type *SrcTy = Src->getType(), *DestTy = CI.getType(); in visitZExt() local [all …]
|
/external/llvm/lib/IR/ |
D | Instructions.cpp | 2348 Type *SrcTy = getOperand(0)->getType(); in isLosslessCast() local 2350 if (SrcTy == DstTy) in isLosslessCast() 2354 if (SrcTy->isPointerTy()) in isLosslessCast() 2368 Type *SrcTy, in isNoopCast() argument 2392 SrcTy->getScalarSizeInBits(); in isNoopCast() 2424 Type *SrcTy, Type *MidTy, Type *DstTy, Type *SrcIntPtrTy, Type *MidIntPtrTy, in isEliminableCastPair() argument 2488 if ((IsFirstBitcast && isa<VectorType>(SrcTy) != isa<VectorType>(MidTy)) || in isEliminableCastPair() 2509 if (!SrcTy->isVectorTy() && DstTy->isIntegerTy()) in isEliminableCastPair() 2521 if (SrcTy->isIntegerTy()) in isEliminableCastPair() 2527 if (SrcTy->isFloatingPointTy()) in isEliminableCastPair() [all …]
|
D | Verifier.cpp | 2226 Type *SrcTy = I.getOperand(0)->getType(); in visitTruncInst() local 2230 unsigned SrcBitSize = SrcTy->getScalarSizeInBits(); in visitTruncInst() 2233 Assert(SrcTy->isIntOrIntVectorTy(), "Trunc only operates on integer", &I); in visitTruncInst() 2235 Assert(SrcTy->isVectorTy() == DestTy->isVectorTy(), in visitTruncInst() 2244 Type *SrcTy = I.getOperand(0)->getType(); in visitZExtInst() local 2248 Assert(SrcTy->isIntOrIntVectorTy(), "ZExt only operates on integer", &I); in visitZExtInst() 2250 Assert(SrcTy->isVectorTy() == DestTy->isVectorTy(), in visitZExtInst() 2252 unsigned SrcBitSize = SrcTy->getScalarSizeInBits(); in visitZExtInst() 2262 Type *SrcTy = I.getOperand(0)->getType(); in visitSExtInst() local 2266 unsigned SrcBitSize = SrcTy->getScalarSizeInBits(); in visitSExtInst() [all …]
|
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Transforms/InstCombine/ |
D | InstCombineCasts.cpp | 235 Type *SrcTy = CI1->getSrcTy(); in isEliminableCastPair() local 242 SrcTy->isPtrOrPtrVectorTy() ? DL.getIntPtrType(SrcTy) : nullptr; in isEliminableCastPair() 247 unsigned Res = CastInst::isEliminableCastPair(firstOp, secondOp, SrcTy, MidTy, in isEliminableCastPair() 253 if ((Res == Instruction::IntToPtr && SrcTy != DstIntPtrTy) || in isEliminableCastPair() 566 Type *SrcTy = Trunc.getSrcTy(); in narrowBinOp() local 568 if (!isa<VectorType>(SrcTy) && !shouldChangeType(SrcTy, DestTy)) in narrowBinOp() 675 Type *DestTy = CI.getType(), *SrcTy = Src->getType(); in visitTrunc() local 681 if ((DestTy->isVectorTy() || shouldChangeType(SrcTy, DestTy)) && in visitTrunc() 711 Constant *One = ConstantInt::get(SrcTy, 1); in visitTrunc() 784 if (Src->hasOneUse() && isa<IntegerType>(SrcTy) && in visitTrunc() [all …]
|
/external/swiftshader/third_party/LLVM/lib/Transforms/InstCombine/ |
D | InstCombineCasts.cpp | 237 Type *SrcTy = CI->getOperand(0)->getType(); // A from above in isEliminableCastPair() local 244 unsigned Res = CastInst::isEliminableCastPair(firstOp, secondOp, SrcTy, MidTy, in isEliminableCastPair() 251 (!TD || SrcTy != TD->getIntPtrType(CI->getContext()))) || in isEliminableCastPair() 439 Type *DestTy = CI.getType(), *SrcTy = Src->getType(); in visitTrunc() local 445 if ((DestTy->isVectorTy() || ShouldChangeType(SrcTy, DestTy)) && in visitTrunc() 762 Type *SrcTy = Src->getType(), *DestTy = CI.getType(); in visitZExt() local 769 if ((DestTy->isVectorTy() || ShouldChangeType(SrcTy, DestTy)) && in visitZExt() 771 assert(BitsToClear < SrcTy->getScalarSizeInBits() && in visitZExt() 780 uint32_t SrcBitsKept = SrcTy->getScalarSizeInBits()-BitsToClear; in visitZExt() 1067 Type *SrcTy = Src->getType(), *DestTy = CI.getType(); in visitSExt() local [all …]
|
D | InstCombineLoadStoreAlloca.cpp | 96 if (PointerType *SrcTy = dyn_cast<PointerType>(CastOp->getType())) { in InstCombineLoadCast() local 99 if (DestTy->getAddressSpace() != SrcTy->getAddressSpace()) in InstCombineLoadCast() 102 Type *SrcPTy = SrcTy->getElementType(); in InstCombineLoadCast() 116 SrcTy = cast<PointerType>(CastOp->getType()); in InstCombineLoadCast() 117 SrcPTy = SrcTy->getElementType(); in InstCombineLoadCast() 261 PointerType *SrcTy = dyn_cast<PointerType>(CastOp->getType()); in InstCombineStoreToCast() local 262 if (SrcTy == 0) return 0; in InstCombineStoreToCast() 264 Type *SrcPTy = SrcTy->getElementType(); in InstCombineStoreToCast() 297 SrcTy = PointerType::get(SrcPTy, SrcTy->getAddressSpace()); in InstCombineStoreToCast() 306 SrcTy->getAddressSpace() != in InstCombineStoreToCast()
|
/external/llvm/lib/Linker/ |
D | IRMover.cpp | 57 void addTypeMapping(Type *DstTy, Type *SrcTy); 65 Type *get(Type *SrcTy); 66 Type *get(Type *SrcTy, SmallPtrSet<StructType *, 8> &Visited); 75 Type *remapType(Type *SrcTy) override { return get(SrcTy); } in remapType() argument 77 bool areTypesIsomorphic(Type *DstTy, Type *SrcTy); 81 void TypeMapTy::addTypeMapping(Type *DstTy, Type *SrcTy) { in addTypeMapping() argument 87 if (!areTypesIsomorphic(DstTy, SrcTy)) { in addTypeMapping() 109 bool TypeMapTy::areTypesIsomorphic(Type *DstTy, Type *SrcTy) { in areTypesIsomorphic() argument 111 if (DstTy->getTypeID() != SrcTy->getTypeID()) in areTypesIsomorphic() 115 Type *&Entry = MappedTypes[SrcTy]; in areTypesIsomorphic() [all …]
|
/external/swiftshader/third_party/llvm-7.0/llvm/lib/CodeGen/GlobalISel/ |
D | CombinerHelper.cpp | 28 LLT SrcTy = MRI.getType(SrcReg); in tryCombineCopy() local 31 if (DstTy.isValid() && SrcTy.isValid() && DstTy == SrcTy) { in tryCombineCopy()
|
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Target/SystemZ/ |
D | SystemZTargetTransformInfo.cpp | 517 getVectorTruncCost(Type *SrcTy, Type *DstTy) { in getVectorTruncCost() argument 518 assert (SrcTy->isVectorTy() && DstTy->isVectorTy()); in getVectorTruncCost() 519 assert (SrcTy->getPrimitiveSizeInBits() > DstTy->getPrimitiveSizeInBits() && in getVectorTruncCost() 521 assert (SrcTy->getVectorNumElements() == DstTy->getVectorNumElements() && in getVectorTruncCost() 526 unsigned NumParts = getNumberOfParts(SrcTy); in getVectorTruncCost() 536 unsigned Log2Diff = getElSizeLog2Diff(SrcTy, DstTy); in getVectorTruncCost() 537 unsigned VF = SrcTy->getVectorNumElements(); in getVectorTruncCost() 547 if (VF == 8 && SrcTy->getScalarSizeInBits() == 64 && in getVectorTruncCost() 557 getVectorBitmaskConversionCost(Type *SrcTy, Type *DstTy) { in getVectorBitmaskConversionCost() argument 558 assert (SrcTy->isVectorTy() && DstTy->isVectorTy() && in getVectorBitmaskConversionCost() [all …]
|
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Linker/ |
D | IRMover.cpp | 57 void addTypeMapping(Type *DstTy, Type *SrcTy); 65 Type *get(Type *SrcTy); 66 Type *get(Type *SrcTy, SmallPtrSet<StructType *, 8> &Visited); 75 Type *remapType(Type *SrcTy) override { return get(SrcTy); } in remapType() argument 77 bool areTypesIsomorphic(Type *DstTy, Type *SrcTy); 81 void TypeMapTy::addTypeMapping(Type *DstTy, Type *SrcTy) { in addTypeMapping() argument 87 if (!areTypesIsomorphic(DstTy, SrcTy)) { in addTypeMapping() 115 bool TypeMapTy::areTypesIsomorphic(Type *DstTy, Type *SrcTy) { in areTypesIsomorphic() argument 117 if (DstTy->getTypeID() != SrcTy->getTypeID()) in areTypesIsomorphic() 121 Type *&Entry = MappedTypes[SrcTy]; in areTypesIsomorphic() [all …]
|
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Target/X86/ |
D | X86InstructionSelector.cpp | 697 const LLT SrcTy = MRI.getType(SrcReg); in selectTruncOrPtrToInt() local 709 const TargetRegisterClass *SrcRC = getRegClass(SrcTy, SrcRB); in selectTruncOrPtrToInt() 761 const LLT SrcTy = MRI.getType(SrcReg); in selectZext() local 763 assert(!(SrcTy == LLT::scalar(8) && DstTy == LLT::scalar(32)) && in selectZext() 765 assert(!(SrcTy == LLT::scalar(16) && DstTy == LLT::scalar(32)) && in selectZext() 769 LLT SrcTy; in selectZext() member 782 [SrcTy, DstTy](const ZextEntry &El) { in selectZext() 783 return El.DstTy == DstTy && El.SrcTy == SrcTy; in selectZext() 791 const TargetRegisterClass *SrcRC = getRegClass(SrcTy, SrcRB); in selectZext() 827 if (SrcTy != LLT::scalar(1)) in selectZext() [all …]
|
/external/swiftshader/third_party/subzero/src/ |
D | IceInstARM32.cpp | 167 Type SrcTy = Instr->getSrc(0)->getType(); in emitUnaryopGPR() local 170 Str << getWidthString(SrcTy); in emitUnaryopGPR() 181 Type SrcTy = Instr->getSrc(0)->getType(); in emitUnaryopFP() local 185 Str << getFpWidthString(SrcTy); in emitUnaryopFP() 188 Str << getSVecWidthString(SrcTy); in emitUnaryopFP() 191 Str << getUVecWidthString(SrcTy); in emitUnaryopFP() 710 const Type SrcTy = getSrc(0)->getType(); in emitIAS() local 711 switch (SrcTy) { in emitIAS() 714 typeStdString(SrcTy)); in emitIAS() 721 Asm->vceqqi(typeElementType(SrcTy), Dest, getSrc(0), getSrc(1)); in emitIAS() [all …]
|
D | IceInstX86BaseImpl.h | 932 const Cfg *Func, Type DestTy, const Variable *Dest, Type SrcTy, in emitIASCastRegOp() argument 941 (Asm->*(Emitter.RegReg))(DestTy, DestReg, SrcTy, SrcReg); in emitIASCastRegOp() 944 (Asm->*(Emitter.RegAddr))(DestTy, DestReg, SrcTy, SrcStackAddr); in emitIASCastRegOp() 948 (Asm->*(Emitter.RegAddr))(DestTy, DestReg, SrcTy, in emitIASCastRegOp() 1033 Type SrcTy = this->getSrc(0)->getType(); in emit() local 1034 assert(isVectorType(SrcTy)); in emit() 1035 switch (SrcTy) { in emit() 1063 const Type SrcTy = Src->getType(); in emitIAS() local 1064 assert(isVectorType(SrcTy)); in emitIAS() 1073 Asm->movmsk(SrcTy, DestReg, SrcReg); in emitIAS() [all …]
|
/external/llvm/lib/Target/ARM/ |
D | ARMTargetTransformInfo.cpp | 95 EVT SrcTy = TLI->getValueType(DL, Src); in getCastInstrCost() local 98 if (!SrcTy.isSimple() || !DstTy.isSimple()) in getCastInstrCost() 179 if (SrcTy.isVector() && ST->hasNEON()) { in getCastInstrCost() 182 SrcTy.getSimpleVT())) in getCastInstrCost() 209 if (SrcTy.isFloatingPoint() && ST->hasNEON()) { in getCastInstrCost() 212 SrcTy.getSimpleVT())) in getCastInstrCost() 240 if (SrcTy.isInteger() && ST->hasNEON()) { in getCastInstrCost() 243 SrcTy.getSimpleVT())) in getCastInstrCost() 259 if (SrcTy.isInteger()) { in getCastInstrCost() 262 SrcTy.getSimpleVT())) in getCastInstrCost()
|
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Target/Hexagon/ |
D | HexagonTargetTransformInfo.cpp | 238 Type *SrcTy, const Instruction *I) { in getCastInstrCost() argument 239 if (SrcTy->isFPOrFPVectorTy() || DstTy->isFPOrFPVectorTy()) { in getCastInstrCost() 240 unsigned SrcN = SrcTy->isFPOrFPVectorTy() ? getTypeNumElements(SrcTy) : 0; in getCastInstrCost() 243 std::pair<int, MVT> SrcLT = TLI.getTypeLegalizationCost(DL, SrcTy); in getCastInstrCost()
|
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Target/ARM/ |
D | ARMTargetTransformInfo.cpp | 156 EVT SrcTy = TLI->getValueType(DL, Src); in getCastInstrCost() local 159 if (!SrcTy.isSimple() || !DstTy.isSimple()) in getCastInstrCost() 240 if (SrcTy.isVector() && ST->hasNEON()) { in getCastInstrCost() 243 SrcTy.getSimpleVT())) in getCastInstrCost() 270 if (SrcTy.isFloatingPoint() && ST->hasNEON()) { in getCastInstrCost() 273 SrcTy.getSimpleVT())) in getCastInstrCost() 301 if (SrcTy.isInteger() && ST->hasNEON()) { in getCastInstrCost() 304 SrcTy.getSimpleVT())) in getCastInstrCost() 320 if (SrcTy.isInteger()) { in getCastInstrCost() 323 SrcTy.getSimpleVT())) in getCastInstrCost()
|
/external/swiftshader/third_party/llvm-7.0/llvm/lib/ExecutionEngine/Interpreter/ |
D | Execution.cpp | 1220 Type *SrcTy = SrcVal->getType(); in executeTruncInst() local 1221 if (SrcTy->isVectorTy()) { in executeTruncInst() 1239 Type *SrcTy = SrcVal->getType(); in executeSExtInst() local 1241 if (SrcTy->isVectorTy()) { in executeSExtInst() 1259 Type *SrcTy = SrcVal->getType(); in executeZExtInst() local 1261 if (SrcTy->isVectorTy()) { in executeZExtInst() 1325 Type *SrcTy = SrcVal->getType(); in executeFPToUIInst() local 1328 if (SrcTy->getTypeID() == Type::VectorTyID) { in executeFPToUIInst() 1330 Type *SrcVecTy = SrcTy->getScalarType(); in executeFPToUIInst() 1349 assert(SrcTy->isFloatingPointTy() && "Invalid FPToUI instruction"); in executeFPToUIInst() [all …]
|
/external/llvm/lib/ExecutionEngine/Interpreter/ |
D | Execution.cpp | 1221 Type *SrcTy = SrcVal->getType(); in executeTruncInst() local 1222 if (SrcTy->isVectorTy()) { in executeTruncInst() 1240 Type *SrcTy = SrcVal->getType(); in executeSExtInst() local 1242 if (SrcTy->isVectorTy()) { in executeSExtInst() 1260 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 Type *SrcVecTy = SrcTy->getScalarType(); in executeFPToUIInst() 1350 assert(SrcTy->isFloatingPointTy() && "Invalid FPToUI instruction"); in executeFPToUIInst() [all …]
|
/external/llvm/lib/Target/NVPTX/ |
D | NVPTXFavorNonGenericAddrSpaces.cpp | 133 PointerType *SrcTy = cast<PointerType>(Src->getType()); in isEliminableAddrSpaceCast() local 139 if (SrcTy->getElementType() != DestTy->getElementType()) in isEliminableAddrSpaceCast() 144 return (SrcTy->getAddressSpace() != AddressSpace::ADDRESS_SPACE_GENERIC && in isEliminableAddrSpaceCast()
|