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.emptyCtxt

Full Usage: DeadCodeElimination.emptyCtxt

Returns: DeadCodeRemovalContext
Returns: DeadCodeRemovalContext

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[]

DeadCodeElimination.removeTempUse n ctxt

Full Usage: DeadCodeElimination.removeTempUse n ctxt

Parameters:
Returns: DeadCodeRemovalContext
n : int
ctxt : DeadCodeRemovalContext
Returns: DeadCodeRemovalContext

DeadCodeElimination.removeUse n ctxt

Full Usage: DeadCodeElimination.removeUse n ctxt

Parameters:
Returns: DeadCodeRemovalContext
n : RegisterID
ctxt : DeadCodeRemovalContext
Returns: DeadCodeRemovalContext

DeadCodeElimination.updateOut rs ctxt

Full Usage: DeadCodeElimination.updateOut rs ctxt

Parameters:
Returns: DeadCodeRemovalContext
rs : RegisterSet
ctxt : DeadCodeRemovalContext
Returns: DeadCodeRemovalContext

DeadCodeElimination.updateTempOut n ctxt

Full Usage: DeadCodeElimination.updateTempOut n ctxt

Parameters:
Returns: DeadCodeRemovalContext
n : int
ctxt : DeadCodeRemovalContext
Returns: DeadCodeRemovalContext

DeadCodeElimination.updateUse ei ctxt

Full Usage: DeadCodeElimination.updateUse ei ctxt

Parameters:
Returns: DeadCodeRemovalContext
ei : ExprInfo
ctxt : DeadCodeRemovalContext
Returns: DeadCodeRemovalContext

DeadCodeElimination.updateUse2 ei1 ei2 ctxt

Full Usage: DeadCodeElimination.updateUse2 ei1 ei2 ctxt

Parameters:
Returns: DeadCodeRemovalContext
ei1 : ExprInfo
ei2 : ExprInfo
ctxt : DeadCodeRemovalContext
Returns: DeadCodeRemovalContext

DeadCodeElimination.updateUse3 ei1 ei2 ei3 ctxt

Full Usage: DeadCodeElimination.updateUse3 ei1 ei2 ei3 ctxt

Parameters:
Returns: DeadCodeRemovalContext
ei1 : ExprInfo
ei2 : ExprInfo
ei3 : ExprInfo
ctxt : DeadCodeRemovalContext
Returns: DeadCodeRemovalContext