Lines Matching full:user
89 /// IVUseShouldUsePostIncValue - We have discovered a "User" of an IV expression
90 /// and now we need to decide whether the user should use the preinc or post-inc
91 /// value. If this user should use the post-inc version of the IV, return true.
97 static bool IVUseShouldUsePostIncValue(Instruction *User, Value *Operand,
99 // If the user is in the loop, use the preinc value.
100 if (L->contains(User))
107 // Ok, the user is outside of the loop. If it is dominated by the latch
109 if (DT->dominates(LatchBlock, User->getParent()))
116 PHINode *PN = dyn_cast<PHINode>(User);
139 // Add this IV user to the Processed set before returning false to ensure that
169 // call this a user.
175 Instruction *User = cast<Instruction>(U.getUser());
176 if (!UniqueUsers.insert(User).second)
180 if (isa<PHINode>(User) && Processed.count(User))
187 // If User is already in Processed, we don't want to recurse into it again,
190 if (LI->getLoopFor(User->getParent()) != L) {
191 if (isa<PHINode>(User) || Processed.count(User) ||
192 !AddUsersIfInteresting(User)) {
193 LLVM_DEBUG(dbgs() << "FOUND USER in other loop: " << *User << '\n'
197 } else if (Processed.count(User) || !AddUsersIfInteresting(User)) {
198 LLVM_DEBUG(dbgs() << "FOUND USER: " << *User << '\n'
204 // Okay, we found a user that we cannot reduce.
205 IVStrideUse &NewUse = AddUser(User, I);
213 bool Result = IVUseShouldUsePostIncValue(User, I, L, DT);
230 // original one, discard this user.
246 IVStrideUse &IVUsers::AddUser(Instruction *User, Value *Operand) {
247 IVUses.push_back(new IVStrideUse(this, User, Operand));
286 OS << "Printing <null> User";
372 // Remove this user from the list.