Remove SplitAnalysis::removeUse. It was only used to make SplitAnalysis
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Tue, 5 Oct 2010 23:10:09 +0000 (23:10 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Tue, 5 Oct 2010 23:10:09 +0000 (23:10 +0000)
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

lib/CodeGen/SplitKit.cpp
lib/CodeGen/SplitKit.h

index b1ce209d456f8af6a7490db177bc42ecf1df1c1d..c47e9c91824bebb202844809dc89cacd249caee7 100644 (file)
@@ -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);
   }
 
index a3488f75f0d5cfd80b6955c6fdc78b97194afbbb..e76cbc6ce3e4ec96ca9cb00d393ed93c53844533 100644 (file)
@@ -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