Jlm
Public Member Functions | Static Public Member Functions | Private Types | Private Attributes | List of all members
jlm::llvm::StronglyConnectedComponentStructure Class Referencefinal

Strongly Connected Component Structure. More...

#include <cfg-structure.hpp>

Collaboration diagram for jlm::llvm::StronglyConnectedComponentStructure:
Collaboration graph
[legend]

Public Member Functions

size_t NumEntryNodes () const noexcept
 
size_t NumExitNodes () const noexcept
 
size_t NumEntryEdges () const noexcept
 
size_t NumRepetitionEdges () const noexcept
 
size_t NumExitEdges () const noexcept
 
NodeIteratorRange EntryNodes () const
 
NodeIteratorRange ExitNodes () const
 
EdgeIteratorRange EntryEdges () const
 
EdgeIteratorRange RepetitionEdges () const
 
EdgeIteratorRange ExitEdges () const
 
bool IsTailControlledLoop () const noexcept
 

Static Public Member Functions

static std::unique_ptr< StronglyConnectedComponentStructureCreate (const StronglyConnectedComponent &scc)
 

Private Types

using CfgEdgeConstIterator = util::HashSet< ControlFlowGraphEdge * >::ItemConstIterator
 
using CfgNodeConstIterator = util::HashSet< ControlFlowGraphNode * >::ItemConstIterator
 
using EdgeIteratorRange = util::IteratorRange< CfgEdgeConstIterator >
 
using NodeIteratorRange = util::IteratorRange< CfgNodeConstIterator >
 

Private Attributes

util::HashSet< ControlFlowGraphNode * > EntryNodes_ {}
 
util::HashSet< ControlFlowGraphNode * > ExitNodes_ {}
 
util::HashSet< ControlFlowGraphEdge * > EntryEdges_ {}
 
util::HashSet< ControlFlowGraphEdge * > RepetitionEdges_ {}
 
util::HashSet< ControlFlowGraphEdge * > ExitEdges_ {}
 

Detailed Description

Strongly Connected Component Structure.

This class computes the structure of strongly connected components (SCCs). It detects the following entities:

  1. Entry edges: All edges from a node outside the SCC pointing to a node in the SCC.
  2. Entry nodes: All nodes that are the target of one or more entry edges.
  3. Exit edges: All edges from a node inside the SCC pointing to a node outside the SCC.
  4. Exit nodes: All nodes that are the target of one or more exit edges.
  5. Repetition edges: All edges from a node inside the SCC to an entry node.

Definition at line 69 of file cfg-structure.hpp.

Member Typedef Documentation

◆ CfgEdgeConstIterator

Definition at line 71 of file cfg-structure.hpp.

◆ CfgNodeConstIterator

Definition at line 72 of file cfg-structure.hpp.

◆ EdgeIteratorRange

Definition at line 74 of file cfg-structure.hpp.

◆ NodeIteratorRange

Definition at line 75 of file cfg-structure.hpp.

Member Function Documentation

◆ Create()

std::unique_ptr< StronglyConnectedComponentStructure > jlm::llvm::StronglyConnectedComponentStructure::Create ( const StronglyConnectedComponent scc)
static

Creates an SCC structure from scc.

Definition at line 36 of file cfg-structure.cpp.

◆ EntryEdges()

EdgeIteratorRange jlm::llvm::StronglyConnectedComponentStructure::EntryEdges ( ) const
inline

Definition at line 121 of file cfg-structure.hpp.

◆ EntryNodes()

NodeIteratorRange jlm::llvm::StronglyConnectedComponentStructure::EntryNodes ( ) const
inline

Definition at line 109 of file cfg-structure.hpp.

◆ ExitEdges()

EdgeIteratorRange jlm::llvm::StronglyConnectedComponentStructure::ExitEdges ( ) const
inline

Definition at line 133 of file cfg-structure.hpp.

◆ ExitNodes()

NodeIteratorRange jlm::llvm::StronglyConnectedComponentStructure::ExitNodes ( ) const
inline

Definition at line 115 of file cfg-structure.hpp.

◆ IsTailControlledLoop()

bool jlm::llvm::StronglyConnectedComponentStructure::IsTailControlledLoop ( ) const
noexcept

Checks if the SCC structure is a tail-controlled loop. A tail-controlled loop is defined as an SSC with a single entry node, as well as a single repetition and exit edge. Both these edges must have the same CFG node as origin.

Definition at line 29 of file cfg-structure.cpp.

◆ NumEntryEdges()

size_t jlm::llvm::StronglyConnectedComponentStructure::NumEntryEdges ( ) const
inlinenoexcept

Definition at line 91 of file cfg-structure.hpp.

◆ NumEntryNodes()

size_t jlm::llvm::StronglyConnectedComponentStructure::NumEntryNodes ( ) const
inlinenoexcept

Definition at line 79 of file cfg-structure.hpp.

◆ NumExitEdges()

size_t jlm::llvm::StronglyConnectedComponentStructure::NumExitEdges ( ) const
inlinenoexcept

Definition at line 103 of file cfg-structure.hpp.

◆ NumExitNodes()

size_t jlm::llvm::StronglyConnectedComponentStructure::NumExitNodes ( ) const
inlinenoexcept

Definition at line 85 of file cfg-structure.hpp.

◆ NumRepetitionEdges()

size_t jlm::llvm::StronglyConnectedComponentStructure::NumRepetitionEdges ( ) const
inlinenoexcept

Definition at line 97 of file cfg-structure.hpp.

◆ RepetitionEdges()

EdgeIteratorRange jlm::llvm::StronglyConnectedComponentStructure::RepetitionEdges ( ) const
inline

Definition at line 127 of file cfg-structure.hpp.

Member Data Documentation

◆ EntryEdges_

util::HashSet<ControlFlowGraphEdge *> jlm::llvm::StronglyConnectedComponentStructure::EntryEdges_ {}
private

Definition at line 155 of file cfg-structure.hpp.

◆ EntryNodes_

util::HashSet<ControlFlowGraphNode *> jlm::llvm::StronglyConnectedComponentStructure::EntryNodes_ {}
private

Definition at line 153 of file cfg-structure.hpp.

◆ ExitEdges_

util::HashSet<ControlFlowGraphEdge *> jlm::llvm::StronglyConnectedComponentStructure::ExitEdges_ {}
private

Definition at line 157 of file cfg-structure.hpp.

◆ ExitNodes_

util::HashSet<ControlFlowGraphNode *> jlm::llvm::StronglyConnectedComponentStructure::ExitNodes_ {}
private

Definition at line 154 of file cfg-structure.hpp.

◆ RepetitionEdges_

util::HashSet<ControlFlowGraphEdge *> jlm::llvm::StronglyConnectedComponentStructure::RepetitionEdges_ {}
private

Definition at line 156 of file cfg-structure.hpp.


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