diff options
author | Tom de Vries <tom@codesourcery.com> | 2016-01-11 08:55:16 +0000 |
---|---|---|
committer | Tom de Vries <vries@gcc.gnu.org> | 2016-01-11 08:55:16 +0000 |
commit | e9ff08b28d529ceb14b39f207733c6f5faf833d6 (patch) | |
tree | ed759a046a604071f6c5e0b55961882b3dfdad5a /gcc/tree-parloops.c | |
parent | 8064654176c42ba9bb063185a62803fe848fbdd8 (diff) | |
download | gcc-e9ff08b28d529ceb14b39f207733c6f5faf833d6.zip gcc-e9ff08b28d529ceb14b39f207733c6f5faf833d6.tar.gz gcc-e9ff08b28d529ceb14b39f207733c6f5faf833d6.tar.bz2 |
Don't parallelize loops if libgomp not supported
2016-01-11 Tom de Vries <tom@codesourcery.com>
PR tree-optimization/69058
* tree-parloops.c (pass_parallelize_loops::execute): Return 0 if libgomp
not supported.
From-SVN: r232208
Diffstat (limited to 'gcc/tree-parloops.c')
-rw-r--r-- | gcc/tree-parloops.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/tree-parloops.c b/gcc/tree-parloops.c index 5bd9c06..e05cc47 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); |