harpoon.Backend.CSAHack.FlowGraph
Class AssemFlowGraph

java.lang.Object
  extended by harpoon.Backend.CSAHack.Graph.Graph
      extended by harpoon.Backend.CSAHack.FlowGraph.FlowGraph
          extended by harpoon.Backend.CSAHack.FlowGraph.AssemFlowGraph

public class AssemFlowGraph
extends FlowGraph

A flow graph whose nodes correspond to machine instructions.

Version:
1.00, 25 Nov 1996
Author:
C. Scott Ananian
See Also:
Instr

Constructor Summary
AssemFlowGraph(Instr root, UseDefer ud, boolean twoWord)
          Construct an AssemFlowGraph from a list of instructions.
 
Method Summary
 TempList def(Node n)
          The set of temporaries defined by this instruction or block
 Instr instr(Node n)
           
 boolean isMove(Node n)
          True if this node represents a move instruction, i.e. one that can be deleted if def=use.
 Node newNode()
          Create a new node in the flow graph that does not correspond to an instruction.
 Node newNode(Instr i)
          Create a new node in the flow graph corresponding to the instruction passed as parameter.
 TempList use(Node n)
          The set of temporaries used by this instruction or block
 
Methods inherited from class harpoon.Backend.CSAHack.FlowGraph.FlowGraph
show
 
Methods inherited from class harpoon.Backend.CSAHack.Graph.Graph
addEdge, nodes, rmEdge
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AssemFlowGraph

public AssemFlowGraph(Instr root,
                      UseDefer ud,
                      boolean twoWord)
Construct an AssemFlowGraph from a list of instructions.

Method Detail

instr

public Instr instr(Node n)
Parameters:
n - a node in the flow graph.
Returns:
the instruction corresponding to node 'n'

def

public TempList def(Node n)
Description copied from class: FlowGraph
The set of temporaries defined by this instruction or block

Specified by:
def in class FlowGraph
Parameters:
n - a node in the flow graph.
Returns:
a list of temps defined by the instruction at node 'n'
See Also:
Temp

use

public TempList use(Node n)
Description copied from class: FlowGraph
The set of temporaries used by this instruction or block

Specified by:
use in class FlowGraph
Parameters:
n - a node in the flow graph.
Returns:
a list of temps used by the instruction at node 'n'
See Also:
Temp

isMove

public boolean isMove(Node n)
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
Parameters:
n - a node in the flow graph.
Returns:
true if node n can be eliminated if use() == def(), false otherwise.

newNode

public Node newNode()
Create a new node in the flow graph that does not correspond to an instruction.
NOT RECOMMENDED. Use newNode(Instr i) instead.

Overrides:
newNode in class Graph

newNode

public Node newNode(Instr i)
Create a new node in the flow graph corresponding to the instruction passed as parameter.