r261029 - in /branches/gomp-5_0-branch/gcc: Cha...

jakub@gcc.gnu.org jakub@gcc.gnu.org
Thu May 31 17:04:00 GMT 2018


Author: jakub
Date: Thu May 31 17:04:41 2018
New Revision: 261029

URL: https://gcc.gnu.org/viewcvs?rev=261029&root=gcc&view=rev
Log:
	* Makefile.in (GTFILES): Add omp-general.h.
	* gengtype.c (open_base_files): Likewise.
	* tree-core.h (enum omp_memory_order): New enum.
	(struct tree_base): Add omp_atomic_memory_order field into union.
	Remove OMP_ATOMIC_SEQ_CST comment.
	* tree.h (OMP_ATOMIC_SEQ_CST): Remove.
	(OMP_ATOMIC_MEMORY_ORDER): Define.
	* tree-pretty-print.h (dump_omp_atomic_memory_order): Declare.
	* tree-pretty-print.c (dump_omp_atomic_memory_order): New function.
	(dump_generic_node): Use it.
	* gimple.h (enum gf_mask): Remove GF_OMP_ATOMIC_SEQ_CST, add
	GF_OMP_ATOMIC_MEMORY_ORDER, use different value for
	GF_OMP_ATOMIC_NEED_VALUE.
	(gimple_build_omp_atomic_load): Add enum omp_memory_order argument.
	(gimple_build_omp_atomic_store): Likewise.
	(gimple_omp_atomic_seq_cst_p): Remove.
	(gimple_omp_atomic_memory_order): New function.
	(gimple_omp_atomic_set_seq_cst): Remove.
	(gimple_omp_atomic_set_memory_order): New function.
	* gimple.c (gimple_build_omp_atomic_load): Add mo argument, call
	gimple_omp_atomic_set_memory_order.
	(gimple_build_omp_atomic_store): Likewise.
	* gimple-pretty-print.c (dump_gimple_omp_atomic_load,
	dump_gimple_omp_atomic_store): Use dump_omp_atomic_memory_order.
	* gimplify.c (gimplify_omp_atomic): Use OMP_ATOMIC_MEMORY_ORDER instead
	of OMP_ATOMIC_SEQ_CST, pass it as new argument to
	gimple_build_omp_atomic_load and gimple_build_omp_atomic_store, remove
	gimple_omp_atomic_set_seq_cst calls.
	* omp-general.h (enum omp_requires): New enum.
	(omp_requires_mask): Declare.
	* omp-general.c (enum omp_requires): New variable.
	* omp-expand.c (omp_memory_order_to_memmodel): New function.
	(expand_omp_atomic_load, expand_omp_atomic_store,
	expand_omp_atomic_fetch_op): Use it and gimple_omp_atomic_memory_order
	instead of gimple_omp_atomic_seq_cst_p.
	* omp-low.c (lower_reduction_clauses): Initialize
	OMP_ATOMIC_MEMORY_ORDER to relaxed.
	* tree-parloops.c (create_call_for_reduction_1): Pass
	OMP_MEMORY_ORDER_RELAXED as new argument to dump_gimple_omp_atomic_load
	and dump_gimple_omp_atomic_store.
c-family/
	* c-common.h (c_finish_omp_atomic): Replace bool seq_cst argument with
	enum omp_memory_order memory_order.
	* c-omp.c (c_finish_omp_atomic): Likewise.  Set OMP_ATOMIC_MEMORY_ORDER
	instead of OMP_ATOMIC_SEQ_CST.
	* c-pragma.c (omp_pragmas): Add requires.
	* c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_REQUIRES.
c/
	* c-parser.c (c_parser_omp_requires): New function.
	(c_parser_pragma): Handle PRAGMA_OMP_REQUIRES.
	(c_parser_omp_clause_hint): Require constant integer expression rather
	than just integer expression.
	(c_parser_omp_atomic): Parse hint and memory order clauses.  Handle
	default memory order from requires directive if any.  Adjust
	c_finish_omp_atomic caller.
	(c_parser_omp_critical): Allow comma in between (name) and hint clause.
	(c_parser_omp_target): Set OMP_REQUIRES_TARGET_USED bit in
	omp_requires_mask.
cp/
	* cp-tree.h (OMP_ATOMIC_DEPENDENT_P): Return true also for first
	argument being OMP_CLAUSE.
	(finish_omp_atomic): Remove seq_cst argument.  Add clauses and mo
	arguments.
	* parser.c (cp_parser_omp_atomic): Parse hint and memory order clauses.
	Handle default memory order from requires directive if any.  Adjust
	finish_omp_atomic caller.
	(cp_parser_omp_critical): Allow comma in between (name) and hint
	clause.
	(cp_parser_omp_target): Set OMP_REQUIRES_TARGET_USED bit in
	omp_requires_mask.
	(cp_parser_omp_requires): New function.
	(cp_parser_pragma): Handle PRAGMA_OMP_REQUIRES.
	* pt.c (tsubst_expr) <case OMP_ATOMIC>: Call tsubst_omp_clauses
	on clauses if any, adjust finish_omp_atomic caller.  Use
	OMP_ATOMIC_MEMORY_ORDER rather than OMP_ATOMIC_SEQ_CST.
	* semantics.c (finish_omp_clauses): Use error_at rather than
	error for priority and hint clause diagnostics.  Fix pasto for
	hint clause.  Diagnose hint expression that doesn't fold into
	INTEGER_CST.
	(finish_omp_atomic): Remove seq_cst argument.  Add clauses and mo
	arguments.  Adjust c_finish_omp_atomic caller.  Stick clauses if
	any into first argument of wrapping OMP_ATOMIC.
