Disable the new aggressive remat logic introduced in 54000; it causes some
authorDan Gohman <gohman@apple.com>
Fri, 25 Jul 2008 15:08:37 +0000 (15:08 +0000)
committerDan Gohman <gohman@apple.com>
Fri, 25 Jul 2008 15:08:37 +0000 (15:08 +0000)
regressions, such as PR2595. Also, there is a significant code-quality
issue in SPEC 464.h264ref and a few others.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54014 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/LiveIntervalAnalysis.cpp

index adc1e207b50ca137a704e117ec869e586b0283a1..09557851be4bcd90b8adb22866ef74bd0791713d 100644 (file)
@@ -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.