aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/RegAllocGreedy.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-09-12 16:54:42 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-09-12 16:54:42 +0000
commita16a25ddeaf495b78b04e2a19feeac00d9824e63 (patch)
tree7de0808219c96cc1c56b7e68c47bde98867155f9 /lib/CodeGen/RegAllocGreedy.cpp
parent708d06f7fb5dfd9c8559aea07b042a88c65645f8 (diff)
Remove the -compact-regions flag.
It has been enabled by default for a while, it was only there to allow performance comparisons. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139501 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/RegAllocGreedy.cpp')
-rw-r--r--lib/CodeGen/RegAllocGreedy.cpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/lib/CodeGen/RegAllocGreedy.cpp b/lib/CodeGen/RegAllocGreedy.cpp
index 474594e796..08767a0d05 100644
--- a/lib/CodeGen/RegAllocGreedy.cpp
+++ b/lib/CodeGen/RegAllocGreedy.cpp
@@ -51,8 +51,6 @@ STATISTIC(NumGlobalSplits, "Number of split global live ranges");
STATISTIC(NumLocalSplits, "Number of split local live ranges");
STATISTIC(NumEvicted, "Number of interferences evicted");
-static cl::opt<bool> CompactRegions("compact-regions", cl::init(true));
-
static cl::opt<SplitEditor::ComplementSpillMode>
SplitSpillMode("split-spill-mode", cl::Hidden,
cl::desc("Spill mode for splitting live ranges"),
@@ -410,15 +408,11 @@ void RAGreedy::enqueue(LiveInterval *LI) {
if (ExtraRegInfo[Reg].Stage == RS_Split) {
// Unsplit ranges that couldn't be allocated immediately are deferred until
- // everything else has been allocated. Long ranges are allocated last so
- // they are split against realistic interference.
- if (CompactRegions)
- Prio = Size;
- else
- Prio = (1u << 31) - Size;
+ // everything else has been allocated.
+ Prio = Size;
} else {
- // Everything else is allocated in long->short order. Long ranges that don't
- // fit should be spilled ASAP so they don't create interference.
+ // Everything is allocated in long->short order. Long ranges that don't fit
+ // should be spilled (or split) ASAP so they don't create interference.
Prio = (1u << 31) + Size;
// Boost ranges that have a physical register hint.
@@ -1092,7 +1086,7 @@ unsigned RAGreedy::tryRegionSplit(LiveInterval &VirtReg, AllocationOrder &Order,
SmallVector<unsigned, 8> UsedCands;
// Check if we can split this live range around a compact region.
- bool HasCompact = CompactRegions && calcCompactRegion(GlobalCand.front());
+ bool HasCompact = calcCompactRegion(GlobalCand.front());
if (HasCompact) {
// Yes, keep GlobalCand[0] as the compact region candidate.
NumCands = 1;