HomeSort by relevance Sort by last modified time
    Searched refs:ConstantExpr (Results 1 - 25 of 124) sorted by null

1 2 3 4 5

  /external/llvm/unittests/IR/
ConstantsTest.cpp 31 EXPECT_EQ(Zero, ConstantExpr::getAdd(One, One));
35 EXPECT_EQ(Zero, ConstantExpr::getAdd(NegOne, One));
39 EXPECT_EQ(Zero, ConstantExpr::getAdd(NegOne, NegOne));
43 EXPECT_EQ(Zero, ConstantExpr::getSub(NegOne, One));
47 EXPECT_EQ(Zero, ConstantExpr::getSub(One, NegOne));
51 EXPECT_EQ(Zero, ConstantExpr::getSub(One, One));
55 EXPECT_EQ(Undef, ConstantExpr::getShl(One, One));
59 EXPECT_EQ(One, ConstantExpr::getShl(One, Zero));
63 EXPECT_EQ(Undef, ConstantExpr::getLShr(One, One));
67 EXPECT_EQ(Undef, ConstantExpr::getAShr(One, One))
    [all...]
  /external/llvm/include/llvm/Support/
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...]
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...]
NoFolder.h 14 // creation and folding, use ConstantExpr and the routines in
182 return ConstantExpr::getGetElementPtr(C, IdxList);
188 return ConstantExpr::getGetElementPtr(C, Idx);
197 return ConstantExpr::getInBoundsGetElementPtr(C, IdxList);
203 return ConstantExpr::getInBoundsGetElementPtr(C, Idx);
  /external/llvm/include/llvm/IR/
Operator.h 29 class ConstantExpr;
49 /// getOpcode - Return the opcode for this Instruction or ConstantExpr.
54 return cast<ConstantExpr>(this)->getOpcode();
57 /// getOpcode - If V is an Instruction or ConstantExpr, return its
63 if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(V))
69 static inline bool classof(const ConstantExpr *) { return true; }
71 return isa<Instruction>(V) || isa<ConstantExpr>(V);
88 friend class ConstantExpr;
117 static inline bool classof(const ConstantExpr *CE)
    [all...]
  /external/llvm/lib/IR/
IntrinsicInst.cpp 35 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(C))
ConstantFold.cpp 12 // ConstantExpr::get* methods to automatically fold constants when possible.
62 ConstantExpr::getExtractElement(CV, ConstantInt::get(Ty, i));
63 C = ConstantExpr::getBitCast(C, DstEltTy);
77 ConstantExpr *Op, ///< the first cast constant expression
133 return ConstantExpr::getInBoundsGetElementPtr(V, IdxList);
155 return ConstantExpr::getBitCast(ConstantVector::get(V), DestPTy);
218 ConstantExpr *CE = dyn_cast<ConstantExpr>(C);
236 return ConstantExpr::getOr(LHS, RHS);
250 return ConstantExpr::getAnd(LHS, RHS)
    [all...]
