Lines Matching defs:BI
217 BlockInfo BI;
218 BI.MBB = &*MFI;
220 std::tie(Start, Stop) = LIS.getSlotIndexes()->getMBBRange(BI.MBB);
227 ThroughBlocks.set(BI.MBB->getNumber());
233 BI.FirstInstr = *UseI;
234 assert(BI.FirstInstr >= Start);
237 BI.LastInstr = UseI[-1];
238 assert(BI.LastInstr < Stop);
241 BI.LiveIn = LVI->start <= Start;
244 if (!BI.LiveIn) {
246 assert(LVI->start == BI.FirstInstr && "First instr should be a def");
247 BI.FirstDef = BI.FirstInstr;
251 BI.LiveOut = true;
255 BI.LiveOut = false;
256 BI.LastInstr = LastStop;
266 BI.LiveOut = false;
267 UseBlocks.push_back(BI);
270 // Set up BI for the live-out part.
271 BI.LiveIn = false;
272 BI.LiveOut = true;
273 BI.FirstInstr = BI.FirstDef = LVI->start;
278 if (!BI.FirstDef)
279 BI.FirstDef = LVI->start;
282 UseBlocks.push_back(BI);
301 any_of(UseBlocks, [this](BlockInfo &BI) {
302 MachineLoop *L = Loops.getLoopFor(BI.MBB);
303 return BI.LiveIn && BI.LiveOut && BI.FirstDef && L &&
304 L->isLoopLatch(BI.MBB);
1588 bool SplitAnalysis::shouldSplitSingleBlock(const BlockInfo &BI,
1591 if (!BI.isOneInstr())
1597 if (BI.LiveIn && BI.LiveOut)
1600 MachineInstr *MI = LIS.getInstructionFromIndex(BI.FirstInstr);
1605 return isOriginalEndpoint(BI.FirstInstr);
1608 void SplitEditor::splitSingleBlock(const SplitAnalysis::BlockInfo &BI) {
1610 SlotIndex LastSplitPoint = SA.getLastSplitPoint(BI.MBB);
1611 SlotIndex SegStart = enterIntvBefore(std::min(BI.FirstInstr,
1613 if (!BI.LiveOut || BI.LastInstr < LastSplitPoint) {
1614 useIntv(SegStart, leaveIntvAfter(BI.LastInstr));
1619 overlapIntv(SegStop, BI.LastInstr);
1737 void SplitEditor::splitRegInBlock(const SplitAnalysis::BlockInfo &BI,
1740 std::tie(Start, Stop) = LIS.getSlotIndexes()->getMBBRange(BI.MBB);
1742 LLVM_DEBUG(dbgs() << printMBBReference(*BI.MBB) << " [" << Start << ';'
1743 << Stop << "), uses " << BI.FirstInstr << '-'
1744 << BI.LastInstr << ", reg-in " << IntvIn
1746 << (BI.LiveOut ? ", stack-out" : ", killed in block"));
1749 assert(BI.LiveIn && "Must be live-in");
1752 if (!BI.LiveOut && (!LeaveBefore || LeaveBefore >= BI.LastInstr)) {
1760 useIntv(Start, BI.LastInstr);
1764 SlotIndex LSP = SA.getLastSplitPoint(BI.MBB);
1766 if (!LeaveBefore || LeaveBefore > BI.LastInstr.getBoundaryIndex()) {
1777 if (BI.LastInstr < LSP) {
1780 SlotIndex Idx = leaveIntvAfter(BI.LastInstr);
1787 overlapIntv(Idx, BI.LastInstr);
1801 if (!BI.LiveOut || BI.LastInstr < LSP) {
1807 SlotIndex To = leaveIntvAfter(BI.LastInstr);
1822 overlapIntv(To, BI.LastInstr);
1830 void SplitEditor::splitRegOutBlock(const SplitAnalysis::BlockInfo &BI,
1833 std::tie(Start, Stop) = LIS.getSlotIndexes()->getMBBRange(BI.MBB);
1835 LLVM_DEBUG(dbgs() << printMBBReference(*BI.MBB) << " [" << Start << ';'
1836 << Stop << "), uses " << BI.FirstInstr << '-'
1837 << BI.LastInstr << ", reg-out " << IntvOut
1839 << (BI.LiveIn ? ", stack-in" : ", defined in block"));
1841 SlotIndex LSP = SA.getLastSplitPoint(BI.MBB);
1844 assert(BI.LiveOut && "Must be live-out");
1847 if (!BI.LiveIn && (!EnterAfter || EnterAfter <= BI.FirstInstr)) {
1855 useIntv(BI.FirstInstr, Stop);
1859 if (!EnterAfter || EnterAfter < BI.FirstInstr.getBaseIndex()) {
1867 SlotIndex Idx = enterIntvBefore(std::min(LSP, BI.FirstInstr));
1888 SlotIndex From = enterIntvBefore(std::min(Idx, BI.FirstInstr));