LLVM 19.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. | |
Friends | |
template<typename > | |
class | GenericCycle |
template<typename > | |
class | GenericCycleInfoCompute |
Cycle information for a function.
Definition at line 222 of file GenericCycleInfo.h.
using llvm::GenericCycleInfo< ContextT >::BlockT = typename ContextT::BlockT |
Definition at line 224 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 286 of file GenericCycleInfo.h.
using llvm::GenericCycleInfo< ContextT >::CycleT = GenericCycle<ContextT> |
Definition at line 225 of file GenericCycleInfo.h.
using llvm::GenericCycleInfo< ContextT >::FunctionT = typename ContextT::FunctionT |
Definition at line 226 of file GenericCycleInfo.h.
|
default |
|
default |
void llvm::GenericCycleInfo< ContextT >::clear |
Reset the object to its initial state.
Definition at line 365 of file GenericCycleImpl.h.
Referenced by llvm::CycleInfoWrapperPass::releaseMemory(), llvm::MachineCycleInfoWrapperPass::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 373 of file GenericCycleImpl.h.
References assert(), Context, llvm::errs(), F, LLVM_DEBUG, and llvm::GenericCycleInfoCompute< ContextT >::run().
Referenced by llvm::CycleAnalysis::run(), llvm::CycleInfoWrapperPass::runOnFunction(), and llvm::MachineCycleInfoWrapperPass::runOnMachineFunction().
|
inline |
Definition at line 280 of file GenericCycleInfo.h.
References llvm::dbgs(), and llvm::GenericCycleInfo< ContextT >::print().
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 402 of file GenericCycleImpl.h.
References llvm::Block.
Referenced by llvm::SIInstrInfo::isSafeToSink(), and mayBeInCycle().
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 441 of file GenericCycleImpl.h.
References llvm::Block, and llvm::GenericCycle< ContextT >::getDepth().
|
inline |
Definition at line 266 of file GenericCycleInfo.h.
References Context.
auto llvm::GenericCycleInfo< ContextT >::getSmallestCommonCycle | ( | CycleT * | A, |
CycleT * | B | ||
) | const |
Find the innermost cycle containing both given cycles.
A
and B
or nullptr if there is no such cycle. Definition at line 412 of file GenericCycleImpl.h.
|
inline |
Definition at line 267 of file GenericCycleInfo.h.
References Context.
auto llvm::GenericCycleInfo< ContextT >::getTopLevelParentCycle | ( | BlockT * | Block | ) |
Definition at line 147 of file GenericCycleImpl.h.
References llvm::Block, and llvm::CallingConv::C.
|
default |
|
inline |
Definition at line 281 of file GenericCycleInfo.h.
References Context, and llvm::GenericCycle< ContextT >::print().
void llvm::GenericCycleInfo< ContextT >::print | ( | raw_ostream & | Out | ) | const |
Print the cycle info.
Definition at line 518 of file GenericCycleImpl.h.
References Context, llvm::depth_first(), I, and llvm::GenericCycle< ContextT >::print().
Referenced by llvm::GenericCycleInfo< ContextT >::dump(), llvm::CycleInfoWrapperPass::print(), and llvm::MachineCycleInfoWrapperPass::print().
void llvm::GenericCycleInfo< ContextT >::splitCriticalEdge | ( | BlockT * | Pred, |
BlockT * | Succ, | ||
BlockT * | New | ||
) |
Definition at line 385 of file GenericCycleImpl.h.
References assert().
|
inline |
Definition at line 302 of file GenericCycleInfo.h.
|
inline |
Definition at line 309 of file GenericCycleInfo.h.
References llvm::make_range().
|
inline |
Definition at line 305 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 454 of file GenericCycleImpl.h.
References llvm::Block, Blocks, check, llvm::GenericCycle< ContextT >::children(), Cond, llvm::GenericCycle< ContextT >::contains(), llvm::depth_first(), llvm::SmallVectorBase< Size_T >::empty(), llvm::errs(), llvm::is_contained(), and reportError().
Definition at line 227 of file GenericCycleInfo.h.
Definition at line 228 of file GenericCycleInfo.h.