LLVM
8.0.1
|
Functions | |
template<typename RangeT > | |
void | appendLoopsToWorklist (RangeT &&Loops, SmallPriorityWorklist< Loop *, 4 > &Worklist) |
Helper to implement appending of loops onto a worklist. More... | |
|
inline |
Helper to implement appending of loops onto a worklist.
We want to process loops in postorder, but the worklist is a LIFO data structure, so we append to it in reverse postorder.
For trees, a preorder traversal is a viable reverse postorder, so we actually append using a preorder walk algorithm.
Definition at line 114 of file LoopPassManager.h.
References llvm::SmallVectorImpl< T >::append(), assert(), llvm::LoopBase< BlockT, LoopT >::begin(), llvm::SmallVectorImpl< T >::clear(), llvm::SmallVectorBase::empty(), llvm::LoopBase< BlockT, LoopT >::end(), llvm::PriorityWorklist< T, SmallVector< T, N >, SmallDenseMap< T, ptrdiff_t > >::insert(), Loops, llvm::SmallVectorImpl< T >::pop_back_val(), llvm::SmallVectorTemplateBase< T >::push_back(), and llvm::reverse().
Referenced by llvm::LPMUpdater::addChildLoops(), llvm::LPMUpdater::addSiblingLoops(), and llvm::FunctionToLoopPassAdaptor< LoopPassT >::run().