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

1 2

  /external/llvm/include/llvm/Support/
GetElementPtrTypeIterator.h 85 inline gep_type_iterator gep_type_begin(const User *GEP) {
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) {
90 return gep_type_iterator::end(GEP->op_end());
92 inline gep_type_iterator gep_type_begin(const User &GEP) {
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) {
97 return gep_type_iterator::end(GEP.op_end())
    [all...]
  /external/llvm/include/llvm/Transforms/Utils/
Local.h 178 Value *EmitGEPOffset(IRBuilderTy *Builder, const TargetData &TD, User *GEP,
180 gep_type_iterator GTI = gep_type_begin(GEP);
181 Type *IntPtrTy = TD.getIntPtrType(GEP->getContext());
184 // If the GEP is inbounds, we know that none of the addressing operations will
186 bool isInBounds = cast<GEPOperator>(GEP)->isInBounds() && !NoAssumptions;
192 for (User::op_iterator i = GEP->op_begin() + 1, e = GEP->op_end(); i != e;
205 GEP->getName()+".offs");
213 Result = Builder->CreateAdd(Result, Scale, GEP->getName()+".offs");
222 GEP->getName()+".idx", isInBounds /*NUW*/)
    [all...]
  /external/llvm/lib/Transforms/InstCombine/
InstructionCombining.cpp 90 Value *InstCombiner::EmitGEPOffset(User *GEP) {
91 return llvm::EmitGEPOffset(Builder, *getTargetData(), GEP);
738 /// or not there is a sequence of GEP indices into the type that will land us at
798 static bool shouldMergeGEPs(GEPOperator &GEP, GEPOperator &Src) {
799 // If this GEP has only 0 indices, it is the same pointer as
800 // Src. If Src is not a trivial GEP too, don't combine
802 if (GEP.hasAllZeroIndices() && !Src.hasAllZeroIndices() &&
808 Instruction *InstCombiner::visitGetElementPtrInst(GetElementPtrInst &GEP) {
809 SmallVector<Value*, 8> Ops(GEP.op_begin(), GEP.op_end())
    [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
72 if (!isOnlyCopiedFromConstantGlobal(GEP, TheCopy, ToDelete,
73 IsOffset || !GEP->hasAllZeroIndices()))
206 Instruction *GEP =
208 InsertNewInstBefore(GEP, *It);
212 return ReplaceInstUsesWith(AI, GEP);
311 // see if a trivial 'gep P, 0, 0' will help matters. Only do this for
381 // load(gep null, ...) -> unreachable
473 /// NewGEPIndices - If SrcPTy is an aggregate type, we can emit a "noop gep"
    [all...]
InstCombineCompares.cpp 194 /// cmp pred (load (gep GV, ...)), cmpcst
197 /// we can optimize "icmp eq (load (gep "foo", 0, i)), 0" into "icmp eq i, 3".
202 FoldCmpLoadFromIndexedGlobal(GetElementPtrInst *GEP, GlobalVariable *GV,
205 if (!GEP->isInBounds() && TD == 0) return 0;
217 // Require: GEP GV, 0, i {{, constant indices}}
218 if (GEP->getNumOperands() < 3 ||
219 !isa<ConstantInt>(GEP->getOperand(1)) ||
220 !cast<ConstantInt>(GEP->getOperand(1))->isZero() ||
221 isa<Constant>(GEP->getOperand(2)))
230 for (unsigned i = 3, e = GEP->getNumOperands(); i != e; ++i)
    [all...]
InstCombineCasts.cpp     [all...]
InstCombine.h 142 Instruction *FoldCmpLoadFromIndexedGlobal(GetElementPtrInst *GEP,
188 Instruction *visitGetElementPtrInst(GetElementPtrInst &GEP);
229 Value *EmitGEPOffset(User *GEP);
  /external/llvm/unittests/Transforms/Utils/
Cloning.cpp 129 GetElementPtrInst *GEP = GetElementPtrInst::Create(V, ops);
130 EXPECT_FALSE(this->clone(GEP)->isInBounds());
132 GEP->setIsInBounds();
133 EXPECT_TRUE(this->clone(GEP)->isInBounds());
  /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...]
Loads.cpp 62 if (GEPOperator *GEP = dyn_cast<GEPOperator>(V)) {
63 if (!GEP->hasAllConstantIndices())
65 SmallVector<Value*, 8> Indices(GEP->op_begin() + 1, GEP->op_end());
66 ByteOffset += TD->getIndexedOffset(GEP->getPointerOperandType(),
68 V = GEP->getPointerOperand();
MemoryBuiltins.cpp 394 if (GEPOperator *GEP = dyn_cast<GEPOperator>(V))
395 return visitGEPOperator(*GEP);
511 SizeOffsetType ObjectSizeOffsetVisitor::visitGEPOperator(GEPOperator &GEP) {
512 SizeOffsetType PtrData = compute(GEP.getPointerOperand());
513 if (!bothKnown(PtrData) || !GEP.hasAllConstantIndices())
516 SmallVector<Value*, 8> Ops(GEP.idx_begin(), GEP.idx_end());
517 APInt Offset(IntTyBits,TD->getIndexedOffset(GEP.getPointerOperandType(),Ops));
615 if (GEPOperator *GEP = dyn_cast<GEPOperator>(V)) {
616 Result = visitGEPOperator(*GEP);
    [all...]
CodeMetrics.cpp 61 // If a GEP has all constant indices, it will probably be folded with
63 if (const GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(I))
64 return GEP->hasAllConstantIndices();
InlineCost.cpp 93 bool isGEPOffsetConstant(GetElementPtrInst &GEP);
94 bool accumulateGEPOffset(GEPOperator &GEP, APInt &Offset);
222 /// \brief Check whether a GEP's indices are all constant.
225 bool CallAnalyzer::isGEPOffsetConstant(GetElementPtrInst &GEP) {
226 for (User::op_iterator I = GEP.idx_begin(), E = GEP.idx_end(); I != E; ++I)
233 /// \brief Accumulate a constant GEP offset into an APInt if possible.
237 bool CallAnalyzer::accumulateGEPOffset(GEPOperator &GEP, APInt &Offset) {
244 for (gep_type_iterator GTI = gep_type_begin(GEP), GTE = gep_type_end(GEP);
    [all...]
ValueTracking.cpp     [all...]
  /external/llvm/lib/VMCore/
Value.cpp 344 if (GEPOperator *GEP = dyn_cast<GEPOperator>(V)) {
347 if (!GEP->hasAllZeroIndices())
351 if (!GEP->hasAllConstantIndices())
355 if (!GEP->isInBounds())
359 V = GEP->getPointerOperand();
411 if (const GEPOperator *GEP = dyn_cast<GEPOperator>(V)) {
413 if (!Visited.insert(GEP->getOperand(0)))
415 if (!isDereferenceablePointer(GEP->getOperand(0), Visited))
418 gep_type_iterator GTI = gep_type_begin(GEP);
419 for (User::const_op_iterator I = GEP->op_begin()+1
    [all...]
Verifier.cpp 272 void visitGetElementPtrInst(GetElementPtrInst &GEP);
    [all...]
  /external/llvm/lib/Transforms/IPO/
ArgumentPromotion.cpp 73 /// A vector used to hold the indices of a single GEP instruction
315 // We can only promote this argument if all of the uses are loads, or are GEP
349 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(V)) {
350 V = GEP->getPointerOperand();
353 Indices.reserve(GEP->getNumIndices());
354 for (User::op_iterator II = GEP->idx_begin(), IE = GEP->idx_end();
359 // We found a non-constant GEP index for this argument? Bail out
368 // Direct loads are equivalent to a GEP with a single 0 index.
374 // not (GEP+)loads, or any (GEP+)loads that are not safe to promote
    [all...]
GlobalOpt.cpp 264 // PHI nodes we can check just like select or GEP instructions, but we
364 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(I)) {
365 if (!GEP->hasAllConstantIndices())
499 } else if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(U)) {
500 // Do not transform "gepinst (gep constexpr (GV))" here, because forming
501 // "gepconstexpr (gep constexpr (GV))" will cause the two gep's to fold
504 if (!isa<ConstantExpr>(GEP->getOperand(0))) {
506 dyn_cast_or_null<ConstantExpr>(ConstantFoldInstruction(GEP, TD, TLI));
510 // If the initializer is an all-null value and we have an inbounds GEP,
    [all...]
  /external/llvm/lib/Transforms/Scalar/
GlobalMerge.cpp 159 Constant *GEP = ConstantExpr::getInBoundsGetElementPtr(MergedGV, Idx);
160 Globals[k]->replaceAllUsesWith(GEP);
ScalarReplAggregates.cpp 503 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(User)) {
504 // If this is a GEP with a variable indices, we can't handle it.
505 PointerType* PtrTy = dyn_cast<PointerType>(GEP->getPointerOperandType());
509 // Compute the offset that this GEP adds to the pointer.
510 SmallVector<Value*, 8> Indices(GEP->op_begin()+1, GEP->op_end());
512 if (!GEP->hasAllConstantIndices()) {
526 if (!CanConvertToScalar(GEP, Offset+GEPOffset, GEPNonConstantIdx))
608 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(User)) {
609 // Compute the offset that this GEP adds to the pointer
    [all...]
  /external/llvm/lib/Transforms/Utils/
CodeExtractor.cpp 365 GetElementPtrInst *GEP =
367 RewriteVal = new LoadInst(GEP, "loadgep_" + inputs[i]->getName(), TI);
467 GetElementPtrInst *GEP =
470 codeReplacer->getInstList().push_back(GEP);
471 StoreInst *SI = new StoreInst(StructValues[i], GEP);
493 GetElementPtrInst *GEP
496 codeReplacer->getInstList().push_back(GEP);
497 Output = GEP;
608 GetElementPtrInst *GEP =
612 new StoreInst(outputs[out], GEP, NTRet)
    [all...]
  /external/llvm/include/llvm/Analysis/
MemoryBuiltins.h 193 SizeOffsetType visitGEPOperator(GEPOperator &GEP);
255 SizeOffsetEvalType visitGEPOperator(GEPOperator &GEP);
  /external/llvm/lib/Target/NVPTX/
NVPTXUtilities.cpp 338 // provide an option to ignore GEP indicies for find out the base address only
350 if (const GEPOperator *GEP = dyn_cast<GEPOperator>(V)) {
351 V = GEP->getPointerOperand()->stripPointerCasts();
360 // - ignore GEP indicies for find out the base address only, and
382 } else if (const GEPOperator *GEP = dyn_cast<GEPOperator>(V)) {
383 V = GEP->getPointerOperand()->stripPointerCasts();
  /external/llvm/lib/Transforms/Instrumentation/
ThreadSanitizer.cpp 179 // If this is a GEP, just analyze its pointer operand.
180 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Addr))
181 Addr = GEP->getPointerOperand();

Completed in 1061 milliseconds

1 2