blockfreq: Really fix r206548 (and r206549)
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Fri, 18 Apr 2014 02:10:09 +0000 (02:10 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Fri, 18 Apr 2014 02:10:09 +0000 (02:10 +0000)
Turns out this code is dead.

llvm-svn: 206554

llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp

index 2c7e9e1..f267a9c 100644 (file)
@@ -369,38 +369,6 @@ typedef BlockFrequencyInfoImplBase::PackagedLoopData PackagedLoopData;
 typedef BlockFrequencyInfoImplBase::Weight Weight;
 typedef BlockFrequencyInfoImplBase::FrequencyData FrequencyData;
 
-/// \brief Stack entry describing a loop.
-struct LoopStackEntry {
-  BlockNode LoopHead;
-  BlockNode LatestBackedge;
-};
-
-/// \brief Stack describing currently open loops.
-struct LoopStack {
-  std::vector<LoopStackEntry> OpenLoops;
-
-  void push(const BlockNode &LoopHead, const BlockNode &LatestBackedge) {
-    assert(LoopHead.isValid());
-    assert(LatestBackedge.isValid());
-    OpenLoops.emplace_back(LoopHead, LatestBackedge);
-  }
-  void pop(const BlockNode &FinishedNode) {
-    while (!empty() && top().LatestBackedge <= FinishedNode)
-      OpenLoops.pop_back();
-  }
-  bool empty() const { return OpenLoops.empty(); }
-  const LoopStackEntry &top() const {
-    assert(!OpenLoops.empty());
-    return OpenLoops.back();
-  }
-  void adjustAfterFinishing(const BlockNode &Current,
-                            const BlockNode &LatestBackedge) {
-    pop(Current);
-    if (LatestBackedge.isValid() && LatestBackedge > Current)
-      push(Current, LatestBackedge);
-  }
-};
-
 /// \brief Dithering mass distributer.
 ///
 /// This class splits up a single mass into portions by weight, dithering to