1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-02-01 13:11:39 +01:00

[splitkit] Add a minor wrapper function for readability [NFC]

This commit is contained in:
Philip Reames 2021-02-18 08:59:38 -08:00
parent 757da1bc62
commit 42c907ecd1
2 changed files with 7 additions and 3 deletions

View File

@ -1531,7 +1531,7 @@ bool SplitAnalysis::shouldSplitSingleBlock(const BlockInfo &BI,
void SplitEditor::splitSingleBlock(const SplitAnalysis::BlockInfo &BI) {
openIntv();
SlotIndex LastSplitPoint = SA.getLastSplitPoint(BI.MBB->getNumber());
SlotIndex LastSplitPoint = SA.getLastSplitPoint(BI.MBB);
SlotIndex SegStart = enterIntvBefore(std::min(BI.FirstInstr,
LastSplitPoint));
if (!BI.LiveOut || BI.LastInstr < LastSplitPoint) {
@ -1685,7 +1685,7 @@ void SplitEditor::splitRegInBlock(const SplitAnalysis::BlockInfo &BI,
return;
}
SlotIndex LSP = SA.getLastSplitPoint(BI.MBB->getNumber());
SlotIndex LSP = SA.getLastSplitPoint(BI.MBB);
if (!LeaveBefore || LeaveBefore > BI.LastInstr.getBoundaryIndex()) {
//
@ -1762,7 +1762,7 @@ void SplitEditor::splitRegOutBlock(const SplitAnalysis::BlockInfo &BI,
<< ", enter after " << EnterAfter
<< (BI.LiveIn ? ", stack-in" : ", defined in block"));
SlotIndex LSP = SA.getLastSplitPoint(BI.MBB->getNumber());
SlotIndex LSP = SA.getLastSplitPoint(BI.MBB);
assert(IntvOut && "Must have register out");
assert(BI.LiveOut && "Must be live-out");

View File

@ -238,6 +238,10 @@ public:
return IPA.getLastInsertPoint(*CurLI, *MF.getBlockNumbered(Num));
}
SlotIndex getLastSplitPoint(MachineBasicBlock *BB) {
return IPA.getLastInsertPoint(*CurLI, *BB);
}
MachineBasicBlock::iterator getLastSplitPointIter(MachineBasicBlock *BB) {
return IPA.getLastInsertPointIter(*CurLI, *BB);
}