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

#include <sdfg/structured_control_flow/block.h>

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

Public Member Functions

 AssignmentBlock (const AssignmentBlock &block)=delete
AssignmentBlock & operator= (const AssignmentBlock &)=delete
ElementType type_id () const override
 Returns the type of the element.
bool add_if_not_overwritten (const symbolic::Symbol &target, const symbolic::Expression &expr)
 Add this assignment, if the symbol in question is not already being written.
bool accept (visitor::ActualStructuredSDFGVisitor &visitor) override
void validate (const Function &function) const override
 Validates the element.
const control_flow::Assignments & assignments () const
 Access the assignments in this transition (const version).
control_flow::Assignments & assignments ()
 Access the assignments in this transition (non-const version).
bool empty () const
 Check if this transition has no assignments.
size_t size () const
 Get the number of assignments in this transition.
void replace (const symbolic::Expression old_expression, const symbolic::Expression new_expression) override
 Replace occurrences of an expression in the dataflow graph.
void replace (const symbolic::ExpressionMapping &replacements) override
Public Member Functions inherited from sdfg::structured_control_flow::ControlFlowNode
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
std::string_view element_type () const
 Returns the type of the element as a human-readable string.

Static Public Member Functions

static bool classof (const Element &element)
Static Public Member Functions inherited from sdfg::structured_control_flow::ControlFlowNode
static bool classof (const Element &element)
 LLVM-style RTTI predicate: true if element is a ControlFlowNode.
static std::vector< ControlFlowNode * > parent_chain (ControlFlowNode &child)

Friends

class sdfg::builder::StructuredSDFGBuilder

Additional Inherited Members

Static Public Attributes inherited from sdfg::structured_control_flow::ControlFlowNode
static constexpr ElementType TypeGroup
 Bitmask of all concrete ElementTypes that are ControlFlowNodes.
Protected Member Functions inherited from sdfg::structured_control_flow::ControlFlowNode
 ControlFlowNode (size_t element_id, const DebugInfo &debug_info, ControlFlowNode *parent)
 Protected constructor for control flow nodes with parent.
Protected Attributes inherited from sdfg::structured_control_flow::ControlFlowNode
ControlFlowNode * parent_
Protected Attributes inherited from sdfg::Element
size_t element_id_
DebugInfo debug_info_
std::unordered_map< std::string, std::string > metadata_

Constructor & Destructor Documentation

◆ AssignmentBlock()

sdfg::structured_control_flow::AssignmentBlock::AssignmentBlock ( const AssignmentBlock & block)
delete

Member Function Documentation

◆ accept()

bool sdfg::structured_control_flow::AssignmentBlock::accept ( visitor::ActualStructuredSDFGVisitor & visitor)
overridevirtual

◆ add_if_not_overwritten()

bool sdfg::structured_control_flow::AssignmentBlock::add_if_not_overwritten ( const symbolic::Symbol & target,
const symbolic::Expression & expr )

Add this assignment, if the symbol in question is not already being written.

In other words this is a "add_before". Sync all assignments are evaluated simultaneously, if it is already written, the new assignment is already dead code.

Returns
true if it was added, the symbol was not already written to in this block

◆ assignments() [1/2]

control_flow::Assignments & sdfg::structured_control_flow::AssignmentBlock::assignments ( )

Access the assignments in this transition (non-const version).

Returns
Reference to the assignments map for modification

◆ assignments() [2/2]

const control_flow::Assignments & sdfg::structured_control_flow::AssignmentBlock::assignments ( ) const

Access the assignments in this transition (const version).

Returns
Const reference to the assignments map

◆ classof()

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

◆ empty()

bool sdfg::structured_control_flow::AssignmentBlock::empty ( ) const

Check if this transition has no assignments.

Returns
true if assignments map is empty, false otherwise

◆ operator=()

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

◆ replace() [1/2]

void sdfg::structured_control_flow::AssignmentBlock::replace ( const symbolic::Expression old_expression,
const symbolic::Expression new_expression )
overridevirtual

Replace occurrences of an expression in the dataflow graph.

Parameters
old_expressionExpression to replace
new_expressionExpression to replace with

Implements sdfg::Element.

◆ replace() [2/2]

void sdfg::structured_control_flow::AssignmentBlock::replace ( const symbolic::ExpressionMapping & replacements)
overridevirtual

Reimplemented from sdfg::Element.

◆ size()

size_t sdfg::structured_control_flow::AssignmentBlock::size ( ) const

Get the number of assignments in this transition.

Returns
Number of symbol assignments

◆ type_id()

ElementType sdfg::structured_control_flow::AssignmentBlock::type_id ( ) const
inlineoverridevirtual

Returns the type of the element.

Implements sdfg::Element.

◆ validate()

void sdfg::structured_control_flow::AssignmentBlock::validate ( const Function & function) const
overridevirtual

Validates the element.

Exceptions
InvalidSDFGExceptionif the element is invalid

Implements sdfg::Element.

◆ sdfg::builder::StructuredSDFGBuilder


The documentation for this class was generated from the following file:
  • sdfg/include/sdfg/structured_control_flow/block.h