Home
last modified time | relevance | path

Searched refs:ConstantExpr (Results 1 – 25 of 158) sorted by relevance

1234567

/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/include/llvm/IR/
DConstantFolder.h37 return ConstantExpr::getAdd(LHS, RHS, HasNUW, HasNSW);
41 return ConstantExpr::getFAdd(LHS, RHS); in CreateFAdd()
46 return ConstantExpr::getSub(LHS, RHS, HasNUW, HasNSW);
50 return ConstantExpr::getFSub(LHS, RHS); in CreateFSub()
55 return ConstantExpr::getMul(LHS, RHS, HasNUW, HasNSW);
59 return ConstantExpr::getFMul(LHS, RHS); in CreateFMul()
64 return ConstantExpr::getUDiv(LHS, RHS, isExact);
69 return ConstantExpr::getSDiv(LHS, RHS, isExact);
73 return ConstantExpr::getFDiv(LHS, RHS); in CreateFDiv()
77 return ConstantExpr::getURem(LHS, RHS); in CreateURem()
[all …]
DOperator.h43 return cast<ConstantExpr>(this)->getOpcode(); in getOpcode()
51 if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(V)) in getOpcode()
57 static bool classof(const ConstantExpr *) { return true; } in classof() argument
59 return isa<Instruction>(V) || isa<ConstantExpr>(V); in classof()
76 friend class ConstantExpr; variable
106 static bool classof(const ConstantExpr *CE) { in classof()
114 (isa<ConstantExpr>(V) && classof(cast<ConstantExpr>(V))); in classof()
128 friend class ConstantExpr; variable
147 static bool classof(const ConstantExpr *CE) { in classof()
155 (isa<ConstantExpr>(V) && classof(cast<ConstantExpr>(V))); in classof()
[all …]
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/include/llvm/Analysis/
DTargetFolder.h50 return Fold(ConstantExpr::getAdd(LHS, RHS, HasNUW, HasNSW));
53 return Fold(ConstantExpr::getFAdd(LHS, RHS)); in CreateFAdd()
57 return Fold(ConstantExpr::getSub(LHS, RHS, HasNUW, HasNSW));
60 return Fold(ConstantExpr::getFSub(LHS, RHS)); in CreateFSub()
64 return Fold(ConstantExpr::getMul(LHS, RHS, HasNUW, HasNSW));
67 return Fold(ConstantExpr::getFMul(LHS, RHS)); in CreateFMul()
70 return Fold(ConstantExpr::getUDiv(LHS, RHS, isExact));
73 return Fold(ConstantExpr::getSDiv(LHS, RHS, isExact));
76 return Fold(ConstantExpr::getFDiv(LHS, RHS)); in CreateFDiv()
79 return Fold(ConstantExpr::getURem(LHS, RHS)); in CreateURem()
[all …]
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/IR/
DConstantFold.cpp63 ConstantExpr::getExtractElement(CV, ConstantInt::get(Ty, i)); in BitCastConstantVector()
64 C = ConstantExpr::getBitCast(C, DstEltTy); in BitCastConstantVector()
78 ConstantExpr *Op, ///< the first cast constant expression in foldConstantCastPair()
133 return ConstantExpr::getInBoundsGetElementPtr(PTy->getElementType(), in FoldBitCast()
156 return ConstantExpr::getBitCast(ConstantVector::get(V), DestPTy); in FoldBitCast()
233 ConstantExpr *CE = dyn_cast<ConstantExpr>(C); in ExtractConstantBytes()
251 return ConstantExpr::getOr(LHS, RHS); in ExtractConstantBytes()
265 return ConstantExpr::getAnd(LHS, RHS); in ExtractConstantBytes()
337 Res = ConstantExpr::getLShr(Res, in ExtractConstantBytes()
339 return ConstantExpr::getTrunc(Res, IntegerType::get(C->getContext(), in ExtractConstantBytes()
[all …]
DConstantsContext.h45 class UnaryConstantExpr : public ConstantExpr {
48 : ConstantExpr(Ty, Opcode, &Op<0>(), 1) { in UnaryConstantExpr()
62 class BinaryConstantExpr : public ConstantExpr {
66 : ConstantExpr(C1->getType(), Opcode, &Op<0>(), 2) { in BinaryConstantExpr()
83 class SelectConstantExpr : public ConstantExpr {
86 : ConstantExpr(C2->getType(), Instruction::Select, &Op<0>(), 3) { in SelectConstantExpr()
104 class ExtractElementConstantExpr : public ConstantExpr {
107 : ConstantExpr(cast<VectorType>(C1->getType())->getElementType(), in ExtractElementConstantExpr()
125 class InsertElementConstantExpr : public ConstantExpr {
128 : ConstantExpr(C1->getType(), Instruction::InsertElement, in InsertElementConstantExpr()
[all …]
DConstants.cpp291 return match(ConstantExpr::getICmp(ICmpInst::Predicate::ICMP_EQ, in isElementWiseEqual()
311 if (isa<ConstantExpr>(getAggregateElement(i))) in containsConstantExpression()
363 C = ConstantExpr::getIntToPtr(C, PTy); in getIntegerValue()
456 SmallPtrSetImpl<const ConstantExpr *> &NonTrappingOps) { in canTrapImpl()
459 const ConstantExpr *CE = dyn_cast<ConstantExpr>(C); in canTrapImpl()
465 if (ConstantExpr *Op = dyn_cast<ConstantExpr>(CE->getOperand(i))) { in canTrapImpl()
487 SmallPtrSet<const ConstantExpr *, 4> NonTrappingOps; in canTrap()
549 if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(this)) { in needsRelocation()
551 ConstantExpr *LHS = dyn_cast<ConstantExpr>(CE->getOperand(0)); in needsRelocation()
552 ConstantExpr *RHS = dyn_cast<ConstantExpr>(CE->getOperand(1)); in needsRelocation()
[all …]
DCore.cpp1456 return map_to_llvmopcode(unwrap<ConstantExpr>(ConstantVal)->getOpcode()); in LLVMGetConstOpcode()
1460 return wrap(ConstantExpr::getAlignOf(unwrap(Ty))); in LLVMAlignOf()
1464 return wrap(ConstantExpr::getSizeOf(unwrap(Ty))); in LLVMSizeOf()
1468 return wrap(ConstantExpr::getNeg(unwrap<Constant>(ConstantVal))); in LLVMConstNeg()
1472 return wrap(ConstantExpr::getNSWNeg(unwrap<Constant>(ConstantVal))); in LLVMConstNSWNeg()
1476 return wrap(ConstantExpr::getNUWNeg(unwrap<Constant>(ConstantVal))); in LLVMConstNUWNeg()
1481 return wrap(ConstantExpr::getFNeg(unwrap<Constant>(ConstantVal))); in LLVMConstFNeg()
1485 return wrap(ConstantExpr::getNot(unwrap<Constant>(ConstantVal))); in LLVMConstNot()
1489 return wrap(ConstantExpr::getAdd(unwrap<Constant>(LHSConstant), in LLVMConstAdd()
1495 return wrap(ConstantExpr::getNSWAdd(unwrap<Constant>(LHSConstant), in LLVMConstNSWAdd()
[all …]
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Analysis/
DConstantFolding.cpp85 return ConstantExpr::getBitCast(C, DestTy); in foldConstVectorToAPInt()
121 C = ConstantExpr::getBitCast(C, SrcIVTy); in FoldBitCast()
140 return ConstantExpr::getBitCast(C, DestTy); in FoldBitCast()
151 return ConstantExpr::getBitCast(C, DestTy); in FoldBitCast()
157 return ConstantExpr::getBitCast(C, DestTy); in FoldBitCast()
181 return ConstantExpr::getBitCast(C, DestTy); in FoldBitCast()
191 C = ConstantExpr::getBitCast(C, SrcIVTy); in FoldBitCast()
222 return ConstantExpr::getBitCast(C, DestTy); in FoldBitCast()
225 Src = ConstantExpr::getZExt(Src, Elt->getType()); in FoldBitCast()
228 Src = ConstantExpr::getShl(Src, in FoldBitCast()
[all …]
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/Utils/
DEvaluator.cpp84 ConstantExpr *CE = cast<ConstantExpr>(C); in isSimpleEnoughValueToCommitHelper()
141 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(C)) { in isSimpleEnoughPointerToCommit()
198 Ptr = ConstantExpr::getGetElementPtr(Ty, Ptr, IdxList); in evaluateBitcastFromPtr()
231 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(P)) { in ComputeLoadResult()
275 auto *CE = dyn_cast<ConstantExpr>(V); in getCalleeWithFormalArgs()
312 ConstantExpr *CE = dyn_cast<ConstantExpr>(CallExpr); in castCallResultIfNeeded()
364 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Ptr)) { in EvaluateBlock()
399 InstResult = ConstantExpr::get(BO->getOpcode(), in EvaluateBlock()
405 InstResult = ConstantExpr::getCompare(CI->getPredicate(), in EvaluateBlock()
411 InstResult = ConstantExpr::getCast(CI->getOpcode(), in EvaluateBlock()
[all …]
DSanitizerStats.cpp52 ConstantExpr::getIntToPtr( in create()
62 auto InitAddr = ConstantExpr::getGetElementPtr( in create()
68 B.CreateCall(StatReport, ConstantExpr::getBitCast(InitAddr, Int8PtrTy)); in create()
90 ConstantExpr::getBitCast(NewModuleStatsGV, ModuleStatsGV->getType())); in finish()
103 B.CreateCall(StatInit, ConstantExpr::getBitCast(NewModuleStatsGV, Int8PtrTy)); in finish()
DVNCoercion.cpp91 if (auto *C = dyn_cast<ConstantExpr>(StoredVal)) in coerceAvailableValueToLoadTypeHelper()
332 ConstantExpr::getBitCast(Src, Type::getInt8PtrTy(Src->getContext(), AS)); in analyzeLoadFromClobberingMemInst()
335 Src = ConstantExpr::getGetElementPtr(Type::getInt8Ty(Src->getContext()), Src, in analyzeLoadFromClobberingMemInst()
337 Src = ConstantExpr::getBitCast(Src, PointerType::get(LoadTy, AS)); in analyzeLoadFromClobberingMemInst()
508 ConstantExpr::getBitCast(Src, Type::getInt8PtrTy(Src->getContext(), AS)); in getMemInstValueForLoadHelper()
511 Src = ConstantExpr::getGetElementPtr(Type::getInt8Ty(Src->getContext()), Src, in getMemInstValueForLoadHelper()
513 Src = ConstantExpr::getBitCast(Src, PointerType::get(LoadTy, AS)); in getMemInstValueForLoadHelper()
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/include/llvm/Transforms/Scalar/
DConstantHoisting.h55 class ConstantExpr; variable
86 ConstantExpr *ConstExpr;
89 ConstantCandidate(ConstantInt *ConstInt, ConstantExpr *ConstExpr=nullptr) :
118 ConstantExpr *BaseExpr;
146 using ConstPtrUnionType = PointerUnion<ConstantInt *, ConstantExpr *>;
180 ConstantExpr *ConstExpr);
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Bitcode/Reader/
DValueList.cpp36 class ConstantPlaceHolder : public ConstantExpr {
39 : ConstantExpr(Ty, Instruction::UserOp1, &Op<0>(), 1) { in ConstantPlaceHolder()
50 return isa<ConstantExpr>(V) && in classof()
51 cast<ConstantExpr>(V)->getOpcode() == Instruction::UserOp1; in classof()
212 assert(isa<ConstantExpr>(UserC) && "Must be a ConstantExpr."); in resolveConstantForwardRefs()
213 NewC = cast<ConstantExpr>(UserC)->getWithOperands(NewOps); in resolveConstantForwardRefs()
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/Scalar/
DInferAddressSpaces.cpp314 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(V)) { in appendsFlatAddressExpressionToPostorderStack()
329 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Op->getOperand(I))) { in appendsFlatAddressExpressionToPostorderStack()
423 return ConstantExpr::getAddrSpaceCast(C, NewPtrTy); in operandWithNewAddressSpaceOrCreateUndef()
504 ConstantExpr *CE, unsigned NewAddrSpace, in cloneConstantExprWithNewAddressSpace()
515 return ConstantExpr::getBitCast(CE->getOperand(0), TargetType); in cloneConstantExprWithNewAddressSpace()
520 return ConstantExpr::getBitCast(cast<Constant>(NewOperand), TargetType); in cloneConstantExprWithNewAddressSpace()
521 return ConstantExpr::getAddrSpaceCast(CE, TargetType); in cloneConstantExprWithNewAddressSpace()
530 return ConstantExpr::getSelect( in cloneConstantExprWithNewAddressSpace()
531 CE->getOperand(0), ConstantExpr::getAddrSpaceCast(Src0, TargetType), in cloneConstantExprWithNewAddressSpace()
532 ConstantExpr::getAddrSpaceCast(Src1, TargetType)); in cloneConstantExprWithNewAddressSpace()
[all …]
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Target/XCore/
DXCoreLowerThreadLocal.cpp78 createReplacementInstr(ConstantExpr *CE, Instruction *Instr) { in createReplacementInstr()
129 static bool replaceConstantExprOp(ConstantExpr *CE, Pass *P) { in replaceConstantExprOp()
150 ConstantExpr *CExpr = dyn_cast<ConstantExpr>(WU); in replaceConstantExprOp()
168 ConstantExpr *CE = dyn_cast<ConstantExpr>(WU); in rewriteNonInstructionUses()
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/InstCombine/
DInstCombineShifts.cpp134 NewShAmt = ConstantExpr::getZExtOrBitCast(NewShAmt, X->getType()); in reassociateShiftAmtsOfTwoSameDirectionShifts()
242 auto *ExtendedSumOfShAmts = ConstantExpr::getZExt(SumOfShAmts, ExtendedTy); in dropRedundantMaskingOfLeftShiftInput()
244 auto *ExtendedAllOnes = ConstantExpr::getAllOnesValue(ExtendedTy); in dropRedundantMaskingOfLeftShiftInput()
246 ConstantExpr::getShl(ExtendedAllOnes, ExtendedSumOfShAmts); in dropRedundantMaskingOfLeftShiftInput()
247 NewMask = ConstantExpr::getNot(ExtendedInvertedMask); in dropRedundantMaskingOfLeftShiftInput()
275 auto *ExtendedNumHighBitsToClear = ConstantExpr::getZExt( in dropRedundantMaskingOfLeftShiftInput()
276 ConstantExpr::getSub(ConstantInt::get(ShAmtsDiff->getType(), in dropRedundantMaskingOfLeftShiftInput()
282 auto *ExtendedAllOnes = ConstantExpr::getAllOnesValue(ExtendedTy); in dropRedundantMaskingOfLeftShiftInput()
284 ConstantExpr::getLShr(ExtendedAllOnes, ExtendedNumHighBitsToClear); in dropRedundantMaskingOfLeftShiftInput()
288 NewMask = ConstantExpr::getTrunc(NewMask, NarrowestTy); in dropRedundantMaskingOfLeftShiftInput()
[all …]
DInstCombineAddSub.cpp850 Constant *WideC = ConstantExpr::getSExt(NarrowC, Ty); in foldNoWrapAdd()
851 Constant *NewC = ConstantExpr::getAdd(WideC, Op1C); in foldNoWrapAdd()
857 Constant *WideC = ConstantExpr::getZExt(NarrowC, Ty); in foldNoWrapAdd()
858 Constant *NewC = ConstantExpr::getAdd(WideC, Op1C); in foldNoWrapAdd()
880 return BinaryOperator::CreateSub(ConstantExpr::getAdd(Op00C, Op1C), X); in foldAddWithConstant()
1263 return BinaryOperator::CreateSub(ConstantExpr::getAdd(XorRHS, CI), in visitAdd()
1270 ConstantExpr::getXor(XorRHS, CI)); in visitAdd()
1540 ConstantExpr::getFPToSI(CFP, LHSIntVal->getType()); in visitFAdd()
1542 ConstantExpr::getSIToFP(CI, I.getType()) == CFP && in visitFAdd()
1772 return BinaryOperator::CreateAdd(X, ConstantExpr::getSub(C, C2)); in visitSub()
[all …]
DInstCombineMulDivRem.cpp203 Constant *Shl = ConstantExpr::getShl(C1, C2); in visitMul()
281 return BinaryOperator::CreateMul(X, ConstantExpr::getNeg(Op1C)); in visitMul()
424 return BinaryOperator::CreateFMulFMF(X, ConstantExpr::getFNeg(C), &I); in visitFMul()
441 Constant *CC1 = ConstantExpr::getFMul(C, C1); in visitFMul()
447 Constant *CDivC1 = ConstantExpr::getFDiv(C, C1); in visitFMul()
453 Constant *C1DivC = ConstantExpr::getFDiv(C1, C); in visitFMul()
463 Constant *CC1 = ConstantExpr::getFMul(C, C1); in visitFMul()
469 Constant *CC1 = ConstantExpr::getFMul(C, C1); in visitFMul()
938 Constant *TruncC = ConstantExpr::getTrunc(C, X->getType()); in narrowUDivURem()
939 if (ConstantExpr::getZExt(TruncC, Ty) != C) in narrowUDivURem()
[all …]
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Target/NVPTX/
DNVVMReflect.cpp135 assert(isa<ConstantExpr>(Str) && in runOnFunction()
137 const ConstantExpr *GEP = cast<ConstantExpr>(Str); in runOnFunction()
DNVPTXGenericToNVVM.cpp52 Value *remapConstantExpr(Module *M, Function *F, ConstantExpr *C,
142 Constant *BitCastNewGV = ConstantExpr::getPointerCast(NewGV, GV->getType()); in runOnModule()
184 } else if (isa<ConstantExpr>(C)) { in remapConstant()
188 NewValue = remapConstantExpr(M, F, cast<ConstantExpr>(C), Builder); in remapConstant()
234 Value *GenericToNVVM::remapConstantExpr(Module *M, Function *F, ConstantExpr *C, in remapConstantExpr()
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Target/AMDGPU/
DAMDGPUOpenCLEnqueuedBlockLowering.cpp131 if (!isa<ConstantExpr>(UU)) in runOnModule()
134 auto *BitCast = cast<ConstantExpr>(UU); in runOnModule()
135 auto *NewPtr = ConstantExpr::getPointerCast(GV, BitCast->getType()); in runOnModule()
DAMDGPUAnnotateKernelFeatures.cpp71 static bool visitConstantExpr(const ConstantExpr *CE);
96 bool AMDGPUAnnotateKernelFeatures::visitConstantExpr(const ConstantExpr *CE) { in visitConstantExpr()
119 if (const auto *CE = dyn_cast<ConstantExpr>(C)) { in visitConstantExprsRecursively()
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/IPO/
DGlobalOpt.cpp237 } else if (ConstantExpr *CE = dyn_cast<ConstantExpr>(U)) { in CleanupPointerRootUsers()
303 } else if (ConstantExpr *CE = dyn_cast<ConstantExpr>(U)) { in CleanupConstantGlobalUsers()
325 if (!isa<ConstantExpr>(GEP->getOperand(0))) { in CleanupConstantGlobalUsers()
326 ConstantExpr *CE = dyn_cast_or_null<ConstantExpr>( in CleanupConstantGlobalUsers()
424 (!isa<ConstantExpr>(U) || in GlobalUsersSafeToSRA()
425 cast<ConstantExpr>(U)->getOpcode() != Instruction::GetElementPtr)) in GlobalUsersSafeToSRA()
496 assert(((isa<ConstantExpr>(GEP) && cast<ConstantExpr>(GEP)->getOpcode() == in SRAGlobal()
575 assert(((isa<ConstantExpr>(GEP) && in SRAGlobal()
576 cast<ConstantExpr>(GEP)->getOpcode()==Instruction::GetElementPtr)|| in SRAGlobal()
590 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(GEP)) { in SRAGlobal()
[all …]
DLowerTypeTests.cpp376 ConstantExpr::getBitCast(P.second, P.first->getType())); in ~ScopedSaveAliaseesAndUsed()
625 ConstantExpr::getIntToPtr(ConstantInt::get(Int8Ty, Mask), Int8PtrTy)); in allocateByteArrays()
641 Constant *GEP = ConstantExpr::getInBoundsGetElementPtr( in allocateByteArrays()
683 B.CreateAnd(Byte, ConstantExpr::getPtrToInt(TIL.BitMask, Int8Ty)); in createBitSetTest()
746 ConstantExpr::getPtrToInt(TIL.OffsetedGlobal, IntPtrTy); in lowerTypeTestCall()
761 B.CreateLShr(PtrOffset, ConstantExpr::getZExt(TIL.AlignLog2, IntPtrTy)); in lowerTypeTestCall()
763 PtrOffset, ConstantExpr::getZExt( in lowerTypeTestCall()
764 ConstantExpr::getSub( in lowerTypeTestCall()
876 Constant *CombinedGlobalElemPtr = ConstantExpr::getGetElementPtr( in buildBitSetsFromGlobalVariables()
917 ExportGlobal(Name, ConstantExpr::getIntToPtr(C, Int8PtrTy)); in exportTypeId()
[all …]
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/include/llvm/Analysis/Utils/
DLocal.h69 Constant *OC = ConstantExpr::getIntegerCast(OpC, IntIdxTy, true /*SExt*/);
71 ConstantExpr::getMul(OC, Scale, false /*NUW*/, isInBounds /*NSW*/);

1234567