LLVM
15.0.0git
|
Cycle information for a function. More...
#include "llvm/ADT/GenericCycleInfo.h"
Classes | |
struct | const_toplevel_iterator |
Public Types | |
using | BlockT = typename ContextT::BlockT |
using | CycleT = GenericCycle< ContextT > |
using | FunctionT = typename ContextT::FunctionT |
using | const_toplevel_iterator_base = typename std::vector< std::unique_ptr< CycleT > >::const_iterator |
Iteration over top-level cycles. More... | |
Public Member Functions | |
GenericCycleInfo ()=default | |
GenericCycleInfo (GenericCycleInfo &&)=default | |
GenericCycleInfo & | operator= (GenericCycleInfo &&)=default |
void | clear () |
Reset the object to its initial state. More... | |
void | compute (FunctionT &F) |
Compute the cycle info for a function. More... | |
FunctionT * | getFunction () const |
const ContextT & | getSSAContext () const |
CycleT * | getCycle (const BlockT *Block) const |
Find the innermost cycle containing a given block. More... | |
unsigned | getCycleDepth (const BlockT *Block) const |
get the depth for the cycle which containing a given block. More... | |
CycleT * | getTopLevelParentCycle (const BlockT *Block) const |
void | moveToNewParent (CycleT *NewParent, CycleT *Child) |
Move Child to NewParent by manipulating Children vectors. More... | |
bool | validateTree () const |
Methods for debug and self-test. More... | |
void | print (raw_ostream &Out) const |
Print the cycle info. More... | |
void | dump () const |
const_toplevel_iterator | toplevel_begin () const |
const_toplevel_iterator | toplevel_end () const |
iterator_range< const_toplevel_iterator > | toplevel_cycles () const |
Friends | |
template<typename > | |
class | GenericCycle |
template<typename > | |
class | GenericCycleInfoCompute |
Cycle information for a function.
Definition at line 44 of file GenericCycleInfo.h.
using llvm::GenericCycleInfo< ContextT >::BlockT = typename ContextT::BlockT |
Definition at line 226 of file GenericCycleInfo.h.
using llvm::GenericCycleInfo< ContextT >::const_toplevel_iterator_base = typename std::vector<std::unique_ptr<CycleT> >::const_iterator |
Iteration over top-level cycles.
Definition at line 277 of file GenericCycleInfo.h.
using llvm::GenericCycleInfo< ContextT >::CycleT = GenericCycle<ContextT> |
Definition at line 227 of file GenericCycleInfo.h.
using llvm::GenericCycleInfo< ContextT >::FunctionT = typename ContextT::FunctionT |
Definition at line 228 of file GenericCycleInfo.h.
|
default |
|
default |
void llvm::GenericCycleInfo< ContextT >::clear |
Reset the object to its initial state.
Definition at line 336 of file GenericCycleImpl.h.
Referenced by llvm::MachineCycleInfoWrapperPass::releaseMemory(), llvm::CycleInfoWrapperPass::releaseMemory(), llvm::CycleInfoWrapperPass::runOnFunction(), and llvm::MachineCycleInfoWrapperPass::runOnMachineFunction().
void llvm::GenericCycleInfo< ContextT >::compute | ( | FunctionT & | F | ) |
Compute the cycle info for a function.
Definition at line 343 of file GenericCycleImpl.h.
Referenced by llvm::CycleAnalysis::run(), llvm::CycleInfoWrapperPass::runOnFunction(), and llvm::MachineCycleInfoWrapperPass::runOnMachineFunction().
|
inline |
Definition at line 271 of file GenericCycleInfo.h.
auto llvm::GenericCycleInfo< ContextT >::getCycle | ( | const BlockT * | Block | ) | const |
Find the innermost cycle containing a given block.
Block
or nullptr if it is not contained in any cycle. Definition at line 359 of file GenericCycleImpl.h.
unsigned llvm::GenericCycleInfo< ContextT >::getCycleDepth | ( | const BlockT * | Block | ) | const |
get the depth for the cycle which containing a given block.
Block
or 0 if it is not contained in any cycle. Definition at line 372 of file GenericCycleImpl.h.
|
inline |
Definition at line 252 of file GenericCycleInfo.h.
|
inline |
Definition at line 253 of file GenericCycleInfo.h.
auto llvm::GenericCycleInfo< ContextT >::getTopLevelParentCycle | ( | const BlockT * | Block | ) | const |
Definition at line 147 of file GenericCycleImpl.h.
void llvm::GenericCycleInfo< ContextT >::moveToNewParent | ( | CycleT * | NewParent, |
CycleT * | Child | ||
) |
Move Child
to NewParent
by manipulating Children vectors.
Note: This is an incomplete operation that does not update the list of blocks in the new parent or the depth of the subtree.
Definition at line 160 of file GenericCycleImpl.h.
|
default |
void llvm::GenericCycleInfo< ContextT >::print | ( | raw_ostream & | Out | ) | const |
Print the cycle info.
Definition at line 449 of file GenericCycleImpl.h.
Referenced by llvm::GenericCycleInfo< SSAContext >::dump(), llvm::MachineCycleInfoWrapperPass::print(), and llvm::CycleInfoWrapperPass::print().
|
inline |
Definition at line 292 of file GenericCycleInfo.h.
|
inline |
Definition at line 299 of file GenericCycleInfo.h.
|
inline |
Definition at line 295 of file GenericCycleInfo.h.
bool llvm::GenericCycleInfo< ContextT >::validateTree |
Methods for debug and self-test.
Validate the internal consistency of the cycle tree.
Note that this does not check that cycles are really cycles in the CFG, or that the right set of cycles in the CFG were found.
Definition at line 385 of file GenericCycleImpl.h.
Definition at line 229 of file GenericCycleInfo.h.
Definition at line 230 of file GenericCycleInfo.h.