scale.score.trans
Class LoopPermute

java.lang.Object
  extended by scale.score.trans.Optimization
      extended by scale.score.trans.LoopTrans
          extended by 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.LoopTrans
floatType, intPointer, intType, unsignedPointer, unsignedType, voidp
 
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
LoopPermute(Scribble scribble)
           
 
Method Summary
 Cost computeRefCost(LoopHeaderChord loop, SubscriptExpr se)
           
 void perform()
          Perform the optimization.
 int requiresSSA()
          Return whether this optimization requires that the CFG be in SSA form.
 
Methods inherited from class scale.score.trans.LoopTrans
cleanup, findIndexInc, findIndexInit, initializeTransform, performLoopInterchange, performLoopStripMining, performLoopTile, permutedLoops, tripProduct
 
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

classTrace

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

Constructor Detail

LoopPermute

public LoopPermute(Scribble scribble)
Parameters:
scribble - is the CFG containing the loops
Method Detail

perform

public void perform()
Description copied from class: Optimization
Perform the optimization. Each optimization must specify 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