reaching_definitions
reaching definitions for finch assembly.
a forward may-analysis: for every variable, the ids of the statements whose definition may reach a program point. function arguments are defined by the synthetic prologue statements of the cfg, and a setattr is a partial definition of the variable at the root of its target, so it adds to the reaching ones.
AssemblyReachingDefinitions
¶
Bases: AbstractAssemblyDataflow
reaching definitions, see the module docstring. a state maps variable names to frozensets of statement ids.
Source code in src/finch/finch_assembly/reaching_definitions.py
def_use_chains()
¶
map each definition to the statements whose reads it reaches
Source code in src/finch/finch_assembly/reaching_definitions.py
use_def_chains()
¶
map (statement id, variable it reads) to the definitions reaching it