docc 0.8.3 (0d44999b)
C++ API Reference
Loading...
Searching...
No Matches
sdfg::structured_control_flow::ControlFlowNode Class Referenceabstract

Base class for all structured control flow nodes in a StructuredSDFG. More...

#include <sdfg/structured_control_flow/control_flow_node.h>

Inheritance diagram for sdfg::structured_control_flow::ControlFlowNode:
[legend]

Public Member Functions

virtual bool accept (visitor::ActualStructuredSDFGVisitor &visitor)=0
virtual ~ControlFlowNode ()=default
ControlFlowNode * get_parent ()
const ControlFlowNode * get_parent () const
 ControlFlowNode (const ControlFlowNode &node)=delete
ControlFlowNode & operator= (const ControlFlowNode &)=delete
Public Member Functions inherited from sdfg::Element
 Element (size_t element_id, const DebugInfo &debug_info)
virtual ~Element ()=default
size_t element_id () const
const DebugInfo & debug_info () const
void set_debug_info (const DebugInfo &debug_info)
void add_metadata (const std::string &key, const std::string &value)
void remove_metadata (const std::string &key)
const std::string & metadata (const std::string &key) const
const std::string * metadata_if_exists (const std::string &key) const
const std::unordered_map< std::string, std::string > & metadata () const
virtual ElementType type_id () const =0
 Returns the type of the element.
std::string_view element_type () const
 Returns the type of the element as a human-readable string.
virtual void validate (const Function &function) const =0
 Validates the element.
virtual void replace (const symbolic::Expression old_expression, const symbolic::Expression new_expression)=0
virtual void replace (const symbolic::ExpressionMapping &replacements)

Static Public Member Functions

static bool classof (const Element &element)
 LLVM-style RTTI predicate: true if element is a ControlFlowNode.
static std::vector< ControlFlowNode * > parent_chain (ControlFlowNode &child)

Static Public Attributes

static constexpr ElementType TypeGroup
 Bitmask of all concrete ElementTypes that are ControlFlowNodes.

Protected Member Functions

 ControlFlowNode (size_t element_id, const DebugInfo &debug_info, ControlFlowNode *parent)
 Protected constructor for control flow nodes with parent.

Protected Attributes

ControlFlowNode * parent_
Protected Attributes inherited from sdfg::Element
size_t element_id_
DebugInfo debug_info_
std::unordered_map< std::string, std::string > metadata_

Friends

class builder::StructuredSDFGBuilder

Detailed Description

Base class for all structured control flow nodes in a StructuredSDFG.

ControlFlowNode is the abstract base class for all elements that form the structured control flow of a StructuredSDFG. This includes:

Control flow nodes form a hierarchical tree structure representing the program's control flow in a structured manner, avoiding the need for arbitrary goto statements or unstructured control flow graphs.

See also
Block
Sequence
IfElse
StructuredLoop
Return

Constructor & Destructor Documentation

◆ ControlFlowNode() [1/2]

sdfg::structured_control_flow::ControlFlowNode::ControlFlowNode ( size_t element_id,
const DebugInfo & debug_info,
ControlFlowNode * parent )
protected

Protected constructor for control flow nodes with parent.

Parameters
element_idUnique identifier for this element
debug_infoDebug information for this node
parentThe parent ControlFlowNode

◆ ~ControlFlowNode()

virtual sdfg::structured_control_flow::ControlFlowNode::~ControlFlowNode ( )
virtualdefault

◆ ControlFlowNode() [2/2]

sdfg::structured_control_flow::ControlFlowNode::ControlFlowNode ( const ControlFlowNode & node)
delete

Member Function Documentation

◆ accept()

◆ classof()

bool sdfg::structured_control_flow::ControlFlowNode::classof ( const Element & element)
inlinestatic

LLVM-style RTTI predicate: true if element is a ControlFlowNode.

◆ get_parent() [1/2]

ControlFlowNode * sdfg::structured_control_flow::ControlFlowNode::get_parent ( )

◆ get_parent() [2/2]

const ControlFlowNode * sdfg::structured_control_flow::ControlFlowNode::get_parent ( ) const

◆ operator=()

ControlFlowNode & sdfg::structured_control_flow::ControlFlowNode::operator= ( const ControlFlowNode & )
delete

◆ parent_chain()

std::vector< ControlFlowNode * > sdfg::structured_control_flow::ControlFlowNode::parent_chain ( ControlFlowNode & child)
static

◆ builder::StructuredSDFGBuilder

friend class builder::StructuredSDFGBuilder
friend

Member Data Documentation

◆ parent_

ControlFlowNode* sdfg::structured_control_flow::ControlFlowNode::parent_
protected

◆ TypeGroup

ElementType sdfg::structured_control_flow::ControlFlowNode::TypeGroup
staticconstexpr
Initial value:
@ IfElse
Definition element.h:84
@ For
Definition element.h:88
@ While
Definition element.h:85
@ Sequence
Definition element.h:82
@ Map
Definition element.h:89
@ Return
Definition element.h:80
@ Continue
Definition element.h:86
@ Block
Definition element.h:81
@ Break
Definition element.h:87
@ Reduce
Definition element.h:90

Bitmask of all concrete ElementTypes that are ControlFlowNodes.


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