C# Class Reko.Structure.CompoundConditionCoalescer

Given a procedure, coalesces any compound conditions found.
A compound condition is expressed in C as a && b or a || b
ファイルを表示 Open project: uxmal/reko Class Usage Examples

Public Methods

Method Description
CompoundConditionCoalescer ( Procedure proc ) : Reko.Core
Transform ( ) : void

Private Methods

Method Description
BuildCompoundCondition ( Reko.Core.Block blockFirst, Reko.Core.Block blockSecond, Func op, bool fInvertFirst, bool fInvertSecond ) : void
IsBlockSingleBranch ( Reko.Core.Block block ) : bool

Returns true iff the block has a single instruction, a branch, and has a single predecessor.

MaybeCoalesce ( Reko.Core.Block block ) : bool

Attempt to coalesce a block ending with a branch with a successor consisting of a single branch instruction.

RebuildCompoundGraph ( Reko.Core.Block block, Reko.Core.Block blockRedundant, Reko.Core.Block blockChain, Reko.Core.Block blockCommon ) : void

Removes the now redundant block from the procedure graph.

ReplaceBlock ( List blocks, Reko.Core.Block old, Reko.Core.Block gnu ) : void

Method Details

CompoundConditionCoalescer() public method

public CompoundConditionCoalescer ( Procedure proc ) : Reko.Core
proc Procedure
return Reko.Core

Transform() public method

public Transform ( ) : void
return void