aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2023-11-14 12:53:18 +0100
committerRichard Biener <rguenther@suse.de>2023-11-14 13:44:56 +0100
commitbc390ae72ff974d6985639b5b392f6e9192c2ee7 (patch)
tree27a9e3ca377d5676728e52b573e218491b1ff7f0 /gcc
parent5ea2965b499f9e491e45db19fedbccfccb75076a (diff)
downloadgcc-bc390ae72ff974d6985639b5b392f6e9192c2ee7.zip
gcc-bc390ae72ff974d6985639b5b392f6e9192c2ee7.tar.gz
gcc-bc390ae72ff974d6985639b5b392f6e9192c2ee7.tar.bz2
Loop distribution fix for SCC detection
The following adjusts data_dep_in_cycle_p to properly consider the whole loop nest when looking for data dep cycles and exempting zero-distance DDRs instead of just the outermost loop. * tree-loop-distribution.cc (loop_distribution::data_dep_in_cycle_p): Consider all loops in the nest when looking for lambda_vector_zerop.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/tree-loop-distribution.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/tree-loop-distribution.cc b/gcc/tree-loop-distribution.cc
index 8e92af6..5ededd9 100644
--- a/gcc/tree-loop-distribution.cc
+++ b/gcc/tree-loop-distribution.cc
@@ -1440,7 +1440,7 @@ loop_distribution::data_dep_in_cycle_p (struct graph *rdg,
else if (DDR_NUM_DIST_VECTS (ddr) > 1)
return true;
else if (DDR_REVERSED_P (ddr)
- || lambda_vector_zerop (DDR_DIST_VECT (ddr, 0), 1))
+ || lambda_vector_zerop (DDR_DIST_VECT (ddr, 0), DDR_NB_LOOPS (ddr)))
return false;
return true;