scale.score.trans
Class LoopPermute
java.lang.Object
scale.score.trans.Optimization
scale.score.trans.LoopTrans
scale.score.trans.LoopPermute
public class LoopPermute
- extends LoopTrans
This optimization permutes the loops of a routine based on cache
order.
$Id: LoopPermute.java,v 1.41 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.
See Improving Data Locality with Loop Transformation
by Kathryn S. McKinley, Steve Carr, and Chau-wen Tseng, ACM
Transactions on Programming Languages and Systems, 18(4):424-453,
July 1996.
Field Summary |
static boolean |
classTrace
True if traces are to be performed. |
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 |
classTrace
public static boolean classTrace
- True if traces are to be performed.
LoopPermute
public LoopPermute(Scribble scribble)
- Parameters:
scribble
- is the CFG containing the loops
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
computeRefCost
public Cost computeRefCost(LoopHeaderChord loop,
SubscriptExpr se)
requiresSSA
public int requiresSSA()
- Return whether this optimization requires that the CFG be in SSA form.
It returns either
- NO_SSA
- the CFG must not be in SSA form,
- IN_SSA
- the CFG must be in SSA form,
- VALID_SSA
- the CFG must be in valid SSA form, or
- NA_SSA
- the CFG does not need to be in valid SSA form.
- Overrides:
requiresSSA
in class Optimization