[llvm-commits] [llvm] r58312 - /llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp
Evan Cheng
evan.cheng at apple.com
Mon Oct 27 18:48:25 PDT 2008
Author: evancheng
Date: Mon Oct 27 20:48:24 2008
New Revision: 58312
URL: http://llvm.org/viewvc/llvm-project?rev=58312&view=rev
Log:
Add command line option to limit the number splits to help debugging.
Modified:
llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp
Modified: llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp?rev=58312&r1=58311&r2=58312&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp (original)
+++ llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp Mon Oct 27 20:48:24 2008
@@ -33,7 +33,9 @@
#include <map>
using namespace llvm;
-STATISTIC(NumSplit , "Number of intervals split");
+static cl::opt<int> PreSplitLimit("pre-split-limit", cl::init(-1), cl::Hidden);
+
+STATISTIC(NumSplits, "Number of intervals split");
namespace {
class VISIBILITY_HIDDEN PreAllocSplitting : public MachineFunctionPass {
@@ -607,7 +609,7 @@
// Record val# values are in the specific spill slot.
RecordSplit(CurrLI->reg, SpillIndex, RestoreIndex, SS);
- ++NumSplit;
+ ++NumSplits;
return true;
}
@@ -659,7 +661,7 @@
// Record val# values are in the specific spill slot.
RecordSplit(CurrLI->reg, SpillIndex, RestoreIndex, SS);
- ++NumSplit;
+ ++NumSplits;
return true;
}
@@ -689,6 +691,8 @@
// Process the affected live intervals.
bool Change = false;
while (!Intervals.empty()) {
+ if (PreSplitLimit != -1 && (int)NumSplits == PreSplitLimit)
+ break;
LiveInterval *LI = Intervals.back();
Intervals.pop_back();
Change |= SplitRegLiveInterval(LI);
More information about the llvm-commits
mailing list