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

Pass that promotes simple dataflow computations to symbolic expressions. More...

#include <sdfg/passes/symbolic/symbol_promotion.h>

Inheritance diagram for sdfg::passes::SymbolPromotion:
[legend]

Public Member Functions

 SymbolPromotion ()
 Default constructor.
std::string name () override
 Returns the name of the pass.
virtual bool run_pass (builder::StructuredSDFGBuilder &builder, analysis::AnalysisManager &analysis_manager) override
 Executes the symbol promotion pass.
Public Member Functions inherited from sdfg::passes::Pass
 Pass ()=default
 Pass (const Options &options)
virtual ~Pass ()=default
virtual std::vector< OptionSpec > options ()
bool run (builder::SDFGBuilder &builder, bool create_report=false)
bool run (builder::StructuredSDFGBuilder &builder, analysis::AnalysisManager &analysis_manager, bool create_report=false)
virtual bool run_pass (builder::SDFGBuilder &builder)
virtual void invalidates (analysis::AnalysisManager &analysis_manager, bool applied)

Static Public Member Functions

static symbolic::Expression as_symbol (const data_flow::DataFlowGraph &dataflow, const data_flow::Tasklet &tasklet, const std::string &op)
 Converts a tasklet input operand to a symbolic expression.

Additional Inherited Members

Protected Member Functions inherited from sdfg::passes::Pass
template<class T>
T option (const OptionKey< T > &key, T fallback=T{}) const

Detailed Description

Pass that promotes simple dataflow computations to symbolic expressions.

The SymbolPromotion pass identifies single-tasklet dataflow graphs that perform simple integer arithmetic operations and converts them into symbolic expressions represented as state transitions. This enables better symbolic analysis and optimization of control flow.

The pass applies to tasklets that meet the following criteria:

  • Single tasklet with computational memlets only
  • No floating-point operations
  • Signed integer operands (with special cases for unsigned constants)
  • Supported operations: assign, add, sub, mul, sdiv, srem, smin, smax, abs, shift, logical ops
Note
The pass handles special cases like zero-extension and truncation for specific type conversions

Constructor & Destructor Documentation

◆ SymbolPromotion()

sdfg::passes::SymbolPromotion::SymbolPromotion ( )

Default constructor.

Member Function Documentation

◆ as_symbol()

symbolic::Expression sdfg::passes::SymbolPromotion::as_symbol ( const data_flow::DataFlowGraph & dataflow,
const data_flow::Tasklet & tasklet,
const std::string & op )
static

Converts a tasklet input operand to a symbolic expression.

Creates a symbolic expression for a tasklet input by examining its source:

  • For constant nodes, returns an integer literal
  • For access nodes, returns a symbolic variable
Parameters
dataflowThe dataflow graph containing the tasklet
taskletThe tasklet whose input to convert
opThe name of the input connector
Returns
A symbolic expression representing the input, or null if not found

◆ name()

std::string sdfg::passes::SymbolPromotion::name ( )
overridevirtual

Returns the name of the pass.

Returns
The string "SymbolPromotion"

Implements sdfg::passes::Pass.

◆ run_pass()

virtual bool sdfg::passes::SymbolPromotion::run_pass ( builder::StructuredSDFGBuilder & builder,
analysis::AnalysisManager & analysis_manager )
overridevirtual

Executes the symbol promotion pass.

Traverses the structured SDFG and applies symbol promotion to all eligible blocks containing single-tasklet computations.

Parameters
builderThe SDFG builder
analysis_managerThe analysis manager
Returns
true if any transformations were applied, false otherwise

Reimplemented from sdfg::passes::Pass.


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