fortran/
	* trans-openmp.c (gfc_trans_omp_atomic): Set OMP_ATOMIC_MEMORY_ORDER
	rather than OMP_ATOMIC_SEQ_CST.
testsuite/
	* c-c++-common/gomp/atomic-17.c: New test.
	* c-c++-common/gomp/atomic-18.c: New test.
	* c-c++-common/gomp/atomic-19.c: New test.
	* c-c++-common/gomp/atomic-20.c: New test.
	* c-c++-common/gomp/atomic-21.c: New test.
	* c-c++-common/gomp/atomic-22.c: New test.
	* c-c++-common/gomp/critical-1.c: New test.
	* c-c++-common/gomp/critical-2.c: New test.
	* c-c++-common/gomp/requires-1.c: New test.
	* c-c++-common/gomp/requires-2.c: New test.
	* c-c++-common/gomp/requires-3.c: New test.
	* c-c++-common/gomp/requires-4.c: New test.
	* gcc.dg/gomp/atomic-5.c (f1): Add another expected error.
	* g++.dg/gomp/atomic-18.C: New test.
	* g++.dg/gomp/atomic-19.C: New test.
	* g++.dg/gomp/atomic-5.C (f1): Add another expected error.
	* g++.dg/gomp/critical-3.C: New test.

Added:
    branches/gomp-5_0-branch/gcc/testsuite/c-c++-common/gomp/atomic-17.c
    branches/gomp-5_0-branch/gcc/testsuite/c-c++-common/gomp/atomic-18.c
    branches/gomp-5_0-branch/gcc/testsuite/c-c++-common/gomp/atomic-19.c
    branches/gomp-5_0-branch/gcc/testsuite/c-c++-common/gomp/atomic-20.c
    branches/gomp-5_0-branch/gcc/testsuite/c-c++-common/gomp/atomic-21.c
    branches/gomp-5_0-branch/gcc/testsuite/c-c++-common/gomp/atomic-22.c
    branches/gomp-5_0-branch/gcc/testsuite/c-c++-common/gomp/critical-1.c
    branches/gomp-5_0-branch/gcc/testsuite/c-c++-common/gomp/critical-2.c
    branches/gomp-5_0-branch/gcc/testsuite/c-c++-common/gomp/requires-1.c
    branches/gomp-5_0-branch/gcc/testsuite/c-c++-common/gomp/requires-2.c
    branches/gomp-5_0-branch/gcc/testsuite/c-c++-common/gomp/requires-3.c
    branches/gomp-5_0-branch/gcc/testsuite/c-c++-common/gomp/requires-4.c
    branches/gomp-5_0-branch/gcc/testsuite/g++.dg/gomp/atomic-18.C
    branches/gomp-5_0-branch/gcc/testsuite/g++.dg/gomp/atomic-19.C
    branches/gomp-5_0-branch/gcc/testsuite/g++.dg/gomp/critical-3.C
Modified:
    branches/gomp-5_0-branch/gcc/ChangeLog.gomp
    branches/gomp-5_0-branch/gcc/Makefile.in
    branches/gomp-5_0-branch/gcc/c-family/ChangeLog.gomp
    branches/gomp-5_0-branch/gcc/c-family/c-common.h
    branches/gomp-5_0-branch/gcc/c-family/c-omp.c
    branches/gomp-5_0-branch/gcc/c-family/c-pragma.c
    branches/gomp-5_0-branch/gcc/c-family/c-pragma.h
    branches/gomp-5_0-branch/gcc/c/ChangeLog.gomp
    branches/gomp-5_0-branch/gcc/c/c-parser.c
    branches/gomp-5_0-branch/gcc/cp/ChangeLog.gomp
    branches/gomp-5_0-branch/gcc/cp/cp-tree.h
    branches/gomp-5_0-branch/gcc/cp/parser.c
    branches/gomp-5_0-branch/gcc/cp/pt.c
    branches/gomp-5_0-branch/gcc/cp/semantics.c
    branches/gomp-5_0-branch/gcc/fortran/ChangeLog.gomp
    branches/gomp-5_0-branch/gcc/fortran/trans-openmp.c
    branches/gomp-5_0-branch/gcc/gengtype.c
    branches/gomp-5_0-branch/gcc/gimple-pretty-print.c
    branches/gomp-5_0-branch/gcc/gimple.c
    branches/gomp-5_0-branch/gcc/gimple.h
    branches/gomp-5_0-branch/gcc/gimplify.c
    branches/gomp-5_0-branch/gcc/omp-expand.c
    branches/gomp-5_0-branch/gcc/omp-general.c
    branches/gomp-5_0-branch/gcc/omp-general.h
    branches/gomp-5_0-branch/gcc/omp-low.c
    branches/gomp-5_0-branch/gcc/testsuite/ChangeLog.gomp
    branches/gomp-5_0-branch/gcc/testsuite/g++.dg/gomp/atomic-5.C
    branches/gomp-5_0-branch/gcc/testsuite/gcc.dg/gomp/atomic-5.c
    branches/gomp-5_0-branch/gcc/tree-core.h
    branches/gomp-5_0-branch/gcc/tree-parloops.c
    branches/gomp-5_0-branch/gcc/tree-pretty-print.c
    branches/gomp-5_0-branch/gcc/tree-pretty-print.h
    branches/gomp-5_0-branch/gcc/tree.h



More information about the Gcc-cvs mailing list