harpoon.Backend.CSAHack.RegAlloc
Class Liveness

java.lang.Object
  extended by harpoon.Backend.CSAHack.Graph.Graph
      extended by harpoon.Backend.CSAHack.RegAlloc.InterferenceGraph
          extended by harpoon.Backend.CSAHack.RegAlloc.Liveness

public class Liveness
extends InterferenceGraph

An interference graph by examination of liveness of nodes in a flow graph.

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

Constructor Summary
Liveness(FlowGraph flow)
          Construct interference graph from flow graph.
 
Method Summary
 Temp gtemp(Node node)
           
 MoveList moves()
           
 Node newNode(Temp t)
           
 int spillCost(Node node)
           
 Node tnode(Temp temp)
           
 
Methods inherited from class harpoon.Backend.CSAHack.Graph.Graph
addEdge, newNode, nodes, rmEdge, show
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Liveness

public Liveness(FlowGraph flow)
Construct interference graph from flow graph.

Method Detail

tnode

public Node tnode(Temp temp)
Specified by:
tnode in class InterferenceGraph
Parameters:
temp - a temporary used in the flow graph
Returns:
the interference graph node corresponding to the temporary.

gtemp

public Temp gtemp(Node node)
Specified by:
gtemp in class InterferenceGraph
Parameters:
node - a node in the interference graph.
Returns:
the temporary corresponding to the node.

spillCost

public int spillCost(Node node)
Overrides:
spillCost in class InterferenceGraph
Parameters:
node - a node in the interference graph.
Returns:
an estimate of the cost of spilling this node.

moves

public MoveList moves()
Specified by:
moves in class InterferenceGraph
Returns:
a list of moves found in the flow graph.

newNode

public Node newNode(Temp t)