Home | History | Annotate | Download | only in Utils

Lines Matching defs:PHI

271   /// dominating definitions for non-PHI blocks.
281 // If this block already needs a PHI, there is nothing to do here.
289 // Need a PHI here.
304 /// FindAvailableVal - If this block requires a PHI, first check if an
305 /// existing PHI matches the PHI placement and reaching definitions computed
306 /// earlier, and if not, create a new PHI. Visit all the block's
308 /// the incoming values for a new PHI.
316 // Check if there needs to be a PHI in BB.
320 // Look for an existing PHI.
325 ValT PHI = Traits::CreateEmptyPHI(Info->BB, Info->NumPreds, Updater);
326 Info->AvailableVal = PHI;
327 (*AvailableVals)[Info->BB] = PHI;
344 // Check if this block contains a newly added PHI.
345 PhiT *PHI = Traits::ValueIsNewPHI(Info->AvailableVal, Updater);
346 if (!PHI)
356 Traits::AddPHIOperand(PHI, PredInfo->AvailableVal, Pred);
359 DEBUG(dbgs() << " Inserted PHI: " << *PHI << "\n");
362 if (InsertedPHIs) InsertedPHIs->push_back(PHI);
366 /// FindExistingPHI - Look through the PHI nodes in a block to see if any of
385 /// CheckIfPHIMatches - Check if a PHI node matches the placement and values
387 bool CheckIfPHIMatches(PhiT *PHI) {
389 WorkList.push_back(PHI);
391 // Mark that the block containing this PHI has been visited.
392 BBMap[PHI->getParent()]->PHITag = PHI;
395 PHI = WorkList.pop_back_val();
397 // Iterate through the PHI's incoming values.
398 for (typename Traits::PHI_iterator I = Traits::PHI_begin(PHI),
399 E = Traits::PHI_end(PHI); I != E; ++I) {
413 // Check if the value is a PHI in the correct block.
418 // If this block has already been visited, check if this PHI matches.
432 /// RecordMatchingPHI - For a PHI node that matches, record it and its input
434 void RecordMatchingPHI(PhiT *PHI) {
436 WorkList.push_back(PHI);
438 // Record this PHI.
439 BlkT *BB = PHI->getParent();
440 ValT PHIVal = Traits::GetPHIValue(PHI);
445 PHI = WorkList.pop_back_val();
447 // Iterate through the PHI's incoming values.
448 for (typename Traits::PHI_iterator I = Traits::PHI_begin(PHI),
449 E = Traits::PHI_end(PHI); I != E; ++I) {
458 // Record the PHI and add it to the worklist.