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

#include <sdfg/analysis/loop_analysis.h>

Inheritance diagram for sdfg::analysis::LoopAnalysis:
[legend]

Classes

struct  LoopState
struct  AggregatedResult

Public Member Functions

 LoopAnalysis (StructuredSDFG &sdfg)
std::string name () const override
void run (analysis::AnalysisManager &analysis_manager) override
bool invalidate (structured_control_flow::ControlFlowNode &changed) override
 Updates the nest of the outermost loop around changed, the only nest whose infos depend on it, and keeps the others.
const std::vector< structured_control_flow::ControlFlowNode * > loops () const
 Currently guaranteed to be in Pre-Order.
const std::vector< structured_control_flow::ControlFlowNode * > & loops_in_pre_order () const
 Loops in Pre-order.
const std::unordered_map< structured_control_flow::ControlFlowNode *, structured_control_flow::ControlFlowNode * > & loop_tree () const
 Tree of parents of nodes.
LoopInfo loop_info (structured_control_flow::ControlFlowNode *loop) const
const LocalLoopInfo & loop_info_local (structured_control_flow::ControlFlowNode *loop) const
structured_control_flow::ControlFlowNode * find_loop_by_indvar (const std::string &indvar)
structured_control_flow::ControlFlowNode * parent_loop (structured_control_flow::ControlFlowNode *loop) const
const std::vector< structured_control_flow::ControlFlowNode * > & outermost_loops () const
bool is_outermost_loop (structured_control_flow::ControlFlowNode *loop) const
const std::vector< structured_control_flow::ControlFlowNode * > outermost_maps () const
const std::vector< sdfg::structured_control_flow::ControlFlowNode * > & children (sdfg::structured_control_flow::ControlFlowNode *node) const
std::list< std::vector< sdfg::structured_control_flow::ControlFlowNode * > > loop_tree_paths (sdfg::structured_control_flow::ControlFlowNode *loop) const
std::unordered_set< sdfg::structured_control_flow::ControlFlowNode * > descendants (sdfg::structured_control_flow::ControlFlowNode *loop) const
std::unordered_set< sdfg::structured_control_flow::ControlFlowNode * > ancestors (sdfg::structured_control_flow::ControlFlowNode *loop) const
std::vector< sdfg::structured_control_flow::ControlFlowNode * >::const_iterator get_loop_iterator (structured_control_flow::ControlFlowNode *loop)
std::vector< sdfg::structured_control_flow::ControlFlowNode * >::const_iterator get_subtree_end (structured_control_flow::ControlFlowNode *loop)
 For a given loop, return the end-iterator of its subtree (the iterator after the last descendant loop) This is essentially an iterator on the loops_in_pre_order() list.
void dump_to_file (std::filesystem::path file) const
void copied_loop (structured_control_flow::ControlFlowNode *existing_loop, structured_control_flow::ControlFlowNode *new_parent_loop, structured_control_flow::ControlFlowNode *new_loop, bool start_not_end=false)
void moved_loop (structured_control_flow::ControlFlowNode *existing_loop, structured_control_flow::StructuredLoop *new_parent, bool start_not_end=false)
void removed_loop (structured_control_flow::ControlFlowNode *existing_loop)
void added_local_contents (structured_control_flow::ControlFlowNode *loop, bool side_effects, bool non_perfectly_nested)
Public Member Functions inherited from sdfg::analysis::Analysis
 Analysis (StructuredSDFG &sdfg)
 Analysis (StructuredSDFG &sdfg, const Options &options)
virtual ~Analysis ()=default
 Analysis (const Analysis &a)=delete
Analysis & operator= (const Analysis &)=delete

Additional Inherited Members

Protected Member Functions inherited from sdfg::analysis::Analysis
template<class T>
T option (const OptionKey< T > &key, T fallback=T{}) const
Protected Attributes inherited from sdfg::analysis::Analysis
StructuredSDFG & sdfg_
symbolic::Assumptions additional_assumptions_
const Options * options_ = &Options::empty()

Constructor & Destructor Documentation

◆ LoopAnalysis()

sdfg::analysis::LoopAnalysis::LoopAnalysis ( StructuredSDFG & sdfg)

Member Function Documentation

◆ added_local_contents()

void sdfg::analysis::LoopAnalysis::added_local_contents ( structured_control_flow::ControlFlowNode * loop,
bool side_effects,
bool non_perfectly_nested )
Parameters
loopthe loop to modify
side_effectselements that have sideffects were added to the body of this loop (and not its children)
non_perfectly_nestedelements other than a loop were added to the body of this loop (block, another sequence etc.)

◆ ancestors()

std::unordered_set< sdfg::structured_control_flow::ControlFlowNode * > sdfg::analysis::LoopAnalysis::ancestors ( sdfg::structured_control_flow::ControlFlowNode * loop) const

◆ children()

