scale.score.trans
Class PRE

java.lang.Object
  extended by scale.score.trans.Optimization
      extended by scale.score.trans.PRE

public class PRE
extends Optimization

Perform the Partial Redundancy Elimination optimization.

$Id: PRE.java,v 1.90 2007-10-04 19:58:37 burrill Exp $

Copyright 2008 by the Scale Compiler Group,
Department of Computer Science
University of Massachusetts Amherst MA. 01003, USA
All Rights Reserved.

The algorithm is based Fred Chow's PLDI paper, "A New Algorithm for Partial Redundancy Elimination based on SSA Form".


Field Summary
static boolean classTrace
          True if traces are to be performed.
static boolean useHeuristics
          If true, use heuristics that prune the cases where the optimization is applied.
 
Fields inherited from class scale.score.trans.Optimization
dChanged, fpReorder, hasDummyAliases, IN_SSA, minimumExecutionCost, NA_SSA, NO_SSA, rChanged, scribble, signedIntsWrapOnOverflow, trace, un, unsafe, unsignedIntsWrapOnOverflow, VALID_SSA
 
Constructor Summary
PRE(Scribble scribble)
           
 
Method Summary
static int deadCFGNodes()
          Return the number of dead nodes removed.
static int newCFGNodes()
          Return the number of new nodes created.
 void perform()
          Perform PRE on the SSA form of a Scribble graph.
static int removedOperations()
          Return the number of operations removed.
 
Methods inherited from class scale.score.trans.Optimization
assertTrace, assertTrace, assertTrace, assertTrace, assertTrace, genTemp, insertStores, requiresSSA, setTrace, sort
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

classTrace

public static boolean classTrace
True if traces are to be performed.


useHeuristics

public static boolean useHeuristics
If true, use heuristics that prune the cases where the optimization is applied.

Constructor Detail

PRE

public PRE(Scribble scribble)
Parameters:
scribble - is the Scribble CFG in SSA form
Method Detail

deadCFGNodes

public static int deadCFGNodes()
Return the number of dead nodes removed.


newCFGNodes

public static int newCFGNodes()
Return the number of new nodes created.


removedOperations

public static int removedOperations()
Return the number of operations removed.


perform

public void perform()
Perform PRE on the SSA form of a Scribble graph. The algorithm is based Fred Chow's PLDI paper, A New Algorithm for Partial Redundancy Elimination based on SSA Form

Specified by:
perform in class Optimization