Lines Matching defs:PHI
49 /// updates. ProtoValue is the value used to name PHI nodes.
108 /// InsertNewDef - Insert an empty PHI or IMPLICIT_DEF instruction which define
137 /// a block. Because of this, we need to insert a new PHI node in SomeBB to
179 // If an identical PHI is already in BB, just reuse it.
184 // Otherwise, we do need a PHI: insert one now.
186 MachineInstr *InsertedPHI = InsertNewDef(TargetOpcode::PHI, BB,
189 // 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");
220 /// RewriteUse - Rewrite a use of the symbolic value. This handles PHI nodes,
245 /// MachinePHIiter - Iterator for PHI operands. This is used for the
250 MachineInstr *PHI;
255 : PHI(P), idx(1) {}
257 : PHI(P), idx(PHI->getNumOperands()) {}
262 unsigned getIncomingValue() { return PHI->getOperand(idx).getReg(); }
264 return PHI->getOperand(idx+1).getMBB();
284 static inline PHI_iterator PHI_begin(PhiT *PHI) { return PHI_iterator(PHI); }
285 static inline PHI_iterator PHI_end(PhiT *PHI) {
286 return PHI_iterator(PHI, true);
310 /// CreateEmptyPHI - Create a PHI instruction that defines a new register.
315 MachineInstr *PHI = InsertNewDef(TargetOpcode::PHI, BB, Loc,
318 return PHI->getOperand(0).getReg();
321 /// AddPHIOperand - Add the specified value as an operand of the PHI for
323 static void AddPHIOperand(MachineInstr *PHI, unsigned Val,
325 PHI->addOperand(MachineOperand::CreateReg(Val, false));
326 PHI->addOperand(MachineOperand::CreateMBB(Pred));
329 /// InstrIsPHI - Check if an instruction is a PHI.
338 /// is a PHI instruction.
343 /// ValueIsNewPHI - Like ValueIsPHI but also check if the PHI has no source
346 MachineInstr *PHI = ValueIsPHI(Val, Updater);
347 if (PHI && PHI->getNumOperands() <= 1)
348 return PHI;
352 /// GetPHIValue - For the specified PHI instruction, return the register
354 static unsigned GetPHIValue(MachineInstr *PHI) {
355 return PHI->getOperand(0).getReg();