llvm.org GIT mirror llvm / d16e7d9
[NFC] Turn collectTransitivePredecessors into a static function git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346217 91177308-0d34-0410-b5e6-96231b3b80d8 Max Kazantsev 11 months ago
2 changed file(s) with 5 addition(s) and 9 deletion(s). Raw diff Collapse all Expand all
4747 class LoopSafetyInfo {
4848 // Used to update funclet bundle operands.
4949 DenseMap BlockColors;
50
51 /// Collect all blocks from \p CurLoop which lie on all possible paths from
52 /// the header of \p CurLoop (inclusive) to BB (exclusive) into the set
53 /// \p Predecessors. If \p BB is the header, \p Predecessors will be empty.
54 void collectTransitivePredecessors(
55 const Loop *CurLoop, const BasicBlock *BB,
56 SmallPtrSetImpl &Predecessors) const;
5750
5851 protected:
5952 /// Computes block colors.
144144 return SimpleCst->isAllOnesValue();
145145 }
146146
147 void LoopSafetyInfo::collectTransitivePredecessors(
147 /// Collect all blocks from \p CurLoop which lie on all possible paths from
148 /// the header of \p CurLoop (inclusive) to BB (exclusive) into the set
149 /// \p Predecessors. If \p BB is the header, \p Predecessors will be empty.
150 static void collectTransitivePredecessors(
148151 const Loop *CurLoop, const BasicBlock *BB,
149 SmallPtrSetImpl &Predecessors) const {
152 SmallPtrSetImpl &Predecessors) {
150153 assert(Predecessors.empty() && "Garbage in predecessors set?");
151154 assert(CurLoop->contains(BB) && "Should only be called for loop blocks!");
152155 if (BB == CurLoop->getHeader())