Loop Access Analysis

Hello,

I want to identify and classify whether a dependence is a loop carried or loop independent dependence by observing how the dependence checker of the Loop Access Analysis pass works.

It currently classifies the dependencies into NoDep, Unknown, Forward, ForwardButPreventsForwarding, Backward, BackwardVectorizable, BackwardVectorizableButPreventsForwarding.

So, is there a way I can use the information provided by LAA to classify the dependencies into loop carried or loop independent dependence.
For example, we know that all backward dependencies are loop-carried.

Also, I will prefer not to use DependenceAnalysis for this purpose.

Thank you
Vijay

Hi all,
I found a solution to the problem I asked in a previous mail.
The question was: How to identify and classify if dependence is a loop-carried or loop-independent dependence.

So to determine the type of dependence, we can calculate the dependence distance vector.
In Loop access analysis, this value is calculated and stored in the “Distance” variable.
If the Distance is equal to zero, then the dependence is loop-independent; otherwise, the dependence is loop-carried.
This method can also be extended to determine if a loop can be parallelized or not.

Thank you.

Vijay Tadikamalla