aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/SplitKit.cpp
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
commitfc3ef3c2e9e1a01f19aaf1e362d8d2f209c09a46 (patch)
tree0c3561d614eb99042425716e8c99ffad126aa8ee /lib/CodeGen/SplitKit.cpp
parentd00f7e0c76d997b6b685ea66ba78aba2b952cd92 (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115709 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SplitKit.cpp')
-rw-r--r--lib/CodeGen/SplitKit.cpp29
1 files changed, 0 insertions, 29 deletions
diff --git a/lib/CodeGen/SplitKit.cpp b/lib/CodeGen/SplitKit.cpp
index b1ce209d45..c47e9c9182 100644
--- a/lib/CodeGen/SplitKit.cpp
+++ b/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);
}