Header menu logo B2R2

DeadCodeElimination Module

Types

Type Description

DeadCodeRemovalContext

Functions and values

Function or value Description

DeadCodeElimination.createLoop outs ins used iIdx oIdx

Full Usage: DeadCodeElimination.createLoop outs ins used iIdx oIdx

Parameters:
    outs : Stmt[]
    ins : Stmt[]
    used : bool[]
    iIdx : int
    oIdx : int

Returns: Stmt[]
outs : Stmt[]
ins : Stmt[]
used : bool[]
iIdx : int
oIdx : int
Returns: Stmt[]

DeadCodeElimination.createReducedStmts stmts reducedLen used

Full Usage: DeadCodeElimination.createReducedStmts stmts reducedLen used

Parameters:
    stmts : Stmt[]
    reducedLen : int
    used : bool[]

Returns: Stmt[]
stmts : Stmt[]
reducedLen : int
used : bool[]
Returns: Stmt[]

DeadCodeElimination.optimize stmts

Full Usage: DeadCodeElimination.optimize stmts

Parameters:
Returns: Stmt[]

Assuming that the stmts are localized, i.e., those stmts represent a basic block, perform dead code elimination.

stmts : Stmt[]
Returns: Stmt[]

DeadCodeElimination.optimizeLoop stmts used idx len ctxt

Full Usage: DeadCodeElimination.optimizeLoop stmts used idx len ctxt

Parameters:
Returns: Stmt[]
stmts : Stmt[]
used : bool[]
idx : int
len : int
ctxt : DeadCodeRemovalContext
Returns: Stmt[]

Type something to start searching.