B2R2


ConstantFolding Module

Types

Type Description

Context

Functions and values

Function or value Description

ConstantFolding.optimize stmts

Full Usage: ConstantFolding.optimize stmts

Parameters:
Returns: Stmt[]

Assuming that the stmts are localized, i.e., those stmts represent a basic block, perform local constant folding.

stmts : Stmt[]
Returns: Stmt[]

ConstantFolding.optimizeLoop stmts idx ctxt

Full Usage: ConstantFolding.optimizeLoop stmts idx ctxt

Parameters:
Returns: Stmt[]
stmts : Stmt[]
idx : int
ctxt : Context
Returns: Stmt[]

ConstantFolding.replace ctxt expr

Full Usage: ConstantFolding.replace ctxt expr

Parameters:
Returns: bool * Expr
ctxt : Context
expr : Expr
Returns: bool * Expr

ConstantFolding.updateContextAtDef ctxt dst src

Full Usage: ConstantFolding.updateContextAtDef ctxt dst src

Parameters:
ctxt : Context
dst : Expr
src : Expr