Searched defs:GEP (Results 1 - 25 of 63) sorted by relevance

123

/external/llvm/include/llvm/Transforms/Utils/
H A DLocal.h188 Value *EmitGEPOffset(IRBuilderTy *Builder, const DataLayout &DL, User *GEP, argument
190 GEPOperator *GEPOp = cast<GEPOperator>(GEP);
191 Type *IntPtrTy = DL.getIntPtrType(GEP->getType());
194 // If the GEP is inbounds, we know that none of the addressing operations will
202 gep_type_iterator GTI = gep_type_begin(GEP);
203 for (User::op_iterator i = GEP->op_begin() + 1, e = GEP->op_end(); i != e;
221 GEP->getName()+".offs");
229 Result = Builder->CreateAdd(Result, Scale, GEP->getName()+".offs");
238 GEP
[all...]
/external/llvm/lib/Target/NVPTX/
H A DNVVMReflect.cpp177 const ConstantExpr *GEP = cast<ConstantExpr>(Str); local
179 const Value *Sym = GEP->getOperand(0);
H A DNVPTXFavorNonGenericAddrSpaces.cpp17 // optimization also recursively traces into a GEP's pointer operand and a
28 // First, function hoistAddrSpaceCastFrom reorders the addrspacecast, the GEP,
94 /// Recursively traces into a GEP's pointer operand or a bitcast's source to
109 Value *hoistAddrSpaceCastFromGEP(GEPOperator *GEP, int Depth);
149 GEPOperator *GEP, int Depth) {
151 hoistAddrSpaceCastFrom(GEP->getPointerOperand(), Depth + 1);
159 SmallVector<Value *, 8> Indices(GEP->idx_begin(), GEP->idx_end());
161 if (Instruction *GEPI = dyn_cast<Instruction>(GEP)) {
162 // GEP
148 hoistAddrSpaceCastFromGEP( GEPOperator *GEP, int Depth) argument
[all...]
H A DNVPTXInferAddressSpaces.cpp317 GetElementPtrInst *GEP = cast<GetElementPtrInst>(I); local
319 GEP->getSourceElementType(), NewPointerOperands[0],
320 SmallVector<Value *, 4>(GEP->idx_begin(), GEP->idx_end()));
321 NewGEP->setIsInBounds(GEP->isInBounds());
/external/swiftshader/third_party/LLVM/include/llvm/Support/
H A DGetElementPtrTypeIterator.h85 inline gep_type_iterator gep_type_begin(const User *GEP) { argument
86 return gep_type_iterator::begin(GEP->getOperand(0)->getType(),
87 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
93 return gep_type_iterator::begin(GEP.getOperand(0)->getType(),
94 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/swiftshader/third_party/LLVM/unittests/Transforms/Utils/
H A DCloning.cpp127 GetElementPtrInst *GEP = GetElementPtrInst::Create(V, ops); local
128 EXPECT_FALSE(this->clone(GEP)->isInBounds());
130 GEP->setIsInBounds();
131 EXPECT_TRUE(this->clone(GEP)->isInBounds());
/external/llvm/include/llvm/IR/
H A DGetElementPtrTypeIterator.h97 inline gep_type_iterator gep_type_begin(const User *GEP) { argument
98 auto *GEPOp = cast<GEPOperator>(GEP);
103 GEP->op_begin() + 1);
105 inline gep_type_iterator gep_type_end(const User *GEP) { argument
106 return gep_type_iterator::end(GEP->op_end());
108 inline gep_type_iterator gep_type_begin(const User &GEP) { argument
109 auto &GEPOp = cast<GEPOperator>(GEP);
114 GEP.op_begin() + 1);
116 inline gep_type_iterator gep_type_end(const User &GEP) { argument
117 return gep_type_iterator::end(GEP
[all...]
/external/swiftshader/third_party/LLVM/lib/Target/ARM/
H A DARMGlobalMerge.cpp153 Constant *GEP = ConstantExpr::getInBoundsGetElementPtr(MergedGV, Idx); local
154 Globals[k]->replaceAllUsesWith(GEP);
/external/llvm/lib/Target/AMDGPU/
H A DAMDGPUTargetTransformInfo.cpp44 const GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(&I); local
45 if (!GEP || GEP->getAddressSpace() != AMDGPUAS::PRIVATE_ADDRESS)
48 const Value *Ptr = GEP->getPointerOperand();
/external/llvm/lib/Transforms/Scalar/
H A DNaryReassociate.cpp131 // Reassociate GEP for better CSE.
132 Instruction *tryReassociateGEP(GetElementPtrInst *GEP);
133 // Try splitting GEP at the I-th index and see whether either part can be
136 // \p IndexedType The element type indexed by GEP's I-th index. This is
138 // GEP->getIndexedType(GEP->getPointerOperand(), 0-th index,
140 GetElementPtrInst *tryReassociateGEPAtIndex(GetElementPtrInst *GEP,
142 // Given GEP's I-th index = LHS + RHS, see whether &Base[..][LHS][..] or
143 // &Base[..][RHS][..] can be CSE'ed and rewrite GEP accordingly.
144 GetElementPtrInst *tryReassociateGEPAtIndex(GetElementPtrInst *GEP,
302 isGEPFoldable(GetElementPtrInst *GEP, const TargetTransformInfo *TTI) argument
311 tryReassociateGEP(GetElementPtrInst *GEP) argument
327 requiresSignExtension(Value *Index, GetElementPtrInst *GEP) argument
335 tryReassociateGEPAtIndex(GetElementPtrInst *GEP, unsigned I, Type *IndexedType) argument
369 tryReassociateGEPAtIndex( GetElementPtrInst *GEP, unsigned I, Value *LHS, Value *RHS, Type *IndexedType) argument
[all...]
H A DStraightLineStrengthReduce.cpp88 GEP, // &B[..][i * S][..] enumerator in enum:__anon14774::StraightLineStrengthReduce::Candidate::Kind
100 // Note that Index and Stride of a GEP candidate do not necessarily have the
173 void allocateCandidatesAndFindBasisForGEP(GetElementPtrInst *GEP);
190 GetElementPtrInst *GEP);
192 // GEP and the bump is not divisible by the element size of the GEP, this
194 // basis using an ugly GEP.
237 static bool isGEPFoldable(GetElementPtrInst *GEP, argument
240 for (auto I = GEP->idx_begin(); I != GEP
266 hasOnlyOneNonZeroIndex(GetElementPtrInst *GEP) argument
447 factorArrayIndex(Value *ArrayIdx, const SCEV *Base, uint64_t ElementSize, GetElementPtrInst *GEP) argument
482 allocateCandidatesAndFindBasisForGEP( GetElementPtrInst *GEP) argument
[all...]
H A DSeparateConstOffsetFromGEP.cpp35 // each GEP, wasting tons of registers. It emits the following PTX for the
51 // It works by splitting each GEP into a variadic base and a constant offset.
82 // Another improvement enabled by the LowerGEP flag is to lower a GEP with
103 // lower a GEP with multiple indices into arithmetic operations:
125 // If the target uses alias analysis in codegen, this pass will lower a GEP
149 // LICM (Loop Invariant Code Motion) can not hoist/sink a GEP of multiple
150 // indices if one of the index is variant. If we lower such GEP into invariant
153 // target's addressing modes. A GEP with multiple indices may not match and will
154 // not be sunk. If we lower such GEP into smaller parts, CGP may sink some of
186 cl::desc("Do not separate the constant offset from a GEP instructio
690 Extract(Value *Idx, GetElementPtrInst *GEP, User *&UserChainTail, const DominatorTree *DT) argument
708 Find(Value *Idx, GetElementPtrInst *GEP, const DominatorTree *DT) argument
717 canonicalizeArrayIndicesToPointerSize( GetElementPtrInst *GEP) argument
736 accumulateByteOffset(GetElementPtrInst *GEP, bool &NeedsExtraction) argument
885 splitGEP(GetElementPtrInst *GEP) argument
[all...]
/external/llvm/unittests/Linker/
H A DLinkModulesTest.cpp86 Value *GEP = Builder.CreateGEP(AT, GV, GEPIndices, "switch.gep"); local
87 Value *Load = Builder.CreateLoad(GEP, "switch.load");
/external/swiftshader/third_party/LLVM/lib/Transforms/InstCombine/
H A DInstCombineLoadStoreAlloca.cpp60 Instruction *GEP = local
62 InsertNewInstBefore(GEP, *It);
66 return ReplaceInstUsesWith(AI, GEP);
329 // emit a GEP to index into its first field.
397 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Ptr)) {
398 if (isa<AllocaInst>(GEP->getOperand(0))) {
399 if (GEP->getOperand(0)->hasOneUse())
H A DInstCombineAddSub.cpp401 Value *InstCombiner::EmitGEPOffset(User *GEP) { argument
403 gep_type_iterator GTI = gep_type_begin(GEP);
404 Type *IntPtrTy = TD.getIntPtrType(GEP->getContext());
407 // If the GEP is inbounds, we know that none of the addressing operations will
409 bool isInBounds = cast<GEPOperator>(GEP)->isInBounds();
415 for (User::op_iterator i = GEP->op_begin() + 1, e = GEP->op_end(); i != e;
428 GEP->getName()+".offs");
437 Result = Builder->CreateAdd(Result, Scale, GEP->getName()+".offs");
446 GEP
469 GetElementPtrInst *GEP = 0; local
[all...]
/external/llvm/lib/Analysis/
H A DVectorUtils.cpp98 /// \brief Find the operand of the GEP that should be checked for consecutive
112 // If it's a type with the same allocation size as the result of the GEP we
122 /// \brief If the argument is a GEP, then returns the operand identified by
126 GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Ptr); local
127 if (!GEP)
130 unsigned InductionOperand = getGEPInductionOperand(GEP);
134 for (unsigned i = 0, e = GEP->getNumOperands(); i != e; ++i)
136 !SE->isLoopInvariant(SE->getSCEV(GEP->getOperand(i)), Lp))
138 return GEP->getOperand(InductionOperand);
H A DMemoryBuiltins.cpp425 if (GEPOperator *GEP = dyn_cast<GEPOperator>(V))
426 return visitGEPOperator(*GEP);
568 SizeOffsetType ObjectSizeOffsetVisitor::visitGEPOperator(GEPOperator &GEP) { argument
569 SizeOffsetType PtrData = compute(GEP.getPointerOperand());
571 if (!bothKnown(PtrData) || !GEP.accumulateConstantOffset(DL, Offset))
703 } else if (GEPOperator *GEP = dyn_cast<GEPOperator>(V)) {
704 Result = visitGEPOperator(*GEP);
780 ObjectSizeOffsetEvaluator::visitGEPOperator(GEPOperator &GEP) { argument
781 SizeOffsetEvalType PtrData = compute_(GEP.getPointerOperand());
785 Value *Offset = EmitGEPOffset(&Builder, DL, &GEP, /*NoAssumption
[all...]
/external/llvm/lib/CodeGen/
H A DGlobalMerge.cpp462 Constant *GEP = local
464 Globals[k]->replaceAllUsesWith(GEP);
473 GlobalAlias::create(Tys[idx], AddrSpace, Linkage, Name, GEP, &M);
/external/llvm/unittests/Transforms/Utils/
H A DCloning.cpp136 GetElementPtrInst *GEP = local
138 EXPECT_FALSE(this->clone(GEP)->isInBounds());
140 GEP->setIsInBounds();
141 EXPECT_TRUE(this->clone(GEP)->isInBounds());
/external/llvm/lib/Transforms/IPO/
H A DArgumentPromotion.cpp92 /// A vector used to hold the indices of a single GEP instruction
466 // We can only promote this argument if all of the uses are loads, or are GEP
502 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(V)) {
503 V = GEP->getPointerOperand();
506 Indices.reserve(GEP->getNumIndices());
507 for (User::op_iterator II = GEP->idx_begin(), IE = GEP->idx_end();
512 // We found a non-constant GEP index for this argument? Bail out
521 // Direct loads are equivalent to a GEP with a single 0 index.
527 // not (GEP
983 GetElementPtrInst *GEP = cast<GetElementPtrInst>(I->user_back()); local
[all...]
/external/llvm/lib/Transforms/InstCombine/
H A DInstCombineLoadStoreAlloca.cpp80 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(I)) {
81 // If the GEP has all zero indices, it doesn't offset the pointer. If it
84 std::make_pair(I, IsOffset || !GEP->hasAllZeroIndices()));
202 Instruction *GEP = local
204 IC.InsertNewInstBefore(GEP, *It);
208 return IC.replaceInstUsesWith(AI, GEP);
694 // Then we know that we can replace %x in the GEP with i64 0.
696 // FIXME: We could fold any GEP index to zero that would cause UB if it were
705 // Find the first non-zero index of a GEP. If all indices are zero, return
754 // FIXME: If the GEP i
[all...]
H A DInstCombinePHI.cpp126 // This is true if all GEP bases are allocas and if all indices into them are
139 GetElementPtrInst *GEP= dyn_cast<GetElementPtrInst>(PN.getIncomingValue(i)); local
140 if (!GEP || !GEP->hasOneUse() || GEP->getType() != FirstInst->getType() ||
141 GEP->getNumOperands() != FirstInst->getNumOperands())
144 AllInBounds &= GEP->isInBounds();
148 (!isa<AllocaInst>(GEP->getOperand(0)) ||
149 !GEP->hasAllConstantIndices()))
154 if (FirstInst->getOperand(op) == GEP
[all...]
/external/llvm/lib/Transforms/Utils/
H A DCodeExtractor.cpp357 GetElementPtrInst *GEP = GetElementPtrInst::Create( local
359 RewriteVal = new LoadInst(GEP, "loadgep_" + inputs[i]->getName(), TI);
457 GetElementPtrInst *GEP = GetElementPtrInst::Create( local
459 codeReplacer->getInstList().push_back(GEP);
460 StoreInst *SI = new StoreInst(StructValues[i], GEP);
482 GetElementPtrInst *GEP = GetElementPtrInst::Create( local
484 codeReplacer->getInstList().push_back(GEP);
485 Output = GEP;
598 GetElementPtrInst *GEP = GetElementPtrInst::Create( local
601 new StoreInst(outputs[out], GEP, NTRe
[all...]
/external/llvm/tools/bugpoint/
H A DMiscompilation.cpp842 Value *GEP = ConstantExpr::getGetElementPtr(InitArray->getType(), local
845 ResolverArgs.push_back(GEP);
/external/llvm/unittests/IR/
H A DConstantsTest.cpp313 Constant *GEP = ConstantExpr::getGetElementPtr( local
315 EXPECT_DEATH(Global->replaceAllUsesWith(GEP),
381 auto *GEP = ConstantExpr::getGetElementPtr(IntTy, Placeholder, C1); local
382 ASSERT_EQ(GEP->getOperand(0), Placeholder);
385 new GlobalVariable(*M, PtrTy, false, GlobalValue::ExternalLinkage, GEP);
386 ASSERT_EQ(GEP, Ref->getInitializer());
393 ASSERT_EQ(GEP, Ref->getInitializer());
394 ASSERT_EQ(GEP->getOperand(0), Alias);

Completed in 653 milliseconds

123