Lines Matching refs:PHI

127   // successor, and if that successor has a PHI node, and if *that* PHI node has
148 /// unconditional branch. PhiNodes will store all PHI nodes in common
158 // We fold the unconditional branch if we can easily update all PHI nodes in
187 /// AddPredecessorToBlock - Update PHI nodes in Succ to indicate that there will
189 /// flowing into the PHI nodes will be the same as those coming in from
610 // Remove PHI node entries for the dead edge.
684 // Remove PHI node entries for dead edges.
923 // sure we update the number of entries in the PHI nodes for these
1093 // Unfortunately, the successors of the if/else blocks may have PHI nodes in
1094 // them. If they do, all PHI entries for BB1/BB2 must agree for all PHI
1113 // Make the PHI node use the select for all incoming values for BB1/BB2
1120 // Update any PHI nodes in our new successors.
1151 // Gather the PHI nodes in BBEnd.
1197 // I1 and I2 should have a single use in the same PHI node, and they
1229 // with a PHI node after sinking. We only handle the case where there is
1238 // Early exit if we need a PHI node to replace a constant.
1265 DEBUG(dbgs() << "Create PHI node " << *NewPN << "\n";);
1477 // Check that the PHI nodes can be converted to selects.
1536 // Insert selects and rewrite the PHI operands.
1603 /// FoldCondBranchOnPHI - If we have a conditional branch on a PHI node value
1604 /// that is defined in the same block as the branch and if any PHI entries are
1610 // NOTE: we currently cannot transform this case if the PHI node is used
1615 // Degenerate case of a single entry PHI.
1641 // The dest block might have PHI nodes, other predecessors and other
1650 // Update PHI nodes.
1704 /// PHI node, see if we can eliminate it.
1706 // Ok, this is a two entry PHI node. Check to see if this is a simple "if
1724 // fewer PHI nodes in this block.
1730 // Loop over the PHI's seeing if we can promote them all to select
1765 // If we all PHI nodes are promotable, check to make sure that all
1801 // If we can still promote the PHI nodes after this gauntlet of tests,
1802 // do all of the PHI's now.
1818 // Change the PHI node into a select instruction.
1851 // with PHI nodes. If there are other instructions, merging would cause extra
1875 // Unwrap any PHI nodes in the return blocks.
2058 // Check that we have two conditional branches. If there is a PHI node in
2230 // Update PHI nodes in the common successors.
2270 // Update PHI Node.
2316 // Otherwise, if there are multiple predecessors, insert a PHI that merges
2325 // Okay, we're going to insert the PHI node. Since PBI is not the only
2326 // predecessor, compute the PHI'd conditional value for all of the preds.
2649 /// the PHI, merging the third icmp into the switch.
2704 // The use of the icmp has to be in the 'end' block, by the only PHI node in
2713 // true in the PHI.
2720 // Replace ICI (which is used by the PHI for the default value) with true or
2826 // If there are PHI nodes in EdgeBB, then we need to add a new entry to them
2852 // PHI nodes in EdgeBB, they need entries to be added corresponding to
3198 // Prune obsolete incoming values off the successor's PHI nodes.
3245 // Prune unused values from PHI nodes.
3279 while (PHINode *PHI = dyn_cast<PHINode>(I++)) {
3280 int Idx = PHI->getBasicBlockIndex(BB);
3281 assert(Idx >= 0 && "PHI has no entry for predecessor?");
3283 Value *InValue = PHI->getIncomingValue(Idx);
3287 return PHI;
3306 PHINode *PHI = FindPHIForConditionForwarding(CaseValue, CaseDest,
3308 if (!PHI) continue;
3310 ForwardingNodes[PHI].push_back(PhiIndex);
3437 while (PHINode *PHI = dyn_cast<PHINode>(I++)) {
3438 int Idx = PHI->getBasicBlockIndex(Pred);
3442 Constant *ConstVal = LookupConstant(PHI->getIncomingValue(Idx),
3457 Res.push_back(std::make_pair(PHI, ConstVal));
3761 PHINode *PHI = PHIs[I];
3762 ResultTypes[PHI] = ResultLists[PHI][0].second->getType();
3788 PHINode *PHI = DefaultResultsList[I].first;
3790 DefaultResults[PHI] = Result;
3874 PHINode *PHI = PHIs[I];
3877 Constant *DV = NeedMask ? ResultLists[PHI][0].second : DefaultResults[PHI];
3878 SwitchLookupTable Table(Mod, TableSize, MinCaseVal, ResultLists[PHI],
3885 if (PHI->hasOneUse() && isa<ReturnInst>(*PHI->user_begin()) &&
3886 PHI->user_back() == CommonDest->getFirstNonPHIOrDbg()) {
3892 PHI->addIncoming(Result, LookupBB);
4020 // for PHI nodes in common successor.
4096 // through this block if any PHI node entries are constants.
4157 PHINode *PHI = dyn_cast<PHINode>(i); ++i)
4158 for (unsigned i = 0, e = PHI->getNumIncomingValues(); i != e; ++i)
4159 if (passingValueIsAlwaysUndefined(PHI->getIncomingValue(i), PHI)) {
4160 TerminatorInst *T = PHI->getIncomingBlock(i)->getTerminator();
4163 BB->removePredecessor(PHI->getIncomingBlock(i));
4200 // Check for and eliminate duplicate PHI nodes in this block.
4208 // if there are no PHI nodes.
4215 // If there is a trivial two-entry PHI node in this basic block, and we can