5#include <unordered_map>
76 std::unordered_map<std::string, LoopCarriedDependencyInfo>
dependencies;
77 std::vector<LoopCarriedDependencyPair>
pairs;
80 std::vector<structured_control_flow::ReductionInfo>
reductions;
85 std::unordered_map<const structured_control_flow::StructuredLoop*, LoopResult> results_;
89 std::unordered_map<const structured_control_flow::StructuredLoop*, std::unique_ptr<analysis::DataDependencyAnalysis>>
94 std::unique_ptr<analysis::AssumptionsAnalysis> detailed_assumptions_;
105 std::string
name()
const override {
106 return "LoopCarriedDependencyAnalysis";
123 const std::unordered_map<std::string, LoopCarriedDependencyInfo>&
Definition structured_sdfg.h:30
Definition assumptions_analysis.h:15
Computes the read-after-write relation between users.
Definition data_dependency_analysis.h:27
bool has_reductions(structured_control_flow::StructuredLoop &loop)
True if the loop carries at least one recognized reduction.
bool available(structured_control_flow::StructuredLoop &loop)
Whether the loop can be analyzed (monotonic, with boundary information).
bool is_reduction_only(structured_control_flow::StructuredLoop &loop)
True if every loop-carried hazard (RAW or undefined) of the loop is a recognized reduction,...
void run(analysis::AnalysisManager &analysis_manager) override
Only records the analysis manager; results are computed on demand per loop.
bool has_loop_carried(structured_control_flow::StructuredLoop &loop)
True if any loop-carried dependency exists for the loop.
const std::vector< LoopCarriedDependencyPair > & pairs(structured_control_flow::StructuredLoop &loop)
Per-pair list of loop-carried dependencies for a loop.
const std::vector< structured_control_flow::ReductionInfo > & reductions(structured_control_flow::StructuredLoop &loop)
Recognized reductions carried by the loop.
bool has_loop_carried_raw(structured_control_flow::StructuredLoop &loop)
True if any loop-carried RAW dependency exists for the loop.
bool has_loop_carried_hazard(structured_control_flow::StructuredLoop &loop)
True if RAW or undefined loop-carried dependency exists.
LoopCarriedDependencyAnalysis(StructuredSDFG &sdfg)
std::vector< const LoopCarriedDependencyPair * > pairs_between(structured_control_flow::StructuredLoop &loop, const structured_control_flow::ControlFlowNode &subtree_a, const structured_control_flow::ControlFlowNode &subtree_b)
Filter pairs(loop) to those whose writer lies in subtree_a and reader lies in subtree_b (or vice vers...
std::string name() const override
Definition loop_carried_dependency_analysis.h:105
const std::unordered_map< std::string, LoopCarriedDependencyInfo > & dependencies(structured_control_flow::StructuredLoop &loop)
Per-container summary of loop-carried dependencies for a loop.
Base class for all structured control flow nodes in a StructuredSDFG.
Definition control_flow_node.h:44
Base class for structured loop constructs.
Definition structured_loop.h:244
Analysis of symbol evolution through maps.
Definition loop_carried_dependency_analysis.h:18
LoopCarriedDependency
Definition loop_carried_dependency_analysis.h:20
@ LOOP_CARRIED_DEPENDENCY_WRITE_WRITE
Definition loop_carried_dependency_analysis.h:22
@ LOOP_CARRIED_DEPENDENCY_UNDEFINED
Definition loop_carried_dependency_analysis.h:23
@ LOOP_CARRIED_DEPENDENCY_READ_WRITE
Definition loop_carried_dependency_analysis.h:21
Extended loop-carried dependency information including distance vectors.
Definition loop_carried_dependency_analysis.h:32
symbolic::maps::DependenceDeltas deltas
Definition loop_carried_dependency_analysis.h:34
LoopCarriedDependency type
Definition loop_carried_dependency_analysis.h:33
Per-pair loop-carried dependency record.
Definition loop_carried_dependency_analysis.h:45
LoopCarriedDependency type
Definition loop_carried_dependency_analysis.h:48
analysis::User * writer
Definition loop_carried_dependency_analysis.h:46
symbolic::maps::DependenceDeltas deltas
Definition loop_carried_dependency_analysis.h:49
analysis::User * reader
Definition loop_carried_dependency_analysis.h:47
Represents the set of dependence distance vectors between two access patterns.
Definition maps.h:40