]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
tree-optimization/112859 - add comment
authorRichard Biener <rguenther@suse.de>
Tue, 28 Jan 2025 14:01:25 +0000 (15:01 +0100)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 24 Jun 2025 11:07:50 +0000 (13:07 +0200)
This adds a comment before the workaround, indicating flaky
dependence analysis.

PR tree-optimization/112859
* tree-loop-distribution.cc
(loop_distribution::pg_add_dependence_edges): Add comment.

(cherry picked from commit 3ccbc8c9d182c380e396631b2b5a683de4fddba9)

gcc/tree-loop-distribution.cc

index 7b4fad238d5d3b46a8bc76f336226cf89d732431..8629b7fa75ac2d759c90326502b44b5de216d792 100644 (file)
@@ -2137,7 +2137,9 @@ loop_distribution::pg_add_dependence_edges (struct graph *rdg, int dir,
                      this_dir = -this_dir;
                    }
                  /* When then dependence distance of the innermost common
-                    loop of the DRs is zero we have a conflict.  */
+                    loop of the DRs is zero we have a conflict.  This is
+                    due to wonky dependence analysis which sometimes
+                    ends up using a zero distance in place of unknown.  */
                  auto l1 = gimple_bb (DR_STMT (dr1))->loop_father;
                  auto l2 = gimple_bb (DR_STMT (dr2))->loop_father;
                  int idx = index_in_loop_nest (find_common_loop (l1, l2)->num,