Lines Matching refs:PHI

51 /// updates.  ProtoValue is the value used to name PHI nodes.
110 /// InsertNewDef - Insert an empty PHI or IMPLICIT_DEF instruction which define
139 /// a block. Because of this, we need to insert a new PHI node in SomeBB to
181 // If an identical PHI is already in BB, just reuse it.
186 // Otherwise, we do need a PHI: insert one now.
188 MachineInstrBuilder InsertedPHI = InsertNewDef(TargetOpcode::PHI, BB,
191 // Fill in all the predecessors of the PHI.
195 // See if the PHI node can be merged to a single value. This can happen in
196 // loop cases when we get a PHI of itself and one other value.
205 DEBUG(dbgs() << " Inserted PHI: " << *InsertedPHI << "\n");
220 /// RewriteUse - Rewrite a use of the symbolic value. This handles PHI nodes,
249 /// Iterator for PHI operands.
252 MachineInstr *PHI;
257 : PHI(P), idx(1) {}
259 : PHI(P), idx(PHI->getNumOperands()) {}
264 unsigned getIncomingValue() { return PHI->getOperand(idx).getReg(); }
266 return PHI->getOperand(idx+1).getMBB();
269 static inline PHI_iterator PHI_begin(PhiT *PHI) { return PHI_iterator(PHI); }
270 static inline PHI_iterator PHI_end(PhiT *PHI) {
271 return PHI_iterator(PHI, true);
295 /// CreateEmptyPHI - Create a PHI instruction that defines a new register.
300 MachineInstr *PHI = InsertNewDef(TargetOpcode::PHI, BB, Loc,
303 return PHI->getOperand(0).getReg();
306 /// AddPHIOperand - Add the specified value as an operand of the PHI for
308 static void AddPHIOperand(MachineInstr *PHI, unsigned Val,
310 MachineInstrBuilder(*Pred->getParent(), PHI).addReg(Val).addMBB(Pred);
313 /// InstrIsPHI - Check if an instruction is a PHI.
322 /// is a PHI instruction.
327 /// ValueIsNewPHI - Like ValueIsPHI but also check if the PHI has no source
330 MachineInstr *PHI = ValueIsPHI(Val, Updater);
331 if (PHI && PHI->getNumOperands() <= 1)
332 return PHI;
336 /// GetPHIValue - For the specified PHI instruction, return the register
338 static unsigned GetPHIValue(MachineInstr *PHI) {
339 return PHI->getOperand(0).getReg();