summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2010-10-05 23:10:09 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2010-10-05 23:10:09 +0000
commit56e2925e6c5ca0476d87b950387adf6de8c9c971 (patch)
tree912a475f5532129d65b8177dfaa1aaa34c041d73 /llvm/lib
parent0445e2a053679f97e1df657e2606a8fba1724a25 (diff)
downloadbcm5719-llvm-56e2925e6c5ca0476d87b950387adf6de8c9c971.tar.gz
bcm5719-llvm-56e2925e6c5ca0476d87b950387adf6de8c9c971.zip
Remove SplitAnalysis::removeUse. It was only used to make SplitAnalysis
reusable, but that is no longer relevant since a split will always replace the original. llvm-svn: 115709
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/SplitKit.cpp29
-rw-r--r--llvm/lib/CodeGen/SplitKit.h3
2 files changed, 0 insertions, 32 deletions
diff --git a/llvm/lib/CodeGen/SplitKit.cpp b/llvm/lib/CodeGen/SplitKit.cpp
index b1ce209d456..c47e9c91824 100644
--- a/llvm/lib/CodeGen/SplitKit.cpp
+++ b/llvm/lib/CodeGen/SplitKit.cpp
@@ -77,34 +77,6 @@ void SplitAnalysis::analyzeUses() {
<< usingLoops_.size() << " loops.\n");
}
-/// removeUse - Update statistics by noting that MI no longer uses curli.
-void SplitAnalysis::removeUse(const MachineInstr *MI) {
- if (!usingInstrs_.erase(MI))
- return;
-
- // Decrement MBB count.
- const MachineBasicBlock *MBB = MI->getParent();
- BlockCountMap::iterator bi = usingBlocks_.find(MBB);
- assert(bi != usingBlocks_.end() && "MBB missing");
- assert(bi->second && "0 count in map");
- if (--bi->second)
- return;
- // No more uses in MBB.
- usingBlocks_.erase(bi);
-
- // Decrement loop count.
- MachineLoop *Loop = loops_.getLoopFor(MBB);
- if (!Loop)
- return;
- LoopCountMap::iterator li = usingLoops_.find(Loop);
- assert(li != usingLoops_.end() && "Loop missing");
- assert(li->second && "0 count in map");
- if (--li->second)
- return;
- // No more blocks in Loop.
- usingLoops_.erase(li);
-}
-
// Get three sets of basic blocks surrounding a loop: Blocks inside the loop,
// predecessor blocks, and exit blocks.
void SplitAnalysis::getLoopBlocks(const MachineLoop *Loop, LoopBlocks &Blocks) {
@@ -865,7 +837,6 @@ void SplitEditor::rewrite() {
}
}
MO.setReg(LI->reg);
- sa_.removeUse(MI);
DEBUG(dbgs() << " rewrite " << Idx << '\t' << *MI);
}
diff --git a/llvm/lib/CodeGen/SplitKit.h b/llvm/lib/CodeGen/SplitKit.h
index a3488f75f0d..e76cbc6ce3e 100644
--- a/llvm/lib/CodeGen/SplitKit.h
+++ b/llvm/lib/CodeGen/SplitKit.h
@@ -68,9 +68,6 @@ 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
OpenPOWER on IntegriCloud