/external/llvm/include/llvm/IR/ |
D | ConstantFolder.h | 36 return ConstantExpr::getAdd(LHS, RHS, HasNUW, HasNSW); 39 return ConstantExpr::getFAdd(LHS, RHS); in CreateFAdd() 43 return ConstantExpr::getSub(LHS, RHS, HasNUW, HasNSW); 46 return ConstantExpr::getFSub(LHS, RHS); in CreateFSub() 50 return ConstantExpr::getMul(LHS, RHS, HasNUW, HasNSW); 53 return ConstantExpr::getFMul(LHS, RHS); in CreateFMul() 57 return ConstantExpr::getUDiv(LHS, RHS, isExact); 61 return ConstantExpr::getSDiv(LHS, RHS, isExact); 64 return ConstantExpr::getFDiv(LHS, RHS); in CreateFDiv() 67 return ConstantExpr::getURem(LHS, RHS); in CreateURem() [all …]
|
D | Operator.h | 28 class ConstantExpr; variable 51 return cast<ConstantExpr>(this)->getOpcode(); in getOpcode() 59 if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(V)) in getOpcode() 65 static inline bool classof(const ConstantExpr *) { return true; } in classof() argument 67 return isa<Instruction>(V) || isa<ConstantExpr>(V); in classof() 83 friend class ConstantExpr; variable 112 static inline bool classof(const ConstantExpr *CE) { in classof() 120 (isa<ConstantExpr>(V) && classof(cast<ConstantExpr>(V))); in classof() 134 friend class ConstantExpr; variable 151 static inline bool classof(const ConstantExpr *CE) { in classof() [all …]
|
/external/llvm/unittests/IR/ |
D | ConstantsTest.cpp | 34 EXPECT_EQ(Zero, ConstantExpr::getAdd(One, One)); in TEST() 38 EXPECT_EQ(Zero, ConstantExpr::getAdd(NegOne, One)); in TEST() 42 EXPECT_EQ(Zero, ConstantExpr::getAdd(NegOne, NegOne)); in TEST() 46 EXPECT_EQ(Zero, ConstantExpr::getSub(NegOne, One)); in TEST() 50 EXPECT_EQ(Zero, ConstantExpr::getSub(One, NegOne)); in TEST() 54 EXPECT_EQ(Zero, ConstantExpr::getSub(One, One)); in TEST() 58 EXPECT_EQ(Undef, ConstantExpr::getShl(One, One)); in TEST() 62 EXPECT_EQ(One, ConstantExpr::getShl(One, Zero)); in TEST() 66 EXPECT_EQ(Undef, ConstantExpr::getLShr(One, One)); in TEST() 70 EXPECT_EQ(Undef, ConstantExpr::getAShr(One, One)); in TEST() [all …]
|
/external/llvm/include/llvm/Analysis/ |
D | TargetFolder.h | 37 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(C)) in Fold() 52 return Fold(ConstantExpr::getAdd(LHS, RHS, HasNUW, HasNSW)); 55 return Fold(ConstantExpr::getFAdd(LHS, RHS)); in CreateFAdd() 59 return Fold(ConstantExpr::getSub(LHS, RHS, HasNUW, HasNSW)); 62 return Fold(ConstantExpr::getFSub(LHS, RHS)); in CreateFSub() 66 return Fold(ConstantExpr::getMul(LHS, RHS, HasNUW, HasNSW)); 69 return Fold(ConstantExpr::getFMul(LHS, RHS)); in CreateFMul() 72 return Fold(ConstantExpr::getUDiv(LHS, RHS, isExact)); 75 return Fold(ConstantExpr::getSDiv(LHS, RHS, isExact)); 78 return Fold(ConstantExpr::getFDiv(LHS, RHS)); in CreateFDiv() [all …]
|
D | ConstantFolding.h | 25 class ConstantExpr; variable 46 ConstantFoldConstantExpression(const ConstantExpr *CE, const DataLayout &DL, 94 Constant *ConstantFoldLoadThroughGEPConstantExpr(Constant *C, ConstantExpr *CE);
|
/external/llvm/lib/IR/ |
D | ConstantFold.cpp | 64 ConstantExpr::getExtractElement(CV, ConstantInt::get(Ty, i)); in BitCastConstantVector() 65 C = ConstantExpr::getBitCast(C, DstEltTy); in BitCastConstantVector() 79 ConstantExpr *Op, ///< the first cast constant expression in foldConstantCastPair() 135 return ConstantExpr::getInBoundsGetElementPtr(PTy->getElementType(), in FoldBitCast() 158 return ConstantExpr::getBitCast(ConstantVector::get(V), DestPTy); in FoldBitCast() 232 ConstantExpr *CE = dyn_cast<ConstantExpr>(C); in ExtractConstantBytes() 250 return ConstantExpr::getOr(LHS, RHS); in ExtractConstantBytes() 264 return ConstantExpr::getAnd(LHS, RHS); in ExtractConstantBytes() 334 Res = ConstantExpr::getLShr(Res, in ExtractConstantBytes() 336 return ConstantExpr::getTrunc(Res, IntegerType::get(C->getContext(), in ExtractConstantBytes() [all …]
|
D | ConstantsContext.h | 35 class UnaryConstantExpr : public ConstantExpr { 44 : ConstantExpr(Ty, Opcode, &Op<0>(), 1) { in UnaryConstantExpr() 52 class BinaryConstantExpr : public ConstantExpr { 62 : ConstantExpr(C1->getType(), Opcode, &Op<0>(), 2) { in BinaryConstantExpr() 73 class SelectConstantExpr : public ConstantExpr { 82 : ConstantExpr(C2->getType(), Instruction::Select, &Op<0>(), 3) { in SelectConstantExpr() 94 class ExtractElementConstantExpr : public ConstantExpr { 103 : ConstantExpr(cast<VectorType>(C1->getType())->getElementType(), in ExtractElementConstantExpr() 115 class InsertElementConstantExpr : public ConstantExpr { 124 : ConstantExpr(C1->getType(), Instruction::InsertElement, in InsertElementConstantExpr() [all …]
|
D | Constants.cpp | 241 C = ConstantExpr::getIntToPtr(C, PTy); in getIntegerValue() 340 SmallPtrSetImpl<const ConstantExpr *> &NonTrappingOps) { in canTrapImpl() 343 const ConstantExpr *CE = dyn_cast<ConstantExpr>(C); in canTrapImpl() 349 if (ConstantExpr *Op = dyn_cast<ConstantExpr>(CE->getOperand(i))) { in canTrapImpl() 375 SmallPtrSet<const ConstantExpr *, 4> NonTrappingOps; in canTrap() 444 if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(this)) in needsRelocation() 446 ConstantExpr *LHS = dyn_cast<ConstantExpr>(CE->getOperand(0)); in needsRelocation() 447 ConstantExpr *RHS = dyn_cast<ConstantExpr>(CE->getOperand(1)); in needsRelocation() 1110 bool ConstantExpr::isCast() const { in isCast() 1114 bool ConstantExpr::isCompare() const { in isCompare() [all …]
|
D | Core.cpp | 990 return map_to_llvmopcode(unwrap<ConstantExpr>(ConstantVal)->getOpcode()); in LLVMGetConstOpcode() 994 return wrap(ConstantExpr::getAlignOf(unwrap(Ty))); in LLVMAlignOf() 998 return wrap(ConstantExpr::getSizeOf(unwrap(Ty))); in LLVMSizeOf() 1002 return wrap(ConstantExpr::getNeg(unwrap<Constant>(ConstantVal))); in LLVMConstNeg() 1006 return wrap(ConstantExpr::getNSWNeg(unwrap<Constant>(ConstantVal))); in LLVMConstNSWNeg() 1010 return wrap(ConstantExpr::getNUWNeg(unwrap<Constant>(ConstantVal))); in LLVMConstNUWNeg() 1015 return wrap(ConstantExpr::getFNeg(unwrap<Constant>(ConstantVal))); in LLVMConstFNeg() 1019 return wrap(ConstantExpr::getNot(unwrap<Constant>(ConstantVal))); in LLVMConstNot() 1023 return wrap(ConstantExpr::getAdd(unwrap<Constant>(LHSConstant), in LLVMConstAdd() 1029 return wrap(ConstantExpr::getNSWAdd(unwrap<Constant>(LHSConstant), in LLVMConstNSWAdd() [all …]
|
D | IntrinsicInst.cpp | 35 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(C)) in CastOperand()
|
/external/llvm/lib/Analysis/ |
D | ConstantFolding.cpp | 65 return ConstantExpr::getBitCast(C, DestTy); in FoldBitCast() 77 C = ConstantExpr::getBitCast(C, SrcIVTy); in FoldBitCast() 82 return ConstantExpr::getBitCast(C, DestTy); in FoldBitCast() 102 return ConstantExpr::getBitCast(C, DestTy); in FoldBitCast() 113 return ConstantExpr::getBitCast(C, DestTy); in FoldBitCast() 119 return ConstantExpr::getBitCast(C, DestTy); in FoldBitCast() 143 return ConstantExpr::getBitCast(C, DestTy); in FoldBitCast() 153 C = ConstantExpr::getBitCast(C, SrcIVTy); in FoldBitCast() 180 return ConstantExpr::getBitCast(C, DestTy); in FoldBitCast() 183 Src = ConstantExpr::getZExt(Src, Elt->getType()); in FoldBitCast() [all …]
|
D | CFLAliasAnalysis.cpp | 448 void visitConstantExpr(ConstantExpr *CE) { in visitConstantExpr() 652 static void argsToEdges(CFLAAResult &, ConstantExpr *, SmallVectorImpl<Edge> &); 666 static void constexprToEdges(CFLAAResult &, ConstantExpr &, 717 static bool hasUsefulEdges(ConstantExpr *CE) { in hasUsefulEdges() 763 static void argsToEdges(CFLAAResult &Analysis, ConstantExpr *CE, in argsToEdges() 783 ConstantExpr &CExprToCollapse, in constexprToEdges() 785 SmallVector<ConstantExpr *, 4> Worklist; in constexprToEdges() 789 SmallPtrSet<ConstantExpr *, 4> Visited; in constexprToEdges() 799 if (auto *Nested = dyn_cast<ConstantExpr>(Edge.From)) in constexprToEdges() 803 if (auto *Nested = dyn_cast<ConstantExpr>(Edge.To)) in constexprToEdges() [all …]
|
/external/llvm/lib/Transforms/IPO/ |
D | GlobalOpt.cpp | 235 } else if (ConstantExpr *CE = dyn_cast<ConstantExpr>(U)) { in CleanupPointerRootUsers() 301 } else if (ConstantExpr *CE = dyn_cast<ConstantExpr>(U)) { in CleanupConstantGlobalUsers() 323 if (!isa<ConstantExpr>(GEP->getOperand(0))) { in CleanupConstantGlobalUsers() 324 ConstantExpr *CE = dyn_cast_or_null<ConstantExpr>( in CleanupConstantGlobalUsers() 397 (!isa<ConstantExpr>(U) || in IsUserOfGlobalSafeForSRA() 398 cast<ConstantExpr>(U)->getOpcode() != Instruction::GetElementPtr)) in IsUserOfGlobalSafeForSRA() 560 assert(((isa<ConstantExpr>(GEP) && in SRAGlobal() 561 cast<ConstantExpr>(GEP)->getOpcode()==Instruction::GetElementPtr)|| in SRAGlobal() 575 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(GEP)) { in SRAGlobal() 581 ConstantExpr::getGetElementPtr(NewTy, cast<Constant>(NewPtr), Idxs); in SRAGlobal() [all …]
|
D | LowerBitSets.cpp | 359 BAI->Mask = ConstantExpr::getPtrToInt(MaskGlobal, Int8Ty); in createByteArray() 392 Constant *GEP = ConstantExpr::getInBoundsGetElementPtr( in allocateByteArrays() 469 Constant *OffsetedGlobalAsInt = ConstantExpr::getAdd( in lowerBitSetCall() 577 Constant *CombinedGlobalElemPtr = ConstantExpr::getGetElementPtr( in buildBitSetsFromGlobalVariables() 598 ConstantExpr::getPtrToInt(CombinedGlobalAddr, IntPtrTy); in lowerBitSetCalls() 680 Constant *DestInt = ConstantExpr::getPtrToInt(Dest, IntPtrTy); in createJumpTableEntry() 681 Constant *SrcInt = ConstantExpr::getPtrToInt(Src, IntPtrTy); in createJumpTableEntry() 682 Constant *Disp = ConstantExpr::getSub(DestInt, SrcInt); in createJumpTableEntry() 685 Constant *OffsetedDisp = ConstantExpr::getSub(Disp, DispOffset); in createJumpTableEntry() 686 OffsetedDisp = ConstantExpr::getTruncOrBitCast(OffsetedDisp, Int32Ty); in createJumpTableEntry() [all …]
|
/external/llvm/lib/Target/XCore/ |
D | XCoreLowerThreadLocal.cpp | 78 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()
|
/external/llvm/lib/ExecutionEngine/Orc/ |
D | ExecutionUtils.cpp | 58 } else if (ConstantExpr *CE = dyn_cast_or_null<ConstantExpr>(FuncC)) { in operator *() 60 FuncC = dyn_cast_or_null<ConstantExpr>(CE->getOperand(0)); in operator *()
|
/external/llvm/lib/Transforms/InstCombine/ |
D | InstCombineCompares.cpp | 44 return cast<ConstantInt>(ConstantExpr::getExtractElement(V, Idx)); in ExtractElement() 62 Result = ConstantExpr::getAdd(In1, In2); in AddWithOverflow() 97 Result = ConstantExpr::getSub(In1, In2); in SubWithOverflow() 308 Elt = ConstantExpr::getExtractValue(Elt, LaterIndices); in FoldCmpLoadFromIndexedGlobal() 311 if (AndCst) Elt = ConstantExpr::getAnd(Elt, AndCst); in FoldCmpLoadFromIndexedGlobal() 722 if (GEPsInBounds && (isa<ConstantExpr>(GEPLHS) || GEPLHS->hasOneUse()) && in FoldGEPICmp() 723 (isa<ConstantExpr>(GEPRHS) || GEPRHS->hasOneUse())) { in FoldGEPICmp() 823 ConstantExpr::getSub(ConstantInt::getAllOnesValue(CI->getType()), CI); in FoldICmpAddOpCst() 831 return new ICmpInst(ICmpInst::ICMP_ULT, X, ConstantExpr::getNeg(CI)); in FoldICmpAddOpCst() 844 return new ICmpInst(ICmpInst::ICMP_SGT, X, ConstantExpr::getSub(SMax, CI)); in FoldICmpAddOpCst() [all …]
|
/external/llvm/lib/Target/NVPTX/ |
D | NVPTXFavorNonGenericAddrSpaces.cpp | 175 Constant *NewGEP = ConstantExpr::getGetElementPtr( in hoistAddrSpaceCastFromGEP() 178 NewASC = ConstantExpr::getAddrSpaceCast(NewGEP, GEP->getType()); in hoistAddrSpaceCastFromGEP() 214 ConstantExpr::getBitCast(cast<Constant>(Src), TypeOfNewCast); in hoistAddrSpaceCastFromBitCast() 215 NewBC = ConstantExpr::getAddrSpaceCast(NewCast, BC->getType()); in hoistAddrSpaceCastFromBitCast()
|
D | NVVMReflect.cpp | 175 assert(isa<ConstantExpr>(Str) && in handleFunction() 177 const ConstantExpr *GEP = cast<ConstantExpr>(Str); in handleFunction()
|
D | NVPTXGenericToNVVM.cpp | 56 Value *remapConstantExpr(Module *M, Function *F, ConstantExpr *C, 153 Constant *BitCastNewGV = ConstantExpr::getPointerCast(NewGV, GV->getType()); in runOnModule() 239 } else if (isa<ConstantExpr>(C)) { in remapConstant() 243 NewValue = remapConstantExpr(M, F, cast<ConstantExpr>(C), Builder); in remapConstant() 289 Value *GenericToNVVM::remapConstantExpr(Module *M, Function *F, ConstantExpr *C, in remapConstantExpr()
|
/external/clang/lib/CodeGen/ |
D | CGVTables.cpp | 422 if (llvm::ConstantExpr *CE = dyn_cast<llvm::ConstantExpr>(C)) { in emitThunk() 446 llvm::ConstantExpr::getBitCast(Entry, OldThunkFn->getType()); in emitThunk() 550 Init = llvm::ConstantExpr::getIntToPtr(Init, Int8PtrTy); in CreateVTableInitializer() 555 Init = llvm::ConstantExpr::getIntToPtr(Init, Int8PtrTy); in CreateVTableInitializer() 560 Init = llvm::ConstantExpr::getIntToPtr(Init, Int8PtrTy); in CreateVTableInitializer() 563 Init = llvm::ConstantExpr::getBitCast(RTTI, Int8PtrTy); in CreateVTableInitializer() 597 Init = llvm::ConstantExpr::getNullValue(Int8PtrTy); in CreateVTableInitializer() 610 PureVirtualFn = llvm::ConstantExpr::getBitCast(PureVirtualFn, in CreateVTableInitializer() 621 DeletedVirtualFn = llvm::ConstantExpr::getBitCast(DeletedVirtualFn, in CreateVTableInitializer() 641 Init = llvm::ConstantExpr::getBitCast(Init, Int8PtrTy); in CreateVTableInitializer() [all …]
|
D | CGObjCGNU.cpp | 170 return llvm::ConstantExpr::getGetElementPtr(Array.getElementType(), in MakeConstantString() 186 return llvm::ConstantExpr::getGetElementPtr(ConstStr->getValueType(), in ExportUniqueString() 1137 return llvm::ConstantExpr::getBitCast(IDEHType, PtrToInt8Ty); in GetEHType() 1152 return llvm::ConstantExpr::getBitCast(typeinfo, PtrToInt8Ty); in GetEHType() 1167 auto *BVtable = llvm::ConstantExpr::getBitCast( in GetEHType() 1168 llvm::ConstantExpr::getGetElementPtr(Vtable->getValueType(), Vtable, Two), in GetEHType() 1182 return llvm::ConstantExpr::getBitCast(TI, PtrToInt8Ty); in GetEHType() 1209 isa = llvm::ConstantExpr::getBitCast(isa, PtrToIdTy); in GenerateConstantString() 1218 ObjCStr = llvm::ConstantExpr::getBitCast(ObjCStr, PtrToInt8Ty); in GenerateConstantString() 1511 Method = llvm::ConstantExpr::getBitCast(Method, in GenerateMethodList() [all …]
|
D | CGExprConstant.cpp | 678 return llvm::ConstantExpr::getAddrSpaceCast(C, destType); in VisitCastExpr() 1052 Ptr = llvm::ConstantExpr::getBitCast(Ptr, ConvertType(E->getType())); in EmitLValue() 1212 C = llvm::ConstantExpr::getZExt(C, BoolTy); in EmitConstantInit() 1237 C = llvm::ConstantExpr::getZExt(C, BoolTy); in EmitConstantExpr() 1287 llvm::Constant *Casted = llvm::ConstantExpr::getBitCast(C, CharPtrTy); in EmitConstantValue() 1288 Casted = llvm::ConstantExpr::getGetElementPtr(Int8Ty, Casted, Offset); in EmitConstantValue() 1289 C = llvm::ConstantExpr::getPointerCast(Casted, C->getType()); in EmitConstantValue() 1295 return llvm::ConstantExpr::getPointerCast(C, DestTy); in EmitConstantValue() 1297 return llvm::ConstantExpr::getPtrToInt(C, DestTy); in EmitConstantValue() 1304 return llvm::ConstantExpr::getIntToPtr(C, DestTy); in EmitConstantValue() [all …]
|
/external/llvm/bindings/ocaml/llvm/ |
D | llvm.mli | 342 | ConstantExpr Constructor 933 more readable. See the method [llvm::ConstantExpr::getAlignOf]. *) 939 See the method [llvm::ConstantExpr::getSizeOf]. *) 943 See the method [llvm::ConstantExpr::getNeg]. *) 948 See the method [llvm::ConstantExpr::getNSWNeg]. *) 953 See the method [llvm::ConstantExpr::getNUWNeg]. *) 957 See the method [llvm::ConstantExpr::getFNeg]. *) 961 See the method [llvm::ConstantExpr::getNot]. *) 965 See the method [llvm::ConstantExpr::getAdd]. *) 970 See the method [llvm::ConstantExpr::getNSWAdd]. *) [all …]
|
/external/llvm/include/llvm/Transforms/Utils/ |
D | Local.h | 39 class ConstantExpr; variable 231 Constant *OC = ConstantExpr::getIntegerCast(OpC, IntPtrTy, true /*SExt*/); 232 Scale = ConstantExpr::getMul(OC, Scale, isInBounds/*NUW*/);
|