Home | History | Annotate | Download | only in Utils

Lines Matching refs:PHI

65 static bool IsEquivalentPHI(PHINode *PHI,
67 unsigned PHINumValues = PHI->getNumIncomingValues();
71 // Scan the phi to see if it matches.
73 if (ValueMapping[PHI->getIncomingBlock(i)] !=
74 PHI->getIncomingValue(i)) {
98 // is relatively slow. If we already have PHI nodes in this block, walk one
136 // Otherwise, we do need a PHI: check to see if we already have one available
153 // Fill in all the predecessors of the PHI.
157 // See if the PHI node can be merged to a single value. This can happen in
158 // loop cases when we get a PHI of itself and one other value.
164 // Set the DebugLoc of the inserted PHI, if available.
173 DEBUG(dbgs() << " Inserted PHI: " << *InsertedPHI << "\n");
220 PHINode *PHI;
225 : PHI(P), idx(0) {}
227 : PHI(P), idx(PHI->getNumIncomingValues()) {}
232 Value *getIncomingValue() { return PHI->getIncomingValue(idx); }
233 BasicBlock *getIncomingBlock() { return PHI->getIncomingBlock(idx); }
236 static PHI_iterator PHI_begin(PhiT *PHI) { return PHI_iterator(PHI); }
237 static PHI_iterator PHI_end(PhiT *PHI) {
238 return PHI_iterator(PHI, true);
246 // but it is relatively slow. If we already have PHI nodes in this
263 /// CreateEmptyPHI - Create a new PHI instruction in the specified block.
267 PHINode *PHI = PHINode::Create(Updater->ProtoType, NumPreds,
269 return PHI;
272 /// AddPHIOperand - Add the specified value as an operand of the PHI for
274 static void AddPHIOperand(PHINode *PHI, Value *Val, BasicBlock *Pred) {
275 PHI->addIncoming(Val, Pred);
278 /// InstrIsPHI - Check if an instruction is a PHI.
284 /// ValueIsPHI - Check if a value is a PHI.
290 /// ValueIsNewPHI - Like ValueIsPHI but also check if the PHI has no source
293 PHINode *PHI = ValueIsPHI(Val, Updater);
294 if (PHI && PHI->getNumIncomingValues() == 0)
295 return PHI;
299 /// GetPHIValue - For the specified PHI instruction, return the value
301 static Value *GetPHIValue(PHINode *PHI) {
302 return PHI;
441 // inserting PHI nodes as necessary.