Lines Matching defs:PHI
111 /// InsertNewDef - Insert an empty PHI or IMPLICIT_DEF instruction which define
141 /// a block. Because of this, we need to insert a new PHI node in SomeBB to
184 // If an identical PHI is already in BB, just reuse it.
193 // Otherwise, we do need a PHI: insert one now.
196 InsertNewDef(TargetOpcode::PHI, BB, Loc, RegAttrs, MRI, TII);
198 // Fill in all the predecessors of the PHI.
202 // See if the PHI node can be merged to a single value. This can happen in
203 // loop cases when we get a PHI of itself and one other value.
212 LLVM_DEBUG(dbgs() << " Inserted PHI: " << *InsertedPHI);
227 /// RewriteUse - Rewrite a use of the symbolic value. This handles PHI nodes,
273 /// Iterator for PHI operands.
276 MachineInstr *PHI;
281 : PHI(P), idx(1) {}
283 : PHI(P), idx(PHI->getNumOperands()) {}
289 Register getIncomingValue() { return PHI->getOperand(idx).getReg(); }
292 return PHI->getOperand(idx+1).getMBB();
296 static inline PHI_iterator PHI_begin(PhiT *PHI) { return PHI_iterator(PHI); }
298 static inline PHI_iterator PHI_end(PhiT *PHI) {
299 return PHI_iterator(PHI, true);
320 /// CreateEmptyPHI - Create a PHI instruction that defines a new register.
325 MachineInstr *PHI =
326 InsertNewDef(TargetOpcode::PHI, BB, Loc, Updater->RegAttrs,
328 return PHI->getOperand(0).getReg();
331 /// AddPHIOperand - Add the specified value as an operand of the PHI for
333 static void AddPHIOperand(MachineInstr *PHI, Register Val,
335 MachineInstrBuilder(*Pred->getParent(), PHI).addReg(Val).addMBB(Pred);
338 /// InstrIsPHI - Check if an instruction is a PHI.
346 /// is a PHI instruction.
351 /// ValueIsNewPHI - Like ValueIsPHI but also check if the PHI has no source
354 MachineInstr *PHI = ValueIsPHI(Val, Updater);
355 if (PHI && PHI->getNumOperands() <= 1)
356 return PHI;
360 /// GetPHIValue - For the specified PHI instruction, return the register
362 static Register GetPHIValue(MachineInstr *PHI) {
363 return PHI->getOperand(0).getReg();