docc 0.8.3 (0d44999b)
C++ API Reference
Loading...
Searching...
No Matches
block_hoisting.h
Go to the documentation of this file.
1#pragma once
2
3#include <string>
4
9#include "sdfg/passes/pass.h"
18#include "symengine/symengine_rcp.h"
19
20namespace sdfg {
21namespace passes {
22
28private:
29 bool is_invariant_move(
30 structured_control_flow::Sequence& body, data_flow::DataFlowGraph& dfg, bool no_loop_carried_dependencies = true
31 );
32 bool is_invariant_view(
35 symbolic::Symbol indvar = SymEngine::null,
36 bool no_loop_carried_dependencies = true
37 );
38 bool is_invariant_libnode(
41 symbolic::Symbol indvar = SymEngine::null,
42 bool no_loop_carried_dependencies = true
43 );
44
45 bool equal_moves(structured_control_flow::Block& block1, structured_control_flow::Block& block2);
46 bool equal_views(structured_control_flow::Block& block1, structured_control_flow::Block& block2);
47 bool equal_libnodes(data_flow::LibraryNode* libnode1, data_flow::LibraryNode* libnode2);
48 bool equal_lib_blocks(structured_control_flow::Block& block1, structured_control_flow::Block& block2);
49
50 bool map_invariant_front(structured_control_flow::Sequence& parent, structured_control_flow::Map& map_stmt);
51 bool map_invariant_back(structured_control_flow::Sequence& parent, structured_control_flow::Map& map_stmt);
52 bool map_invariant_move(
56 );
57 bool map_invariant_view(
61 );
62 bool map_invariant_libnode_front(
66 );
67 bool map_invariant_libnode_back(
71 );
72
73 bool if_else_invariant_front(structured_control_flow::Sequence& parent, structured_control_flow::IfElse& if_else);
74 bool if_else_invariant_back(structured_control_flow::Sequence& parent, structured_control_flow::IfElse& if_else);
75 void if_else_extract_invariant_front(
77 );
78 void
79 if_else_extract_invariant_back(structured_control_flow::Sequence& parent, structured_control_flow::IfElse& if_else);
80
81 bool equal_offloading_nodes(
83 offloading::DataOffloadingNode* offloading_node1,
85 offloading::DataOffloadingNode* offloading_node2
86 );
87
88protected:
89 virtual bool is_libnode_allowed(
91 );
92
94
97 );
100 );
101
102public:
104
105 static std::string name() {
106 return "BlockHoisting";
107 }
108
109 virtual bool accept(structured_control_flow::Map& map_stmt) override;
110
111 virtual bool accept(structured_control_flow::IfElse& if_else) override;
112};
113
115
116} // namespace passes
117} // namespace sdfg
Definition analysis.h:53
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
Base class for all library nodes in the dataflow graph.
Definition library_node.h:106
Name does not match current function.
Definition data_offloading_node.h:49
static std::string name()
Definition block_hoisting.h:105
virtual bool accept(structured_control_flow::IfElse &if_else) override
virtual void if_else_extract_invariant_libnode_back(structured_control_flow::Sequence &parent, structured_control_flow::IfElse &if_else)
BlockHoisting(builder::StructuredSDFGBuilder &builder, analysis::AnalysisManager &analysis_manager)
virtual bool is_libnode_allowed(structured_control_flow::Sequence &body, data_flow::DataFlowGraph &dfg, data_flow::LibraryNode *libnode)
virtual bool accept(structured_control_flow::Map &map_stmt) override
virtual bool equal_libnodes(structured_control_flow::Block &block1, structured_control_flow::Block &block2)
virtual void if_else_extract_invariant_libnode_front(structured_control_flow::Sequence &parent, structured_control_flow::IfElse &if_else)
Definition pass.h:55
A control flow node representing a basic block with dataflow computations.
Definition block.h:42
Represents a conditional if-else control flow node with multiple cases.
Definition if_else.h:47
Represents a parallel map loop with configurable scheduling.
Definition map.h:47
A sequential container of control flow nodes.
Definition sequence.h:52
Definition structured_sdfg_visitor.h:53
SymEngine::RCP< const SymEngine::Symbol > Symbol
Reference-counted pointer to a SymEngine Symbol.
Definition symbolic.h:71
Library node definitions for calling functions beyond simple instructions.
Definition function_builder.h:10
Definition approximate_math.h:12
VisitorPass< BlockHoisting > BlockHoistingPass
Definition block_hoisting.h:114
Definition analysis.h:7
Symbolic system for integer-based symbol analysis.