Lines Matching defs:Phi
519 // Phi optimization bookkeeping:
528 assert(From->getNumOperands() && "Phi with no operands?");
549 /// Walk to the next Phi or Clobber in the def chain starting at Desc.Last.
594 void addSearches(MemoryPhi *Phi, SmallVectorImpl<ListIndex> &PausedSearches,
596 auto UpwardDefsBegin = upward_defs_begin({Phi, Paths[PriorNode].Loc}, DT);
739 /// necessarily the result of the Phi optimization.
754 /// Phi optimization algorithm tl;dr:
764 OptznResult tryOptimizePhi(MemoryPhi *Phi, MemoryAccess *Start,
769 Paths.emplace_back(Loc, Start, Phi, std::nullopt);
778 addSearches(Phi, PausedSearches, 0);
793 MemoryPhi *Current = Phi;
1104 auto *Phi = cast<MemoryPhi>(&Accesses->front());
1107 for (unsigned I = 0, E = Phi->getNumIncomingValues(); I != E; ++I)
1108 if (Phi->getIncomingBlock(I) == BB) {
1109 Phi->setIncomingValue(I, IncomingVal);
1115 Phi->addIncoming(IncomingVal, BB);
1212 auto *Phi = cast<MemoryPhi>(&Accesses->front());
1213 Phi->addIncoming(LiveOnEntryDef.get(), BB);
1704 "Can only move a Phi at the beginning of the block");
1709 assert(Inserted && "Cannot move a Phi to a block that already has one");
1718 MemoryPhi *Phi = new MemoryPhi(BB->getContext(), BB, NextID++);
1719 // Phi's always are placed at the front of the block.
1720 insertIntoListsForBlock(Phi, BB, Beginning);
1721 ValueToMemoryAccess[BB] = Phi;
1722 return Phi;
1944 if (MemoryPhi *Phi = getMemoryAccess(&BB)) {
1945 for (unsigned I = 0, E = Phi->getNumIncomingValues(); I != E; ++I) {
1946 auto *Pred = Phi->getIncomingBlock(I);
1947 auto *IncAcc = Phi->getIncomingValue(I);
2031 MemoryPhi *Phi = getMemoryAccess(&B);
2032 if (Phi) {
2034 ActualAccesses.push_back(Phi);
2035 ActualDefs.push_back(Phi);
2037 for (const Use &U : Phi->uses()) {
2038 assert(dominates(Phi, U) && "Memory PHI does not dominate it's uses");
2043 assert(Phi->getNumOperands() == pred_size(&B) &&
2045 for (unsigned I = 0, E = Phi->getNumIncomingValues(); I != E; ++I) {
2046 verifyUseInDefs(Phi->getIncomingValue(I), Phi);
2047 assert(is_contained(predecessors(&B), Phi->getIncomingBlock(I)) &&