mirror of
https://github.com/RPCS3/llvm.git
synced 2026-07-20 19:04:10 -04:00
InsertPointAnalysis: Move current live interval from being a class member
to query interfaces argument; NFC Differential Revision: http://reviews.llvm.org/D20532 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270481 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -43,10 +43,11 @@ STATISTIC(NumRepairs, "Number of invalid live ranges repaired");
|
||||
|
||||
InsertPointAnalysis::InsertPointAnalysis(const LiveIntervals &lis,
|
||||
unsigned BBNum)
|
||||
: LIS(lis), CurLI(nullptr), LastInsertPoint(BBNum) {}
|
||||
: LIS(lis), LastInsertPoint(BBNum) {}
|
||||
|
||||
SlotIndex
|
||||
InsertPointAnalysis::computeLastInsertPoint(const MachineBasicBlock &MBB) {
|
||||
InsertPointAnalysis::computeLastInsertPoint(const LiveInterval &CurLI,
|
||||
const MachineBasicBlock &MBB) {
|
||||
unsigned Num = MBB.getNumber();
|
||||
std::pair<SlotIndex, SlotIndex> &LIP = LastInsertPoint[Num];
|
||||
SlotIndex MBBEnd = LIS.getMBBEndIdx(&MBB);
|
||||
@@ -85,14 +86,13 @@ InsertPointAnalysis::computeLastInsertPoint(const MachineBasicBlock &MBB) {
|
||||
if (!LIP.second)
|
||||
return LIP.first;
|
||||
|
||||
assert(CurLI && "CurLI not being set");
|
||||
if (none_of(EHPadSucessors, [&](const MachineBasicBlock *EHPad) {
|
||||
return LIS.isLiveInToMBB(*CurLI, EHPad);
|
||||
return LIS.isLiveInToMBB(CurLI, EHPad);
|
||||
}))
|
||||
return LIP.first;
|
||||
|
||||
// Find the value leaving MBB.
|
||||
const VNInfo *VNI = CurLI->getVNInfoBefore(MBBEnd);
|
||||
const VNInfo *VNI = CurLI.getVNInfoBefore(MBBEnd);
|
||||
if (!VNI)
|
||||
return LIP.first;
|
||||
|
||||
@@ -109,8 +109,9 @@ InsertPointAnalysis::computeLastInsertPoint(const MachineBasicBlock &MBB) {
|
||||
}
|
||||
|
||||
MachineBasicBlock::iterator
|
||||
InsertPointAnalysis::getLastInsertPointIter(MachineBasicBlock &MBB) {
|
||||
SlotIndex LIP = getLastInsertPoint(MBB);
|
||||
InsertPointAnalysis::getLastInsertPointIter(const LiveInterval &CurLI,
|
||||
MachineBasicBlock &MBB) {
|
||||
SlotIndex LIP = getLastInsertPoint(CurLI, MBB);
|
||||
if (LIP == LIS.getMBBEndIdx(&MBB))
|
||||
return MBB.end();
|
||||
return LIS.getInstructionFromIndex(LIP);
|
||||
@@ -328,7 +329,6 @@ bool SplitAnalysis::isOriginalEndpoint(SlotIndex Idx) const {
|
||||
void SplitAnalysis::analyze(const LiveInterval *li) {
|
||||
clear();
|
||||
CurLI = li;
|
||||
IPA.setInterval(li);
|
||||
analyzeUses();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user