angr.analyses.s_liveness

class angr.analyses.s_liveness.SLivenessModel

Bases: object

The SLiveness model that stores LiveIn and LiveOut sets for each block in a partial-SSA function.

Blocks are identified by address and (block) index.

__init__()
class angr.analyses.s_liveness.SLivenessAnalysis

Bases: Analysis

Calculates LiveIn and LiveOut sets for each block in a partial-SSA function.

__init__(func, func_graph, entry=None, func_addr=None, arg_vvars=None)
interference_graph()

Generate an interference graph based on the liveness analysis result.

Returns:

A networkx.Graph instance.

live_vars_by_stmt()

Get a mapping from statements to live variables at the point of the statement.

Return type:

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

Returns:

A dictionary mapping statements to sets of live variable IDs.