Lines Matching defs:Phi
209 // Rename the phi nodes in our successor block
213 auto *Phi = cast<MemoryPhi>(&Accesses->front());
214 Phi->addIncoming(IncomingVal, BB);
223 /// in phi nodes in our successors.
249 /// \brief Compute dominator levels, used by the phi insertion algorithm above.
256 /// \brief This handles unreachable block accesses by deleting phi nodes in
263 // Make sure phi nodes in our reachable successors end up with a
271 // Rename the phi nodes in our successor block
275 auto *Phi = cast<MemoryPhi>(&Accesses->front());
276 Phi->addIncoming(LiveOnEntryDef.get(), BB);
286 // If we have a phi, just remove it. We are going to replace all
407 // Insert phi node
409 MemoryPhi *Phi = new MemoryPhi(BB->getContext(), BB, NextID++);
410 ValueToMemoryAccess.insert(std::make_pair(BB, Phi));
411 // Phi's always are placed at the front of the block.
412 Accesses->push_front(Phi);
458 MemoryPhi *Phi = new MemoryPhi(BB->getContext(), BB, NextID++);
459 ValueToMemoryAccess.insert(std::make_pair(BB, Phi));
460 // Phi's always are placed at the front of the block.
461 Accesses->push_front(Phi);
462 return Phi;
467 assert(!isa<PHINode>(I) && "Cannot create a defined access for a PHI");
483 // It goes after any phi nodes
553 // The only thing that could define us at the beginning is a phi node
554 if (MemoryPhi *Phi = getMemoryAccess(UseBlock))
555 return Phi;
582 // For a phi node, the use occurs in the predecessor block of the phi node.
583 // Since we may occur multiple times in the phi node, we have to check each
638 // We can only delete phi nodes if they have no uses, or we can replace all
642 // Note that it is sufficient to know that all edges of the phi node have
644 // (which we used to place this phi), that argument must dominate this phi,
645 // and thus, must dominate the phi's uses, and so we will not hit the assert
649 "We can't delete this memory phi");
688 MemoryAccess *Phi = getMemoryAccess(&B);
689 if (Phi)
690 ActualAccesses.push_back(Phi);
721 // Phi nodes are attached to basic blocks
725 // Phi operands are used on edges, we simulate the right domination by
739 "Memory PHI does not dominate it's uses");
751 // Things are allowed to flow to phi nodes over their predecessor edge.
791 // Phi nodes are attached to basic blocks
792 if (MemoryPhi *Phi = getMemoryAccess(&B)) {
793 assert(Phi->getNumOperands() == static_cast<unsigned>(std::distance(
796 for (unsigned I = 0, E = Phi->getNumIncomingValues(); I != E; ++I)
797 verifyUseInDefs(Phi->getIncomingValue(I), Phi);
803 "Found a phi node not attached to a bb");
986 // True if we saw a phi whose predecessor was a backedge
1133 // We need to know whether it is a phi so we can track backedges.
1141 // The loop below visits the phi's children for us. Because phis are the
1149 "Skipping phi's children doesn't end the DFS?");
1154 // Don't try to optimize this phi again if we've already tried to do so.
1162 // Recurse on PHI nodes, since we need to change locations.
1174 // All the phi arguments should reach the same point if we can bypass
1175 // this phi. The alternative is that they hit this phi node, which
1189 assert(FirstDef && "Found a Phi with no upward defs?");
1192 // If we can't optimize this Phi, then we can't safely cache any of the
1207 // phi, we can add the last thing in the path to the cache, since that won't
1286 // There should be no way to lookup an instruction and get a phi as the
1287 // access, since we only map BB's to PHI's. So, this must be a use or def.