|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object scale.score.trans.Optimization scale.score.trans.UselessCopy
public class UselessCopy
This class removes useless copies from the CFG.
$Id: UselessCopy.java,v 1.17 2007-02-28 18:00:39 burrill Exp $
Copyright 2008 by the
Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.
A useless copy is simply the expression var = var;
.
It is always valid to remove such occurrences.
Unlike most optimizations this optimization never increases
register pressure. Consequently, there is never a case where a
legal
transformation is not also
beneficial
.
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 | |
---|---|
UselessCopy(Scribble scribble)
|
Method Summary | |
---|---|
void |
perform()
Remove useless copy statements. |
int |
requiresSSA()
Return whether this optimization requires that the CFG be in SSA form. |
static int |
uselessCopyCFGNodes()
Return the number of useless copies eliminated. |
Methods inherited from class scale.score.trans.Optimization |
---|
assertTrace, assertTrace, assertTrace, assertTrace, assertTrace, genTemp, insertStores, setTrace, sort |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static boolean classTrace
public static boolean useHeuristics
Constructor Detail |
---|
public UselessCopy(Scribble scribble)
Method Detail |
---|
public static int uselessCopyCFGNodes()
public void perform()
X = X;These are created by going into and out of SSA form and by other optimizations.
perform
in class Optimization
public int requiresSSA()
requiresSSA
in class Optimization
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |