54#include <boost/lexical_cast.hpp>
55#include <nlohmann/json.hpp>
60using json = nlohmann::json;
177 virtual std::unique_ptr<DataFlowNode>
Element(size_t element_id, const DebugInfo &debug_info)
size_t element_id() const
const DebugInfo & debug_info() const
virtual ElementType type_id() const =0
Returns the type of the element.
Definition sdfg_builder.h:13
Note: Even though the class references unique_ptr, it will never delete an SDFG it has a reference to...
Definition structured_sdfg_builder.h:44
Definition data_flow_graph.h:29
virtual EdgeRemoveOption can_remove_in_edge(const data_flow::DataFlowGraph &graph, const Memlet *memlet) const =0
virtual std::unique_ptr< DataFlowNode > clone(size_t element_id, const graph::Vertex vertex, DataFlowGraph &parent) const =0
Clone this node for graph transformations.
virtual EdgeRemoveOption can_remove_out_edge(const data_flow::DataFlowGraph &graph, const Memlet *memlet) const =0
Is the edge in question removable, or will this make the node its an output on invalid?
graph::Vertex vertex() const
Get the graph vertex for this node.
static bool classof(const Element &element)
LLVM-style RTTI predicate: true if element is a DataFlowNode.
Definition data_flow_node.h:132
DataFlowGraph & get_parent()
Get the parent dataflow graph (mutable).
DataFlowNode(size_t element_id, const DebugInfo &debug_info, const graph::Vertex vertex, DataFlowGraph &parent)
Protected constructor for dataflow nodes.
const DataFlowGraph & get_parent() const
Get the parent dataflow graph (const).
virtual bool update_edge_removed(const std::string &out_conn)
Definition data_flow_node.h:199
DataFlowNode & operator=(const DataFlowNode &)=delete
DataFlowNode(const DataFlowNode &data_node)=delete
static constexpr ElementType TypeGroup
Bitmask of all concrete ElementTypes that are DataFlowNodes.
Definition data_flow_node.h:128
virtual bool side_effect() const =0
Check if this node has side effects Side effect on dflow nodes is broad.
Edge in the dataflow graph representing data movement.
Definition memlet.h:131
nlohmann::json json
Definition interstate_edge.h:14
Definition function_builder.h:10
Definition access_node.h:67
EdgeRemoveOption
Definition data_flow_node.h:71
@ NotRemovable
You must not remove this edge unless you can guarantee the entire node will be removed.
Definition data_flow_node.h:73
@ RemoveNodeAfter
This is the only relevant edge of this node.
Definition data_flow_node.h:86
@ RequiresUpdate
It can be removed, but the node requires a call to update itself to match the removed edge.
Definition data_flow_node.h:81
@ Trivially
You may remove the edge without further action.
Definition data_flow_node.h:77
boost::graph_traits< Graph >::vertex_descriptor Vertex
Definition graph.h:25
constexpr bool is_a(ElementType type, ElementType mask)
Tests whether type is contained in the category mask (efficient, branch-free type check).
Definition element.h:107
ElementType
Definition element.h:72
@ AccessNode
Definition element.h:75
@ Tasklet
Definition element.h:77
@ LibraryNode
Definition element.h:78
@ Memlet
Definition element.h:79
@ ConstantNode
Definition element.h:76