LLVM 20.0.0git
Public Member Functions | List of all members
llvm::MachineRegion Class Reference

#include "llvm/CodeGen/MachineRegionInfo.h"

Inheritance diagram for llvm::MachineRegion:
Inheritance graph
[legend]

Public Member Functions

 MachineRegion (MachineBasicBlock *Entry, MachineBasicBlock *Exit, MachineRegionInfo *RI, MachineDominatorTree *DT, MachineRegion *Parent=nullptr)
 
 ~MachineRegion ()
 
bool operator== (const MachineRegionNode &RN) const
 
- Public Member Functions inherited from llvm::RegionBase< RegionTraits< MachineFunction > >
 RegionBase (BlockT *Entry, BlockT *Exit, RegionInfoT *RI, DomTreeT *DT, RegionT *Parent=nullptr)
 Create a new region.
 
 RegionBase (const RegionBase &)=delete
 
RegionBaseoperator= (const RegionBase &)=delete
 
 ~RegionBase ()
 Delete the Region and all its subregions.
 
BlockT * getEntry () const
 Get the entry BasicBlock of the Region.
 
void replaceEntry (BlockT *BB)
 Replace the entry basic block of the region with the new basic block.
 
void replaceExit (BlockT *BB)
 Replace the exit basic block of the region with the new basic block.
 
void replaceEntryRecursive (BlockT *NewEntry)
 Recursively replace the entry basic block of the region.
 
void replaceExitRecursive (BlockT *NewExit)
 Recursively replace the exit basic block of the region.
 
BlockT * getExit () const
 Get the exit BasicBlock of the Region.
 
RegionT * getParent () const
 Get the parent of the Region.
 
RegionNodeT * getNode () const
 Get the RegionNode representing the current Region.
 
RegionNodeT * getNode (BlockT *BB) const
 Get the RegionNode for a BasicBlock.
 
unsigned getDepth () const
 Get the nesting level of this Region.
 
bool isTopLevelRegion () const
 Check if a Region is the TopLevel region.
 
RegionT * getExpandedRegion () const
 Return a new (non-canonical) region, that is obtained by joining this region with its predecessors.
 
BlockT * getEnteringBlock () const
 Return the first block of this region's single entry edge, if existing.
 
BlockT * getExitingBlock () const
 Return the first block of this region's single exit edge, if existing.
 
bool getExitingBlocks (SmallVectorImpl< BlockT * > &Exitings) const
 Collect all blocks of this region's single exit edge, if existing.
 
bool isSimple () const
 Is this a simple region?
 
std::string getNameStr () const
 Returns the name of the Region.
 
RegionInfoT * getRegionInfo () const
 Return the RegionInfo object, that belongs to this Region.
 
void print (raw_ostream &OS, bool printTree=true, unsigned level=0, PrintStyle Style=PrintNone) const
 Print the region.
 
void dump () const
 Print the region to stderr.
 
bool contains (const BlockT *BB) const
 Check if the region contains a BasicBlock.
 
bool contains (const RegionT *SubRegion) const
 Check if the region contains another region.
 
bool contains (const InstT *Inst) const
 Check if the region contains an Instruction.
 
bool contains (const LoopT *L) const
 Check if the region contains a loop.
 
LoopT * outermostLoopInRegion (LoopT *L) const
 Get the outermost loop in the region that contains a loop.
 
LoopT * outermostLoopInRegion (LoopInfoT *LI, BlockT *BB) const
 Get the outermost loop in the region that contains a basic block.
 
RegionT * getSubRegionNode (BlockT *BB) const
 Get the subregion that starts at a BasicBlock.
 
RegionNodeT * getBBNode (BlockT *BB) const
 Get the BasicBlock RegionNode for a BasicBlock.
 
void addSubRegion (RegionT *SubRegion, bool moveChildren=false)
 Add a new subregion to this Region.
 
RegionT * removeSubRegion (RegionT *SubRegion)
 Remove a subregion from this Region.
 
void transferChildrenTo (RegionT *To)
 Move all direct child nodes of this Region to another Region.
 
void verifyRegion () const
 Verify if the region is a correct region.
 
void clearNodeCache ()
 Clear the cache for BB RegionNodes.
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
block_iterator block_begin ()
 
const_block_iterator block_begin () const
 
block_iterator block_end ()
 
const_block_iterator block_end () const
 
block_range blocks ()
 Returns a range view of the basic blocks in the region.
 
const_block_range blocks () const
 Returns a range view of the basic blocks in the region.
 
element_iterator element_begin ()
 
const_element_iterator element_begin () const
 
element_iterator element_end ()
 
const_element_iterator element_end () const
 
iterator_range< element_iteratorelements ()
 
iterator_range< const_element_iteratorelements () const
 
- Public Member Functions inherited from llvm::RegionNodeBase< Tr >
 RegionNodeBase (const RegionNodeBase &)=delete
 
RegionNodeBaseoperator= (const RegionNodeBase &)=delete
 
RegionTgetParent () const
 Get the parent Region of this RegionNode.
 
BlockTgetEntry () const
 Get the entry BasicBlock of this RegionNode.
 
template<class T >
TgetNodeAs () const
 Get the content of this RegionNode.
 
bool isSubRegion () const
 Is this RegionNode a subregion?
 
BasicBlockgetNodeAs () const
 
RegiongetNodeAs () const
 
MachineBasicBlockgetNodeAs () const
 
MachineRegiongetNodeAs () const
 

Additional Inherited Members

- Public Types inherited from llvm::RegionBase< RegionTraits< MachineFunction > >
enum  PrintStyle
 PrintStyle - Print region in difference ways. More...
 
using iterator = typename RegionSet::iterator
 
using const_iterator = typename RegionSet::const_iterator
 
using block_iterator = block_iterator_wrapper< false >
 
using const_block_iterator = block_iterator_wrapper< true >
 
using block_range = iterator_range< block_iterator >
 
using const_block_range = iterator_range< const_block_iterator >
 
using element_iterator = df_iterator< RegionNodeT *, df_iterator_default_set< RegionNodeT * >, false, GraphTraits< RegionNodeT * > >
 
using const_element_iterator = df_iterator< const RegionNodeT *, df_iterator_default_set< const RegionNodeT * >, false, GraphTraits< const RegionNodeT * > >
 
- Public Types inherited from llvm::RegionNodeBase< Tr >
using BlockT = typename Tr::BlockT
 
using RegionT = typename Tr::RegionT
 
- Protected Member Functions inherited from llvm::RegionNodeBase< Tr >
 RegionNodeBase (RegionT *Parent, BlockT *Entry, bool isSubRegion=false)
 Create a RegionNode.
 

Detailed Description

Definition at line 61 of file MachineRegionInfo.h.

Constructor & Destructor Documentation

◆ MachineRegion()

MachineRegion::MachineRegion ( MachineBasicBlock Entry,
MachineBasicBlock Exit,
MachineRegionInfo RI,
MachineDominatorTree DT,
MachineRegion Parent = nullptr 
)

Definition at line 37 of file MachineRegionInfo.cpp.

◆ ~MachineRegion()

MachineRegion::~MachineRegion ( )
default

Member Function Documentation

◆ operator==()

bool llvm::MachineRegion::operator== ( const MachineRegionNode RN) const
inline

Definition at line 68 of file MachineRegionInfo.h.


The documentation for this class was generated from the following files: