Home | History | Annotate | Download | only in CodeGen

Lines Matching defs:PHI

50 /// updates.  ProtoValue is the value used to name PHI nodes.
109 /// InsertNewDef - Insert an empty PHI or IMPLICIT_DEF instruction which define
138 /// a block. Because of this, we need to insert a new PHI node in SomeBB to
180 // If an identical PHI is already in BB, just reuse it.
185 // Otherwise, we do need a PHI: insert one now.
187 MachineInstrBuilder InsertedPHI = InsertNewDef(TargetOpcode::PHI, BB,
190 // Fill in all the predecessors of the PHI.
194 // See if the PHI node can be merged to a single value. This can happen in
195 // loop cases when we get a PHI of itself and one other value.
204 DEBUG(dbgs() << " Inserted PHI: " << *InsertedPHI << "\n");
219 /// RewriteUse - Rewrite a use of the symbolic value. This handles PHI nodes,
248 /// Iterator for PHI operands.
251 MachineInstr *PHI;
256 : PHI(P), idx(1) {}
258 : PHI(P), idx(PHI->getNumOperands()) {}
263 unsigned getIncomingValue() { return PHI->getOperand(idx).getReg(); }
265 return PHI->getOperand(idx+1).getMBB();
268 static inline PHI_iterator PHI_begin(PhiT *PHI) { return PHI_iterator(PHI); }
269 static inline PHI_iterator PHI_end(PhiT *PHI) {
270 return PHI_iterator(PHI, true);
294 /// CreateEmptyPHI - Create a PHI instruction that defines a new register.
299 MachineInstr *PHI = InsertNewDef(TargetOpcode::PHI, BB, Loc,
302 return PHI->getOperand(0).getReg();
305 /// AddPHIOperand - Add the specified value as an operand of the PHI for
307 static void AddPHIOperand(MachineInstr *PHI, unsigned Val,
309 MachineInstrBuilder(*Pred->getParent(), PHI).addReg(Val).addMBB(Pred);
312 /// InstrIsPHI - Check if an instruction is a PHI.
321 /// is a PHI instruction.
326 /// ValueIsNewPHI - Like ValueIsPHI but also check if the PHI has no source
329 MachineInstr *PHI = ValueIsPHI(Val, Updater);
330 if (PHI && PHI->getNumOperands() <= 1)
331 return PHI;
335 /// GetPHIValue - For the specified PHI instruction, return the register
337 static unsigned GetPHIValue(MachineInstr *PHI) {
338 return PHI->getOperand(0).getReg();