aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/SplitKit.h
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2010-08-12 23:02:55 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2010-08-12 23:02:55 +0000
commit5bac38b2ba90ba5bfe1a25a34f4bc3a39d55010d (patch)
treea87787398563ce11d16090595733ee1dc0b90e1e /lib/CodeGen/SplitKit.h
parent92bdf63fff357f6204fe5bd9642d6591ed0508fe (diff)
downloadexternal_llvm-5bac38b2ba90ba5bfe1a25a34f4bc3a39d55010d.zip
external_llvm-5bac38b2ba90ba5bfe1a25a34f4bc3a39d55010d.tar.gz
external_llvm-5bac38b2ba90ba5bfe1a25a34f4bc3a39d55010d.tar.bz2
Update the SplitAnalysis statistics as uses are moved from curli to the new
split intervals. THis means the analysis can be used for multiple splits as long as curli doesn't shrink. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110975 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SplitKit.h')
-rw-r--r--lib/CodeGen/SplitKit.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/CodeGen/SplitKit.h b/lib/CodeGen/SplitKit.h
index 663626e..08f7c56 100644
--- a/lib/CodeGen/SplitKit.h
+++ b/lib/CodeGen/SplitKit.h
@@ -45,9 +45,9 @@ public:
typedef DenseMap<const MachineBasicBlock*, unsigned> BlockCountMap;
BlockCountMap usingBlocks_;
- // Loops where the curent interval is used.
- typedef SmallPtrSet<const MachineLoop*, 16> LoopPtrSet;
- LoopPtrSet usingLoops_;
+ // The number of basic block using curli in each loop.
+ typedef DenseMap<const MachineLoop*, unsigned> LoopCountMap;
+ LoopCountMap usingLoops_;
private:
// Current live interval.
@@ -68,6 +68,9 @@ public:
/// split.
void analyze(const LiveInterval *li);
+ /// removeUse - Update statistics by noting that mi no longer uses curli.
+ void removeUse(const MachineInstr *mi);
+
const LiveInterval *getCurLI() { return curli_; }
/// clear - clear all data structures so SplitAnalysis is ready to analyze a
@@ -75,6 +78,7 @@ public:
void clear();
typedef SmallPtrSet<const MachineBasicBlock*, 16> BlockPtrSet;
+ typedef SmallPtrSet<const MachineLoop*, 16> LoopPtrSet;
// Sets of basic blocks surrounding a machine loop.
struct LoopBlocks {