decompiler  1.0.0
Public Member Functions | Private Attributes | List of all members
RuleConditionalMove::BoolExpress Class Reference

Class for categorizing and rebuilding a boolean expression. More...

Public Member Functions

bool isConstant (void) const
 Return true if boolean is a constant.
 
uintb getVal (void) const
 Get the constant boolean value.
 
bool initialize (Varnode *vn)
 Initialize based on output Varnode. More...
 
bool evaluatePropagation (FlowBlock *root, FlowBlock *branch)
 Can this expression be propagated. More...
 
VarnodeconstructBool (PcodeOp *insertop, Funcdata &data)
 Construct the expression after the merge. More...
 

Private Attributes

int4 optype
 0=constant 1=unary 2=binary
 
OpCode opc
 OpCode constructing the boolean value.
 
PcodeOpop
 PcodeOp constructing the boolean value.
 
uintb val
 Value (if boolean is constant)
 
Varnodein0
 First input.
 
Varnodein1
 Second input.
 
bool mustreconstruct
 Must make a copy of final boolean operation.
 

Detailed Description

Class for categorizing and rebuilding a boolean expression.

Member Function Documentation

◆ constructBool()

Varnode * RuleConditionalMove::BoolExpress::constructBool ( PcodeOp insertop,
Funcdata data 
)

Construct the expression after the merge.

Produce the boolean Varnode to use after the merge. Either reuse the existing Varnode or reconstruct it, making sure the expression does not depend on data in the branch.

Parameters
insertopis point at which any reconstruction should be inserted
datais the function being analyzed
Returns
the Varnode representing the boolean expression

References Funcdata::newConstant(), Funcdata::newOp(), Funcdata::newUniqueOut(), Funcdata::opInsertBefore(), Funcdata::opSetInput(), and Funcdata::opSetOpcode().

Referenced by RuleConditionalMove::applyOp().

◆ evaluatePropagation()

bool RuleConditionalMove::BoolExpress::evaluatePropagation ( FlowBlock root,
FlowBlock branch 
)

Can this expression be propagated.

Evaluate if this expression can be easily propagated past a merge point. Also can the Varnode be used past the merge, or does its value need to be reconstructed.

Parameters
rootis the split point
branchis the block on which the expression exists and after which is the merge
Returns
true if the expression can be propagated

Referenced by RuleConditionalMove::applyOp().

◆ initialize()

bool RuleConditionalMove::BoolExpress::initialize ( Varnode vn)

The documentation for this class was generated from the following files: