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

#include <aggregation.hpp>

Inheritance diagram for jlm::llvm::AggregationNode:
Inheritance graph
[legend]
Collaboration diagram for jlm::llvm::AggregationNode:
Collaboration graph
[legend]

Public Member Functions

virtual ~AggregationNode () noexcept
 
 AggregationNode ()
 
 AggregationNode (const AggregationNode &other)=delete
 
 AggregationNode (AggregationNode &&other)=delete
 
AggregationNodeoperator= (const AggregationNode &other)=delete
 
AggregationNodeoperator= (AggregationNode &&other)=delete
 
iterator begin () noexcept
 
const_iterator begin () const noexcept
 
iterator end () noexcept
 
const_iterator end () const noexcept
 
size_t nchildren () const noexcept
 
void add_child (std::unique_ptr< AggregationNode > child)
 
AggregationNodechild (size_t n) const noexcept
 
AggregationNodeparent () noexcept
 
const AggregationNodeparent () const noexcept
 
size_t index () const noexcept
 
size_t nnodes () const noexcept
 
virtual std::string debug_string () const =0
 

Static Public Member Functions

static void normalize (AggregationNode &node)
 

Private Types

using iterator = util::PtrIterator< AggregationNode, std::vector< std::unique_ptr< AggregationNode > >::iterator >
 
using const_iterator = util::PtrIterator< const AggregationNode, std::vector< std::unique_ptr< AggregationNode > >::const_iterator >
 

Private Member Functions

void remove_children ()
 

Private Attributes

size_t index_
 
AggregationNodeparent_
 
std::vector< std::unique_ptr< AggregationNode > > children_
 

Detailed Description

Definition at line 18 of file aggregation.hpp.

Member Typedef Documentation

◆ const_iterator

Definition at line 22 of file aggregation.hpp.

◆ iterator

Definition at line 20 of file aggregation.hpp.

Constructor & Destructor Documentation

◆ ~AggregationNode()

jlm::llvm::AggregationNode::~AggregationNode ( )
virtualdefaultnoexcept

◆ AggregationNode() [1/3]

jlm::llvm::AggregationNode::AggregationNode ( )
inline

Definition at line 29 of file aggregation.hpp.

◆ AggregationNode() [2/3]

jlm::llvm::AggregationNode::AggregationNode ( const AggregationNode other)
delete

◆ AggregationNode() [3/3]

jlm::llvm::AggregationNode::AggregationNode ( AggregationNode &&  other)
delete

Member Function Documentation

◆ add_child()

void jlm::llvm::AggregationNode::add_child ( std::unique_ptr< AggregationNode child)
inline

Definition at line 75 of file aggregation.hpp.

◆ begin() [1/2]

const_iterator jlm::llvm::AggregationNode::begin ( ) const
inlinenoexcept

Definition at line 51 of file aggregation.hpp.

◆ begin() [2/2]

iterator jlm::llvm::AggregationNode::begin ( )
inlinenoexcept

Definition at line 45 of file aggregation.hpp.

◆ child()

AggregationNode* jlm::llvm::AggregationNode::child ( size_t  n) const
inlinenoexcept

Definition at line 84 of file aggregation.hpp.

◆ debug_string()

virtual std::string jlm::llvm::AggregationNode::debug_string ( ) const
pure virtual

◆ end() [1/2]

const_iterator jlm::llvm::AggregationNode::end ( ) const
inlinenoexcept

Definition at line 63 of file aggregation.hpp.

◆ end() [2/2]

iterator jlm::llvm::AggregationNode::end ( )
inlinenoexcept

Definition at line 57 of file aggregation.hpp.

◆ index()

size_t jlm::llvm::AggregationNode::index ( ) const
inlinenoexcept

Definition at line 105 of file aggregation.hpp.

◆ nchildren()

size_t jlm::llvm::AggregationNode::nchildren ( ) const
inlinenoexcept

Definition at line 69 of file aggregation.hpp.

◆ nnodes()

size_t jlm::llvm::AggregationNode::nnodes ( ) const
inlinenoexcept

Return the number of nodes of the entire subtree.

Definition at line 115 of file aggregation.hpp.

◆ normalize()

void jlm::llvm::AggregationNode::normalize ( AggregationNode node)
static

Normalizes an aggregation tree

This function normalizes an aggregation tree by reducing nested linear nodes to a single linear node. For example, the tree:

linear

  • linear – block – block
  • block

is reduced to:

linear

  • block
  • block
  • block

Definition at line 19 of file aggregation.cpp.

◆ operator=() [1/2]

AggregationNode& jlm::llvm::AggregationNode::operator= ( AggregationNode &&  other)
delete

◆ operator=() [2/2]

AggregationNode& jlm::llvm::AggregationNode::operator= ( const AggregationNode other)
delete

◆ parent() [1/2]

const AggregationNode* jlm::llvm::AggregationNode::parent ( ) const
inlinenoexcept

Definition at line 98 of file aggregation.hpp.

◆ parent() [2/2]

AggregationNode* jlm::llvm::AggregationNode::parent ( )
inlinenoexcept

Definition at line 91 of file aggregation.hpp.

◆ remove_children()

void jlm::llvm::AggregationNode::remove_children ( )
inlineprivate

Definition at line 151 of file aggregation.hpp.

Member Data Documentation

◆ children_

std::vector<std::unique_ptr<AggregationNode> > jlm::llvm::AggregationNode::children_
private

Definition at line 158 of file aggregation.hpp.

◆ index_

size_t jlm::llvm::AggregationNode::index_
private

Definition at line 156 of file aggregation.hpp.

◆ parent_

AggregationNode* jlm::llvm::AggregationNode::parent_
private

Definition at line 157 of file aggregation.hpp.


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