const std::vector< sdfg::structured_control_flow::ControlFlowNode * > & sdfg::analysis::LoopAnalysis::children ( sdfg::structured_control_flow::ControlFlowNode * node) const

◆ copied_loop()

void sdfg::analysis::LoopAnalysis::copied_loop ( structured_control_flow::ControlFlowNode * existing_loop,
structured_control_flow::ControlFlowNode * new_parent_loop,
structured_control_flow::ControlFlowNode * new_loop,
bool start_not_end = false )

◆ descendants()

std::unordered_set< sdfg::structured_control_flow::ControlFlowNode * > sdfg::analysis::LoopAnalysis::descendants ( sdfg::structured_control_flow::ControlFlowNode * loop) const

◆ dump_to_file()

void sdfg::analysis::LoopAnalysis::dump_to_file ( std::filesystem::path file) const

◆ find_loop_by_indvar()

structured_control_flow::ControlFlowNode * sdfg::analysis::LoopAnalysis::find_loop_by_indvar ( const std::string & indvar)

◆ get_loop_iterator()

std::vector< sdfg::structured_control_flow::ControlFlowNode * >::const_iterator sdfg::analysis::LoopAnalysis::get_loop_iterator ( structured_control_flow::ControlFlowNode * loop)

◆ get_subtree_end()

std::vector< sdfg::structured_control_flow::ControlFlowNode * >::const_iterator sdfg::analysis::LoopAnalysis::get_subtree_end ( structured_control_flow::ControlFlowNode * loop)

For a given loop, return the end-iterator of its subtree (the iterator after the last descendant loop) This is essentially an iterator on the loops_in_pre_order() list.

◆ invalidate()

bool sdfg::analysis::LoopAnalysis::invalidate ( structured_control_flow::ControlFlowNode & changed)
overridevirtual

Updates the nest of the outermost loop around changed, the only nest whose infos depend on it, and keeps the others.

A change outside of every loop that contains no loop leaves all as they are. Returns false, to be run again, for a change of the outermost loops themselves: a new one, or a change containing loops outside of all.

Reimplemented from sdfg::analysis::Analysis.

◆ is_outermost_loop()

bool sdfg::analysis::LoopAnalysis::is_outermost_loop ( structured_control_flow::ControlFlowNode * loop) const

◆ loop_info()

LoopInfo sdfg::analysis::LoopAnalysis::loop_info ( structured_control_flow::ControlFlowNode * loop) const

◆ loop_info_local()

const LocalLoopInfo & sdfg::analysis::LoopAnalysis::loop_info_local ( structured_control_flow::ControlFlowNode * loop) const

◆ loop_tree()

const std::unordered_map< structured_control_flow::ControlFlowNode *, structured_control_flow::ControlFlowNode * > & sdfg::analysis::LoopAnalysis::loop_tree ( ) const

Tree of parents of nodes.

Not in any stable order. Do NEVER iterate over this. If you need to iterate over loops()

◆ loop_tree_paths()

std::list< std::vector< sdfg::structured_control_flow::ControlFlowNode * > > sdfg::analysis::LoopAnalysis::loop_tree_paths ( sdfg::structured_control_flow::ControlFlowNode * loop) const

◆ loops()

const std::vector< structured_control_flow::ControlFlowNode * > sdfg::analysis::LoopAnalysis::loops ( ) const

Currently guaranteed to be in Pre-Order.

◆ loops_in_pre_order()

const std::vector< structured_control_flow::ControlFlowNode * > & sdfg::analysis::LoopAnalysis::loops_in_pre_order ( ) const

Loops in Pre-order.

Returns
This is a live vector. It will change if modifications to LoopAnalysis are processed

◆ moved_loop()

void sdfg::analysis::LoopAnalysis::moved_loop ( structured_control_flow::ControlFlowNode * existing_loop,
structured_control_flow::StructuredLoop * new_parent,
bool start_not_end = false )

◆ name()

std::string sdfg::analysis::LoopAnalysis::name ( ) const
inlineoverridevirtual

◆ outermost_loops()

const std::vector< structured_control_flow::ControlFlowNode * > & sdfg::analysis::LoopAnalysis::outermost_loops ( ) const

◆ outermost_maps()

const std::vector< structured_control_flow::ControlFlowNode * > sdfg::analysis::LoopAnalysis::outermost_maps ( ) const

◆ parent_loop()

structured_control_flow::ControlFlowNode * sdfg::analysis::LoopAnalysis::parent_loop ( structured_control_flow::ControlFlowNode * loop) const

◆ removed_loop()

void sdfg::analysis::LoopAnalysis::removed_loop ( structured_control_flow::ControlFlowNode * existing_loop)

◆ run()

void sdfg::analysis::LoopAnalysis::run ( analysis::AnalysisManager & analysis_manager)
overridevirtual

The documentation for this class was generated from the following file: