Lines Matching defs:phi
118 // instructions that are pinned to an edge like a phi, or
132 // through multiple levels of phi, so give up if we've already
187 // %exn = phi ...
188 // %selector = phi ...
216 // For all the phis in nonDominated, make a new phi in split to join
217 // that phi with the edge from lastDominated.
220 PHINode *phi = dyn_cast<PHINode>(i);
221 if (!phi) break;
223 PHINode *splitPhi = PHINode::Create(phi->getType(), 2, phi->getName(),
225 phi->replaceAllUsesWith(splitPhi);
226 splitPhi->addIncoming(phi, nonDominated);
227 splitPhi->addIncoming(phi->removeIncomingValue(lastDominated),
260 PHINode *InnerEHValuesPHI; //< PHI for EH values from landingpad insts.
268 // If there are PHI nodes in the unwind destination block, we need to keep
275 PHINode *PHI = cast<PHINode>(I);
276 UnwindDestPHIValues.push_back(PHI->getIncomingValueForBlock(InvokeBB));
313 /// addIncomingPHIValuesFor - Add incoming-PHI values to the unwind
323 PHINode *phi = cast<PHINode>(I);
324 phi->addIncoming(UnwindDestPHIValues[i], src);
379 // Create a phi for the exception value...
460 // Create a PHI for the exception values.
499 /// it rewrites them to be invokes that jump to InvokeDest and fills in the PHI
590 // Update any PHI nodes in the exceptional block to indicate that
618 // Now that everything is happy, we have one final detail. The PHI nodes in
621 // PHI node) now.
647 // Update any PHI nodes in the exceptional block to indicate that
657 // Now that everything is happy, we have one final detail. The PHI nodes in
660 // PHI node) now.
1198 // Split the basic block. This guarantees that no PHI nodes will have to be
1231 PHINode *PHI = 0;
1233 // The PHI node should go at the front of the new basic block to merge all
1236 PHI = PHINode::Create(RTy, Returns.size(), TheCall->getName(),
1239 // PHI node as their operand.
1240 TheCall->replaceAllUsesWith(PHI);
1243 // Loop over all of the return instructions adding entries to the PHI node
1245 if (PHI) {
1248 assert(RI->getReturnValue()->getType() == PHI->getType() &&
1250 PHI->addIncoming(RI->getReturnValue(), RI->getParent());
1271 // Update PHI nodes that use the ReturnBB to use the AfterCallBB.
1299 CalleeEntry->replaceAllUsesWith(OrigBB); // Update PHI nodes
1308 // If we inserted a phi node, check to see if it has a single value (e.g. all
1309 // the entries are the same or undef). If so, remove the PHI so it doesn't
1311 if (PHI)
1312 if (Value *V = SimplifyInstruction(PHI, IFI.TD)) {
1313 PHI->replaceAllUsesWith(V);
1314 PHI->eraseFromParent();