Lines Matching refs:BB

66 bool MachineSSAUpdater::HasValueForBlock(MachineBasicBlock *BB) const {
67 return getAvailableVals(AV).count(BB);
72 void MachineSSAUpdater::AddAvailableValue(MachineBasicBlock *BB, unsigned V) {
73 getAvailableVals(AV)[BB] = V;
78 unsigned MachineSSAUpdater::GetValueAtEndOfBlock(MachineBasicBlock *BB) {
79 return GetValueAtEndOfBlockInternal(BB);
83 unsigned LookForIdenticalPHI(MachineBasicBlock *BB,
85 if (BB->empty())
88 MachineBasicBlock::iterator I = BB->begin();
95 while (I != BB->end() && I->isPHI()) {
117 MachineBasicBlock *BB, MachineBasicBlock::iterator I,
122 return BuildMI(*BB, I, DebugLoc(), TII->get(Opcode), NewVR);
130 /// 'use' in BB. Consider code like this:
143 unsigned MachineSSAUpdater::GetValueInMiddleOfBlock(MachineBasicBlock *BB) {
146 if (!HasValueForBlock(BB))
147 return GetValueAtEndOfBlockInternal(BB);
150 if (BB->pred_empty()) {
153 BB, BB->getFirstTerminator(),
164 for (MachineBasicBlock::pred_iterator PI = BB->pred_begin(),
165 E = BB->pred_end(); PI != E; ++PI) {
182 // If an identical PHI is already in BB, just reuse it.
183 unsigned DupPHI = LookForIdenticalPHI(BB, PredValues);
188 MachineBasicBlock::iterator Loc = BB->empty() ? BB->end() : BB->begin();
189 MachineInstrBuilder InsertedPHI = InsertNewDef(TargetOpcode::PHI, BB,
248 static BlkSucc_iterator BlkSucc_begin(BlkT *BB) { return BB->succ_begin(); }
249 static BlkSucc_iterator BlkSucc_end(BlkT *BB) { return BB->succ_end(); }
280 /// FindPredecessorBlocks - Put the predecessors of BB into the Preds
282 static void FindPredecessorBlocks(MachineBasicBlock *BB,
284 for (MachineBasicBlock::pred_iterator PI = BB->pred_begin(),
285 E = BB->pred_end(); PI != E; ++PI)
291 static unsigned GetUndefVal(MachineBasicBlock *BB,
295 BB, BB->getFirstNonPHI(),
303 static unsigned CreateEmptyPHI(MachineBasicBlock *BB, unsigned NumPreds,
305 MachineBasicBlock::iterator Loc = BB->empty() ? BB->end() : BB->begin();
306 MachineInstr *PHI = InsertNewDef(TargetOpcode::PHI, BB, Loc,
351 /// for the specified BB and if so, return it. If not, construct SSA form by
354 unsigned MachineSSAUpdater::GetValueAtEndOfBlockInternal(MachineBasicBlock *BB){
356 if (unsigned V = AvailableVals[BB])
360 return Impl.GetValue(BB);