|
|||||||||
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.SCC
public class SCC
This class performs the sparse conditional constant propagation.
$Id: SCC.java,v 1.111 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.
See Constant Propagation with Conditional Branches by Mark N. Wegman and F. Kenneth Zadeck in ACM Transactions on Programming Languages and Systems, Vol 13, No. 2, April 1991, Pages 181-210.
This optimization attempts to do two things:
decision node
is a constant, then un-selected edges out of that
node may be eliminated. If only one edge remains, the the decision
node may also be eliminated.
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 | |
---|---|
SCC(Scribble scribble)
Perform sparse conditional constant propagation. |
Method Summary | |
---|---|
static int |
deadCFGNodes()
Return the number of dead nodes removed. |
static int |
newCFGNodes()
Return the number of new nodes created. |
void |
perform()
Propagate constants through the Scribble graph. |
static int |
propagations()
Return the number of times copy propagation was performed. |
static int |
uselessDecisions()
Return the number of DecisionChords deleted. |
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 |
---|
public static boolean classTrace
public static boolean useHeuristics
Constructor Detail |
---|
public SCC(Scribble scribble)
scribble
- the Scribble graph to be transformedMethod Detail |
---|
public static int deadCFGNodes()
public static int propagations()
public static int newCFGNodes()
public static int uselessDecisions()
public void perform()
perform
in class Optimization
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |