FlowGraph
Class AssemFlowGraph

java.lang.Object
  extended by Graph.Graph
      extended by FlowGraph.FlowGraph
          extended by FlowGraph.AssemFlowGraph

public class AssemFlowGraph
extends FlowGraph<Instr,AssemNode>


Constructor Summary
AssemFlowGraph(Frame frame, java.util.LinkedList<Instr> insns)
          My implementation builds a flowgraph node for every instruction.
 
Method Summary
 Temp[] def(AssemNode node)
          The set of temporaries defined by this instruction or block
 Instr instr(AssemNode node)
           
 boolean isMove(AssemNode node)
          True if this node represents a move instruction, i.e.
 Temp[] use(AssemNode node)
          The set of temporaries used by this instruction or block
 
Methods inherited from class FlowGraph.FlowGraph
def, isMove, show, use
 
Methods inherited from class Graph.Graph
addEdge, get, nodes, rmEdge, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AssemFlowGraph

public AssemFlowGraph(Frame frame,
                      java.util.LinkedList<Instr> insns)
My implementation builds a flowgraph node for every instruction. A more compact implementation would build a node per basic block and allow forward and backward traversal of the instructions in the block.

Method Detail

instr

public Instr instr(AssemNode node)

def

public Temp[] def(AssemNode node)
Description copied from class: FlowGraph
The set of temporaries defined by this instruction or block

Specified by:
def in class FlowGraph

use

public Temp[] use(AssemNode node)
Description copied from class: FlowGraph
The set of temporaries used by this instruction or block

Specified by:
use in class FlowGraph

isMove

public boolean isMove(AssemNode node)
Description copied from class: FlowGraph
True if this node represents a move instruction, i.e. one that can be deleted if def=use.

Specified by:
isMove in class FlowGraph