diff options
author | Owen Anderson <resistor@mac.com> | 2009-01-27 05:01:15 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-01-27 05:01:15 +0000 |
commit | 26562de2efa73446dbb8ae4cb6fb6b08f1c252a9 (patch) | |
tree | 78cc825e4b4c37d6b72943336e748db970a3c08f /lib/CodeGen/PreAllocSplitting.cpp | |
parent | 6a86bd71df6114ce3435b6fda70573f8c1ff80cf (diff) |
Make the pre-split-limit option more useful by using a per-function counter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63091 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/PreAllocSplitting.cpp')
-rw-r--r-- | lib/CodeGen/PreAllocSplitting.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/CodeGen/PreAllocSplitting.cpp b/lib/CodeGen/PreAllocSplitting.cpp index e3d652ac5e..2a009b0aef 100644 --- a/lib/CodeGen/PreAllocSplitting.cpp +++ b/lib/CodeGen/PreAllocSplitting.cpp @@ -38,7 +38,7 @@ using namespace llvm; static cl::opt<int> PreSplitLimit("pre-split-limit", cl::init(-1), cl::Hidden); -STATISTIC(NumSplits, "Number of intervals split"); +STATISTIC(NumTotalSplits, "Number of intervals split"); STATISTIC(NumRemats, "Number of intervals split by rematerialization"); STATISTIC(NumFolds, "Number of intervals split with spill folding"); STATISTIC(NumRenumbers, "Number of intervals renumbered into new registers"); @@ -77,6 +77,8 @@ namespace { // Def2SpillMap - A map from a def instruction index to spill index. DenseMap<unsigned, unsigned> Def2SpillMap; + + unsigned NumSplits; public: static char ID; @@ -1191,6 +1193,7 @@ bool PreAllocSplitting::runOnMachineFunction(MachineFunction &MF) { LSs = &getAnalysis<LiveStacks>(); bool MadeChange = false; + NumSplits = 0; // Make sure blocks are numbered in order. MF.RenumberBlocks(); @@ -1217,6 +1220,9 @@ bool PreAllocSplitting::runOnMachineFunction(MachineFunction &MF) { } MadeChange |= removeDeadSpills(Split); + + if (NumSplits) + NumTotalSplits += NumSplits; return MadeChange; } |