r132340 - in /branches/gomp-3_0-branch: gcc/Cha...

jakub@gcc.gnu.org jakub@gcc.gnu.org
Fri Feb 15 12:57:00 GMT 2008


Author: jakub
Date: Fri Feb 15 12:57:04 2008
New Revision: 132340

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=132340
Log:
	* tree.h (OMP_CLAUSE_LASTPRIVATE_STMT): Define.
	* tree.c (omp_clause_num_ops): Increase OMP_CLAUSE_LASTPRIVATE num_ops
	to 2.
	(walk_tree_1): Walk OMP_CLAUSE_LASTPRIVATE_STMT.
	* omp-low.c (scan_sharing_clauses): Scan
	OMP_CLAUSE_LASTPRIVATE_STMT.
	(lower_lastprivate_clauses): Even if some lastprivate is found on a
	work-sharing construct, continue looking for them on parent parallel
	construct.
	* gimplify.c (gimplify_scan_omp_clauses): Handle
	OMP_CLAUSE_LASTPRIVATE_STMT.
	(gimplify_omp_for): If loop counter has been replaced and original
	iterator is present in lastprivate clause, set
	OMP_CLAUSE_LASTPRIVATE_STMT.
	* tree-nested.c (convert_nonlocal_omp_clauses,
	convert_local_omp_clauses): Handle OMP_CLAUSE_LASTPRIVATE_STMT,
	OMP_CLAUSE_REDUCTION_INIT and OMP_CLAUSE_REDUCTION_MERGE.
	Don't do about TREE_STATIC or DECL_EXTERNAL VAR_DECLs in
	OMP_CLAUSE_DECL.
	* c-parser.c (c_parser_omp_clause_collapse): Don't clear
	OMP_CLAUSE_COLLAPSE_ITERVAR and OMP_CLAUSE_COLLAPSE_COUNT.
	(c_parser_omp_for_loop): Add par_clauses argument.  If decl is
	present in parallel's lastprivate clause, change it to shared
	and add lastprivate clause for decl to OMP_FOR_CLAUSES.
	(c_parser_omp_for, c_parser_omp_parallel): Adjust
	c_parser_omp_for_loop callers.

	* cp-tree.h (finish_omp_for): Add new clauses argument.
	* cp-gimplify.c (cp_genericize_r): Walk OMP_CLAUSE_LASTPRIVATE_STMT.
	* pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_LASTPRIVATE_STMT.
	(tsubst_expr) <case OMP_FOR>: Fix wording of error messages.  Call
	finish_omp_clauses on the newly added OMP_CLAUSE_PRIVATE.  Adjust
	finish_omp_for caller, don't set OMP_FOR_CLAUSES here.
	* semantics.c (finish_omp_for): Add new clauses argument.  Fix check
	for type dependent cond or incr.  Set OMP_FOR_CLAUSES to clauses.
	Use cp_convert instead of fold_convert to convert incr amount to
	difference_type.  Only fold if not in template.  If decl is
	mentioned in lastprivate clause, set OMP_CLAUSE_LASTPRIVATE_STMT.
	* parser.c (cp_parser_omp_clause_collapse): Don't clear
	OMP_CLAUSE_COLLAPSE_ITERVAR and OMP_CLAUSE_COLLAPSE_COUNT.
	(cp_parser_omp_for_loop): Add par_clauses argument.  If decl is
	present in parallel's lastprivate clause, change that clause to
	shared and add a lastprivate clause for decl to OMP_FOR_CLAUSES.
	Fix wording of error messages.  Adjust finish_omp_for caller, don't
	set OMP_FOR_CLAUSES here.
	(cp_parser_omp_for, cp_parser_omp_parallel): Adjust
	cp_parser_omp_for_loop callers.

	* trans-openmp.c (gfc_trans_omp_clauses): Don't clear
	OMP_CLAUSE_COLLAPSE_ITERVAR and OMP_CLAUSE_COLLAPSE_COUNT.
	(gfc_trans_omp_do): Add par_clauses argument.  If dovar is
	present in lastprivate clause and do loop isn't simple,
	set OMP_CLAUSE_LASTPRIVATE_STMT.  If dovar is present in
	parallel's lastprivate clause, change it to shared and add
	lastprivate clause to OMP_FOR_CLAUSES.
	(gfc_trans_omp_parallel_do, gfc_trans_omp_directive): Adjust
	gfc_trans_omp_do callers.

	* testsuite/libgomp.c/nestedfn-6.c: New test.
	* testsuite/libgomp.c++/for-5.C: New test.
	* testsuite/libgomp.fortran/nestedfn4.f90: New test.
	* testsuite/libgomp.fortran/collapse3.f90: Uncomment tests for
	lastprivate values, make sure all iterators are in lastprivate
	clauses.
	* testsuite/libgomp.fortran/lastprivate1.f90: New test.
	* testsuite/libgomp.fortran/lastprivate2.f90: New test.

Added:
    branches/gomp-3_0-branch/libgomp/testsuite/libgomp.c++/for-5.C
    branches/gomp-3_0-branch/libgomp/testsuite/libgomp.c/nestedfn-6.c
    branches/gomp-3_0-branch/libgomp/testsuite/libgomp.fortran/lastprivate1.f90
    branches/gomp-3_0-branch/libgomp/testsuite/libgomp.fortran/lastprivate2.f90
    branches/gomp-3_0-branch/libgomp/testsuite/libgomp.fortran/nestedfn4.f90
Modified:
    branches/gomp-3_0-branch/gcc/ChangeLog.gomp
    branches/gomp-3_0-branch/gcc/c-parser.c
    branches/gomp-3_0-branch/gcc/cp/ChangeLog.gomp
    branches/gomp-3_0-branch/gcc/cp/cp-gimplify.c
    branches/gomp-3_0-branch/gcc/cp/cp-tree.h
    branches/gomp-3_0-branch/gcc/cp/parser.c
    branches/gomp-3_0-branch/gcc/cp/pt.c
    branches/gomp-3_0-branch/gcc/cp/semantics.c
    branches/gomp-3_0-branch/gcc/fortran/ChangeLog.gomp
    branches/gomp-3_0-branch/gcc/fortran/trans-openmp.c
    branches/gomp-3_0-branch/gcc/gimplify.c
    branches/gomp-3_0-branch/gcc/omp-low.c
    branches/gomp-3_0-branch/gcc/tree-nested.c
    branches/gomp-3_0-branch/gcc/tree.c
    branches/gomp-3_0-branch/gcc/tree.h
    branches/gomp-3_0-branch/libgomp/ChangeLog.gomp
    branches/gomp-3_0-branch/libgomp/testsuite/libgomp.fortran/collapse3.f90



More information about the Gcc-cvs mailing list