/external/llvm/include/llvm/Support/ |
H A D | GetElementPtrTypeIterator.h | 85 inline gep_type_iterator gep_type_begin(const User *GEP) { argument 87 (GEP->getOperand(0)->getType()->getScalarType(), GEP->op_begin()+1); 89 inline gep_type_iterator gep_type_end(const User *GEP) { argument 90 return gep_type_iterator::end(GEP->op_end()); 92 inline gep_type_iterator gep_type_begin(const User &GEP) { argument 94 (GEP.getOperand(0)->getType()->getScalarType(), GEP.op_begin()+1); 96 inline gep_type_iterator gep_type_end(const User &GEP) { argument 97 return gep_type_iterator::end(GEP [all...] |
/external/llvm/include/llvm/Transforms/Utils/ |
H A D | Local.h | 187 Value *EmitGEPOffset(IRBuilderTy *Builder, const DataLayout &TD, User *GEP, argument 189 GEPOperator *GEPOp = cast<GEPOperator>(GEP); 190 Type *IntPtrTy = TD.getIntPtrType(GEP->getType()); 193 // If the GEP is inbounds, we know that none of the addressing operations will 201 gep_type_iterator GTI = gep_type_begin(GEP); 202 for (User::op_iterator i = GEP->op_begin() + 1, e = GEP->op_end(); i != e; 215 GEP->getName()+".offs"); 223 Result = Builder->CreateAdd(Result, Scale, GEP->getName()+".offs"); 232 GEP [all...] |
/external/llvm/lib/Target/NVPTX/ |
H A D | NVVMReflect.cpp | 162 const ConstantExpr *GEP = cast<ConstantExpr>(str); local 164 const Value *Sym = GEP->getOperand(0);
|
/external/llvm/unittests/Transforms/Utils/ |
H A D | Cloning.cpp | 132 GetElementPtrInst *GEP = GetElementPtrInst::Create(V, ops); local 133 EXPECT_FALSE(this->clone(GEP)->isInBounds()); 135 GEP->setIsInBounds(); 136 EXPECT_TRUE(this->clone(GEP)->isInBounds());
|
/external/llvm/lib/Transforms/Scalar/ |
H A D | GlobalMerge.cpp | 185 Constant *GEP = ConstantExpr::getInBoundsGetElementPtr(MergedGV, Idx); local 186 Globals[k]->replaceAllUsesWith(GEP);
|
H A D | MemCpyOptimizer.cpp | 41 static int64_t GetOffsetFromIndex(const GEPOperator *GEP, unsigned Idx, argument 44 gep_type_iterator GTI = gep_type_begin(GEP); 50 for (unsigned i = Idx, e = GEP->getNumOperands(); i != e; ++i, ++GTI) { 51 ConstantInt *OpC = dyn_cast<ConstantInt>(GEP->getOperand(i)); 83 // If one pointer is a GEP and the other isn't, then see if the GEP is a 103 // Skip any common indices and track the GEP types.
|
/external/chromium_org/third_party/mesa/src/src/gallium/drivers/radeon/ |
H A D | R600KernelParameters.cpp | 159 getElementPtrInst* GEP = dyn_cast<getElementPtrInst>(Val); 160 getElementPtrInst::op_iterator I = GEP->op_begin(); 162 for (++I; I != GEP->op_end(); ++I) { 247 GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(V); local 257 if (GEP && GEP->getType()->getAddressSpace() != Addrspace) { 258 Value *Op = GEP->getPointerOperand(); 266 std::vector<Value*> Params(GEP->idx_begin(), GEP->idx_end()); 270 GEP2->setIsInBounds(GEP [all...] |
/external/llvm/lib/Transforms/InstCombine/ |
H A D | InstCombineLoadStoreAlloca.cpp | 69 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(U)) { 70 // If the GEP has all zero indices, it doesn't offset the pointer. If it 73 GEP, TheCopy, ToDelete, IsOffset || !GEP->hasAllZeroIndices())) 187 Instruction *GEP = local 189 InsertNewInstBefore(GEP, *It); 193 return ReplaceInstUsesWith(AI, GEP); 522 // emit a GEP to index into its first field. 590 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Ptr)) { 591 if (isa<AllocaInst>(GEP [all...] |
H A D | InstCombinePHI.cpp | 135 // This is true if all GEP bases are allocas and if all indices into them are 148 GetElementPtrInst *GEP= dyn_cast<GetElementPtrInst>(PN.getIncomingValue(i)); local 149 if (!GEP || !GEP->hasOneUse() || GEP->getType() != FirstInst->getType() || 150 GEP->getNumOperands() != FirstInst->getNumOperands()) 153 AllInBounds &= GEP->isInBounds(); 157 (!isa<AllocaInst>(GEP->getOperand(0)) || 158 !GEP->hasAllConstantIndices())) 163 if (FirstInst->getOperand(op) == GEP [all...] |
H A D | InstCombineVectorOps.cpp | 640 GetElementPtrInst *GEP = GetElementPtrInst::Create(Ptr, Idx, "", I); local 641 GEP->setIsInBounds(cast<GetElementPtrInst>(I)->isInBounds()); 642 return GEP;
|
H A D | InstCombineCompares.cpp | 227 FoldCmpLoadFromIndexedGlobal(GetElementPtrInst *GEP, GlobalVariable *GV, argument 230 if (!GEP->isInBounds() && TD == 0) return 0; 242 // Require: GEP GV, 0, i {{, constant indices}} 243 if (GEP->getNumOperands() < 3 || 244 !isa<ConstantInt>(GEP->getOperand(1)) || 245 !cast<ConstantInt>(GEP->getOperand(1))->isZero() || 246 isa<Constant>(GEP->getOperand(2))) 255 for (unsigned i = 3, e = GEP->getNumOperands(); i != e; ++i) { 256 ConstantInt *Idx = dyn_cast<ConstantInt>(GEP->getOperand(i)); 391 Value *Idx = GEP 510 EvaluateGEPOffsetExpression(User *GEP, InstCombiner &IC) argument [all...] |
H A D | InstructionCombining.cpp | 96 Value *InstCombiner::EmitGEPOffset(User *GEP) { argument 97 return llvm::EmitGEPOffset(Builder, *getDataLayout(), GEP); 759 /// or not there is a sequence of GEP indices into the type that will land us at 819 static bool shouldMergeGEPs(GEPOperator &GEP, GEPOperator &Src) { argument 820 // If this GEP has only 0 indices, it is the same pointer as 821 // Src. If Src is not a trivial GEP too, don't combine 823 if (GEP.hasAllZeroIndices() && !Src.hasAllZeroIndices() && 1067 Instruction *InstCombiner::visitGetElementPtrInst(GetElementPtrInst &GEP) { argument 1068 SmallVector<Value*, 8> Ops(GEP.op_begin(), GEP 1788 Value *GEP = Builder->CreateInBoundsGEP(L->getPointerOperand(), Indices); local [all...] |
/external/mesa3d/src/gallium/drivers/radeon/ |
H A D | R600KernelParameters.cpp | 159 getElementPtrInst* GEP = dyn_cast<getElementPtrInst>(Val); 160 getElementPtrInst::op_iterator I = GEP->op_begin(); 162 for (++I; I != GEP->op_end(); ++I) { 247 GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(V); local 257 if (GEP && GEP->getType()->getAddressSpace() != Addrspace) { 258 Value *Op = GEP->getPointerOperand(); 266 std::vector<Value*> Params(GEP->idx_begin(), GEP->idx_end()); 270 GEP2->setIsInBounds(GEP [all...] |
/external/llvm/lib/Analysis/ |
H A D | MemoryBuiltins.cpp | 407 if (GEPOperator *GEP = dyn_cast<GEPOperator>(V)) 408 return visitGEPOperator(*GEP); 526 SizeOffsetType ObjectSizeOffsetVisitor::visitGEPOperator(GEPOperator &GEP) { argument 527 SizeOffsetType PtrData = compute(GEP.getPointerOperand()); 529 if (!bothKnown(PtrData) || !GEP.accumulateConstantOffset(*TD, Offset)) 635 if (GEPOperator *GEP = dyn_cast<GEPOperator>(V)) { 636 Result = visitGEPOperator(*GEP); 715 ObjectSizeOffsetEvaluator::visitGEPOperator(GEPOperator &GEP) { argument 716 SizeOffsetEvalType PtrData = compute_(GEP.getPointerOperand()); 720 Value *Offset = EmitGEPOffset(&Builder, *TD, &GEP, /*NoAssumption [all...] |
H A D | ValueTracking.cpp | 900 /// \brief Test whether a GEP's result is known to be non-null. 902 /// Uses properties inherent in a GEP to try to determine whether it is known 906 static bool isGEPKnownNonNull(GEPOperator *GEP, const DataLayout *DL, argument 908 if (!GEP->isInBounds() || GEP->getPointerAddressSpace() != 0) 912 assert(GEP->getType()->isPointerTy() && "We only support plain pointer GEP"); 915 // inbounds GEP in address space zero. 916 if (isKnownNonZero(GEP->getPointerOperand(), DL, Depth)) 923 // Walk the GEP operand [all...] |
H A D | ScalarEvolutionExpander.cpp | 336 /// into GEP indices. 369 /// a GEP instead of using ptrtoint+arithmetic+inttoptr. This helps 410 // operands into GEP indices, at each level. The first index in a GEP 512 // If none of the operands were convertible to proper GEP indices, cast 526 // Fold a GEP with constant operands. 531 // Do a quick scan to see if we have this GEP nearby. If so, reuse it. 564 // Emit a GEP. 565 Value *GEP = Builder.CreateGEP(V, Idx, "uglygep"); local 566 rememberInstruction(GEP); 606 Value *GEP = Builder.CreateGEP(Casted, local [all...] |
/external/llvm/lib/Transforms/IPO/ |
H A D | ArgumentPromotion.cpp | 73 /// A vector used to hold the indices of a single GEP instruction 311 // We can only promote this argument if all of the uses are loads, or are GEP 345 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(V)) { 346 V = GEP->getPointerOperand(); 349 Indices.reserve(GEP->getNumIndices()); 350 for (User::op_iterator II = GEP->idx_begin(), IE = GEP->idx_end(); 355 // We found a non-constant GEP index for this argument? Bail out 364 // Direct loads are equivalent to a GEP with a single 0 index. 370 // not (GEP 832 GetElementPtrInst *GEP = cast<GetElementPtrInst>(I->use_back()); local [all...] |
/external/llvm/lib/Transforms/Utils/ |
H A D | CodeExtractor.cpp | 366 GetElementPtrInst *GEP = local 368 RewriteVal = new LoadInst(GEP, "loadgep_" + inputs[i]->getName(), TI); 468 GetElementPtrInst *GEP = local 471 codeReplacer->getInstList().push_back(GEP); 472 StoreInst *SI = new StoreInst(StructValues[i], GEP); 494 GetElementPtrInst *GEP local 497 codeReplacer->getInstList().push_back(GEP); 498 Output = GEP; 609 GetElementPtrInst *GEP = local 613 new StoreInst(outputs[out], GEP, NTRe [all...] |
/external/llvm/tools/bugpoint/ |
H A D | Miscompilation.cpp | 871 Value *GEP = ConstantExpr::getGetElementPtr(funcName, GEPargs); local 873 ResolverArgs.push_back(GEP);
|
/external/llvm/lib/Analysis/IPA/ |
H A D | InlineCost.cpp | 101 bool isGEPOffsetConstant(GetElementPtrInst &GEP); 102 bool accumulateGEPOffset(GEPOperator &GEP, APInt &Offset); 234 /// \brief Check whether a GEP's indices are all constant. 237 bool CallAnalyzer::isGEPOffsetConstant(GetElementPtrInst &GEP) { argument 238 for (User::op_iterator I = GEP.idx_begin(), E = GEP.idx_end(); I != E; ++I) 245 /// \brief Accumulate a constant GEP offset into an APInt if possible. 249 bool CallAnalyzer::accumulateGEPOffset(GEPOperator &GEP, APInt &Offset) { argument 256 for (gep_type_iterator GTI = gep_type_begin(GEP), GTE = gep_type_end(GEP); [all...] |
/external/llvm/lib/Transforms/Instrumentation/ |
H A D | GCOVProfiling.cpp | 816 Value *GEP = Builder.CreateGEP(Arg, ZExtPred); local 817 Value *Counter = Builder.CreateLoad(GEP, "counter");
|
/external/clang/lib/CodeGen/ |
H A D | CGExprCXX.cpp | 1595 // We might be deleting a pointer to array. If so, GEP down to the 1601 SmallVector<llvm::Value*,8> GEP; local 1603 GEP.push_back(Zero); // point at the outermost array 1611 // 2. GEP to the first element of the array. 1612 GEP.push_back(Zero); 1615 Ptr = Builder.CreateInBoundsGEP(Ptr, GEP, "del.first");
|
/external/llvm/lib/IR/ |
H A D | Constants.cpp | 670 /// getElementValue - Return a zero of the right value for the specified GEP 678 /// getElementValue - Return a zero of the right value for the specified GEP 703 /// getElementValue - Return an undef of the right value for the specified GEP 711 /// getElementValue - Return an undef of the right value for the specified GEP 1746 Constant *GEP = getGetElementPtr( local 1748 return getPtrToInt(GEP, 1761 Constant *GEP = getGetElementPtr(NullPtr, Indices); local 1762 return getPtrToInt(GEP, 1778 Constant *GEP = getGetElementPtr( local 1780 return getPtrToInt(GEP, [all...] |
H A D | Verifier.cpp | 292 void visitGetElementPtrInst(GetElementPtrInst &GEP); 1688 void Verifier::visitGetElementPtrInst(GetElementPtrInst &GEP) { argument 1689 Type *TargetTy = GEP.getPointerOperandType()->getScalarType(); 1692 "GEP base pointer is not a vector or a vector of pointers", &GEP); local 1694 "GEP into unsized type!", &GEP); 1695 Assert1(GEP.getPointerOperandType()->isVectorTy() == 1696 GEP.getType()->isVectorTy(), "Vector GEP mus [all...] |
/external/llvm/include/llvm/IR/ |
H A D | Instructions.h | 749 GetElementPtrInst *GEP = Create(Ptr, IdxList, NameStr, InsertBefore); local 750 GEP->setIsInBounds(true); 751 return GEP; 757 GetElementPtrInst *GEP = Create(Ptr, IdxList, NameStr, InsertAtEnd); local 758 GEP->setIsInBounds(true); 759 return GEP; 813 /// GetGEPReturnType - Returns the pointer type returned by the GEP 819 // Vector GEP 825 // Scalar GEP 837 /// hasAllZeroIndices - Return true if all of the indices of this GEP ar [all...] |