diff options
| author | Owen Anderson <resistor@mac.com> | 2008-06-16 16:58:24 +0000 |
|---|---|---|
| committer | Owen Anderson <resistor@mac.com> | 2008-06-16 16:58:24 +0000 |
| commit | 7894e5bbac35100047396161587a0875f93828e1 (patch) | |
| tree | 3f42d10dc33ff77429712f02077e429bcab8172c | |
| parent | f1420cd4aa28a67354be5c02611ad564df694a19 (diff) | |
| download | external_llvm-7894e5bbac35100047396161587a0875f93828e1.zip external_llvm-7894e5bbac35100047396161587a0875f93828e1.tar.gz external_llvm-7894e5bbac35100047396161587a0875f93828e1.tar.bz2 | |
Re-enable empty block indexing by default, since it doesn't seem to have any
impact on code quality or compile time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52329 91177308-0d34-0410-b5e6-96231b3b80d8
| -rw-r--r-- | lib/CodeGen/LiveIntervalAnalysis.cpp | 30 |
1 files changed, 9 insertions, 21 deletions
diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp index f265e63..5bb3cfa 100644 --- a/lib/CodeGen/LiveIntervalAnalysis.cpp +++ b/lib/CodeGen/LiveIntervalAnalysis.cpp @@ -44,8 +44,6 @@ static cl::opt<bool> SplitAtBB("split-intervals-at-bb", cl::init(true), cl::Hidden); static cl::opt<int> SplitLimit("split-limit", cl::init(-1), cl::Hidden); -static cl::opt<bool> EmptyBBIndex("empty-bb-index", - cl::init(false), cl::Hidden); STATISTIC(numIntervals, "Number of original intervals"); STATISTIC(numIntervalsAfter, "Number of intervals after coalescing"); @@ -102,23 +100,15 @@ void LiveIntervals::computeNumbering() { i2miMap_.push_back(I); MIIndex += InstrSlots::NUM; } - - // Set the MBB2IdxMap entry for this MBB. - if (!EmptyBBIndex) { - 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)); - } else { - if (StartIdx == MIIndex) { - // Empty MBB - MIIndex += InstrSlots::NUM; - i2miMap_.push_back(0); - } - - MBB2IdxMap[MBB->getNumber()] = std::make_pair(StartIdx, MIIndex - 1); - Idx2MBBMap.push_back(std::make_pair(StartIdx, MBB)); + + if (StartIdx == MIIndex) { + // Empty MBB + MIIndex += InstrSlots::NUM; + i2miMap_.push_back(0); } + // Set the MBB2IdxMap entry for this MBB. + MBB2IdxMap[MBB->getNumber()] = std::make_pair(StartIdx, MIIndex - 1); + Idx2MBBMap.push_back(std::make_pair(StartIdx, MBB)); } std::sort(Idx2MBBMap.begin(), Idx2MBBMap.end(), Idx2MBBCompare()); @@ -675,9 +665,7 @@ void LiveIntervals::computeIntervals() { MIIndex += InstrSlots::NUM; } - if (EmptyBBIndex) { - if (MBB->begin() == miEnd) MIIndex += InstrSlots::NUM; // Empty MBB - } + if (MBB->begin() == miEnd) MIIndex += InstrSlots::NUM; // Empty MBB } } |
