[PATCH] D17381: [Polly] [RFC] Access level dependency analysis

Hongbin Zheng via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 18 07:58:24 PST 2016


etherzhhb added inline comments.

================
Comment at: lib/Analysis/DependenceInfo.cpp:79
@@ +78,3 @@
+  isl_id *TagId = isl_space_get_tuple_id(Space, isl_dim_out);
+  Space = isl_space_drop_dims(Space, isl_dim_out, 0, isl_map_n_out(Relation));
+  Space = isl_space_set_tuple_id(Space, isl_dim_out, TagId);
----------------
Drop the output dimensions, otherwise we cannot calculate the dependency. 

================
Comment at: lib/Analysis/DependenceInfo.cpp:81-82
@@ +80,4 @@
+  Space = isl_space_set_tuple_id(Space, isl_dim_out, TagId);
+  isl_multi_aff *Tag = isl_multi_aff_domain_map(Space);
+  Relation = isl_map_preimage_domain_multi_aff(Relation, Tag);
+  return Relation;
----------------
isl magic :)

================
Comment at: lib/Analysis/DependenceInfo.cpp:287
@@ -266,1 +286,3 @@
+
+  if (isl_union_map_is_empty(AccessSchedule) && false) {
     isl_union_map_free(AccessSchedule);
----------------
ah ... this line is incorrect...

================
Comment at: test/DependenceInfo/access_level_dep_simple_0.ll:4
@@ +3,3 @@
+; CHECK:      RAW dependences:
+; CHECK-NEXT:     [N] -> { [Stmt_for_body[i0] -> MemRef_a[]] -> [Stmt_for_body[4 + i0] -> MemRef_a[]] : 0 <= i0 <= -11 + N; [Stmt_for_body[i0] -> MemRef_b[]] -> [Stmt_for_body[6 + i0] -> MemRef_b[]] : 0 <= i0 <= -13 + N; Stmt_for_body[i0] -> Stmt_for_body[6 + i0] : 0 <= i0 <= -13 + N; Stmt_for_body[i0] -> Stmt_for_body[4 + i0] : 0 <= i0 <= -11 + N }
+; CHECK-NEXT: WAR dependences:
----------------
Looks like we get both the access level dependency ([Stmt_for_body[i0] -> MemRef_a[]] -> [Stmt_for_body[4 + i0] -> MemRef_a[]] : 0 <= i0 <= -11 + N) and statement level dependence (Stmt_for_body[i0] -> Stmt_for_body[4 + i0] : 0 <= i0 <= -11 + N)


Repository:
  rL LLVM

http://reviews.llvm.org/D17381





More information about the llvm-commits mailing list