Lines Matching refs:BB
64 bool MachineSSAUpdater::HasValueForBlock(MachineBasicBlock *BB) const { in HasValueForBlock()
65 return getAvailableVals(AV).count(BB); in HasValueForBlock()
70 void MachineSSAUpdater::AddAvailableValue(MachineBasicBlock *BB, unsigned V) { in AddAvailableValue() argument
71 getAvailableVals(AV)[BB] = V; in AddAvailableValue()
76 unsigned MachineSSAUpdater::GetValueAtEndOfBlock(MachineBasicBlock *BB) { in GetValueAtEndOfBlock() argument
77 return GetValueAtEndOfBlockInternal(BB); in GetValueAtEndOfBlock()
81 unsigned LookForIdenticalPHI(MachineBasicBlock *BB, in LookForIdenticalPHI() argument
83 if (BB->empty()) in LookForIdenticalPHI()
86 MachineBasicBlock::iterator I = BB->begin(); in LookForIdenticalPHI()
93 while (I != BB->end() && I->isPHI()) { in LookForIdenticalPHI()
115 MachineBasicBlock *BB, MachineBasicBlock::iterator I, in InsertNewDef() argument
120 return BuildMI(*BB, I, DebugLoc(), TII->get(Opcode), NewVR); in InsertNewDef()
142 unsigned MachineSSAUpdater::GetValueInMiddleOfBlock(MachineBasicBlock *BB) { in GetValueInMiddleOfBlock() argument
145 if (!HasValueForBlock(BB)) in GetValueInMiddleOfBlock()
146 return GetValueAtEndOfBlockInternal(BB); in GetValueInMiddleOfBlock()
149 if (BB->pred_empty()) { in GetValueInMiddleOfBlock()
152 BB, BB->getFirstTerminator(), in GetValueInMiddleOfBlock()
163 for (MachineBasicBlock::pred_iterator PI = BB->pred_begin(), in GetValueInMiddleOfBlock()
164 E = BB->pred_end(); PI != E; ++PI) { in GetValueInMiddleOfBlock()
182 unsigned DupPHI = LookForIdenticalPHI(BB, PredValues); in GetValueInMiddleOfBlock()
187 MachineBasicBlock::iterator Loc = BB->empty() ? BB->end() : BB->begin(); in GetValueInMiddleOfBlock()
188 MachineInstrBuilder InsertedPHI = InsertNewDef(TargetOpcode::PHI, BB, in GetValueInMiddleOfBlock()
246 static BlkSucc_iterator BlkSucc_begin(BlkT *BB) { return BB->succ_begin(); } in BlkSucc_begin() argument
247 static BlkSucc_iterator BlkSucc_end(BlkT *BB) { return BB->succ_end(); } in BlkSucc_end() argument
276 static void FindPredecessorBlocks(MachineBasicBlock *BB, in FindPredecessorBlocks() argument
278 for (MachineBasicBlock::pred_iterator PI = BB->pred_begin(), in FindPredecessorBlocks()
279 E = BB->pred_end(); PI != E; ++PI) in FindPredecessorBlocks()
285 static unsigned GetUndefVal(MachineBasicBlock *BB, in GetUndefVal() argument
289 BB, BB->getFirstTerminator(), in GetUndefVal()
297 static unsigned CreateEmptyPHI(MachineBasicBlock *BB, unsigned NumPreds, in CreateEmptyPHI() argument
299 MachineBasicBlock::iterator Loc = BB->empty() ? BB->end() : BB->begin(); in CreateEmptyPHI()
300 MachineInstr *PHI = InsertNewDef(TargetOpcode::PHI, BB, Loc, in CreateEmptyPHI()
349 unsigned MachineSSAUpdater::GetValueAtEndOfBlockInternal(MachineBasicBlock *BB){ in GetValueAtEndOfBlockInternal() argument
351 if (unsigned V = AvailableVals[BB]) in GetValueAtEndOfBlockInternal()
355 return Impl.GetValue(BB); in GetValueAtEndOfBlockInternal()