Lines Matching full:bb
65 bool MachineSSAUpdater::HasValueForBlock(MachineBasicBlock *BB) const { in HasValueForBlock()
66 return getAvailableVals(AV).count(BB); in HasValueForBlock()
71 void MachineSSAUpdater::AddAvailableValue(MachineBasicBlock *BB, Register V) { in AddAvailableValue() argument
72 getAvailableVals(AV)[BB] = V; in AddAvailableValue()
77 Register MachineSSAUpdater::GetValueAtEndOfBlock(MachineBasicBlock *BB) { in GetValueAtEndOfBlock() argument
78 return GetValueAtEndOfBlockInternal(BB); in GetValueAtEndOfBlock()
82 Register LookForIdenticalPHI(MachineBasicBlock *BB, in LookForIdenticalPHI() argument
84 if (BB->empty()) in LookForIdenticalPHI()
87 MachineBasicBlock::iterator I = BB->begin(); in LookForIdenticalPHI()
94 while (I != BB->end() && I->isPHI()) { in LookForIdenticalPHI()
114 static MachineInstrBuilder InsertNewDef(unsigned Opcode, MachineBasicBlock *BB, in InsertNewDef() argument
120 return BuildMI(*BB, I, DebugLoc(), TII->get(Opcode), NewVR); in InsertNewDef()
130 /// 'use' in BB. Consider code like this:
143 Register MachineSSAUpdater::GetValueInMiddleOfBlock(MachineBasicBlock *BB, in GetValueInMiddleOfBlock() argument
147 if (!HasValueForBlock(BB)) in GetValueInMiddleOfBlock()
148 return GetValueAtEndOfBlockInternal(BB, ExistingValueOnly); in GetValueInMiddleOfBlock()
151 if (BB->pred_empty()) { in GetValueInMiddleOfBlock()
157 InsertNewDef(TargetOpcode::IMPLICIT_DEF, BB, BB->getFirstTerminator(), in GetValueInMiddleOfBlock()
168 for (MachineBasicBlock *PredBB : BB->predecessors()) { in GetValueInMiddleOfBlock()
184 // If an identical PHI is already in BB, just reuse it. in GetValueInMiddleOfBlock()
185 Register DupPHI = LookForIdenticalPHI(BB, PredValues); in GetValueInMiddleOfBlock()
194 MachineBasicBlock::iterator Loc = BB->empty() ? BB->end() : BB->begin(); in GetValueInMiddleOfBlock()
196 InsertNewDef(TargetOpcode::PHI, BB, Loc, RegAttrs, MRI, TII); in GetValueInMiddleOfBlock()
270 static BlkSucc_iterator BlkSucc_begin(BlkT *BB) { return BB->succ_begin(); } in BlkSucc_begin() argument
271 static BlkSucc_iterator BlkSucc_end(BlkT *BB) { return BB->succ_end(); } in BlkSucc_end() argument
302 /// FindPredecessorBlocks - Put the predecessors of BB into the Preds
304 static void FindPredecessorBlocks(MachineBasicBlock *BB, in FindPredecessorBlocks() argument
306 append_range(*Preds, BB->predecessors()); in FindPredecessorBlocks()
311 static Register GetPoisonVal(MachineBasicBlock *BB, in GetPoisonVal() argument
315 InsertNewDef(TargetOpcode::IMPLICIT_DEF, BB, BB->getFirstNonPHI(), in GetPoisonVal()
322 static Register CreateEmptyPHI(MachineBasicBlock *BB, unsigned NumPreds, in CreateEmptyPHI() argument
324 MachineBasicBlock::iterator Loc = BB->empty() ? BB->end() : BB->begin(); in CreateEmptyPHI()
326 InsertNewDef(TargetOpcode::PHI, BB, Loc, Updater->RegAttrs, in CreateEmptyPHI()
370 /// for the specified BB and if so, return it. If not, construct SSA form by
374 MachineSSAUpdater::GetValueAtEndOfBlockInternal(MachineBasicBlock *BB, in GetValueAtEndOfBlockInternal() argument
377 Register ExistingVal = AvailableVals.lookup(BB); in GetValueAtEndOfBlockInternal()
382 return Impl.GetValue(BB); in GetValueAtEndOfBlockInternal()