A method and apparatus for improving the process of determining whether two
computer system memory references are exactly dependent. While loop
unrolling creates a large number of memory reference pairs which must be
analyzed during the data dependence analysis phase of compiler
optimization, this invention reduces the computer resources required for
this analysis. When two memory references are exactly dependent, the
present invention quickly determines the distance between them by an
elegant method which uses easily accessible values. Therefore, if two
memory references are exactly dependent, and if the distance is an
integral greater than zero then the compiler optimizer may re-use the same
data in computer memory and thus reduce the need to execute computer
register instructions. Alternately, if the two memory references are
independent they become candidates for pipeline scheduling. This further
reduces the use of computer resources.