diff mbox

[committed] Test for flag_parallelize_loops > 1

Message ID 55884326.1050603@mentor.com
State New
Headers show

Commit Message

Tom de Vries June 22, 2015, 5:17 p.m. UTC
On 19/06/15 11:26, Tom de Vries wrote:
> Hi,
>
> DEF_GOMP_BUILTIN tests for 'flag_parallelize_loops'. But if
> flag_parallelize_loops is one (which is also the default), then
> pass_parloops doesn't do anything, and won't generate any OMP constructs.
>
> This patch makes DEF_GOMP_BUILTIN tests 'flag_parallelize_loops > 1',
> just like all the other tests of flag_parallelize_loops in the compiler.
>
> Build on x86_64 and reg-tested libgomp's c.exp.
>

During bootstrap and reg-test, I found regressions for -fcilkplus. 
There's a dependency of fcilkplus on the gomp builtins, which is exposed 
by this patch.

This updated patch also enables the gomp builtins for fcilkplus.

Bootstrapped and reg-tested on x86_64 on top of trunk.

Committed to trunk as obvious.

Thanks,
- Tom
diff mbox

Patch

Test for flag_parallelize_loops > 1

2015-06-19  Tom de Vries  <tom@codesourcery.com>

	* builtins.def (DEF_GOMP_BUILTIN): Test
	'flag_tree_parallelize_loops > 1' instead of
	'flag_tree_parallelize_loops'.  Test flag_cilkplus.
---
 gcc/builtins.def | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gcc/builtins.def b/gcc/builtins.def
index 55ce9f6..80e4a9c 100644
--- a/gcc/builtins.def
+++ b/gcc/builtins.def
@@ -182,7 +182,9 @@  along with GCC; see the file COPYING3.  If not see
 #define DEF_GOMP_BUILTIN(ENUM, NAME, TYPE, ATTRS) \
   DEF_BUILTIN (ENUM, "__builtin_" NAME, BUILT_IN_NORMAL, TYPE, TYPE,    \
                false, true, true, ATTRS, false, \
-	       (flag_openmp || flag_tree_parallelize_loops \
+	       (flag_openmp \
+		|| flag_tree_parallelize_loops > 1 \
+		|| flag_cilkplus \
 		|| flag_offload_abi != OFFLOAD_ABI_UNSET))
 
 /* Builtin used by implementation of Cilk Plus.  Most of these are decomposed
-- 
1.9.1