JML

org.multijava.util.backend
Class LivenessAnalysis

java.lang.Object
  extended byorg.multijava.util.backend.LivenessAnalysis

public class LivenessAnalysis
extends Object

This class compute the liveness of each temporaries


Field Summary
private  BasicBlock[] bblocks
           
private  BasicBlock[] eblocks
           
private  HashMap hash
           
private  QTemporary[] temps
           
private  ArrayList vect
           
 
Constructor Summary
LivenessAnalysis(BasicBlock[] bblocks, BasicBlock[] eblocks)
          Creates a new instruction handle.
 
Method Summary
private  void analyse(BasicBlock block)
          Analyses a tree
private  void analyseNode(BasicBlock block, int pos, QNode node)
          Processes a node
private  boolean calculateLiveness(BasicBlock block)
          Analyses a tree
private  boolean calculateLiveness(BasicBlock block, int pos, int branch, QNode node)
          Processes a node
private static boolean equals(Object[] o1, Object[] o2)
           
 QTemporary[] getTemporaries()
          Returns the temporaries defined in this method
private  QTemporary[] livein(QTemporary[] uses, QTemporary[] outs, QTemporary def)
           
private  QTemporary[] liveout(BasicBlock block, int pos, int branch)
           
 void run()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

hash

private HashMap hash

vect

private ArrayList vect

temps

private QTemporary[] temps

bblocks

private BasicBlock[] bblocks

eblocks

private BasicBlock[] eblocks
Constructor Detail

LivenessAnalysis

public LivenessAnalysis(BasicBlock[] bblocks,
                        BasicBlock[] eblocks)
Creates a new instruction handle.

Method Detail

run

public void run()

getTemporaries

public QTemporary[] getTemporaries()
Returns the temporaries defined in this method


analyse

private void analyse(BasicBlock block)
Analyses a tree


analyseNode

private void analyseNode(BasicBlock block,
                         int pos,
                         QNode node)
Processes a node


calculateLiveness

private boolean calculateLiveness(BasicBlock block)
Analyses a tree


calculateLiveness

private boolean calculateLiveness(BasicBlock block,
                                  int pos,
                                  int branch,
                                  QNode node)
Processes a node


equals

private static final boolean equals(Object[] o1,
                                    Object[] o2)

liveout

private QTemporary[] liveout(BasicBlock block,
                             int pos,
                             int branch)

livein

private QTemporary[] livein(QTemporary[] uses,
                            QTemporary[] outs,
                            QTemporary def)

JML

JML is Copyright (C) 1998-2002 by Iowa State University and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This release depends on code from the MultiJava project and is based in part on the Kopi project Copyright (C) 1990-99 DMS Decision Management Systems Ges.m.b.H.