summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/include/llvm/Analysis/MustExecute.h7
-rw-r--r--llvm/lib/Analysis/MustExecute.cpp7
2 files changed, 5 insertions, 9 deletions
diff --git a/llvm/include/llvm/Analysis/MustExecute.h b/llvm/include/llvm/Analysis/MustExecute.h
index c4005a9af95..05c28d13988 100644
--- a/llvm/include/llvm/Analysis/MustExecute.h
+++ b/llvm/include/llvm/Analysis/MustExecute.h
@@ -49,13 +49,6 @@ class LoopSafetyInfo {
// Used to update funclet bundle operands.
DenseMap<BasicBlock *, ColorVector> BlockColors;
- /// Collect all blocks from \p CurLoop which lie on all possible paths from
- /// the header of \p CurLoop (inclusive) to BB (exclusive) into the set
- /// \p Predecessors. If \p BB is the header, \p Predecessors will be empty.
- void collectTransitivePredecessors(
- const Loop *CurLoop, const BasicBlock *BB,
- SmallPtrSetImpl<const BasicBlock *> &Predecessors) const;
-
protected:
/// Computes block colors.
void computeBlockColors(const Loop *CurLoop);
diff --git a/llvm/lib/Analysis/MustExecute.cpp b/llvm/lib/Analysis/MustExecute.cpp
index 7507aebb527..23e012626e2 100644
--- a/llvm/lib/Analysis/MustExecute.cpp
+++ b/llvm/lib/Analysis/MustExecute.cpp
@@ -145,9 +145,12 @@ static bool CanProveNotTakenFirstIteration(const BasicBlock *ExitBlock,
return SimpleCst->isAllOnesValue();
}
-void LoopSafetyInfo::collectTransitivePredecessors(
+/// Collect all blocks from \p CurLoop which lie on all possible paths from
+/// the header of \p CurLoop (inclusive) to BB (exclusive) into the set
+/// \p Predecessors. If \p BB is the header, \p Predecessors will be empty.
+static void collectTransitivePredecessors(
const Loop *CurLoop, const BasicBlock *BB,
- SmallPtrSetImpl<const BasicBlock *> &Predecessors) const {
+ SmallPtrSetImpl<const BasicBlock *> &Predecessors) {
assert(Predecessors.empty() && "Garbage in predecessors set?");
assert(CurLoop->contains(BB) && "Should only be called for loop blocks!");
if (BB == CurLoop->getHeader())
OpenPOWER on IntegriCloud