Home | History | Annotate | Download | only in Utils

Lines Matching defs:PHI

64 static bool IsEquivalentPHI(PHINode *PHI,
66 unsigned PHINumValues = PHI->getNumIncomingValues();
70 // Scan the phi to see if it matches.
72 if (ValueMapping[PHI->getIncomingBlock(i)] !=
73 PHI->getIncomingValue(i)) {
97 // is relatively slow. If we already have PHI nodes in this block, walk one
135 // Otherwise, we do need a PHI: check to see if we already have one available
152 // Fill in all the predecessors of the PHI.
156 // See if the PHI node can be merged to a single value. This can happen in
157 // loop cases when we get a PHI of itself and one other value.
163 // Set the DebugLoc of the inserted PHI, if available.
172 DEBUG(dbgs() << " Inserted PHI: " << *InsertedPHI << "\n");
219 PHINode *PHI;
224 : PHI(P), idx(0) {}
226 : PHI(P), idx(PHI->getNumIncomingValues()) {}
231 Value *getIncomingValue() { return PHI->getIncomingValue(idx); }
232 BasicBlock *getIncomingBlock() { return PHI->getIncomingBlock(idx); }
235 static PHI_iterator PHI_begin(PhiT *PHI) { return PHI_iterator(PHI); }
236 static PHI_iterator PHI_end(PhiT *PHI) {
237 return PHI_iterator(PHI, true);
245 // but it is relatively slow. If we already have PHI nodes in this
262 /// CreateEmptyPHI - Create a new PHI instruction in the specified block.
266 PHINode *PHI = PHINode::Create(Updater->ProtoType, NumPreds,
268 return PHI;
271 /// AddPHIOperand - Add the specified value as an operand of the PHI for
273 static void AddPHIOperand(PHINode *PHI, Value *Val, BasicBlock *Pred) {
274 PHI->addIncoming(Val, Pred);
277 /// InstrIsPHI - Check if an instruction is a PHI.
283 /// ValueIsPHI - Check if a value is a PHI.
289 /// ValueIsNewPHI - Like ValueIsPHI but also check if the PHI has no source
292 PHINode *PHI = ValueIsPHI(Val, Updater);
293 if (PHI && PHI->getNumIncomingValues() == 0)
294 return PHI;
298 /// GetPHIValue - For the specified PHI instruction, return the value
300 static Value *GetPHIValue(PHINode *PHI) {
301 return PHI;
440 // inserting PHI nodes as necessary.