summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit32c181c4442db7eb326cebbe1c7d8b7bbd94132e (patch)
tree91ff653d5d1113218dbcea363029391ae28960e1 /llvm/lib/CodeGen/SplitKit.h
parentaf9bbad718bb59057fed7c7f921c42b4983607c3 (diff)
downloadbcm5719-llvm-32c181c4442db7eb326cebbe1c7d8b7bbd94132e.tar.gz
bcm5719-llvm-32c181c4442db7eb326cebbe1c7d8b7bbd94132e.zip
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. llvm-svn: 110975
Diffstat (limited to 'llvm/lib/CodeGen/SplitKit.h')
-rw-r--r--llvm/lib/CodeGen/SplitKit.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/SplitKit.h b/llvm/lib/CodeGen/SplitKit.h
index 663626e7299..08f7c56b470 100644
--- a/llvm/lib/CodeGen/SplitKit.h
+++ b/llvm/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 {
OpenPOWER on IntegriCloud