Constants.cpp 154 C = ConstantExpr::getIntToPtr(C, PTy);
181 /// not. This can return null if the element index is a ConstantExpr, or if
241 SmallPtrSet<const ConstantExpr *, 4> &NonTrappingOps) {
244 const ConstantExpr *CE = dyn_cast<ConstantExpr>(C);
248 // ConstantExpr traps if any operands can trap.
250 if (ConstantExpr *Op = dyn_cast<ConstantExpr>(CE->getOperand(i))) {
276 SmallPtrSet<const ConstantExpr *, 4> NonTrappingOps;
351 if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(this)
    [all...]
ConstantsContext.h 34 class UnaryConstantExpr : public ConstantExpr {
43 : ConstantExpr(Ty, Opcode, &Op<0>(), 1) {
51 class BinaryConstantExpr : public ConstantExpr {
61 : ConstantExpr(C1->getType(), Opcode, &Op<0>(), 2) {
72 class SelectConstantExpr : public ConstantExpr {
81 : ConstantExpr(C2->getType(), Instruction::Select, &Op<0>(), 3) {
93 class ExtractElementConstantExpr : public ConstantExpr {
102 : ConstantExpr(cast<VectorType>(C1->getType())->getElementType(),
114 class InsertElementConstantExpr : public ConstantExpr {
123 : ConstantExpr(C1->getType(), Instruction::InsertElement,
    [all...]
Core.cpp 747 return map_to_llvmopcode(unwrap<ConstantExpr>(ConstantVal)->getOpcode());
751 return wrap(ConstantExpr::getAlignOf(unwrap(Ty)));
755 return wrap(ConstantExpr::getSizeOf(unwrap(Ty)));
759 return wrap(ConstantExpr::getNeg(unwrap<Constant>(ConstantVal)));
763 return wrap(ConstantExpr::getNSWNeg(unwrap<Constant>(ConstantVal)));
767 return wrap(ConstantExpr::getNUWNeg(unwrap<Constant>(ConstantVal)));
772 return wrap(ConstantExpr::getFNeg(unwrap<Constant>(ConstantVal)));
776 return wrap(ConstantExpr::getNot(unwrap<Constant>(ConstantVal)));
780 return wrap(ConstantExpr::getAdd(unwrap<Constant>(LHSConstant),
786 return wrap(ConstantExpr::getNSWAdd(unwrap<Constant>(LHSConstant)
    [all...]
  /external/llvm/include/llvm/Analysis/
ConstantFolding.h 13 // Also, to supplement the basic VMCore ConstantExpr simplifications,
25 class ConstantExpr;
45 Constant *ConstantFoldConstantExpression(const ConstantExpr *CE,
81 /// getelementptr constantexpr, return the constant value being addressed by the
83 Constant *ConstantFoldLoadThroughGEPConstantExpr(Constant *C, ConstantExpr *CE);
  /external/llvm/lib/Analysis/
ConstantFolding.cpp 12 // Also, to supplement the basic IR ConstantExpr simplifications,
47 /// ConstantExpr if unfoldable.
60 return ConstantExpr::getBitCast(C, DestTy);
72 C = ConstantExpr::getBitCast(C, SrcIVTy);
77 return ConstantExpr::getBitCast(C, DestTy);
97 return ConstantExpr::getBitCast(C, DestTy);
108 return ConstantExpr::getBitCast(C, DestTy);
114 return ConstantExpr::getBitCast(C, DestTy);
138 return ConstantExpr::getBitCast(C, DestTy);
148 C = ConstantExpr::getBitCast(C, SrcIVTy)
    [all...]
  /external/llvm/include/llvm/Transforms/Utils/
Local.h 37 class ConstantExpr;
181 /// EmitGEPOffset - Given a getelementptr instruction/constantexpr, emit the
220 Constant *OC = ConstantExpr::getIntegerCast(OpC, IntPtrTy, true /*SExt*/);
221 Scale = ConstantExpr::getMul(OC, Scale, isInBounds/*NUW*/);
  /external/llvm/lib/Target/NVPTX/
NVVMReflect.cpp 160 assert(isa<ConstantExpr>(str) &&
162 const ConstantExpr *GEP = cast<ConstantExpr>(str);
NVPTXGenericToNVVM.cpp 57 Value *remapConstantExpr(Module *M, Function *F, ConstantExpr *C,
145 Constant *BitCastNewGV = ConstantExpr::getBitCast(NewGV, GV->getType());
236 } else if (isa<ConstantExpr>(C)) {
240 NewValue = remapConstantExpr(M, F, cast<ConstantExpr>(C), Builder);
286 Value *GenericToNVVM::remapConstantExpr(Module *M, Function *F, ConstantExpr *C,
360 assert(false && "GenericToNVVM encountered an unsupported ConstantExpr");
  /external/llvm/lib/Transforms/InstCombine/
InstCombineCompares.cpp 33 return ConstantExpr::getAdd(C, ConstantInt::get(C->getType(), 1));
37 return ConstantExpr::getSub(C, ConstantInt::get(C->getType(), 1));
41 return cast<ConstantInt>(ConstantExpr::getExtractElement(V, Idx));
59 Result = ConstantExpr::getAdd(In1, In2);
94 Result = ConstantExpr::getSub(In1, In2);
311 Elt = ConstantExpr::getExtractValue(Elt, LaterIndices);
314 if (AndCst) Elt = ConstantExpr::getAnd(Elt, AndCst);
728 (isa<ConstantExpr>(GEPLHS) || GEPLHS->hasOneUse()) &&
729 (isa<ConstantExpr>(GEPRHS) || GEPRHS->hasOneUse())) {
768 ConstantExpr::getSub(ConstantInt::getAllOnesValue(CI->getType()), CI)
    [all...]
InstCombineAddSub.cpp 850 return ConstantExpr::getAdd(C, ConstantInt::get(C->getType(), 1));
975 return BinaryOperator::CreateSub(ConstantExpr::getAdd(XorRHS, CI),
982 ConstantExpr::getXor(XorRHS, CI));
1028 return BinaryOperator::CreateMul(X, ConstantExpr::getAdd(C1, C2));
    [all...]
  /external/llvm/lib/Transforms/IPO/
GlobalOpt.cpp 198 if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(U)) {
201 // If the result of the constantexpr isn't pointer type, then we won't
431 } else if (ConstantExpr *CE = dyn_cast<ConstantExpr>(U)) {
489 } else if (ConstantExpr *CE = dyn_cast<ConstantExpr>(U)) {
510 if (!isa<ConstantExpr>(GEP->getOperand(0))) {
511 ConstantExpr *CE =
512 dyn_cast_or_null<ConstantExpr>(ConstantFoldInstruction(GEP, TD, TLI))
    [all...]
  /external/clang/lib/CodeGen/
CGCUDANV.cpp 102 llvm::ConstantExpr::getSizeOf(ArgTypes[I]),
105 llvm::ConstantExpr::getOffsetOf(ArgStackTy, I),
CGVTables.cpp 410 if (llvm::ConstantExpr *CE = dyn_cast<llvm::ConstantExpr>(Entry)) {
432 llvm::ConstantExpr::getBitCast(Entry, OldThunkFn->getType());
545 Init = llvm::ConstantExpr::getIntToPtr(Init, Int8PtrTy);
550 Init = llvm::ConstantExpr::getIntToPtr(Init, Int8PtrTy);
555 Init = llvm::ConstantExpr::getIntToPtr(Init, Int8PtrTy);
558 Init = llvm::ConstantExpr::getBitCast(RTTI, Int8PtrTy);
587 PureVirtualFn = llvm::ConstantExpr::getBitCast(PureVirtualFn,
598 DeletedVirtualFn = llvm::ConstantExpr::getBitCast(DeletedVirtualFn,
618 Init = llvm::ConstantExpr::getBitCast(Init, Int8PtrTy)
    [all...]
CGExprConstant.cpp 102 llvm::ConstantExpr::getInBoundsGetElementPtr(VTable, Indices);
920 return llvm::ConstantExpr::getBitCast(C, ConvertType(E->getType()));
    [all...]
CGObjCGNU.cpp 174 return llvm::ConstantExpr::getGetElementPtr(ConstStr, Zeros);
189 return llvm::ConstantExpr::getGetElementPtr(ConstStr, Zeros);
240 return llvm::ConstantExpr::getGetElementPtr(
    [all...]
  /external/llvm/lib/Transforms/Instrumentation/
ProfilingUtils.cpp 54 Args[2] = ConstantExpr::getGetElementPtr(Array, GEPIndices);
122 ConstantExpr::getGetElementPtr(CounterArray, Indices);
145 ConstantExpr::getBitCast(Callee, GlobalDtorElems[1])
  /external/llvm/examples/BrainF/
BrainF.cpp 85 Constant* allocsize = ConstantExpr::getSizeOf(Int8Ty);
86 allocsize = ConstantExpr::getTruncOrBitCast(allocsize, IntPtrTy);
165 Constant *msgptr = ConstantExpr::
  /external/llvm/lib/Analysis/IPA/
InlineCost.cpp 370 if (Constant *C = ConstantExpr::getBitCast(COp, I.getType())) {
398 if (Constant *C = ConstantExpr::getPtrToInt(COp, I.getType())) {
434 if (Constant *C = ConstantExpr::getIntToPtr(COp, I.getType())) {
464 if (Constant *C = ConstantExpr::getCast(I.getOpcode(), COp, I.getType())) {
504 if (Constant *C = ConstantExpr::getCompare(I.getPredicate(), CLHS, CRHS)) {
525 if (Constant *C = ConstantExpr::getICmp(I.getPredicate(), CLHS, CRHS)) {
575 if (Constant *C = ConstantExpr::getSub(CLHS, CRHS)) {
645 SimplifiedValues[&I] = ConstantExpr::getExtractValue(C, I.getIndices());
662 SimplifiedValues[&I] = ConstantExpr::getInsertValue(AggC, InsertedC,
    [all...]

Completed in 328 milliseconds

1 2 3 4 5