coins.mdf
Class MacroFlowGraph

java.lang.Object
  extended bycoins.mdf.MacroFlowGraph

public class MacroFlowGraph
extends java.lang.Object

This class represents a macro flow graph. Divide a input program into macro tasks and make their predecessors and successors.


Nested Class Summary
(package private)  class MacroFlowGraph.ControlBranch
          This class individuate each conditional branches.
 
Field Summary
(package private)  MacroFlowGraph.ControlBranch controlBranch
          The conditional branches in the current function
 HirRoot hirRoot
          The current HirRoot
(package private)  Sym idSym
          This symbol represents the ID on threads
 SubpDefinition subpDef
          The current sub program
(package private)  SubpFlow subpFlow
          The current SubpFlow
(package private)  SymRoot symRoot
          The current SymRoot
(package private)  SymTable symTab
          The current symbol table
(package private)  Sym taskSym
          This symbol represents the macro task number
 
Constructor Summary
MacroFlowGraph(MdfEnvironment e, HirRoot hRoot, SubpDefinition subpDefinition)
          Constructor:
 
Method Summary
(package private)  int bound()
          Return the boundary of the list of the macro tasks.
(package private)  MacroTask entryBlk()
          Get the entry macro task of the current macro flow graph.
(package private)  java.util.List exitBlks()
          Get the list of the exit macro tasks of the current macro flow graph.
 java.util.ListIterator listIterator()
          Get the list iterator of the macro flow graph.
(package private)  MacroTask macroTask(BBlock blk)
          Search the macro task which includes the specified basic block.
(package private)  MacroTask macroTask(Label label)
          Search the macro task which includes the specified label.
(package private)  int numberOfMacroTasks()
          Return the number of the macro tasks.
(package private)  void print()
          Debug print
(package private)  void printGraph(java.lang.String filename)
          Print the node as graphviz format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

subpDef

public final SubpDefinition subpDef
The current sub program


symRoot

final SymRoot symRoot
The current SymRoot


hirRoot

public final HirRoot hirRoot
The current HirRoot


subpFlow

final SubpFlow subpFlow
The current SubpFlow


symTab

final SymTable symTab
The current symbol table


idSym

final Sym idSym
This symbol represents the ID on threads


taskSym

final Sym taskSym
This symbol represents the macro task number


controlBranch

final MacroFlowGraph.ControlBranch controlBranch
The conditional branches in the current function

Constructor Detail

MacroFlowGraph

public MacroFlowGraph(MdfEnvironment e,
                      HirRoot hRoot,
                      SubpDefinition subpDefinition)
               throws PassException
Constructor:

Parameters:
e - The environment of the MDF module
hRoot - The current HirRoot
subpDefinition - The current sub program
Method Detail

bound

int bound()
Return the boundary of the list of the macro tasks.

Returns:
The boundary of the list of the macro tasks

numberOfMacroTasks

int numberOfMacroTasks()
Return the number of the macro tasks.

Returns:
The number of the macro tasks

macroTask

MacroTask macroTask(BBlock blk)
Search the macro task which includes the specified basic block.

Parameters:
blk - The basic block
Returns:
The macro task which includes `blk'

macroTask

MacroTask macroTask(Label label)
Search the macro task which includes the specified label.

Parameters:
label - The label
Returns:
The macro task which includes `label'

listIterator

public java.util.ListIterator listIterator()
Get the list iterator of the macro flow graph.

Returns:
The list iterator

entryBlk

MacroTask entryBlk()
Get the entry macro task of the current macro flow graph. The entry means the macro task which has no predecessors. If there are no entry macro task, then return `null'.

Returns:
The entry macro task of the current macro flow graph

exitBlks

java.util.List exitBlks()
Get the list of the exit macro tasks of the current macro flow graph. The exit means the macro task which has no successors.

Returns:
The list of exit macro tasks

print

void print()
Debug print


printGraph

void printGraph(java.lang.String filename)
          throws PassException
Print the node as graphviz format.

Parameters:
filename - The file name for output
Throws:
PassException