Commit e9ff08b2 by Tom de Vries Committed by Tom de Vries

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
parent 80646541
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.
2016-01-11 Andrew Burgess <andrew.burgess@embecosm.com> 2016-01-11 Andrew Burgess <andrew.burgess@embecosm.com>
* config/arc/arc.opt (mdiv-rem): Add period to the end. * config/arc/arc.opt (mdiv-rem): Add period to the end.
......
...@@ -2836,6 +2836,10 @@ pass_parallelize_loops::execute (function *fun) ...@@ -2836,6 +2836,10 @@ pass_parallelize_loops::execute (function *fun)
if (number_of_loops (fun) <= 1) if (number_of_loops (fun) <= 1)
return 0; return 0;
tree nthreads = builtin_decl_explicit (BUILT_IN_OMP_GET_NUM_THREADS);
if (nthreads == NULL_TREE)
return 0;
if (parallelize_loops ()) if (parallelize_loops ())
{ {
fun->curr_properties &= ~(PROP_gimple_eomp); fun->curr_properties &= ~(PROP_gimple_eomp);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment