angr.utils.ssa

class angr.utils.ssa.VVarUsesCollector

Bases: AILBlockViewer

Collect all uses of virtual variables and their use locations in an AIL block. Skip collecting use locations if block is not specified.

__init__()
vvar_and_uselocs: dict[int, list[tuple[VirtualVariable, AILCodeLocation]]]
vvars: set[int]
angr.utils.ssa.check_in_between_stmts(graph, blocks, defloc, useloc, predicate)
Parameters:
angr.utils.ssa.get_tmp_deflocs(blocks)
Return type:

dict[tuple[int, int | None], dict[Tmp, int]]

Parameters:

blocks (Iterable[Block])

angr.utils.ssa.get_tmp_uselocs(blocks)
Return type:

dict[tuple[int, int | None], dict[Tmp, set[tuple[Tmp, int]]]]

Parameters:

blocks (Iterable[Block])

angr.utils.ssa.get_vvar_deflocs(blocks, phi_vvars=None)
Return type:

dict[int, tuple[VirtualVariable, AILCodeLocation]]

Parameters:

phi_vvars (dict[int, set[int | None]] | None)

angr.utils.ssa.get_vvar_uselocs(blocks)
Return type:

dict[int, list[tuple[VirtualVariable, AILCodeLocation]]]

angr.utils.ssa.has_call_in_between_stmts(graph, blocks, defloc, useloc, skip_if_contains_vvar=None)
Return type:

bool

Parameters:
angr.utils.ssa.has_ite_expr(expr)
Return type:

bool

Parameters:

expr (Expression)

angr.utils.ssa.has_load_expr_in_between_stmts(graph, blocks, defloc, useloc, skip_if_contains_vvar=None)
Return type:

bool

Parameters:
angr.utils.ssa.has_store_stmt_in_between_stmts(graph, blocks, defloc, useloc)
Return type:

bool

Parameters:
angr.utils.ssa.is_const_and_vvar_assignment(stmt)
Return type:

bool

Parameters:

stmt (Statement)

angr.utils.ssa.is_const_assignment(stmt, only_consts=False)
Return type:

tuple[bool, Const | StackBaseOffset | None]

Parameters:
angr.utils.ssa.is_const_vvar_load_assignment(stmt)
Return type:

bool

Parameters:

stmt (Statement)

angr.utils.ssa.is_const_vvar_load_dirty_assignment(stmt)
Return type:

bool

Parameters:

stmt (Statement)

angr.utils.ssa.is_phi_assignment(stmt)
Return type:

bool

Parameters:

stmt (Statement)

angr.utils.ssa.is_vvar_eliminatable(vvar, def_stmt)
Return type:

bool

Parameters:
angr.utils.ssa.phi_assignment_get_src(stmt)
Return type:

Phi | None

Parameters:

stmt (Statement)

Submodules