docc 0.8.3 (0d44999b)
C++ API Reference
Loading...
Searching...
No Matches
sdfg::analysis::PointerEscapeAnalyzer< Policy, ForceDetailed > Class Template Reference

Reusable BaseUserAnalyzer that detects pointer escapes. More...

#include <sdfg/analysis/pointer_analyzers.h>

Inheritance diagram for sdfg::analysis::PointerEscapeAnalyzer< Policy, ForceDetailed >:
[legend]

Public Member Functions

 PointerEscapeAnalyzer (const StructuredSDFG &sdfg, Policy &policy)
void use_as_return_src (const std::string &container, const Return &ret) override
void use_as_symbol_read (const std::string &container, const ControlFlowNode *node, const Element *user, SymbolReadLocation loc, int loc_index, symbolic::Expression expr) override
void use_as_src_node (const std::string &container, const data_flow::AccessNode &node, const data_flow::Memlet &edge, const Block &block) override
void use_as_dst_node (const std::string &container, const data_flow::AccessNode &node, const data_flow::Memlet &edge, const Block &block) override
void use_as_symbol_write (const symbolic::Symbol &container, const ControlFlowNode *node, const Element *user, SymbolWriteLocation loc) override
Public Member Functions inherited from sdfg::users::BaseUserAnalyzer
virtual ~BaseUserAnalyzer ()=default

Additional Inherited Members

Public Types inherited from sdfg::users::BaseUserAnalyzer
enum class  SymbolReadLocation {
  Assignment , LoopHeader , IfHeader , MemletSubset ,
  LibraryNode
}
enum class  SymbolWriteLocation { Assignment , LoopHeader }
Static Public Attributes inherited from sdfg::users::BaseUserAnalyzer
static constexpr int LOC_LOOP_READ_INIT = 0
static constexpr int LOC_LOOP_READ_CONDITION = 1
static constexpr int LOC_LOOP_READ_UPDATE = 2

Detailed Description

template<EscapePolicy Policy, bool ForceDetailed = false>
class sdfg::analysis::PointerEscapeAnalyzer< Policy, ForceDetailed >

Reusable BaseUserAnalyzer that detects pointer escapes.

For each of the 5 BaseUserAnalyzer callbacks, it checks whether the access involves a pointer-typed container and whether the operation constitutes an escape (value leaks out of our control). Detected events are forwarded to the policy object via static dispatch.

Does NOT walk the SDFG itself — must be driven by a BaseUserVisitor (or future CompositeUserVisitor) that calls the callbacks.

If the policy implements the EscapeDetailsPolicy concept, it will make a more specific call for lib-nodes, as they can vary greatly in what they do with the pointer.

Constructor & Destructor Documentation

◆ PointerEscapeAnalyzer()

template<EscapePolicy Policy, bool ForceDetailed = false>
sdfg::analysis::PointerEscapeAnalyzer< Policy, ForceDetailed >::PointerEscapeAnalyzer ( const StructuredSDFG & sdfg,
Policy & policy )
inline

Member Function Documentation

◆ use_as_dst_node()

template<EscapePolicy Policy, bool ForceDetailed = false>
void sdfg::analysis::PointerEscapeAnalyzer< Policy, ForceDetailed >::use_as_dst_node ( const std::string & container,
const data_flow::AccessNode & node,
const data_flow::Memlet & edge,
const Block & block )
inlineoverridevirtual

◆ use_as_return_src()

template<EscapePolicy Policy, bool ForceDetailed = false>
void sdfg::analysis::PointerEscapeAnalyzer< Policy, ForceDetailed >::use_as_return_src ( const std::string & container,
const Return & ret )
inlineoverridevirtual

◆ use_as_src_node()

template<EscapePolicy Policy, bool ForceDetailed = false>
void sdfg::analysis::PointerEscapeAnalyzer< Policy, ForceDetailed >::use_as_src_node ( const std::string & container,
const data_flow::AccessNode & node,
const data_flow::Memlet & edge,
const Block & block )
inlineoverridevirtual

◆ use_as_symbol_read()

template<EscapePolicy Policy, bool ForceDetailed = false>
void sdfg::analysis::PointerEscapeAnalyzer< Policy, ForceDetailed >::use_as_symbol_read ( const std::string & container,
const ControlFlowNode * node,
const Element * user,
SymbolReadLocation loc,
int loc_index,
symbolic::Expression expr )
inlineoverridevirtual

◆ use_as_symbol_write()

template<EscapePolicy Policy, bool ForceDetailed = false>
void sdfg::analysis::PointerEscapeAnalyzer< Policy, ForceDetailed >::use_as_symbol_write ( const symbolic::Symbol & container,
const ControlFlowNode * node,
const Element * user,
SymbolWriteLocation loc )
inlineoverridevirtual

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