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

1 2

  /external/llvm/include/llvm/Support/
GetElementPtrTypeIterator.h 85 inline gep_type_iterator gep_type_begin(const User *GEP) {
87 (GEP->getOperand(0)->getType()->getScalarType(), GEP->op_begin()+1);
89 inline gep_type_iterator gep_type_end(const User *GEP) {
90 return gep_type_iterator::end(GEP->op_end());
92 inline gep_type_iterator gep_type_begin(const User &GEP) {
94 (GEP.getOperand(0)->getType()->getScalarType(), GEP.op_begin()+1);
96 inline gep_type_iterator gep_type_end(const User &GEP) {
97 return gep_type_iterator::end(GEP.op_end())
    [all...]
  /external/llvm/include/llvm/Transforms/Utils/
Local.h 187 Value *EmitGEPOffset(IRBuilderTy *Builder, const DataLayout &TD, User *GEP,
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->getName()+".idx", isInBounds /*NUW*/)
    [all...]
  /external/chromium_org/third_party/mesa/src/src/gallium/drivers/radeon/
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);
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->isInBounds())
    [all...]
  /external/mesa3d/src/gallium/drivers/radeon/
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);
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->isInBounds())
    [all...]
  /external/llvm/lib/Transforms/InstCombine/
InstructionCombining.cpp 96 Value *InstCombiner::EmitGEPOffset(User *GEP) {
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) {
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() &&
    [all...]
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));
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->getOperand(op)
    [all...]
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 =
189 InsertNewInstBefore(GEP, *It);
193 return ReplaceInstUsesWith(AI, GEP);
300 // see if a trivial 'gep P, 0, 0' will help matters. Only do this for
370 // load(gep null, ...) -> unreachable
462 /// NewGEPIndices - If SrcPTy is an aggregate type, we can emit a "noop gep"
    [all...]
InstCombineCompares.cpp 219 /// cmp pred (load (gep GV, ...)), cmpcst
222 /// we can optimize "icmp eq (load (gep "foo", 0, i)), 0" into "icmp eq i, 3".
227 FoldCmpLoadFromIndexedGlobal(GetElementPtrInst *GEP, GlobalVariable *GV,
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)
    [all...]
