Home | History | Annotate | Download | only in Utils

Lines Matching defs:PHI

46 /// updates with type 'Ty'.  PHI nodes get a name based on 'Name'.
71 /// IsEquivalentPHI - Check if PHI has the same incoming value as specified
73 static bool IsEquivalentPHI(PHINode *PHI,
75 unsigned PHINumValues = PHI->getNumIncomingValues();
79 // Scan the phi to see if it matches.
81 if (ValueMapping[PHI->getIncomingBlock(i)] !=
82 PHI->getIncomingValue(i)) {
112 /// a block. Because of this, we need to insert a new PHI node in SomeBB to
127 // is relatively slow. If we already have PHI nodes in this block, walk one
165 // Otherwise, we do need a PHI: check to see if we already have one available
182 // Fill in all the predecessors of the PHI.
186 // See if the PHI node can be merged to a single value. This can happen in
187 // loop cases when we get a PHI of itself and one other value.
199 DEBUG(dbgs() << " Inserted PHI: " << *InsertedPHI << "\n");
203 /// RewriteUse - Rewrite a use of the symbolic value. This handles PHI nodes,
233 /// PHIiter - Iterator for PHI operands. This is used for the PHI_iterator
238 PHINode *PHI;
243 : PHI(P), idx(0) {}
245 : PHI(P), idx(PHI->getNumIncomingValues()) {}
250 Value *getIncomingValue() { return PHI->getIncomingValue(idx); }
251 BasicBlock *getIncomingBlock() { return PHI->getIncomingBlock(idx); }
270 static inline PHI_iterator PHI_begin(PhiT *PHI) { return PHI_iterator(PHI); }
271 static inline PHI_iterator PHI_end(PhiT *PHI) {
272 return PHI_iterator(PHI, true);
280 // but it is relatively slow. If we already have PHI nodes in this
297 /// CreateEmptyPHI - Create a new PHI instruction in the specified block.
301 PHINode *PHI = PHINode::Create(Updater->ProtoType, NumPreds,
303 return PHI;
306 /// AddPHIOperand - Add the specified value as an operand of the PHI for
308 static void AddPHIOperand(PHINode *PHI, Value *Val, BasicBlock *Pred) {
309 PHI->addIncoming(Val, Pred);
312 /// InstrIsPHI - Check if an instruction is a PHI.
318 /// ValueIsPHI - Check if a value is a PHI.
324 /// ValueIsNewPHI - Like ValueIsPHI but also check if the PHI has no source
327 PHINode *PHI = ValueIsPHI(Val, Updater);
328 if (PHI && PHI->getNumIncomingValues() == 0)
329 return PHI;
333 /// GetPHIValue - For the specified PHI instruction, return the value
335 static Value *GetPHIValue(PHINode *PHI) {
336 return PHI;
476 // inserting PHI nodes as necessary.