Home | History | Annotate | Download | only in Scalar

Lines Matching defs:GEP

308   /// a GEP back into the bounds using it elsewhere) and nor is the PHI, but we
431 // inbounds, then the result of the GEP is a poison value and we can
633 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(I)) {
634 if (!GEP->hasAllZeroIndices())
635 return GEP;
1259 /// \brief Build a GEP out of a base pointer and indices.
1261 /// This will return the BasePtr if that is valid, or build a new GEP
1262 /// instruction using the IRBuilder if GEP-ing is needed.
1268 // A single zero index is a no-op, so check for this and avoid building a GEP
1276 /// \brief Get a natural GEP off of the BasePtr walking through Ty toward
1279 GEP with
1280 /// Indices, and arrived at the Ty type. The goal is to continue to GEP with
1283 /// one with the same size. If none of that works, we just produce the GEP as
1325 /// \brief Recursively compute indices for a natural GEP.
1328 /// element types adding appropriate indices for the GEP.
1392 /// \brief Get a natural GEP from a base pointer to a particular offset and
1395 /// The goal is to produce a "natural" looking GEP that works with the existing
1397 /// a pointer. TargetTy is the element type the returned GEP should point-to if
1401 /// If no natural GEP can be constructed, this function returns null.
1415 return nullptr; // We can't GEP through an unsized element.
1418 return nullptr; // Zero-length arrays can't help us build a natural GEP.
1430 /// This tries very hard to compute a "natural" GEP which arrives at the offset
1432 /// the natural GEP to arrive at the offset and bitcast to the type. Where that
1433 /// fails, it will try to use an existing i8* and GEP to the byte offset and
1438 /// pointer from which we can compute a natural GEP with the desired
1440 /// a single GEP as possible, thus making each GEP more independent of the
1465 while (GEPOperator *GEP = dyn_cast<GEPOperator>(Ptr)) {
1467 if (!GEP->accumulateConstantOffset(DL, GEPOffset))
1470 Ptr = GEP->getPointerOperand();
1475 // See if we can perform a natural GEP here.
2580 // a single, simple GEP in most cases.
2803 /// The indices to a GEP instruction which will move Ptr to the correct slot
2811 /// single zero GEP index.
2876 Value *GEP = IRB.CreateInBoundsGEP(Ptr, GEPIndices, Name + ".gep");
2877 Value *Load = IRB.CreateLoad(GEP, Name + ".load");
2909 IRB.CreateInBoundsGEP(Ptr, GEPIndices, Name + ".gep"));