Lines Matching refs:BI
203 BlockInfo BI; in calcLiveBlockInfo() local
204 BI.MBB = &*MFI; in calcLiveBlockInfo()
206 std::tie(Start, Stop) = LIS.getSlotIndexes()->getMBBRange(BI.MBB); in calcLiveBlockInfo()
213 ThroughBlocks.set(BI.MBB->getNumber()); in calcLiveBlockInfo()
220 BI.FirstInstr = *UseI; in calcLiveBlockInfo()
221 assert(BI.FirstInstr >= Start); in calcLiveBlockInfo()
224 BI.LastInstr = UseI[-1]; in calcLiveBlockInfo()
225 assert(BI.LastInstr < Stop); in calcLiveBlockInfo()
228 BI.LiveIn = LVI->start <= Start; in calcLiveBlockInfo()
231 if (!BI.LiveIn) { in calcLiveBlockInfo()
233 assert(LVI->start == BI.FirstInstr && "First instr should be a def"); in calcLiveBlockInfo()
234 BI.FirstDef = BI.FirstInstr; in calcLiveBlockInfo()
238 BI.LiveOut = true; in calcLiveBlockInfo()
242 BI.LiveOut = false; in calcLiveBlockInfo()
243 BI.LastInstr = LastStop; in calcLiveBlockInfo()
253 BI.LiveOut = false; in calcLiveBlockInfo()
254 UseBlocks.push_back(BI); in calcLiveBlockInfo()
258 BI.LiveIn = false; in calcLiveBlockInfo()
259 BI.LiveOut = true; in calcLiveBlockInfo()
260 BI.FirstInstr = BI.FirstDef = LVI->start; in calcLiveBlockInfo()
265 if (!BI.FirstDef) in calcLiveBlockInfo()
266 BI.FirstDef = LVI->start; in calcLiveBlockInfo()
269 UseBlocks.push_back(BI); in calcLiveBlockInfo()
1225 bool SplitAnalysis::shouldSplitSingleBlock(const BlockInfo &BI, in shouldSplitSingleBlock() argument
1228 if (!BI.isOneInstr()) in shouldSplitSingleBlock()
1234 if (BI.LiveIn && BI.LiveOut) in shouldSplitSingleBlock()
1237 if (LIS.getInstructionFromIndex(BI.FirstInstr)->isCopyLike()) in shouldSplitSingleBlock()
1240 return isOriginalEndpoint(BI.FirstInstr); in shouldSplitSingleBlock()
1243 void SplitEditor::splitSingleBlock(const SplitAnalysis::BlockInfo &BI) { in splitSingleBlock() argument
1245 SlotIndex LastSplitPoint = SA.getLastSplitPoint(BI.MBB->getNumber()); in splitSingleBlock()
1246 SlotIndex SegStart = enterIntvBefore(std::min(BI.FirstInstr, in splitSingleBlock()
1248 if (!BI.LiveOut || BI.LastInstr < LastSplitPoint) { in splitSingleBlock()
1249 useIntv(SegStart, leaveIntvAfter(BI.LastInstr)); in splitSingleBlock()
1254 overlapIntv(SegStop, BI.LastInstr); in splitSingleBlock()
1374 void SplitEditor::splitRegInBlock(const SplitAnalysis::BlockInfo &BI, in splitRegInBlock() argument
1377 std::tie(Start, Stop) = LIS.getSlotIndexes()->getMBBRange(BI.MBB); in splitRegInBlock()
1379 DEBUG(dbgs() << "BB#" << BI.MBB->getNumber() << " [" << Start << ';' << Stop in splitRegInBlock()
1380 << "), uses " << BI.FirstInstr << '-' << BI.LastInstr in splitRegInBlock()
1382 << (BI.LiveOut ? ", stack-out" : ", killed in block")); in splitRegInBlock()
1385 assert(BI.LiveIn && "Must be live-in"); in splitRegInBlock()
1388 if (!BI.LiveOut && (!LeaveBefore || LeaveBefore >= BI.LastInstr)) { in splitRegInBlock()
1396 useIntv(Start, BI.LastInstr); in splitRegInBlock()
1400 SlotIndex LSP = SA.getLastSplitPoint(BI.MBB->getNumber()); in splitRegInBlock()
1402 if (!LeaveBefore || LeaveBefore > BI.LastInstr.getBoundaryIndex()) { in splitRegInBlock()
1413 if (BI.LastInstr < LSP) { in splitRegInBlock()
1416 SlotIndex Idx = leaveIntvAfter(BI.LastInstr); in splitRegInBlock()
1423 overlapIntv(Idx, BI.LastInstr); in splitRegInBlock()
1437 if (!BI.LiveOut || BI.LastInstr < LSP) { in splitRegInBlock()
1443 SlotIndex To = leaveIntvAfter(BI.LastInstr); in splitRegInBlock()
1458 overlapIntv(To, BI.LastInstr); in splitRegInBlock()
1466 void SplitEditor::splitRegOutBlock(const SplitAnalysis::BlockInfo &BI, in splitRegOutBlock() argument
1469 std::tie(Start, Stop) = LIS.getSlotIndexes()->getMBBRange(BI.MBB); in splitRegOutBlock()
1471 DEBUG(dbgs() << "BB#" << BI.MBB->getNumber() << " [" << Start << ';' << Stop in splitRegOutBlock()
1472 << "), uses " << BI.FirstInstr << '-' << BI.LastInstr in splitRegOutBlock()
1474 << (BI.LiveIn ? ", stack-in" : ", defined in block")); in splitRegOutBlock()
1476 SlotIndex LSP = SA.getLastSplitPoint(BI.MBB->getNumber()); in splitRegOutBlock()
1479 assert(BI.LiveOut && "Must be live-out"); in splitRegOutBlock()
1482 if (!BI.LiveIn && (!EnterAfter || EnterAfter <= BI.FirstInstr)) { in splitRegOutBlock()
1490 useIntv(BI.FirstInstr, Stop); in splitRegOutBlock()
1494 if (!EnterAfter || EnterAfter < BI.FirstInstr.getBaseIndex()) { in splitRegOutBlock()
1502 SlotIndex Idx = enterIntvBefore(std::min(LSP, BI.FirstInstr)); in splitRegOutBlock()
1523 SlotIndex From = enterIntvBefore(std::min(Idx, BI.FirstInstr)); in splitRegOutBlock()