mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-07 01:38:26 +00:00
Empty basic block should have an empty range.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49800 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
48325f4b08
commit
76249966ee
@ -108,7 +108,9 @@ bool LiveIntervals::runOnMachineFunction(MachineFunction &fn) {
|
||||
}
|
||||
|
||||
// Set the MBB2IdxMap entry for this MBB.
|
||||
MBB2IdxMap[MBB->getNumber()] = std::make_pair(StartIdx, MIIndex - 1);
|
||||
MBB2IdxMap[MBB->getNumber()] = (StartIdx == MIIndex)
|
||||
? std::make_pair(StartIdx, StartIdx) // Empty MBB
|
||||
: std::make_pair(StartIdx, MIIndex - 1);
|
||||
Idx2MBBMap.push_back(std::make_pair(StartIdx, MBB));
|
||||
}
|
||||
std::sort(Idx2MBBMap.begin(), Idx2MBBMap.end(), Idx2MBBCompare());
|
||||
|
Loading…
x
Reference in New Issue
Block a user