scale.score.trans
Class Noopt
java.lang.Object
scale.score.trans.Optimization
scale.score.trans.Noopt
public class Noopt
- extends Optimization
This class performs no optimization.
$Id: Noopt.java,v 1.13 2007-10-04 19:58:36 burrill Exp $
Copyright 2008 by the
Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.
This class is used to force entry into SSA form without performing
an optimization. This is useful for debugging the compiler.
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 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
obtainAliasAnalysisStats
public static boolean obtainAliasAnalysisStats
- Set true to obtain some statistics for a study of alias analysis.
The statistics are obtained in two different sets. The first set
is obtained the first time the 's' optimization is invoked on a
CFG and includes:
- numberOfCfgNodesBefore
- Number of CFG nodes.
- numberOfDirectStoresBefore
- Number of simple assignments.
- numberOfDuplicateStoresBefore
- Number of duplicate indirect
assignments in the same basic block.
- numberOfIndirectStoresBefore
- Number of indirect assignments.
- numberOfStoresBefore
- Number of assignments.
- numberOfMayDefsBefore
- Number of assignments with may-def
information.
- numberOfExprBefore
- Number of expression nodes on the
right-hand-side.
- numberOfDirectMayUseBefore
- Number of variable loads with
may-use information.
- numberOfDirectLoadsBefore
- Number of variable loads.
- numberOfIndirectMayUseBefore
- Number of indirect loads with
may-use information.
- numberOfIndirectLoadsBefore
- Number of indirect loads.
- numberOfATNoMayUseBefore
- Number of direct loads of
variables whose address is taken but for which there is no may-use
information.
- numberOfNoATMayUseBefore
- Number of direct loads of
variables whose address is not taken but for which there is
may-use information.
The second set is obtained for all subsequent times the 's'
optimization is invoked on a CFG and includes:
- numberOfCfgNodesAfter
- Number of CFG nodes.
- numberOfDirectStoresAfter
- Number of simple assignments.
- numberOfDuplicateStoresAfter
- Number of duplicate indirect
assignments in the same basic block.
- numberOfIndirectStoresAfter
- Number of indirect assignments.
- numberOfStoresAfter
- Number of assignments.
- numberOfMayDefsAfter
- Number of assignments with may-def information.
- numberOfExprAfter
- Number of expression nodes on the right-hand-side.
- numberOfDirectMayUseAfter
- Number of variable loads with may-use information.
- numberOfDirectLoadsAfter
- Number of variable loads.
- numberOfIndirectMayUseAfter
- Number of indirect loads with may-use information.
- numberOfIndirectLoadsAfter
- Number of indirect loads.
- numberOfATNoMayUseAfter
- Number of direct loads of variables
whose address is taken but for which there is no may-use
information.
- numberOfNoATMayUse
- Number of direct loads of variables
whose address is not taken but for which there is may-use
information.
To obtain these statistics use the -f
scale.score.trans.Noopt.obtainAliasAnalysisStats=1 command
line switch and use the s optimization. For example,
java scale.test.Scale module.c -O snsud -f scale.score.trans.Noopt.obtainAliasAnalysisStats=1
would compile module.c and obtain the alias analysis
statistics for the global value numbering optimization. Use of
the s optimization more than twice will result in
erroneous statistics. Also, note that this optimization forces
the CFG into SSA form.
Noopt
public Noopt(Scribble scribble)
numberOfCfgNodesBefore
public static int numberOfCfgNodesBefore()
numberOfDirectStoresBefore
public static int numberOfDirectStoresBefore()
numberOfDuplicateStoresBefore
public static int numberOfDuplicateStoresBefore()
numberOfIndirectStoresBefore
public static int numberOfIndirectStoresBefore()
numberOfStoresBefore
public static int numberOfStoresBefore()
numberOfMayDefsBefore
public static int numberOfMayDefsBefore()
numberOfExprBefore
public static int numberOfExprBefore()
numberOfDirectMayUseBefore
public static int numberOfDirectMayUseBefore()
numberOfDirectLoadsBefore
public static int numberOfDirectLoadsBefore()
numberOfIndirectMayUseBefore
public static int numberOfIndirectMayUseBefore()
numberOfIndirectLoadsBefore
public static int numberOfIndirectLoadsBefore()
numberOfATNoMayUseBefore
public static int numberOfATNoMayUseBefore()
numberOfNoATMayUseBefore
public static int numberOfNoATMayUseBefore()
numberOfCfgNodesAfter
public static int numberOfCfgNodesAfter()
numberOfDirectStoresAfter
public static int numberOfDirectStoresAfter()
numberOfDuplicateStoresAfter
public static int numberOfDuplicateStoresAfter()
numberOfIndirectStoresAfter
public static int numberOfIndirectStoresAfter()
numberOfStoresAfter
public static int numberOfStoresAfter()
numberOfMayDefsAfter
public static int numberOfMayDefsAfter()
numberOfExprAfter
public static int numberOfExprAfter()
numberOfDirectMayUseAfter
public static int numberOfDirectMayUseAfter()
numberOfDirectLoadsAfter
public static int numberOfDirectLoadsAfter()
numberOfIndirectMayUseAfter
public static int numberOfIndirectMayUseAfter()
numberOfIndirectLoadsAfter
public static int numberOfIndirectLoadsAfter()
numberOfATNoMayUseAfter
public static int numberOfATNoMayUseAfter()
numberOfNoATMayUseAfter
public static int numberOfNoATMayUseAfter()
perform
public void perform()
- Description copied from class:
Optimization
- Perform the optimization. Each optimization must specify
- if the CFG is left in valid SSA form
- if the dominance information is still valid
- if the variable reference information is still valid
after it completes. The Scribble
class provides methods that may be used to sepcify this
information.
- Specified by:
perform
in class Optimization
obtainAliasAnalysisStats
public void obtainAliasAnalysisStats()
- Obtain some statistics for a study of alias analysis.
cleanup
public static void cleanup()
- Clean up for profiling statistics.