Lines Matching defs:Cand
2432 Instruction *Cand = cast<Instruction>(It.first);
2438 if (Cand->user_empty())
2441 if (Cand->hasOneUse())
2442 if (auto *U = dyn_cast<Instruction>(Cand->getUniqueUndroppableUser()))
2443 if (U->getParent() == Cand->getParent())
2447 if (llvm::any_of(Cand->users(),
2451 LLVM_DEBUG(dbgs() << "Trying cand " << *Cand << " ... ");
2460 Records, [Cand](const auto &R) { return R.LiveSet.contains(Cand); });
2461 unsigned NumUses = Cand->getNumUses();
2488 findRematerializableChainToBasePointer(Record.ChainToBase, Cand);
2493 // block or if use is local to Cand Def. The reason is that this allows
2500 while (!Cand->user_empty()) {
2501 Instruction *UserI = cast<Instruction>(*Cand->user_begin());
2504 Record.RootOfChain, PointerToBase[Cand]);
2505 UserI->replaceUsesOfWith(Cand, RematChain);
2506 PointerToBase[RematChain] = PointerToBase[Cand];
2508 LiveValuesToBeDeleted.push_back(Cand);
2513 for (auto *Cand : LiveValuesToBeDeleted) {
2514 assert(Cand->use_empty() && "Unexpected user remain");
2515 RematerizationCandidates.erase(Cand);
2517 assert(!R.LiveSet.contains(Cand) ||
2518 R.LiveSet.contains(PointerToBase[Cand]));
2519 R.LiveSet.remove(Cand);