diff options
author | Evan Cheng <evan.cheng@apple.com> | 2008-04-16 18:01:08 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2008-04-16 18:01:08 +0000 |
commit | 76249966eec8d318534b416f33f878c6bd01d1ee (patch) | |
tree | 2a5fb44d8b579f3b606ad44fb45851481f6b7600 /lib/CodeGen/LiveIntervalAnalysis.cpp | |
parent | 48325f4b0892859844f9dc0c6e9d2606e381ecc4 (diff) |
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
Diffstat (limited to 'lib/CodeGen/LiveIntervalAnalysis.cpp')
-rw-r--r-- | lib/CodeGen/LiveIntervalAnalysis.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp index 9f72035bc9..d8ca141c66 100644 --- a/lib/CodeGen/LiveIntervalAnalysis.cpp +++ b/lib/CodeGen/LiveIntervalAnalysis.cpp @@ -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()); |