64 return "IF_NEXT_BRANCH";
71 class ParentScopeLoc {
72 friend StructuredSDFGWalker;
77 ParentScopeLoc(
ControlFlowNode* node, int32_t idx) : node_(node), idx_(idx) {
82 friend StructuredSDFGWalker;
87 std::list<ParentScopeLoc> parent_cache_;
91 Iterator& next_internal(
bool descend);
97 void move_to_next_seq_child(
Sequence* parent, int32_t prev_idx,
bool descend,
ParentScopeLoc* parent_cache);
98 void move_to_next_ifelse_child(
IfElse* parent, int32_t prev_idx,
bool descend,
ParentScopeLoc* parent_cache);
120 static constexpr int32_t NO_SCOPE_FLAG = 0x80000000;
121 static constexpr int32_t SCOPE_MASK = 0x8000007F;
122 static constexpr int32_t SCOPE_ANY_MASK = 0x70;
123 static constexpr int32_t SCOPE_ENTRY_FLAG = 0x00000001;
124 static constexpr int32_t SCOPE_EXIT_FLAG = 0x00000002;
125 static constexpr int32_t SEQ_FLAG = 0x80000010;
126 static constexpr int32_t SEQ_MASK = 0x8000001F;
127 static constexpr int32_t SEQ_ENTER = SEQ_FLAG | SCOPE_ENTRY_FLAG;
128 static constexpr int32_t SEQ_EXIT = SEQ_FLAG | SCOPE_EXIT_FLAG;
129 static constexpr int32_t LOOP_FLAG = 0x80000020;
130 static constexpr int32_t LOOP_MASK = 0x8000002F;
131 static constexpr int32_t LOOP_ENTER = LOOP_FLAG | SCOPE_ENTRY_FLAG;
132 static constexpr int32_t LOOP_EXIT = LOOP_FLAG | SCOPE_EXIT_FLAG;
133 static constexpr int32_t IFELSE_FLAG = 0x80000040;
134 static constexpr int32_t IFELSE_MASK = 0x8000004F;
135 static constexpr int32_t IFELSE_ENTER = IFELSE_FLAG | SCOPE_ENTRY_FLAG;
136 static constexpr int32_t IFELSE_EXIT = IFELSE_FLAG | SCOPE_EXIT_FLAG;
Definition structured_sdfg.h:30
Base class for all structured control flow nodes in a StructuredSDFG.
Definition control_flow_node.h:44
Represents a conditional if-else control flow node with multiple cases.
Definition if_else.h:47
A sequential container of control flow nodes.
Definition sequence.h:52
Base class for structured loop constructs.
Definition structured_loop.h:244
Represents a while-loop with condition-controlled iteration.
Definition while.h:37
Definition structured_sdfg_walker.h:81
std::pair< ControlFlowNode &, Scope > operator*() const
Iterator & next_no_descend()
Move to next entry in exec order, but do not descend into scopes, just visit scopes as Leafs.
Iterator & next()
Move to next entry in exec order.
bool operator!=(const Iterator &other) const
Definition structured_sdfg_walker.h:71
A sequential walker for traversing structured control flow nodes in a StructuredSDFG with iterators I...
Definition structured_sdfg_walker.h:47
static Iterator loop_exit(StructuredLoop &loop)
static Iterator from_node(ControlFlowNode &node)
static Iterator root(StructuredSDFG &sdfg)
static constexpr std::string_view scope_to_string(Scope scope)
Definition structured_sdfg_walker.h:51
static Iterator ifelse_exit(IfElse &ifelse)
static Iterator loop_exit(While &loop)
static Iterator from_after(ControlFlowNode &node)
Scope
Definition structured_sdfg_walker.h:49
@ ENTRY
Definition structured_sdfg_walker.h:49
@ IF_EXIT
Definition structured_sdfg_walker.h:49
@ IF_NEXT_BRANCH
Definition structured_sdfg_walker.h:49
@ EXIT
Definition structured_sdfg_walker.h:49
@ NONE
Definition structured_sdfg_walker.h:49
@ IF_ENTRY
Definition structured_sdfg_walker.h:49
static Iterator sequence_exit(Sequence &seq)
Definition control_flow_node.h:16
std::ostream & operator<<(std::ostream &os, StructuredSDFGWalker::Scope scope)
Definition structured_sdfg_walker.h:152