This is the mail archive of the
gcc-cvs@gcc.gnu.org
mailing list for the GCC project.
r132090 - in /branches/gomp-3_0-branch: gcc/Cha...
- From: jakub at gcc dot gnu dot org
- To: gcc-cvs at gcc dot gnu dot org
- Date: Mon, 04 Feb 2008 09:31:52 -0000
- Subject: r132090 - in /branches/gomp-3_0-branch: gcc/Cha...
Author: jakub
Date: Mon Feb 4 09:31:52 2008
New Revision: 132090
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=132090
Log:
* tree.h (OMP_CLAUSE_COLLAPSE_ITERVAR,
OMP_CLAUSE_COLLAPSE_COUNT): Define.
* tree.c (omp_clause_num_ops): Change OMP_CLAUSE_COLLAPSE
to 3 ops from 1 op.
(walk_tree_1): Handle the 2 extra ops in OMP_CLAUSE_COLLAPSE.
* tree-pretty-print.c (dump_generic_node): Handle collapsed
OMP_FOR loops.
* tree-parloops.c (create_parallel_loop): Create 1 entry
vectors for OMP_FOR_{INIT,COND,INCR}.
* gimplify.c (gimplify_omp_for): Handle collapsed OMP_FOR
loops, adjust for OMP_FOR_{INIT,COND,INCR} changes.
* tree-ssa-operands.c (get_expr_operands): Likewise.
* c-omp.c (c_finish_omp_for): Create 1 entry vectors for
OMP_FOR_{INIT,COND,INCR}.
* tree-nested.c (walk_omp_for): Adjust for OMP_FOR_{INIT,COND,INCR}
changes.
(convert_nonlocal_omp_clauses, convert_local_omp_clauses): Handle
OMP_CLAUSE_COLLAPSE and OMP_CLAUSE_UNTIED.
* c-parser.c (c_parser_omp_clause_collapse): Clear
OMP_CLAUSE_COLLAPSE_ITERVAR and OMP_CLAUSE_COLLAPSE_COUNT.
* omp-low.c (struct omp_for_data_loop): New type.
(struct omp_for_data): Remove v, n1, n2, step, cond_code fields.
Add loop, loops, collapse fields.
(extract_omp_for_data): Add loops argument. Extract data for
collapsed OMP_FOR loops.
(workshare_safe_to_combine_p): Don't combine collapse > 1 loops
unless all bounds and steps are constant. Adjust extract_omp_for_data
caller.
(get_ws_args_for): Adjust extract_omp_for_data caller.
(scan_omp_for): Handle collapsed OMP_FOR
loops, adjust for OMP_FOR_{INIT,COND,INCR} changes.
(expand_omp_for_generic): Handle collapsed OMP_FOR loops. Adjust
for struct omp_for_data changes. If libgomp function doesn't return
boolean_type_node, add comparison of the return value with 0.
(expand_omp_for_static_nochunk, expand_omp_for_static_chunk): Adjust
for struct omp_for_data changes.
(expand_omp_for): Allocate loops array, pass it to
extract_omp_for_data. For collapse > 1 loops use always
expand_omp_for_generic.
(lower_omp_single_simple): If libgomp function doesn't return
boolean_type_node, add comparison of the return value with 0.
(lower_omp_for_lastprivate): Adjust for struct omp_for_data changes.
(lower_omp_for): Handle collapsed OMP_FOR loops, adjust for
OMP_FOR_{INIT,COND,INCR} changes, adjust extract_omp_for_data
caller.
(diagnose_sb_1, diagnose_sb_2): Handle collapsed OMP_FOR
loops, adjust for OMP_FOR_{INIT,COND,INCR} changes.
gcc/fortran/
* openmp.c (omp_current_do_code): Made static.
(omp_current_do_collapse): New variable.
(gfc_resolve_omp_do_blocks): Compute omp_current_do_collapse,
clear omp_current_do_code and omp_current_do_collapse on return.
(gfc_resolve_do_iterator): Handle collapsed do loops.
(resolve_omp_do): Likewise, diagnose errorneous collapsed do loops.
* trans-openmp.c (gfc_trans_omp_clauses): Clear
OMP_CLAUSE_COLLAPSE_ITERVAR and OMP_CLAUSE_COLLAPSE_COUNT.
(gfc_trans_omp_do): Handle collapsed do loops.
* gfortran.h (gfc_find_sym_in_expr): New prototype.
* resolve.c (find_sym_in_expr): Rename to...
(gfc_find_sym_in_expr): ... this. No longer static.
(resolve_allocate_expr, resolve_ordinary_assign): Adjust caller.
* types.def (BT_BOOL): Use integer type with BOOL_TYPE_SIZE rather
than boolean_type_node.
gcc/cp/
* pt.c (tsubst_expr): Adjust for OMP_FOR_{INIT,COND,INCR} changes.
* semantics.c (finish_omp_for): Likewise.
* parser.c (cp_parser_omp_clause_collapse): Clear
OMP_CLAUSE_COLLAPSE_ITERVAR and OMP_CLAUSE_COLLAPSE_COUNT.
gcc/testsuite/
* gfortran.dg/gomp/collapse1.f90: New test.
libgomp/
* testsuite/libgomp.fortran/collapse2.f90: New test.
* testsuite/libgomp.fortran/collapse3.f90: New test.
Added:
branches/gomp-3_0-branch/gcc/testsuite/ChangeLog.gomp
branches/gomp-3_0-branch/gcc/testsuite/gfortran.dg/gomp/collapse1.f90
branches/gomp-3_0-branch/libgomp/testsuite/libgomp.fortran/collapse2.f90
branches/gomp-3_0-branch/libgomp/testsuite/libgomp.fortran/collapse3.f90
Modified:
branches/gomp-3_0-branch/gcc/ChangeLog.gomp
branches/gomp-3_0-branch/gcc/c-omp.c
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/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/gfortran.h
branches/gomp-3_0-branch/gcc/fortran/openmp.c
branches/gomp-3_0-branch/gcc/fortran/resolve.c
branches/gomp-3_0-branch/gcc/fortran/trans-openmp.c
branches/gomp-3_0-branch/gcc/fortran/types.def
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-parloops.c
branches/gomp-3_0-branch/gcc/tree-pretty-print.c
branches/gomp-3_0-branch/gcc/tree-ssa-operands.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