scale.score.dependence.omega
Class AccessIteration

java.lang.Object
  extended by scale.score.dependence.omega.AccessIteration

public final class AccessIteration
extends java.lang.Object

A class for determining data dependences using the Omega library.

$Id: AccessIteration.java,v 1.51 2007-10-17 13:45:07 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 an interface that lets the user generate Presburger Formulae that represent dependences from program source. Patterned after notation used in Hans Zima and Barbara Chapman, Supercompilers for Parallel and Vector Computers, ACM Press, 1991.

Improvement:
We use the actual node (Expr) to get information about the loops. We don't actually need to do this since we already get the loop information when the omega test object, OmegaTest, is created.


Constructor Summary
AccessIteration()
          Create a reference to a single memory access at a particular loop iteration.
 
Method Summary
 void adjMemory(FAnd n, AccessIteration Bj, int blockSize)
          Add a constraint requiring that this memory location(A[i]) and B[j] are adjacent.
static int formError()
          Return the count of all the failues due to incorrect form.
 void inBounds(FAnd n)
          Add the constraints requiring that the loop subscripts for this reference (the i in A[i]) are within the loop bounds.
 void initialize(SubscriptExpr arr, LoopHeaderChord loop, OmegaLib omegaLib, Relation relation, int at)
           
static int lbAffine()
          Return the count of all the failues due to loop lower bound.
 void sameMemory(FAnd n, AccessIteration Bj)
          Add a constraint requiring that this memory location(A[i]) and B[j] are the same.
static int ubAffine()
          Return the count of all the failues due to loop upper bound.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AccessIteration

public AccessIteration()
Create a reference to a single memory access at a particular loop iteration. The object is used by the Omega test for adding constraints to the data dependence relation.

Method Detail

formError

public static int formError()
Return the count of all the failues due to incorrect form.


ubAffine

public static int ubAffine()
Return the count of all the failues due to loop upper bound.


lbAffine

public static int lbAffine()
Return the count of all the failues due to loop lower bound.


initialize

public void initialize(SubscriptExpr arr,
                       LoopHeaderChord loop,
                       OmegaLib omegaLib,
                       Relation relation,
                       int at)
                throws Exception
Parameters:
arr - an access to an array.
loop - is the loop containing the array access
omegaLib - is the Omega Library token
relation - the relation we are creating.
at - is the kind: inputTuple or outputTuple
Throws:
Exception

inBounds

public void inBounds(FAnd n)
              throws java.lang.Exception
Add the constraints requiring that the loop subscripts for this reference (the i in A[i]) are within the loop bounds.

Parameters:
n - Presburber formula which represents the dependence relation.
Throws:
java.lang.Exception

sameMemory

public void sameMemory(FAnd n,
                       AccessIteration Bj)
                throws Exception
Add a constraint requiring that this memory location(A[i]) and B[j] are the same. We add constaints to check if the subscripts are equal.

Parameters:
n - is the presburger formula representing the constraint
Bj - is the other memory location (array subscript expression)
Throws:
Exception

adjMemory

public void adjMemory(FAnd n,
                      AccessIteration Bj,
                      int blockSize)
               throws Exception
Add a constraint requiring that this memory location(A[i]) and B[j] are adjacent. We add constaints to check if the subscripts are adjacent.

Parameters:
n - is the presburger formula representing the constraint
Bj - is the other memory location
Throws:
Exception