InstCombine.h 148 Instruction *FoldCmpLoadFromIndexedGlobal(GetElementPtrInst *GEP,
194 Instruction *visitGetElementPtrInst(GetElementPtrInst &GEP);
235 Value *EmitGEPOffset(User *GEP);
InstCombineCasts.cpp     [all...]
  /external/llvm/lib/Analysis/
PHITransAddr.cpp 217 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Inst)) {
220 for (unsigned i = 0, e = GEP->getNumOperands(); i != e; ++i) {
221 Value *GEPOp = PHITranslateSubExpr(GEP->getOperand(i), CurBB, PredBB, DT);
224 AnyChanged |= GEPOp != GEP->getOperand(i);
229 return GEP;
231 // Simplify the GEP to handle 'gep x, 0' -> x etc.
239 // Scan to see if we have this GEP available.
244 if (GEPI->getType() == GEP->getType() &&
400 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Inst))
    [all...]
MemoryBuiltins.cpp 407 if (GEPOperator *GEP = dyn_cast<GEPOperator>(V))
408 return visitGEPOperator(*GEP);
526 SizeOffsetType ObjectSizeOffsetVisitor::visitGEPOperator(GEPOperator &GEP) {
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) {
716 SizeOffsetEvalType PtrData = compute_(GEP.getPointerOperand());
720 Value *Offset = EmitGEPOffset(&Builder, *TD, &GEP, /*NoAssumptions=*/true)
    [all...]
ValueTracking.cpp     [all...]
  /external/llvm/lib/Transforms/IPO/
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+)loads, or any (GEP+)loads that are not safe to promote
    [all...]
GlobalOpt.cpp 270 // PHI nodes we can check just like select or GEP instructions, but we
369 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(I)) {
370 if (!GEP->hasAllConstantIndices())
505 } else if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(U)) {
506 // Do not transform "gepinst (gep constexpr (GV))" here, because forming
507 // "gepconstexpr (gep constexpr (GV))" will cause the two gep's to fold
510 if (!isa<ConstantExpr>(GEP->getOperand(0))) {
512 dyn_cast_or_null<ConstantExpr>(ConstantFoldInstruction(GEP, TD, TLI));
516 // If the initializer is an all-null value and we have an inbounds GEP,
    [all...]
  /external/llvm/lib/IR/
Value.cpp 351 if (GEPOperator *GEP = dyn_cast<GEPOperator>(V)) {
355 if (!GEP->hasAllZeroIndices())
359 if (!GEP->hasAllConstantIndices())
363 if (!GEP->isInBounds())
367 V = GEP->getPointerOperand();
423 if (const GEPOperator *GEP = dyn_cast<GEPOperator>(V)) {
425 if (!Visited.insert(GEP->getOperand(0)))
427 if (!isDereferenceablePointer(GEP->getOperand(0), Visited))
430 gep_type_iterator GTI = gep_type_begin(GEP);
431 for (User::const_op_iterator I = GEP->op_begin()+1
    [all...]
Verifier.cpp 292 void visitGetElementPtrInst(GetElementPtrInst &GEP);
    [all...]
  /external/llvm/unittests/Transforms/Utils/
Cloning.cpp 132 GetElementPtrInst *GEP = GetElementPtrInst::Create(V, ops);
133 EXPECT_FALSE(this->clone(GEP)->isInBounds());
135 GEP->setIsInBounds();
136 EXPECT_TRUE(this->clone(GEP)->isInBounds());
  /external/llvm/lib/Target/NVPTX/
NVVMReflect.cpp 162 const ConstantExpr *GEP = cast<ConstantExpr>(str);
164 const Value *Sym = GEP->getOperand(0);
NVPTXUtilities.cpp 329 // provide an option to ignore GEP indicies for find out the base address only
341 if (const GEPOperator *GEP = dyn_cast<GEPOperator>(V)) {
342 V = GEP->getPointerOperand()->stripPointerCasts();
351 // - ignore GEP indicies for find out the base address only, and
373 } else if (const GEPOperator *GEP = dyn_cast<GEPOperator>(V)) {
374 V = GEP->getPointerOperand()->stripPointerCasts();
  /external/llvm/lib/Analysis/IPA/
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) {
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) {
256 for (gep_type_iterator GTI = gep_type_begin(GEP), GTE = gep_type_end(GEP);
    [all...]
  /external/llvm/lib/Transforms/Utils/
CodeExtractor.cpp 366 GetElementPtrInst *GEP =
368 RewriteVal = new LoadInst(GEP, "loadgep_" + inputs[i]->getName(), TI);
468 GetElementPtrInst *GEP =
471 codeReplacer->getInstList().push_back(GEP);
472 StoreInst *SI = new StoreInst(StructValues[i], GEP);
494 GetElementPtrInst *GEP
497 codeReplacer->getInstList().push_back(GEP);
498 Output = GEP;
609 GetElementPtrInst *GEP =
613 new StoreInst(outputs[out], GEP, NTRet)
    [all...]
  /external/llvm/include/llvm/Analysis/
MemoryBuiltins.h 195 SizeOffsetType visitGEPOperator(GEPOperator &GEP);
258 SizeOffsetEvalType visitGEPOperator(GEPOperator &GEP);
  /external/llvm/lib/CodeGen/
StackProtector.cpp 194 } else if (const GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(U)) {
195 if (HasAddressTaken(GEP))
  /external/llvm/lib/Transforms/Scalar/
GlobalMerge.cpp 185 Constant *GEP = ConstantExpr::getInBoundsGetElementPtr(MergedGV, Idx);
186 Globals[k]->replaceAllUsesWith(GEP);

Completed in 523 milliseconds

1 2