decompiler  1.0.0
Public Member Functions | Public Attributes | List of all members
TraceDAG::BranchPoint Struct Reference

Public Member Functions

void createTraces (void)
 Given the BlockTrace objects, given a new BranchPoint.
 
void markPath (void)
 Mark a path from this up to the root BranchPoint.
 
int4 distance (BranchPoint *op2)
 Calculate distance between two BranchPoints. More...
 
FlowBlockgetPathStart (int4 i)
 Get the start of the i-th BlockTrace. More...
 
 BranchPoint (void)
 Create the (unique) root branch point.
 
 BranchPoint (BlockTrace *parenttrace)
 Construct given a parent BlockTrace.
 
 ~BranchPoint (void)
 BranchPoint owns its BlockTraces.
 

Public Attributes

BranchPointparent
 The parent BranchPoint along which this is only one path.
 
int4 pathout
 Index (of the out edge from the parent) of the path along which this lies.
 
FlowBlocktop
 FlowBlock that embodies the branch point.
 
vector< BlockTrace * > paths
 BlockTrace for each possible path out of this BlockPoint.
 
int4 depth
 Depth of BranchPoints from the root.
 
bool ismark
 Possible mark.
 

Detailed Description

A node in the control-flow graph with multiple outgoing edges in the DAG. Ideally, all these paths eventually merge at the same node.

Member Function Documentation

◆ distance()

int4 TraceDAG::BranchPoint::distance ( BranchPoint op2)

Calculate distance between two BranchPoints.

The distance is the number of edges from this up to the common ancestor plus the number of edges down to the other BranchPoint. We assume that this has had its path up to the root marked.

Parameters
op2is the other BranchPoint
Returns
the distance

References depth, ismark, and parent.

Referenced by TraceDAG::processExitConflict().

◆ getPathStart()

FlowBlock * TraceDAG::BranchPoint::getPathStart ( int4  i)

Get the start of the i-th BlockTrace.

Get the first FlowBlock along the i-th BlockTrace path.

Parameters
iis the index of the path
Returns
the first FlowBlock along the path

References FlowBlock::sizeOut().


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