Home | History | Annotate | Download | only in Scalar

Lines Matching refs:GEP

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.
610 SmallVector<Value*, 8> Indices(GEP->op_begin()+1, GEP->op_end());
612 if (!GEP->hasAllConstantIndices()) {
614 "Dynamic GEP reading from dynamic GEP unsupported");
618 uint64_t GEPOffset = TD.getIndexedOffset(GEP->getPointerOperandType(),
620 ConvertUsesToScalar(GEP, NewAI, Offset+GEPOffset*8, GEPNonConstantIdx);
621 GEP->eraseFromParent();
892 /// NonConstantIdx is an index value if there was a GEP with a non-constant
1706 /// isSafeGEP - Check if a GEP instruction can be handled for scalar
1710 /// return, Offset is adjusted as specified by the GEP indices.
1719 // Walk through the GEP type indices, checking the types that this indexes
1740 // Compute the offset due to this GEP and check if the alloca has a
1743 // If this GEP is non constant then the last operand must have been a
1796 /// within it. The offset checked here may have been formed from a GEP with a
1968 // If we have a PHI user of the alloca itself (as opposed to a GEP or
1969 // bitcast) we have to rewrite it. GEP and bitcast uses will be RAUW'd to
2017 /// GEP instruction.
2045 /// RewriteGEP - Check if this GEP instruction moves the pointer across
2047 /// the GEP
2052 // If the GEP was dynamic then it must have been a dynamic vector lookup.
2053 // In this case, it must be the last GEP operand which is dynamic so keep that
2054 // aside until we've found the constant GEP offset then add it back in at the
2067 OldIdx = ~0ULL; // Force the GEP to be rewritten.
2073 // If this GEP does not move the pointer across elements of the alloca
2087 // This GEP has a dynamic index. We need to add "i32 0" to index through
2184 // type as AI has, so we can GEP through it safely.
2192 // OtherPtr may be a bitcast or GEP that currently being rewritten. (This
2223 // If this is a memcpy/memmove, emit a GEP of the other element address.