mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-25 05:15:58 +00:00
[NFC] Turn collectTransitivePredecessors into a static function
llvm-svn: 346217
This commit is contained in:
parent
21c2bce874
commit
712a03820e
@ -49,13 +49,6 @@ class LoopSafetyInfo {
|
|||||||
// Used to update funclet bundle operands.
|
// Used to update funclet bundle operands.
|
||||||
DenseMap<BasicBlock *, ColorVector> BlockColors;
|
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:
|
protected:
|
||||||
/// Computes block colors.
|
/// Computes block colors.
|
||||||
void computeBlockColors(const Loop *CurLoop);
|
void computeBlockColors(const Loop *CurLoop);
|
||||||
|
@ -145,9 +145,12 @@ static bool CanProveNotTakenFirstIteration(const BasicBlock *ExitBlock,
|
|||||||
return SimpleCst->isAllOnesValue();
|
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,
|
const Loop *CurLoop, const BasicBlock *BB,
|
||||||
SmallPtrSetImpl<const BasicBlock *> &Predecessors) const {
|
SmallPtrSetImpl<const BasicBlock *> &Predecessors) {
|
||||||
assert(Predecessors.empty() && "Garbage in predecessors set?");
|
assert(Predecessors.empty() && "Garbage in predecessors set?");
|
||||||
assert(CurLoop->contains(BB) && "Should only be called for loop blocks!");
|
assert(CurLoop->contains(BB) && "Should only be called for loop blocks!");
|
||||||
if (BB == CurLoop->getHeader())
|
if (BB == CurLoop->getHeader())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user