Home | History | Annotate | Download | only in Scalar

Lines Matching defs:GEP

88       GEP,     // &B[..][i * S][..]
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.
238 static bool isGEPFoldable(GetElementPtrInst *GEP,
246 if (GlobalVariable *GV = dyn_cast<GlobalVariable>(GEP->getPointerOperand()))
251 gep_type_iterator GTI = gep_type_begin(GEP);
252 for (auto I = GEP->idx_begin(); I != GEP->idx_end(); ++I, ++GTI) {
272 unsigned AddrSpace = GEP->getPointerAddressSpace();
273 return TTI->isLegalAddressingMode(GEP->getType()->getElementType(), BaseGV,
289 if (C.CandidateKind == Candidate::GEP)
294 // Returns true if GEP has zero or one non-zero index.
295 static bool hasOnlyOneNonZeroIndex(GetElementPtrInst *GEP) {
297 for (auto I = GEP->idx_begin(); I != GEP->idx_end(); ++I) {
314 if (C.CandidateKind == Candidate::GEP) {
473 allocateCandidatesAndFindBasis(Candidate::GEP, B, ScaledIdx, S, I);
479 GetElementPtrInst *GEP) {
483 ArrayIdx, ElementSize, GEP);
499 // GEP = Base + sext(LHS *nsw RHS) * ElementSize
500 allocateCandidatesAndFindBasisForGEP(Base, RHS, LHS, ElementSize, GEP);
502 // GEP = Base + sext(LHS <<nsw RHS) * ElementSize
507 allocateCandidatesAndFindBasisForGEP(Base, PowerOf2, LHS, ElementSize, GEP);
512 GetElementPtrInst *GEP) {
514 if (GEP->getType()->isVectorTy())
518 for (auto I = GEP->idx_begin(); I != GEP->idx_end(); ++I)
521 gep_type_iterator GTI = gep_type_begin(GEP);
522 for (unsigned I = 1, E = GEP->getNumOperands(); I != E; ++I) {
529 // The base of this candidate is GEP's base plus the offsets of all
531 const SCEV *BaseExpr = SE->getGEPExpr(GEP->getSourceElementType(),
532 SE->getSCEV(GEP->getPointerOperand()),
533 IndexExprs, GEP->isInBounds());
534 Value *ArrayIdx = GEP->getOperand(I);
536 factorArrayIndex(ArrayIdx, BaseExpr, ElementSize, GEP);
542 factorArrayIndex(TruncatedArrayIdx, BaseExpr, ElementSize, GEP);
566 if (Basis.CandidateKind == Candidate::GEP) {
650 case Candidate::GEP:
666 // C = gep Basis, Bump