Home | History | Annotate | Download | only in IPO

Lines Matching refs:GEP

73     /// A vector used to hold the indices of a single GEP instruction
318 // We can only promote this argument if all of the uses are loads, or are GEP
352 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(V)) {
353 V = GEP->getPointerOperand();
356 Indices.reserve(GEP->getNumIndices());
357 for (User::op_iterator II = GEP->idx_begin(), IE = GEP->idx_end();
362 // We found a non-constant GEP index for this argument? Bail out
371 // Direct loads are equivalent to a GEP with a single 0 index.
377 // not (GEP+)loads, or any (GEP+)loads that are not safe to promote.
388 // Direct loads are equivalent to a GEP with a zero index and then a load.
390 } else if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(U)) {
391 if (GEP->use_empty()) {
392 // Dead GEP's cause trouble later. Just remove them if we run into
394 getAnalysis<AliasAnalysis>().deleteValue(GEP);
395 GEP->eraseFromParent();
403 for (User::op_iterator i = GEP->idx_begin(), e = GEP->idx_end();
408 return false; // Not a constant operand GEP!
410 // Ensure that the only users of the GEP are load instructions.
411 for (Value::use_iterator UI = GEP->use_begin(), E = GEP->use_end();
422 return false; // Not a load or a GEP.
425 // Now, see if it is safe to promote this load / loads of this GEP. Loading
507 // handle cases where there are both a direct load and GEP accesses.
513 // what the new GEP/Load instructions we are inserting look like.
560 // and gep+loads with the GEP indices.
651 // Loop over the operands, inserting GEP and loads in the caller as
664 // Emit a GEP and load for each element of the struct.
693 // This satisfies GEP constraints.
701 // And create a GEP to extract those indices.
838 GetElementPtrInst *GEP = cast<GetElementPtrInst>(I->use_back());
840 Operands.reserve(GEP->getNumIndices());
841 for (User::op_iterator II = GEP->idx_begin(), IE = GEP->idx_end();
852 assert(It != ArgIndices.end() && "GEP not handled??");
867 while (!GEP->use_empty()) {
868 LoadInst *L = cast<LoadInst>(GEP->use_back());
873 AA.deleteValue(GEP);
874 GEP->eraseFromParent();