• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-12-stable/contrib/llvm-project/llvm/lib/Transforms/IPO/

Lines Matching refs:GEP

99 /// A vector used to hold the indices of a single GEP instruction
122 // handle cases where there are both a direct load and GEP accesses.
127 // what the new GEP/Load instructions we are inserting look like.
179 // and gep+loads with the GEP indices.
250 // Loop over the operands, inserting GEP and loads in the caller as
260 // Emit a GEP and load for each element of the struct.
289 // This satisfies GEP constraints.
300 // And create a GEP to extract those indices.
439 GetElementPtrInst *GEP = cast<GetElementPtrInst>(I->user_back());
441 Operands.reserve(GEP->getNumIndices());
442 for (User::op_iterator II = GEP->idx_begin(), IE = GEP->idx_end();
453 assert(It != ArgIndices.end() && "GEP not handled??");
468 while (!GEP->use_empty()) {
469 LoadInst *L = cast<LoadInst>(GEP->user_back());
473 GEP->eraseFromParent();
579 // We can only promote this argument if all of the uses are loads, or are GEP
631 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(V)) {
632 V = GEP->getPointerOperand();
635 Indices.reserve(GEP->getNumIndices());
636 for (User::op_iterator II = GEP->idx_begin(), IE = GEP->idx_end();
641 // We found a non-constant GEP index for this argument? Bail out
645 if (!UpdateBaseTy(GEP->getSourceElementType()))
653 // Direct loads are equivalent to a GEP with a single 0 index.
664 // not (GEP+)loads, or any (GEP+)loads that are not safe to promote.
675 // Direct loads are equivalent to a GEP with a zero index and then a load.
680 } else if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(UR)) {
681 if (GEP->use_empty()) {
682 // Dead GEP's cause trouble later. Just remove them if we run into
684 GEP->eraseFromParent();
691 if (!UpdateBaseTy(GEP->getSourceElementType()))
695 for (User::op_iterator i = GEP->idx_begin(), e = GEP->idx_end(); i != e;
700 return false; // Not a constant operand GEP!
702 // Ensure that the only users of the GEP are load instructions.
703 for (User *GEPU : GEP->users())
714 return false; // Not a load or a GEP.
717 // Now, see if it is safe to promote this load / loads of this GEP. Loading