From a9da909e57d4ecb9b58348d0d0dfad171cf4e11f Mon Sep 17 00:00:00 2001 From: "Duncan P. N. Exon Smith" Date: Fri, 18 Apr 2014 02:10:09 +0000 Subject: [PATCH] blockfreq: Really fix r206548 (and r206549) Turns out this code is dead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206554 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Analysis/BlockFrequencyInfoImpl.cpp | 32 ------------------------- 1 file changed, 32 deletions(-) diff --git a/lib/Analysis/BlockFrequencyInfoImpl.cpp b/lib/Analysis/BlockFrequencyInfoImpl.cpp index 2c7e9e131f4..f267a9cdc5c 100644 --- a/lib/Analysis/BlockFrequencyInfoImpl.cpp +++ b/lib/Analysis/BlockFrequencyInfoImpl.cpp @@ -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 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