LLVM 20.0.0git
|
A possibly irreducible generalization of a Loop. More...
#include "llvm/ADT/GenericCycleInfo.h"
Classes | |
struct | const_child_iterator |
Public Types | |
using | BlockT = typename ContextT::BlockT |
using | FunctionT = typename ContextT::FunctionT |
using | const_child_iterator_base = typename std::vector< std::unique_ptr< GenericCycle > >::const_iterator |
Iteration over child cycles. | |
using | const_block_iterator = typename BlockSetVectorT::const_iterator |
Iteration over blocks in the cycle (including entry blocks). | |
using | const_entry_iterator = typename SmallVectorImpl< BlockT * >::const_iterator |
Iteration over entry blocks. | |
Friends | |
template<typename > | |
class | GenericCycleInfo |
template<typename > | |
class | GenericCycleInfoCompute |
A possibly irreducible generalization of a Loop.
Definition at line 44 of file GenericCycleInfo.h.
using llvm::GenericCycle< ContextT >::BlockT = typename ContextT::BlockT |
Definition at line 46 of file GenericCycleInfo.h.
using llvm::GenericCycle< ContextT >::const_block_iterator = typename BlockSetVectorT::const_iterator |
Iteration over blocks in the cycle (including entry blocks).
Definition at line 174 of file GenericCycleInfo.h.
using llvm::GenericCycle< ContextT >::const_child_iterator_base = typename std::vector<std::unique_ptr<GenericCycle> >::const_iterator |
Iteration over child cycles.
Definition at line 145 of file GenericCycleInfo.h.
using llvm::GenericCycle< ContextT >::const_entry_iterator = typename SmallVectorImpl<BlockT *>::const_iterator |
Iteration over entry blocks.
Definition at line 190 of file GenericCycleInfo.h.
using llvm::GenericCycle< ContextT >::FunctionT = typename ContextT::FunctionT |
Definition at line 47 of file GenericCycleInfo.h.
|
default |
|
inline |
Definition at line 176 of file GenericCycleInfo.h.
References Blocks.
Referenced by llvm::GenericCycle< ContextT >::blocks().
|
inline |
Definition at line 179 of file GenericCycleInfo.h.
References Blocks.
Referenced by llvm::GenericCycle< ContextT >::blocks().
|
inline |
Definition at line 183 of file GenericCycleInfo.h.
References llvm::GenericCycle< ContextT >::block_begin(), llvm::GenericCycle< ContextT >::block_end(), and llvm::make_range().
|
inline |
Definition at line 159 of file GenericCycleInfo.h.
|
inline |
Definition at line 162 of file GenericCycleInfo.h.
|
inline |
Definition at line 166 of file GenericCycleInfo.h.
References llvm::make_range().
Referenced by llvm::GenericCycleInfo< ContextT >::validateTree().
|
inline |
Return whether Block
is contained in the cycle.
Definition at line 111 of file GenericCycleInfo.h.
References llvm::Block, and Blocks.
Referenced by llvm::getExtDivCycle(), llvm::getIntDivCycle(), llvm::isCycleInvariant(), llvm::SIInstrInfo::isSafeToSink(), and llvm::GenericCycleInfo< ContextT >::validateTree().
bool llvm::GenericCycle< ContextT >::contains | ( | const GenericCycle< ContextT > * | C | ) | const |
Returns true iff this cycle contains C
.
Note: Non-strict containment check, i.e. returns true if C is the same cycle.
Definition at line 35 of file GenericCycleImpl.h.
References llvm::CallingConv::C, and llvm::Depth.
|
inline |
Definition at line 194 of file GenericCycleInfo.h.
References llvm::make_range().
auto llvm::GenericCycle< ContextT >::getCyclePredecessor |
If the cycle has exactly one entry with exactly one predecessor, return it, otherwise return nullptr.
Definition at line 103 of file GenericCycleImpl.h.
References contains(), and llvm::predecessors().
auto llvm::GenericCycle< ContextT >::getCyclePreheader |
Return the preheader block for this cycle.
Pre-header is well-defined for reducible cycle in docs/LoopTerminology.rst as: the only one entering block and its only edge is to the entry block. Return null for irreducible cycles.
Definition at line 85 of file GenericCycleImpl.h.
References assert(), and llvm::succ_size().
|
inline |
Definition at line 121 of file GenericCycleInfo.h.
References llvm::Depth.
Referenced by llvm::GenericCycleInfo< ContextT >::getCycleDepth().
|
inline |
Definition at line 101 of file GenericCycleInfo.h.
Referenced by llvm::isCycleInvariant().
void llvm::GenericCycle< ContextT >::getExitBlocks | ( | SmallVectorImpl< BlockT * > & | TmpStorage | ) | const |
Return all of the successor blocks of this cycle.
These are the blocks outside of the current cycle which are branched to.
Definition at line 47 of file GenericCycleImpl.h.
References llvm::append_range(), llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::Block, blocks, llvm::SmallVectorImpl< T >::clear(), contains(), End, Idx, llvm::SmallVectorImpl< T >::resize(), llvm::SmallVectorBase< Size_T >::size(), and llvm::successors().
Referenced by llvm::DivergencePropagator< ContextT >::computeJoinPoints().
void llvm::GenericCycle< ContextT >::getExitingBlocks | ( | SmallVectorImpl< BlockT * > & | TmpStorage | ) | const |
Return all blocks of this cycle that have successor outside of this cycle.
These blocks have cycle exit branch.
Definition at line 70 of file GenericCycleImpl.h.
References llvm::Block, blocks, llvm::SmallVectorImpl< T >::clear(), contains(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), and llvm::successors().
Referenced by llvm::SIInstrInfo::isSafeToSink().
|
inline |
Definition at line 99 of file GenericCycleInfo.h.
Referenced by llvm::DivergencePropagator< ContextT >::computeJoinPoints(), llvm::getExtDivCycle(), and llvm::getIntDivCycle().
|
inline |
Definition at line 182 of file GenericCycleInfo.h.
References Blocks.
|
inline |
Definition at line 165 of file GenericCycleInfo.h.
|
inline |
Definition at line 193 of file GenericCycleInfo.h.
|
inline |
Definition at line 120 of file GenericCycleInfo.h.
|
inline |
Definition at line 119 of file GenericCycleInfo.h.
Referenced by llvm::DivergencePropagator< ContextT >::computeJoinPoints(), llvm::getExtDivCycle(), llvm::getIntDivCycle(), and llvm::SIInstrInfo::isSafeToSink().
|
inline |
Return whether Block
is an entry block of the cycle.
Definition at line 106 of file GenericCycleInfo.h.
References llvm::Block, and llvm::is_contained().
Referenced by llvm::GenericCycle< ContextT >::print().
|
inline |
Whether the cycle is a natural loop.
Definition at line 97 of file GenericCycleInfo.h.
Referenced by llvm::DivergencePropagator< ContextT >::computeJoinPoints(), llvm::getExtDivCycle(), and llvm::getIntDivCycle().
|
inline |
Definition at line 211 of file GenericCycleInfo.h.
References llvm::Block, Blocks, llvm::Depth, llvm::GenericCycle< ContextT >::isEntry(), and llvm::GenericCycle< ContextT >::printEntries().
Referenced by llvm::GenericCycleInfo< ContextT >::print().
|
inline |
Definition at line 199 of file GenericCycleInfo.h.
References llvm::First.
Referenced by llvm::GenericCycle< ContextT >::print().
Definition at line 48 of file GenericCycleInfo.h.
Definition at line 49 of file GenericCycleInfo.h.