/external/llvm/include/llvm/Analysis/ |
TargetFolder.h | 14 // creation and folding, use ConstantExpr and the routines in 37 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(C)) 52 return Fold(ConstantExpr::getAdd(LHS, RHS, HasNUW, HasNSW)); 55 return Fold(ConstantExpr::getFAdd(LHS, RHS)); 59 return Fold(ConstantExpr::getSub(LHS, RHS, HasNUW, HasNSW)); 62 return Fold(ConstantExpr::getFSub(LHS, RHS)); 66 return Fold(ConstantExpr::getMul(LHS, RHS, HasNUW, HasNSW)); 69 return Fold(ConstantExpr::getFMul(LHS, RHS)); 72 return Fold(ConstantExpr::getUDiv(LHS, RHS, isExact)) [all...] |
ConstantFolding.h | 13 // Also, to supplement the basic VMCore ConstantExpr simplifications, 25 class ConstantExpr; 46 ConstantFoldConstantExpression(const ConstantExpr *CE, const DataLayout &DL, 92 /// getelementptr constantexpr, return the constant value being addressed by the 94 Constant *ConstantFoldLoadThroughGEPConstantExpr(Constant *C, ConstantExpr *CE);
|
/external/llvm/include/llvm/IR/ |
ConstantFolder.h | 13 // use ConstantExpr and the routines in llvm/Analysis/ConstantFolding.h. 36 return ConstantExpr::getAdd(LHS, RHS, HasNUW, HasNSW); 39 return ConstantExpr::getFAdd(LHS, RHS); 43 return ConstantExpr::getSub(LHS, RHS, HasNUW, HasNSW); 46 return ConstantExpr::getFSub(LHS, RHS); 50 return ConstantExpr::getMul(LHS, RHS, HasNUW, HasNSW); 53 return ConstantExpr::getFMul(LHS, RHS); 57 return ConstantExpr::getUDiv(LHS, RHS, isExact); 61 return ConstantExpr::getSDiv(LHS, RHS, isExact); 64 return ConstantExpr::getFDiv(LHS, RHS) [all...] |
Operator.h | 28 class ConstantExpr; 47 /// Return the opcode for this Instruction or ConstantExpr. 51 return cast<ConstantExpr>(this)->getOpcode(); 54 /// If V is an Instruction or ConstantExpr, return its opcode. 59 if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(V)) 65 static inline bool classof(const ConstantExpr *) { return true; } 67 return isa<Instruction>(V) || isa<ConstantExpr>(V); 83 friend class ConstantExpr; 112 static inline bool classof(const ConstantExpr *CE) [all...] |
/external/llvm/unittests/IR/ |
ConstantsTest.cpp | 34 EXPECT_EQ(Zero, ConstantExpr::getAdd(One, One)); 38 EXPECT_EQ(Zero, ConstantExpr::getAdd(NegOne, One)); 42 EXPECT_EQ(Zero, ConstantExpr::getAdd(NegOne, NegOne)); 46 EXPECT_EQ(Zero, ConstantExpr::getSub(NegOne, One)); 50 EXPECT_EQ(Zero, ConstantExpr::getSub(One, NegOne)); 54 EXPECT_EQ(Zero, ConstantExpr::getSub(One, One)); 58 EXPECT_EQ(Undef, ConstantExpr::getShl(One, One)); 62 EXPECT_EQ(One, ConstantExpr::getShl(One, Zero)); 66 EXPECT_EQ(Undef, ConstantExpr::getLShr(One, One)); 70 EXPECT_EQ(Undef, ConstantExpr::getAShr(One, One)) [all...] |
/external/llvm/lib/IR/ |
ConstantsContext.h | 35 class UnaryConstantExpr : public ConstantExpr { 44 : ConstantExpr(Ty, Opcode, &Op<0>(), 1) { 52 class BinaryConstantExpr : public ConstantExpr { 62 : ConstantExpr(C1->getType(), Opcode, &Op<0>(), 2) { 73 class SelectConstantExpr : public ConstantExpr { 82 : ConstantExpr(C2->getType(), Instruction::Select, &Op<0>(), 3) { 94 class ExtractElementConstantExpr : public ConstantExpr { 103 : ConstantExpr(cast<VectorType>(C1->getType())->getElementType(), 115 class InsertElementConstantExpr : public ConstantExpr { 124 : ConstantExpr(C1->getType(), Instruction::InsertElement [all...] |
ConstantFold.cpp | 12 // ConstantExpr::get* methods to automatically fold constants when possible. 64 ConstantExpr::getExtractElement(CV, ConstantInt::get(Ty, i)); 65 C = ConstantExpr::getBitCast(C, DstEltTy); 79 ConstantExpr *Op, ///< the first cast constant expression 135 return ConstantExpr::getInBoundsGetElementPtr(PTy->getElementType(), 158 return ConstantExpr::getBitCast(ConstantVector::get(V), DestPTy); 232 ConstantExpr *CE = dyn_cast<ConstantExpr>(C); 250 return ConstantExpr::getOr(LHS, RHS); 264 return ConstantExpr::getAnd(LHS, RHS) [all...] |
IntrinsicInst.cpp | 35 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(C))
|
Constants.cpp | 241 C = ConstantExpr::getIntToPtr(C, PTy); 268 /// not. This can return null if the element index is a ConstantExpr, or if 340 SmallPtrSetImpl<const ConstantExpr *> &NonTrappingOps) { 343 const ConstantExpr *CE = dyn_cast<ConstantExpr>(C); 347 // ConstantExpr traps if any operands can trap. 349 if (ConstantExpr *Op = dyn_cast<ConstantExpr>(CE->getOperand(i))) { 375 SmallPtrSet<const ConstantExpr *, 4> NonTrappingOps; 444 if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(this) [all...] |
Core.cpp | 990 return map_to_llvmopcode(unwrap<ConstantExpr>(ConstantVal)->getOpcode()); 994 return wrap(ConstantExpr::getAlignOf(unwrap(Ty))); 998 return wrap(ConstantExpr::getSizeOf(unwrap(Ty))); 1002 return wrap(ConstantExpr::getNeg(unwrap<Constant>(ConstantVal))); 1006 return wrap(ConstantExpr::getNSWNeg(unwrap<Constant>(ConstantVal))); 1010 return wrap(ConstantExpr::getNUWNeg(unwrap<Constant>(ConstantVal))); 1015 return wrap(ConstantExpr::getFNeg(unwrap<Constant>(ConstantVal))); 1019 return wrap(ConstantExpr::getNot(unwrap<Constant>(ConstantVal))); 1023 return wrap(ConstantExpr::getAdd(unwrap<Constant>(LHSConstant), 1029 return wrap(ConstantExpr::getNSWAdd(unwrap<Constant>(LHSConstant) [all...] |
/external/llvm/lib/ExecutionEngine/Orc/ |
ExecutionUtils.cpp | 58 } else if (ConstantExpr *CE = dyn_cast_or_null<ConstantExpr>(FuncC)) { 60 FuncC = dyn_cast_or_null<ConstantExpr>(CE->getOperand(0));
|
/external/llvm/lib/Analysis/ |
ConstantFolding.cpp | 12 // Also, to supplement the basic IR ConstantExpr simplifications, 52 /// ConstantExpr if unfoldable. 65 return ConstantExpr::getBitCast(C, DestTy); 77 C = ConstantExpr::getBitCast(C, SrcIVTy); 82 return ConstantExpr::getBitCast(C, DestTy); 102 return ConstantExpr::getBitCast(C, DestTy); 113 return ConstantExpr::getBitCast(C, DestTy); 119 return ConstantExpr::getBitCast(C, DestTy); 143 return ConstantExpr::getBitCast(C, DestTy); 153 C = ConstantExpr::getBitCast(C, SrcIVTy) [all...] |
CFLAliasAnalysis.cpp | 448 void visitConstantExpr(ConstantExpr *CE) { 651 // Gets edges of the given ConstantExpr*, writing them to the SmallVector*. 652 static void argsToEdges(CFLAAResult &, ConstantExpr *, SmallVectorImpl<Edge> &); 663 // Gets the edges of a ConstantExpr as if it was an Instruction. This 666 static void constexprToEdges(CFLAAResult &, ConstantExpr &, 717 static bool hasUsefulEdges(ConstantExpr *CE) { 718 // ConstantExpr doesn't have terminators, invokes, or fences, so only needs 763 static void argsToEdges(CFLAAResult &Analysis, ConstantExpr *CE, 783 ConstantExpr &CExprToCollapse, 785 SmallVector<ConstantExpr *, 4> Worklist [all...] |
/external/llvm/lib/Target/X86/ |
X86TargetObjectFile.h | 56 getExecutableRelativeSymbol(const ConstantExpr *CE, Mangler &Mang,
|
/external/llvm/lib/Target/XCore/ |
XCoreLowerThreadLocal.cpp | 78 createReplacementInstr(ConstantExpr *CE, Instruction *Instr) { 129 static bool replaceConstantExprOp(ConstantExpr *CE, Pass *P) { 150 ConstantExpr *CExpr = dyn_cast<ConstantExpr>(WU); 168 ConstantExpr *CE = dyn_cast<ConstantExpr>(WU);
|
/external/llvm/lib/Target/NVPTX/ |
NVPTXFavorNonGenericAddrSpaces.cpp | 175 Constant *NewGEP = ConstantExpr::getGetElementPtr( 178 NewASC = ConstantExpr::getAddrSpaceCast(NewGEP, GEP->getType()); 214 ConstantExpr::getBitCast(cast<Constant>(Src), TypeOfNewCast); 215 NewBC = ConstantExpr::getAddrSpaceCast(NewCast, BC->getType());
|
NVVMReflect.cpp | 175 assert(isa<ConstantExpr>(Str) && 177 const ConstantExpr *GEP = cast<ConstantExpr>(Str);
|
/external/llvm/lib/Transforms/IPO/ |
GlobalOpt.cpp | 235 } else if (ConstantExpr *CE = dyn_cast<ConstantExpr>(U)) { 301 } else if (ConstantExpr *CE = dyn_cast<ConstantExpr>(U)) { 323 if (!isa<ConstantExpr>(GEP->getOperand(0))) { 324 ConstantExpr *CE = dyn_cast_or_null<ConstantExpr>( 395 // The user of the global must be a GEP Inst or a ConstantExpr GEP. 397 (!isa<ConstantExpr>(U) || 398 cast<ConstantExpr>(U)->getOpcode() != Instruction::GetElementPtr) [all...] |
LowerBitSets.cpp | 359 BAI->Mask = ConstantExpr::getPtrToInt(MaskGlobal, Int8Ty); 392 Constant *GEP = ConstantExpr::getInBoundsGetElementPtr( 469 Constant *OffsetedGlobalAsInt = ConstantExpr::getAdd( 577 Constant *CombinedGlobalElemPtr = ConstantExpr::getGetElementPtr( 598 ConstantExpr::getPtrToInt(CombinedGlobalAddr, IntPtrTy); 680 Constant *DestInt = ConstantExpr::getPtrToInt(Dest, IntPtrTy); 681 Constant *SrcInt = ConstantExpr::getPtrToInt(Src, IntPtrTy); 682 Constant *Disp = ConstantExpr::getSub(DestInt, SrcInt); 685 Constant *OffsetedDisp = ConstantExpr::getSub(Disp, DispOffset); 686 OffsetedDisp = ConstantExpr::getTruncOrBitCast(OffsetedDisp, Int32Ty) [all...] |
/external/llvm/include/llvm/Target/ |
TargetLoweringObjectFile.h | 33 class ConstantExpr; 157 getExecutableRelativeSymbol(const ConstantExpr *CE, Mangler &Mang,
|
/external/llvm/unittests/AsmParser/ |
AsmParserTest.cpp | 146 ASSERT_TRUE(isa<ConstantExpr>(V)); 152 ASSERT_TRUE(isa<ConstantExpr>(V));
|
/external/clang/lib/CodeGen/ |
Address.h | 89 return ConstantAddress(llvm::ConstantExpr::getBitCast(getPointer(), ty),
|
CGVTables.cpp | 422 if (llvm::ConstantExpr *CE = dyn_cast<llvm::ConstantExpr>(C)) { 446 llvm::ConstantExpr::getBitCast(Entry, OldThunkFn->getType()); 550 Init = llvm::ConstantExpr::getIntToPtr(Init, Int8PtrTy); 555 Init = llvm::ConstantExpr::getIntToPtr(Init, Int8PtrTy); 560 Init = llvm::ConstantExpr::getIntToPtr(Init, Int8PtrTy); 563 Init = llvm::ConstantExpr::getBitCast(RTTI, Int8PtrTy); 597 Init = llvm::ConstantExpr::getNullValue(Int8PtrTy); 610 PureVirtualFn = llvm::ConstantExpr::getBitCast(PureVirtualFn, 621 DeletedVirtualFn = llvm::ConstantExpr::getBitCast(DeletedVirtualFn [all...] |
/external/llvm/include/llvm/Transforms/Utils/ |
Local.h | 39 class ConstantExpr; 187 /// EmitGEPOffset - Given a getelementptr instruction/constantexpr, emit the 231 Constant *OC = ConstantExpr::getIntegerCast(OpC, IntPtrTy, true /*SExt*/); 232 Scale = ConstantExpr::getMul(OC, Scale, isInBounds/*NUW*/);
|
/external/llvm/lib/Transforms/InstCombine/ |
InstCombineCompares.cpp | 44 return cast<ConstantInt>(ConstantExpr::getExtractElement(V, Idx)); 62 Result = ConstantExpr::getAdd(In1, In2); 97 Result = ConstantExpr::getSub(In1, In2); 308 Elt = ConstantExpr::getExtractValue(Elt, LaterIndices); 311 if (AndCst) Elt = ConstantExpr::getAnd(Elt, AndCst); 722 if (GEPsInBounds && (isa<ConstantExpr>(GEPLHS) || GEPLHS->hasOneUse()) && 723 (isa<ConstantExpr>(GEPRHS) || GEPRHS->hasOneUse())) { [all...] |