aboutsummaryrefslogtreecommitdiff
path: root/libgomp
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2023-09-14 13:06:51 +0200
committerRichard Biener <rguenther@suse.de>2023-09-18 10:56:18 +0200
commitd45ddc2c04e471d0dcee016b6edacc00b8341b16 (patch)
treee9ed8b868d10b51ac2fc02f15418ca17f5ab38aa /libgomp
parent1f9bf6f372da48c75d42f2669ba92f3fd4370fda (diff)
downloadgcc-d45ddc2c04e471d0dcee016b6edacc00b8341b16.zip
gcc-d45ddc2c04e471d0dcee016b6edacc00b8341b16.tar.gz
gcc-d45ddc2c04e471d0dcee016b6edacc00b8341b16.tar.bz2
tree-optimization/111294 - backwards threader PHI costing
This revives an earlier patch since the problematic code applying extra costs to PHIs in copied blocks we couldn't make any sense of prevents a required threading in this case. Instead of coming up with an artificial other costing the following simply removes the bits. As with all threading changes this requires a plethora of testsuite adjustments, but only the last three are unfortunate as is the libgomp team.c adjustment which is required to avoid a bogus -Werror diagnostic during bootstrap. PR tree-optimization/111294 gcc/ * tree-ssa-threadbackward.cc (back_threader_profitability::m_name): Remove (back_threader::find_paths_to_names): Adjust. (back_threader::maybe_thread_block): Likewise. (back_threader_profitability::possibly_profitable_path_p): Remove code applying extra costs to copies PHIs. libgomp/ * team.c (gomp_team_start): Assert alloca size to avoid false positive alloc-size diagnostic. gcc/testsuite/ * gcc.dg/tree-ssa/pr111294.c: New test. * gcc.dg/tree-ssa/phi_on_compare-4.c: Adjust. * gcc.dg/tree-ssa/pr59597.c: Likewise. * gcc.dg/tree-ssa/pr61839_2.c: Likewise. * gcc.dg/tree-ssa/ssa-sink-18.c: Likewise. * g++.dg/warn/Wstringop-overflow-4.C: XFAIL subtest on ilp32. * gcc.dg/uninit-pred-9_b.c: XFAIL subtest everywhere. * gcc.dg/vect/vect-117.c: Make scan for not Invalid sum conditional on lp64.
Diffstat (limited to 'libgomp')
-rw-r--r--libgomp/team.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libgomp/team.c b/libgomp/team.c
index 54dfca8..b4fd6f2 100644
--- a/libgomp/team.c
+++ b/libgomp/team.c
@@ -756,6 +756,8 @@ gomp_team_start (void (*fn) (void *), void *data, unsigned nthreads,
attr = &thread_attr;
}
+ if (i >= nthreads)
+ __builtin_unreachable ();
start_data = gomp_alloca (sizeof (struct gomp_thread_start_data)
* (nthreads - i));