Lines Matching refs:Constant

40 bool Constant::isNegativeZeroValue() const {  in isNegativeZeroValue()
60 bool Constant::isZeroValue() const { in isZeroValue()
74 bool Constant::isNullValue() const { in isNullValue()
91 bool Constant::isAllOnesValue() const { in isAllOnesValue()
108 bool Constant::isOneValue() const { in isOneValue()
125 bool Constant::isNotOneValue() const { in isNotOneValue()
137 Constant *Elt = getAggregateElement(I); in isNotOneValue()
153 bool Constant::isMinSignedValue() const { in isMinSignedValue()
170 bool Constant::isNotMinSignedValue() const { in isNotMinSignedValue()
182 Constant *Elt = getAggregateElement(I); in isNotMinSignedValue()
198 bool Constant::isFiniteNonZeroFP() const { in isFiniteNonZeroFP()
219 bool Constant::isNormalFP() const { in isNormalFP()
240 bool Constant::hasExactInverseFP() const { in hasExactInverseFP()
261 bool Constant::isNaN() const { in isNaN()
282 bool Constant::isElementWiseEqual(Value *Y) const { in isElementWiseEqual()
289 if (!isa<Constant>(Y) || !VTy || VTy != Y->getType()) in isElementWiseEqual()
300 Constant *C0 = ConstantExpr::getBitCast(const_cast<Constant *>(this), IntTy); in isElementWiseEqual()
301 Constant *C1 = ConstantExpr::getBitCast(cast<Constant>(Y), IntTy); in isElementWiseEqual()
302 Constant *CmpEq = ConstantExpr::getICmp(ICmpInst::ICMP_EQ, C0, C1); in isElementWiseEqual()
307 containsUndefinedElement(const Constant *C, in containsUndefinedElement()
308 function_ref<bool(const Constant *)> HasFn) { in containsUndefinedElement()
319 if (Constant *Elem = C->getAggregateElement(i)) in containsUndefinedElement()
328 bool Constant::containsUndefOrPoisonElement() const { in containsUndefOrPoisonElement()
333 bool Constant::containsPoisonElement() const { in containsPoisonElement()
338 bool Constant::containsConstantExpression() const { in containsConstantExpression()
348 Constant *Constant::getNullValue(Type *Ty) { in getNullValue()
389 Constant *Constant::getIntegerValue(Type *Ty, const APInt &V) { in getIntegerValue()
393 Constant *C = ConstantInt::get(Ty->getContext(), V); in getIntegerValue()
406 Constant *Constant::getAllOnesValue(Type *Ty) { in getAllOnesValue()
422 Constant *Constant::getAggregateElement(unsigned Elt) const { in getAggregateElement()
451 Constant *Constant::getAggregateElement(Constant *Elt) const { in getAggregateElement()
462 void Constant::destroyConstant() { in destroyConstant()
485 if (!isa<Constant>(V)) { in destroyConstant()
491 assert(isa<Constant>(V) && "References remain to Constant being destroyed"); in destroyConstant()
492 cast<Constant>(V)->destroyConstant(); in destroyConstant()
502 void llvm::deleteConstant(Constant *C) { in deleteConstant()
504 case Constant::ConstantIntVal: in deleteConstant()
507 case Constant::ConstantFPVal: in deleteConstant()
510 case Constant::ConstantAggregateZeroVal: in deleteConstant()
513 case Constant::ConstantArrayVal: in deleteConstant()
516 case Constant::ConstantStructVal: in deleteConstant()
519 case Constant::ConstantVectorVal: in deleteConstant()
522 case Constant::ConstantPointerNullVal: in deleteConstant()
525 case Constant::ConstantDataArrayVal: in deleteConstant()
528 case Constant::ConstantDataVectorVal: in deleteConstant()
531 case Constant::ConstantTokenNoneVal: in deleteConstant()
534 case Constant::BlockAddressVal: in deleteConstant()
537 case Constant::DSOLocalEquivalentVal: in deleteConstant()
540 case Constant::UndefValueVal: in deleteConstant()
543 case Constant::PoisonValueVal: in deleteConstant()
546 case Constant::ConstantExprVal: in deleteConstant()
575 static bool canTrapImpl(const Constant *C, in canTrapImpl()
606 bool Constant::canTrap() const { in canTrap()
613 ConstHasGlobalValuePredicate(const Constant *C, in ConstHasGlobalValuePredicate()
615 SmallPtrSet<const Constant *, 8> Visited; in ConstHasGlobalValuePredicate()
616 SmallVector<const Constant *, 8> WorkList; in ConstHasGlobalValuePredicate()
621 const Constant *WorkItem = WorkList.pop_back_val(); in ConstHasGlobalValuePredicate()
626 const Constant *ConstOp = dyn_cast<Constant>(Op); in ConstHasGlobalValuePredicate()
636 bool Constant::isThreadDependent() const { in isThreadDependent()
643 bool Constant::isDLLImportDependent() const { in isDLLImportDependent()
650 bool Constant::isConstantUsed() const { in isConstantUsed()
652 const Constant *UC = dyn_cast<Constant>(U); in isConstantUsed()
662 bool Constant::needsDynamicRelocation() const { in needsDynamicRelocation()
666 bool Constant::needsRelocation() const { in needsRelocation()
670 Constant::PossibleRelocationsTy Constant::getRelocationInfo() const { in getRelocationInfo()
683 Constant *LHSOp0 = LHS->getOperand(0); in getRelocationInfo()
684 Constant *RHSOp0 = RHS->getOperand(0); in getRelocationInfo()
714 std::max(cast<Constant>(getOperand(i))->getRelocationInfo(), Result); in getRelocationInfo()
721 static bool removeDeadUsersOfConstant(const Constant *C) { in removeDeadUsersOfConstant()
725 const Constant *User = dyn_cast<Constant>(C->user_back()); in removeDeadUsersOfConstant()
734 const_cast<Constant *>(C)->replaceAllUsesWith( in removeDeadUsersOfConstant()
737 const_cast<Constant*>(C)->destroyConstant(); in removeDeadUsersOfConstant()
742 void Constant::removeDeadConstantUsers() const { in removeDeadConstantUsers()
746 const Constant *User = dyn_cast<Constant>(*I); in removeDeadConstantUsers()
769 Constant *Constant::replaceUndefsWith(Constant *C, Constant *Replacement) { in replaceUndefsWith()
783 SmallVector<Constant *, 32> NewC(NumElts); in replaceUndefsWith()
785 Constant *EltC = C->getAggregateElement(i); in replaceUndefsWith()
793 Constant *Constant::mergeUndefsWith(Constant *C, Constant *Other) { in mergeUndefsWith()
813 SmallVector<Constant *, 32> NewC(NumElts); in mergeUndefsWith()
816 Constant *OtherEltC = Other->getAggregateElement(I); in mergeUndefsWith()
828 bool Constant::isManifestConstant() const { in isManifestConstant()
833 if (!cast<Constant>(Op)->isManifestConstant()) in isManifestConstant()
867 Constant *ConstantInt::getTrue(Type *Ty) { in getTrue()
875 Constant *ConstantInt::getFalse(Type *Ty) { in getFalse()
883 Constant *ConstantInt::getBool(Type *Ty, bool V) { in getBool()
901 Constant *ConstantInt::get(Type *Ty, uint64_t V, bool isSigned) { in get()
902 Constant *C = get(cast<IntegerType>(Ty->getScalarType()), V, isSigned); in get()
919 Constant *ConstantInt::getSigned(Type *Ty, int64_t V) { in getSigned()
923 Constant *ConstantInt::get(Type *Ty, const APInt& V) { in get()
948 Constant *ConstantFP::get(Type *Ty, double V) { in get()
955 Constant *C = get(Context, FV); in get()
964 Constant *ConstantFP::get(Type *Ty, const APFloat &V) { in get()
976 Constant *ConstantFP::get(Type *Ty, StringRef Str) { in get()
980 Constant *C = get(Context, FV); in get()
989 Constant *ConstantFP::getNaN(Type *Ty, bool Negative, uint64_t Payload) { in getNaN()
992 Constant *C = get(Ty->getContext(), NaN); in getNaN()
1000 Constant *ConstantFP::getQNaN(Type *Ty, bool Negative, APInt *Payload) { in getQNaN()
1003 Constant *C = get(Ty->getContext(), NaN); in getQNaN()
1011 Constant *ConstantFP::getSNaN(Type *Ty, bool Negative, APInt *Payload) { in getSNaN()
1014 Constant *C = get(Ty->getContext(), NaN); in getSNaN()
1022 Constant *ConstantFP::getNegativeZero(Type *Ty) { in getNegativeZero()
1025 Constant *C = get(Ty->getContext(), NegZero); in getNegativeZero()
1034 Constant *ConstantFP::getZeroValueForNegation(Type *Ty) { in getZeroValueForNegation()
1038 return Constant::getNullValue(Ty); in getZeroValueForNegation()
1056 Constant *ConstantFP::getInfinity(Type *Ty, bool Negative) { in getInfinity()
1058 Constant *C = get(Ty->getContext(), APFloat::getInf(Semantics, Negative)); in getInfinity()
1085 Constant *ConstantAggregateZero::getSequentialElement() const { in getSequentialElement()
1087 return Constant::getNullValue(AT->getElementType()); in getSequentialElement()
1088 return Constant::getNullValue(cast<VectorType>(getType())->getElementType()); in getSequentialElement()
1091 Constant *ConstantAggregateZero::getStructElement(unsigned Elt) const { in getStructElement()
1092 return Constant::getNullValue(getType()->getStructElementType(Elt)); in getStructElement()
1095 Constant *ConstantAggregateZero::getElementValue(Constant *C) const { in getElementValue()
1101 Constant *ConstantAggregateZero::getElementValue(unsigned Idx) const { in getElementValue()
1130 UndefValue *UndefValue::getElementValue(Constant *C) const { in getElementValue()
1165 PoisonValue *PoisonValue::getElementValue(Constant *C) const { in getElementValue()
1190 static Constant *getIntSequenceIfElementsMatch(ArrayRef<Constant *> V) { in getIntSequenceIfElementsMatch()
1194 for (Constant *C : V) in getIntSequenceIfElementsMatch()
1203 static Constant *getFPSequenceIfElementsMatch(ArrayRef<Constant *> V) { in getFPSequenceIfElementsMatch()
1207 for (Constant *C : V) in getFPSequenceIfElementsMatch()
1216 static Constant *getSequenceIfElementsMatch(Constant *C, in getSequenceIfElementsMatch()
1217 ArrayRef<Constant *> V) { in getSequenceIfElementsMatch()
1243 ArrayRef<Constant *> V) in ConstantAggregate()
1244 : Constant(T, VT, OperandTraits<ConstantAggregate>::op_end(this) - V.size(), in ConstantAggregate()
1258 ConstantArray::ConstantArray(ArrayType *T, ArrayRef<Constant *> V) in ConstantArray()
1264 Constant *ConstantArray::get(ArrayType *Ty, ArrayRef<Constant*> V) { in get()
1265 if (Constant *C = getImpl(Ty, V)) in get()
1270 Constant *ConstantArray::getImpl(ArrayType *Ty, ArrayRef<Constant*> V) { in getImpl()
1283 Constant *C = V[0]; in getImpl()
1303 ArrayRef<Constant*> V, in getTypeForElements()
1314 StructType *ConstantStruct::getTypeForElements(ArrayRef<Constant*> V, in getTypeForElements()
1321 ConstantStruct::ConstantStruct(StructType *T, ArrayRef<Constant *> V) in ConstantStruct()
1328 Constant *ConstantStruct::get(StructType *ST, ArrayRef<Constant*> V) { in get()
1363 ConstantVector::ConstantVector(VectorType *T, ArrayRef<Constant *> V) in ConstantVector()
1370 Constant *ConstantVector::get(ArrayRef<Constant*> V) { in get()
1371 if (Constant *C = getImpl(V)) in get()
1377 Constant *ConstantVector::getImpl(ArrayRef<Constant*> V) { in getImpl()
1383 Constant *C = V[0]; in getImpl()
1413 Constant *ConstantVector::getSplat(ElementCount EC, Constant *V) { in getSplat()
1421 SmallVector<Constant *, 32> Elts(EC.getKnownMinValue(), V); in getSplat()
1435 Constant *UndefV = UndefValue::get(VTy); in getSplat()
1509 Constant *ConstantExpr::getShuffleMaskForBitcode() const { in getShuffleMaskForBitcode()
1513 Constant *
1514 ConstantExpr::getWithOperandReplaced(unsigned OpNo, Constant *Op) const { in getWithOperandReplaced()
1520 SmallVector<Constant*, 8> NewOps; in getWithOperandReplaced()
1527 Constant *ConstantExpr::getWithOperands(ArrayRef<Constant *> Ops, Type *Ty, in getWithOperands()
1701 Constant *Constant::getSplatValue(bool AllowUndefs) const { in getSplatValue()
1721 Constant *SplatVal = IElt->getOperand(1); in getSplatValue()
1733 Constant *ConstantVector::getSplatValue(bool AllowUndefs) const { in getSplatValue()
1735 Constant *Elt = getOperand(0); in getSplatValue()
1738 Constant *OpC = getOperand(I); in getSplatValue()
1760 const APInt &Constant::getUniqueInteger() const { in getUniqueInteger()
1764 const Constant *C = this->getAggregateElement(0U); in getUniqueInteger()
1835 : Constant(Type::getInt8PtrTy(F->getContext(), F->getAddressSpace()), in BlockAddress()
1908 : Constant(GV->getType(), Value::DSOLocalEquivalentVal, &Op<0>(), 1) { in DSOLocalEquivalent()
1920 assert(isa<Constant>(To) && "Can only replace the operands with a constant"); in handleOperandChangeImpl()
1932 if (cast<Constant>(To)->isNullValue()) in handleOperandChangeImpl()
1960 static Constant *getFoldedCast(Instruction::CastOps opc, Constant *C, Type *Ty, in getFoldedCast()
1964 if (Constant *FC = ConstantFoldCastInstruction(opc, C, Ty)) in getFoldedCast()
1978 Constant *ConstantExpr::getCast(unsigned oc, Constant *C, Type *Ty, in getCast()
2017 Constant *ConstantExpr::getZExtOrBitCast(Constant *C, Type *Ty) { in getZExtOrBitCast()
2023 Constant *ConstantExpr::getSExtOrBitCast(Constant *C, Type *Ty) { in getSExtOrBitCast()
2029 Constant *ConstantExpr::getTruncOrBitCast(Constant *C, Type *Ty) { in getTruncOrBitCast()
2035 Constant *ConstantExpr::getPointerCast(Constant *S, Type *Ty) { in getPointerCast()
2050 Constant *ConstantExpr::getPointerBitCastOrAddrSpaceCast(Constant *S, in getPointerBitCastOrAddrSpaceCast()
2061 Constant *ConstantExpr::getIntegerCast(Constant *C, Type *Ty, bool isSigned) { in getIntegerCast()
2073 Constant *ConstantExpr::getFPCast(Constant *C, Type *Ty) { in getFPCast()
2085 Constant *ConstantExpr::getTrunc(Constant *C, Type *Ty, bool OnlyIfReduced) { in getTrunc()
2099 Constant *ConstantExpr::getSExt(Constant *C, Type *Ty, bool OnlyIfReduced) { in getSExt()
2113 Constant *ConstantExpr::getZExt(Constant *C, Type *Ty, bool OnlyIfReduced) { in getZExt()
2127 Constant *ConstantExpr::getFPTrunc(Constant *C, Type *Ty, bool OnlyIfReduced) { in getFPTrunc()
2139 Constant *ConstantExpr::getFPExtend(Constant *C, Type *Ty, bool OnlyIfReduced) { in getFPExtend()
2151 Constant *ConstantExpr::getUIToFP(Constant *C, Type *Ty, bool OnlyIfReduced) { in getUIToFP()
2162 Constant *ConstantExpr::getSIToFP(Constant *C, Type *Ty, bool OnlyIfReduced) { in getSIToFP()
2173 Constant *ConstantExpr::getFPToUI(Constant *C, Type *Ty, bool OnlyIfReduced) { in getFPToUI()
2184 Constant *ConstantExpr::getFPToSI(Constant *C, Type *Ty, bool OnlyIfReduced) { in getFPToSI()
2195 Constant *ConstantExpr::getPtrToInt(Constant *C, Type *DstTy, in getPtrToInt()
2209 Constant *ConstantExpr::getIntToPtr(Constant *C, Type *DstTy, in getIntToPtr()
2223 Constant *ConstantExpr::getBitCast(Constant *C, Type *DstTy, in getBitCast()
2235 Constant *ConstantExpr::getAddrSpaceCast(Constant *C, Type *DstTy, in getAddrSpaceCast()
2257 Constant *ConstantExpr::get(unsigned Opcode, Constant *C, unsigned Flags, in get()
2275 if (Constant *FC = ConstantFoldUnaryInstruction(Opcode, C)) in get()
2281 Constant *ArgVec[] = { C }; in get()
2288 Constant *ConstantExpr::get(unsigned Opcode, Constant *C1, Constant *C2, in get()
2334 if (Constant *FC = ConstantFoldBinaryInstruction(Opcode, C1, C2)) in get()
2340 Constant *ArgVec[] = { C1, C2 }; in get()
2347 Constant *ConstantExpr::getSizeOf(Type* Ty) { in getSizeOf()
2350 Constant *GEPIdx = ConstantInt::get(Type::getInt32Ty(Ty->getContext()), 1); in getSizeOf()
2351 Constant *GEP = getGetElementPtr( in getSizeOf()
2352 Ty, Constant::getNullValue(PointerType::getUnqual(Ty)), GEPIdx); in getSizeOf()
2357 Constant *ConstantExpr::getAlignOf(Type* Ty) { in getAlignOf()
2361 Constant *NullPtr = Constant::getNullValue(AligningTy->getPointerTo(0)); in getAlignOf()
2362 Constant *Zero = ConstantInt::get(Type::getInt64Ty(Ty->getContext()), 0); in getAlignOf()
2363 Constant *One = ConstantInt::get(Type::getInt32Ty(Ty->getContext()), 1); in getAlignOf()
2364 Constant *Indices[2] = { Zero, One }; in getAlignOf()
2365 Constant *GEP = getGetElementPtr(AligningTy, NullPtr, Indices); in getAlignOf()
2370 Constant *ConstantExpr::getOffsetOf(StructType* STy, unsigned FieldNo) { in getOffsetOf()
2375 Constant *ConstantExpr::getOffsetOf(Type* Ty, Constant *FieldNo) { in getOffsetOf()
2378 Constant *GEPIdx[] = { in getOffsetOf()
2382 Constant *GEP = getGetElementPtr( in getOffsetOf()
2383 Ty, Constant::getNullValue(PointerType::getUnqual(Ty)), GEPIdx); in getOffsetOf()
2388 Constant *ConstantExpr::getCompare(unsigned short Predicate, Constant *C1, in getCompare()
2389 Constant *C2, bool OnlyIfReduced) { in getCompare()
2410 Constant *ConstantExpr::getSelect(Constant *C, Constant *V1, Constant *V2, in getSelect()
2414 if (Constant *SC = ConstantFoldSelectInstruction(C, V1, V2)) in getSelect()
2420 Constant *ArgVec[] = { C, V1, V2 }; in getSelect()
2427 Constant *ConstantExpr::getGetElementPtr(Type *Ty, Constant *C, in getGetElementPtr()
2435 if (Constant *FC = in getGetElementPtr()
2462 std::vector<Constant*> ArgVec; in getGetElementPtr()
2467 auto *Idx = cast<Constant>(GTI.getOperand()); in getGetElementPtr()
2492 Constant *ConstantExpr::getICmp(unsigned short pred, Constant *LHS, in getICmp()
2493 Constant *RHS, bool OnlyIfReduced) { in getICmp()
2498 if (Constant *FC = ConstantFoldCompareInstruction(pred, LHS, RHS)) in getICmp()
2505 Constant *ArgVec[] = { LHS, RHS }; in getICmp()
2517 Constant *ConstantExpr::getFCmp(unsigned short pred, Constant *LHS, in getFCmp()
2518 Constant *RHS, bool OnlyIfReduced) { in getFCmp()
2523 if (Constant *FC = ConstantFoldCompareInstruction(pred, LHS, RHS)) in getFCmp()
2530 Constant *ArgVec[] = { LHS, RHS }; in getFCmp()
2542 Constant *ConstantExpr::getExtractElement(Constant *Val, Constant *Idx, in getExtractElement()
2549 if (Constant *FC = ConstantFoldExtractElementInstruction(Val, Idx)) in getExtractElement()
2557 Constant *ArgVec[] = { Val, Idx }; in getExtractElement()
2564 Constant *ConstantExpr::getInsertElement(Constant *Val, Constant *Elt, in getInsertElement()
2565 Constant *Idx, Type *OnlyIfReducedTy) { in getInsertElement()
2573 if (Constant *FC = ConstantFoldInsertElementInstruction(Val, Elt, Idx)) in getInsertElement()
2580 Constant *ArgVec[] = { Val, Elt, Idx }; in getInsertElement()
2587 Constant *ConstantExpr::getShuffleVector(Constant *V1, Constant *V2, in getShuffleVector()
2593 if (Constant *FC = ConstantFoldShuffleVectorInstruction(V1, V2, Mask)) in getShuffleVector()
2606 Constant *ArgVec[] = {V1, V2}; in getShuffleVector()
2613 Constant *ConstantExpr::getInsertValue(Constant *Agg, Constant *Val, in getInsertValue()
2624 if (Constant *FC = ConstantFoldInsertValueInstruction(Agg, Val, Idxs)) in getInsertValue()
2630 Constant *ArgVec[] = { Agg, Val }; in getInsertValue()
2637 Constant *ConstantExpr::getExtractValue(Constant *Agg, ArrayRef<unsigned> Idxs, in getExtractValue()
2648 if (Constant *FC = ConstantFoldExtractValueInstruction(Agg, Idxs)) in getExtractValue()
2654 Constant *ArgVec[] = { Agg }; in getExtractValue()
2661 Constant *ConstantExpr::getNeg(Constant *C, bool HasNUW, bool HasNSW) { in getNeg()
2668 Constant *ConstantExpr::getFNeg(Constant *C) { in getFNeg()
2674 Constant *ConstantExpr::getNot(Constant *C) { in getNot()
2677 return get(Instruction::Xor, C, Constant::getAllOnesValue(C->getType())); in getNot()
2680 Constant *ConstantExpr::getAdd(Constant *C1, Constant *C2, in getAdd()
2687 Constant *ConstantExpr::getFAdd(Constant *C1, Constant *C2) { in getFAdd()
2691 Constant *ConstantExpr::getSub(Constant *C1, Constant *C2, in getSub()
2698 Constant *ConstantExpr::getFSub(Constant *C1, Constant *C2) { in getFSub()
2702 Constant *ConstantExpr::getMul(Constant *C1, Constant *C2, in getMul()
2709 Constant *ConstantExpr::getFMul(Constant *C1, Constant *C2) { in getFMul()
2713 Constant *ConstantExpr::getUDiv(Constant *C1, Constant *C2, bool isExact) { in getUDiv()
2718 Constant *ConstantExpr::getSDiv(Constant *C1, Constant *C2, bool isExact) { in getSDiv()
2723 Constant *ConstantExpr::getFDiv(Constant *C1, Constant *C2) { in getFDiv()
2727 Constant *ConstantExpr::getURem(Constant *C1, Constant *C2) { in getURem()
2731 Constant *ConstantExpr::getSRem(Constant *C1, Constant *C2) { in getSRem()
2735 Constant *ConstantExpr::getFRem(Constant *C1, Constant *C2) { in getFRem()
2739 Constant *ConstantExpr::getAnd(Constant *C1, Constant *C2) { in getAnd()
2743 Constant *ConstantExpr::getOr(Constant *C1, Constant *C2) { in getOr()
2747 Constant *ConstantExpr::getXor(Constant *C1, Constant *C2) { in getXor()
2751 Constant *ConstantExpr::getUMin(Constant *C1, Constant *C2) { in getUMin()
2752 Constant *Cmp = ConstantExpr::getICmp(CmpInst::ICMP_ULT, C1, C2); in getUMin()
2756 Constant *ConstantExpr::getShl(Constant *C1, Constant *C2, in getShl()
2763 Constant *ConstantExpr::getLShr(Constant *C1, Constant *C2, bool isExact) { in getLShr()
2768 Constant *ConstantExpr::getAShr(Constant *C1, Constant *C2, bool isExact) { in getAShr()
2773 Constant *ConstantExpr::getExactLogBase2(Constant *C) { in getExactLogBase2()
2784 SmallVector<Constant *, 4> Elts; in getExactLogBase2()
2786 Constant *Elt = C->getAggregateElement(I); in getExactLogBase2()
2791 Elts.push_back(Constant::getNullValue(Ty->getScalarType())); in getExactLogBase2()
2802 Constant *ConstantExpr::getBinOpIdentity(unsigned Opcode, Type *Ty, in getBinOpIdentity()
2812 return Constant::getNullValue(Ty); in getBinOpIdentity()
2816 return Constant::getAllOnesValue(Ty); in getBinOpIdentity()
2837 return Constant::getNullValue(Ty); in getBinOpIdentity()
2848 Constant *ConstantExpr::getBinOpAbsorber(unsigned Opcode, Type *Ty) { in getBinOpAbsorber()
2855 return Constant::getAllOnesValue(Ty); in getBinOpAbsorber()
2859 return Constant::getNullValue(Ty); in getBinOpAbsorber()
2873 Type *SrcElementTy, Constant *C, ArrayRef<Constant *> IdxList, Type *DestTy) in GetElementPtrConstantExpr()
2953 Constant *ConstantDataSequential::getImpl(StringRef Elements, Type *Ty) { in getImpl()
3035 Constant *ConstantDataArray::getFP(Type *ElementType, ArrayRef<uint16_t> Elts) { in getFP()
3042 Constant *ConstantDataArray::getFP(Type *ElementType, ArrayRef<uint32_t> Elts) { in getFP()
3048 Constant *ConstantDataArray::getFP(Type *ElementType, ArrayRef<uint64_t> Elts) { in getFP()
3056 Constant *ConstantDataArray::getString(LLVMContext &Context, in getString()
3072 Constant *ConstantDataVector::get(LLVMContext &Context, ArrayRef<uint8_t> Elts){ in get()
3077 Constant *ConstantDataVector::get(LLVMContext &Context, ArrayRef<uint16_t> Elts){ in get()
3082 Constant *ConstantDataVector::get(LLVMContext &Context, ArrayRef<uint32_t> Elts){ in get()
3087 Constant *ConstantDataVector::get(LLVMContext &Context, ArrayRef<uint64_t> Elts){ in get()
3092 Constant *ConstantDataVector::get(LLVMContext &Context, ArrayRef<float> Elts) { in get()
3097 Constant *ConstantDataVector::get(LLVMContext &Context, ArrayRef<double> Elts) { in get()
3109 Constant *ConstantDataVector::getFP(Type *ElementType, in getFP()
3117 Constant *ConstantDataVector::getFP(Type *ElementType, in getFP()
3124 Constant *ConstantDataVector::getFP(Type *ElementType, in getFP()
3133 Constant *ConstantDataVector::getSplat(unsigned NumElts, Constant *V) { in getSplat()
3265 Constant *ConstantDataSequential::getElementAsConstant(unsigned Elt) const { in getElementAsConstant()
3310 Constant *ConstantDataVector::getSplatValue() const { in getSplatValue()
3329 void Constant::handleOperandChange(Value *From, Value *To) { in handleOperandChange()
3357 assert(isa<Constant>(To) && "Cannot make Constant refer to non-constant!"); in handleOperandChangeImpl()
3358 Constant *ToC = cast<Constant>(To); in handleOperandChangeImpl()
3360 SmallVector<Constant*, 8> Values; in handleOperandChangeImpl()
3372 Constant *Val = cast<Constant>(O->get()); in handleOperandChangeImpl()
3389 if (Constant *C = getImpl(getType(), Values)) in handleOperandChangeImpl()
3398 assert(isa<Constant>(To) && "Cannot make Constant refer to non-constant!"); in handleOperandChangeImpl()
3399 Constant *ToC = cast<Constant>(To); in handleOperandChangeImpl()
3403 SmallVector<Constant*, 8> Values; in handleOperandChangeImpl()
3412 Constant *Val = cast<Constant>(O->get()); in handleOperandChangeImpl()
3434 assert(isa<Constant>(To) && "Cannot make Constant refer to non-constant!"); in handleOperandChangeImpl()
3435 Constant *ToC = cast<Constant>(To); in handleOperandChangeImpl()
3437 SmallVector<Constant*, 8> Values; in handleOperandChangeImpl()
3442 Constant *Val = getOperand(i); in handleOperandChangeImpl()
3451 if (Constant *C = getImpl(Values)) in handleOperandChangeImpl()
3460 assert(isa<Constant>(ToV) && "Cannot make Constant refer to non-constant!"); in handleOperandChangeImpl()
3461 Constant *To = cast<Constant>(ToV); in handleOperandChangeImpl()
3463 SmallVector<Constant*, 8> NewOps; in handleOperandChangeImpl()
3467 Constant *Op = getOperand(i); in handleOperandChangeImpl()
3477 if (Constant *C = getWithOperands(NewOps, getType(), true)) in handleOperandChangeImpl()