[llvm] r346217 - [NFC] Turn collectTransitivePredecessors into a static function

Max Kazantsev via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 6 01:07:04 PST 2018


Author: mkazantsev
Date: Tue Nov  6 01:07:03 2018
New Revision: 346217

URL: http://llvm.org/viewvc/llvm-project?rev=346217&view=rev
Log:
[NFC] Turn collectTransitivePredecessors into a static function

Modified:
    llvm/trunk/include/llvm/Analysis/MustExecute.h
    llvm/trunk/lib/Analysis/MustExecute.cpp

Modified: llvm/trunk/include/llvm/Analysis/MustExecute.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/MustExecute.h?rev=346217&r1=346216&r2=346217&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/MustExecute.h (original)
+++ llvm/trunk/include/llvm/Analysis/MustExecute.h Tue Nov  6 01:07:03 2018
@@ -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);

Modified: llvm/trunk/lib/Analysis/MustExecute.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/MustExecute.cpp?rev=346217&r1=346216&r2=346217&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/MustExecute.cpp (original)
+++ llvm/trunk/lib/Analysis/MustExecute.cpp Tue Nov  6 01:07:03 2018
@@ -145,9 +145,12 @@ static bool CanProveNotTakenFirstIterati
   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())




More information about the llvm-commits mailing list