From: Tom de Vries Date: Mon, 11 Jan 2016 08:55:16 +0000 (+0000) Subject: Don't parallelize loops if libgomp not supported X-Git-Tag: basepoints/gcc-7~1743 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e9ff08b28d529ceb14b39f207733c6f5faf833d6;p=thirdparty%2Fgcc.git Don't parallelize loops if libgomp not supported 2016-01-11 Tom de Vries PR tree-optimization/69058 * tree-parloops.c (pass_parallelize_loops::execute): Return 0 if libgomp not supported. From-SVN: r232208 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c1982b6ba48d..e717fc5e0130 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2016-01-11 Tom de Vries + + PR tree-optimization/69058 + * tree-parloops.c (pass_parallelize_loops::execute): Return 0 if libgomp + not supported. + 2016-01-11 Andrew Burgess * config/arc/arc.opt (mdiv-rem): Add period to the end. diff --git a/gcc/tree-parloops.c b/gcc/tree-parloops.c index 5bd9c06f3154..e05cc4746d71 100644 --- a/gcc/tree-parloops.c +++ b/gcc/tree-parloops.c @@ -2836,6 +2836,10 @@ pass_parallelize_loops::execute (function *fun) if (number_of_loops (fun) <= 1) return 0; + tree nthreads = builtin_decl_explicit (BUILT_IN_OMP_GET_NUM_THREADS); + if (nthreads == NULL_TREE) + return 0; + if (parallelize_loops ()) { fun->curr_properties &= ~(PROP_gimple_eomp);