[llvm-commits] [llvm] r52329 - /llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp
Owen Anderson
resistor at mac.com
Mon Jun 16 09:58:24 PDT 2008
Author: resistor
Date: Mon Jun 16 11:58:24 2008
New Revision: 52329
URL: http://llvm.org/viewvc/llvm-project?rev=52329&view=rev
Log:
Re-enable empty block indexing by default, since it doesn't seem to have any
impact on code quality or compile time.
Modified:
llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp
Modified: llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp?rev=52329&r1=52328&r2=52329&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp (original)
+++ llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp Mon Jun 16 11:58:24 2008
@@ -44,8 +44,6 @@
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 @@
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 @@
MIIndex += InstrSlots::NUM;
}
- if (EmptyBBIndex) {
- if (MBB->begin() == miEnd) MIIndex += InstrSlots::NUM; // Empty MBB
- }
+ if (MBB->begin() == miEnd) MIIndex += InstrSlots::NUM; // Empty MBB
}
}
More information about the llvm-commits
mailing list