coins.mdf
Class MacroFlowGraph.ControlBranch

java.lang.Object
  extended bycoins.mdf.MacroFlowGraph.ControlBranch
Enclosing class:
MacroFlowGraph

class MacroFlowGraph.ControlBranch
extends java.lang.Object

This class individuate each conditional branches.


Constructor Summary
(package private) MacroFlowGraph.ControlBranch(MacroFlowGraph mfg)
          Constructor: Collect the macro tasks which have the conditional branches and inidividuate them.
 
Method Summary
(package private)  MacroTask[] branchPair(int num)
          Get a pair of macro task, that consist of source and target of the conditional branch.
(package private)  int branchUniqueNum(MacroTask src, MacroTask dst)
          Get the unique number of the conditinal branches.
(package private)  int size()
          Get the number of macro tasks which have the conditional branches.
(package private)  int[] whichCond(MacroTask src, MacroTask dst)
          Get the decision which way to branch.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MacroFlowGraph.ControlBranch

MacroFlowGraph.ControlBranch(MacroFlowGraph mfg)
Constructor: Collect the macro tasks which have the conditional branches and inidividuate them.

Method Detail

size

int size()
Get the number of macro tasks which have the conditional branches.

Returns:
the number of macro tasks which have the conditional branches

branchPair

MacroTask[] branchPair(int num)
Get a pair of macro task, that consist of source and target of the conditional branch. The first element of the array means the source, and the second element of the array means the target.

Parameters:
num - The unique number for the conditional branches
Returns:
The pair of the macro tasks

branchUniqueNum

int branchUniqueNum(MacroTask src,
                    MacroTask dst)
Get the unique number of the conditinal branches.

Parameters:
src - The source macro task of the conditional branch
dst - The target macro task of the conditional branch
Returns:
The unique number of the conditional branch

whichCond

int[] whichCond(MacroTask src,
                MacroTask dst)
Get the decision which way to branch.

Parameters:
src - The macro task which `dst' is control depended
dst - The macro task which control depend on `src'
Returns:
The list of decisions which are needed to reach from `src' to `dst' in flow.