joeq.Compiler.Dataflow
Class LivenessAnalysis

java.lang.Object
  extended by joeq.Compiler.Dataflow.Problem
      extended by joeq.Compiler.Dataflow.LivenessAnalysis

public class LivenessAnalysis
extends Problem

LivenessAnalysis

Version:
$Id: LivenessAnalysis.java 2465 2006-06-07 23:03:17Z joewhaley $
Author:
John Whaley

Constructor Summary
LivenessAnalysis()
           
 
Method Summary
 Fact boundary()
          Returns the boundary value for this dataflow problem.
 boolean direction()
          Returns true if this is a forward dataflow problem, false if it is a backward dataflow problem.
 TransferFunction getTransferFunction(Object e)
          Returns the transfer function for the given code element.
 void initialize(jwutil.graphs.Graph g)
          Performs necessary initialization for this dataflow problem.
 Fact interior()
          Returns the value that the interior points should be initialized to.
 boolean isLiveAtIn(BasicBlock bb, RegisterFactory.Register r)
           
 boolean isLiveAtOut(BasicBlock bb, RegisterFactory.Register r)
           
static void main(String[] args)
           
 void setKilledAtIn(BasicBlock bb, RegisterFactory.Register r)
           
 void setLiveAtIn(BasicBlock bb, RegisterFactory.Register r)
           
static LivenessAnalysis solve(ControlFlowGraph cfg)
           
 
Methods inherited from class joeq.Compiler.Dataflow.Problem
apply, closure, compare, compose, merge
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LivenessAnalysis

public LivenessAnalysis()
Method Detail

initialize

public void initialize(jwutil.graphs.Graph g)
Description copied from class: Problem
Performs necessary initialization for this dataflow problem.

Overrides:
initialize in class Problem
Parameters:
g - graph of locations that we will run over

direction

public boolean direction()
Description copied from class: Problem
Returns true if this is a forward dataflow problem, false if it is a backward dataflow problem.

Specified by:
direction in class Problem
Returns:
direction

boundary

public Fact boundary()
Description copied from class: Problem
Returns the boundary value for this dataflow problem. For a forward problem, this is the value at the entrypoint, whereas for a backward problem, this is the value at the exitpoint.

Specified by:
boundary in class Problem
Returns:
boundary value

interior

public Fact interior()
Description copied from class: Problem
Returns the value that the interior points should be initialized to.

Specified by:
interior in class Problem
Returns:
value for interior points

getTransferFunction

public TransferFunction getTransferFunction(Object e)
Description copied from class: Problem
Returns the transfer function for the given code element.

Specified by:
getTransferFunction in class Problem
Parameters:
e - code element
Returns:
transfer function for the given code element

main

public static void main(String[] args)

solve

public static LivenessAnalysis solve(ControlFlowGraph cfg)

isLiveAtOut

public boolean isLiveAtOut(BasicBlock bb,
                           RegisterFactory.Register r)

isLiveAtIn

public boolean isLiveAtIn(BasicBlock bb,
                          RegisterFactory.Register r)

setLiveAtIn

public void setLiveAtIn(BasicBlock bb,
                        RegisterFactory.Register r)

setKilledAtIn

public void setKilledAtIn(BasicBlock bb,
                          RegisterFactory.Register r)


Copyright © 2001-2008 John Whaley. All Rights Reserved.