aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/LiveIntervalAnalysis.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/LiveIntervalAnalysis.cpp')
-rw-r--r--lib/CodeGen/LiveIntervalAnalysis.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp
index adc1e207b5..09557851be 100644
--- a/lib/CodeGen/LiveIntervalAnalysis.cpp
+++ b/lib/CodeGen/LiveIntervalAnalysis.cpp
@@ -47,6 +47,8 @@ static cl::opt<bool> SplitAtBB("split-intervals-at-bb",
static cl::opt<int> SplitLimit("split-limit",
cl::init(-1), cl::Hidden);
+static cl::opt<bool> EnableAggressiveRemat("aggressive-remat", cl::Hidden);
+
STATISTIC(numIntervals, "Number of original intervals");
STATISTIC(numIntervalsAfter, "Number of intervals after coalescing");
STATISTIC(numFolds , "Number of loads/stores folded into instructions");
@@ -797,6 +799,8 @@ bool LiveIntervals::isReMaterializable(const LiveInterval &li,
// rules.
if (!MI->getDesc().isRematerializable() ||
!tii_->isTriviallyReMaterializable(MI)) {
+ if (!EnableAggressiveRemat)
+ return false;
// If the instruction access memory but the memoperands have been lost,
// we can't analyze it.