Jlm
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
jlm::rvsdg::Graph Class Referencefinal

#include <graph.hpp>

Public Member Functions

 ~Graph () noexcept
 
 Graph ()
 
Region::Id generateRegionId () noexcept
 
RegionGetRootRegion () const noexcept
 
std::unique_ptr< GraphCopy () const
 
void PruneNodes ()
 

Static Public Member Functions

static std::vector< Node * > ExtractTailNodes (const Graph &rvsdg)
 

Private Attributes

Region::Id nextRegionId_
 
std::unique_ptr< RegionRootRegion_
 

Detailed Description

Represents a Regionalized Value State Dependence Graph (RVSDG)

Definition at line 74 of file graph.hpp.

Constructor & Destructor Documentation

◆ ~Graph()

jlm::rvsdg::Graph::~Graph ( )
defaultnoexcept

◆ Graph()

jlm::rvsdg::Graph::Graph ( )

Definition at line 73 of file graph.cpp.

Member Function Documentation

◆ Copy()

std::unique_ptr< Graph > jlm::rvsdg::Graph::Copy ( ) const
Returns
A copy of the RVSDG.

Definition at line 79 of file graph.cpp.

◆ ExtractTailNodes()

std::vector< Node * > jlm::rvsdg::Graph::ExtractTailNodes ( const Graph rvsdg)
static

Extracts all tail nodes of the RVSDG root region.

A tail node is any node in the root region on which no other node in the root region depends on. An example would be a lambda node that is not called within the RVSDG module.

Parameters
rvsdgThe RVSDG from which to extract the tail nodes.
Returns
A vector of tail nodes.

Definition at line 105 of file graph.cpp.

◆ generateRegionId()

Region::Id jlm::rvsdg::Graph::generateRegionId ( )
inlinenoexcept
Returns
A unique identifier for a region within this graph.
Note
This method is automatically invoked when a region is created. The identifier is only unique within this graph.

Definition at line 88 of file graph.hpp.

◆ GetRootRegion()

Region& jlm::rvsdg::Graph::GetRootRegion ( ) const
inlinenoexcept
Returns
The root region of the graph.

Definition at line 99 of file graph.hpp.

◆ PruneNodes()

void jlm::rvsdg::Graph::PruneNodes ( )
inline

Remove all dead nodes in the graph.

See also
Node::IsDead()

Definition at line 116 of file graph.hpp.

Member Data Documentation

◆ nextRegionId_

Region::Id jlm::rvsdg::Graph::nextRegionId_
private

Definition at line 134 of file graph.hpp.

◆ RootRegion_

std::unique_ptr<Region> jlm::rvsdg::Graph::RootRegion_
private

Definition at line 135 of file graph.hpp.


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