During the IslAst parallelism check also compute the actual dependency distance and store it in the IstAst for node.
Details
Diff Detail
Event Timeline
lib/Analysis/Dependences.cpp | ||
---|---|---|
521 | What happens when the isl_set_free function returns a non-zero error? | |
test/Isl/Ast/dependence_distance_parametric.ll | ||
5 | j++) | |
test/Isl/Ast/dependence_distance_varying.ll | ||
4 | I am not sure I understand what "((N - 1) % 2) + 1" means: for a given N, say 100, this expression is equal to 2, for (int i = 0; i < N; i++) A[i] = A[N - i] + 1; and the dependence distance in this loop is not constant:
| |
test/Isl/Ast/dependence_distance_varying_in_outer_loop.ll | ||
6 | Is the distance carried by the inner loop equal to 1? Say we fix the outer loop j to iteration 5, then in the inner loop
I think that the dependence distance is not constant in this case. | |
8 | for j < 3, A[i - 3] is a negative access function. | |
test/Isl/Ast/dependence_distance_varying_multiple.ll | ||
5 | The difference between A[i] and A[100 - 2*i] is not constant. This loop does not carry a constant dependence distance of 1, 2, or 5. |
Answers
lib/Analysis/Dependences.cpp | ||
---|---|---|
521 | isl "guarantees" (with the __isl_null annotation) that we get a nullptr back. Apperently ppl don't like my shortcut, I can change that. | |
test/Isl/Ast/dependence_distance_parametric.ll | ||
5 | thx | |
test/Isl/Ast/dependence_distance_varying.ll | ||
4 | We compute the minimal dependence distance, everything else seems not really useful? Am I wrong here? | |
test/Isl/Ast/dependence_distance_varying_in_outer_loop.ll | ||
6 | Again, 1 is the minimal dependence distance | |
8 | That is totally fine for a subset of possible pointers A. | |
test/Isl/Ast/dependence_distance_varying_multiple.ll | ||
5 | Should again be the minimal dep. distance. |
test/Isl/Ast/dependence_distance_varying_multiple.ll | ||
---|---|---|
5 | Ok, so then let's print: #pragma minimal dependence distance that is different than what books call "dependence distance", that's why I got confused. |
test/Isl/Ast/dependence_distance_varying_multiple.ll | ||
---|---|---|
5 | True, will do. |
LGTM with those changes.
Let's also wait for Tobi's ok before commit.
include/polly/CodeGen/IslAst.h | ||
---|---|---|
55 | MinimalDependenceDistance | |
72 | the minimal dependence distance | |
73 | MinimalDependenceDistance | |
132 | Get the minimal dependence distance or nullptr. | |
134 | getMinimalDependenceDistance | |
include/polly/Dependences.h | ||
95 | MinDistancePtr If not nullptr, the minimal dependence distance will be returned at the address of that pointer | |
lib/Analysis/Dependences.cpp | ||
490 | MinDistancePtr | |
527 | Please add a comment above this stmt to explain that we take the min of the distance polyhedron. |
MinimalDependenceDistance