org.jikesrvm.compilers.opt.controlflow
Class LSTNode

java.lang.Object
  extended by org.jikesrvm.compilers.opt.util.SpaceEffGraphNode
      extended by org.jikesrvm.compilers.opt.controlflow.LSTNode
All Implemented Interfaces:
GraphElement, GraphNode
Direct Known Subclasses:
AnnotatedLSTNode

public class LSTNode
extends SpaceEffGraphNode

A node in the LST (Loop Structure Tree)


Nested Class Summary
(package private) static class LSTNode.Edge
           
 
Nested classes/interfaces inherited from class org.jikesrvm.compilers.opt.util.SpaceEffGraphNode
SpaceEffGraphNode.GraphEdgeEnumeration<T extends GraphEdge>, SpaceEffGraphNode.OutEdgeEnumeration
 
Field Summary
(package private)  int depth
          The depth of the loop
 BasicBlock header
          Basic block which is the loop head
(package private)  BitVector loop
          Basic blocks in the loop
(package private)  ArrayList<LSTNode.Edge> loopExits
          The CFG Edges that are exits from the loop.
(package private)  float loopMultiplier
          If the loop is entered from the loopHeader x times, then the loopHead is executed loopMultiplier * x times.
 
Fields inherited from class org.jikesrvm.compilers.opt.util.SpaceEffGraphNode
_inEdgeEnd, _inEdgeStart, _outEdgeEnd, _outEdgeStart, info, next, nextSorted, prev, scratch, scratchObject
 
Constructor Summary
(package private) LSTNode(BasicBlock bb)
           
protected LSTNode(LSTNode node)
          Copy constructor
 
Method Summary
 void addLoopExit(BasicBlock source, BasicBlock target, float prob)
           
 Enumeration<LSTNode> getChildren()
           
 BasicBlock getHeader()
           
 BitVector getLoop()
           
 LSTNode getParent()
           
 void initializeLoopExits()
           
 String toString()
           
 
Methods inherited from class org.jikesrvm.compilers.opt.util.SpaceEffGraphNode
_sortDFS, _sortRevTop, _sortTop, append, appendInEdge, appendOutEdge, clearDfsVisited, clearFlags, clearInFlags, clearLoopHeader, clearOnStack, clearOutFlags, clearTopVisited, deleteIn, deleteOut, deleteOut, deleteOut, dfsVisited, findOutEdgeTo, firstInEdge, firstInNode, firstOutEdge, firstOutNode, flagsOn, getIndex, getNext, getNumber, getNumberOfIn, getNumberOfOut, getPrev, getScratch, hasIn, hasOneIn, hasOneIn, hasOneOut, hasOneOut, hasOut, hasZeroIn, hasZeroOut, inEdges, inNodes, insertOut, insertOut, isLoopHeader, markDFN, markSCC, onStack, outEdges, outNodes, pointsIn, pointsOut, printExtended, printInEdges, printInNodes, printOutEdges, printOutNodes, remove, removeIn, removeIn, removeOut, removeOut, replaceInEdge, replaceOut, setDfsVisited, setDfsVisitedOnStack, setIndex, setLoopHeader, setNumber, setOnStack, setScratch, setTopVisited, sortDFS, sortRevTop, sortTop, topVisited
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

header

public final BasicBlock header
Basic block which is the loop head


loop

BitVector loop
Basic blocks in the loop


depth

int depth
The depth of the loop


loopMultiplier

float loopMultiplier
If the loop is entered from the loopHeader x times, then the loopHead is executed loopMultiplier * x times.


loopExits

ArrayList<LSTNode.Edge> loopExits
The CFG Edges that are exits from the loop.

Constructor Detail

LSTNode

LSTNode(BasicBlock bb)

LSTNode

protected LSTNode(LSTNode node)
Copy constructor

Parameters:
node - for copying
Method Detail

getHeader

public BasicBlock getHeader()

getLoop

public BitVector getLoop()

toString

public String toString()
Overrides:
toString in class Object

getParent

public LSTNode getParent()

getChildren

public Enumeration<LSTNode> getChildren()

initializeLoopExits

public void initializeLoopExits()

addLoopExit

public void addLoopExit(BasicBlock source,
                        BasicBlock target,
                        float prob)