diff options
author | Zdenek Dvorak <ook@ucw.cz> | 2007-08-01 13:50:39 +0200 |
---|---|---|
committer | Zdenek Dvorak <rakdver@gcc.gnu.org> | 2007-08-01 11:50:39 +0000 |
commit | e5c95afe1e18581b060601f70b1a6888835028ce (patch) | |
tree | ff781d81e1c759d85b9e39299b57bf35bf7747a4 /gcc/tree.def | |
parent | 203bb67ec4596d07169474c03d36f7726e796120 (diff) | |
download | gcc-e5c95afe1e18581b060601f70b1a6888835028ce.zip gcc-e5c95afe1e18581b060601f70b1a6888835028ce.tar.gz gcc-e5c95afe1e18581b060601f70b1a6888835028ce.tar.bz2 |
tree-pretty-print.c (dump_generic_node): Dump OMP_SECTIONS_SWITCH.
* tree-pretty-print.c (dump_generic_node): Dump OMP_SECTIONS_SWITCH.
Display new operands of OMP_SECTIONS and OMP_CONTINUE.
* tree.h (OMP_SECTIONS_CONTROL): New macro.
(OMP_DIRECTIVE_P): Add OMP_SECTIONS_SWITCH.
* omp-low.c (get_ws_args_for, determine_parallel_type,
expand_omp_for_generic, expand_omp_for_static_nochunk,
expand_omp_for_static_chunk, expand_omp_for, expand_omp_sections):
Work with more precise CFG.
(build_omp_regions_1): Handle OMP_SECTIONS_SWITCH.
(lower_omp_sections): Emit OMP_SECTIONS_SWITCH. Add arguments to
OMP_CONTINUE.
* tree-gimple.c (is_gimple_stmt): Handle OMP_SECTIONS_SWITCH.
* gimple-low.c (lower_stmt): Ditto.
* tree-inline.c (estimate_num_insns_1): Ditto.
* tree.def (OMP_SECTIONS, OMP_CONTINUE): Added new operands.
(OMP_SECTIONS_SWITCH): New.
* tree-cfgcleanup.c (cleanup_omp_return): New.
(cleanup_tree_cfg_bb): Call cleanup_omp_return.
* tree-cfg.c (make_edges): Create back edges for OMP_CONTINUE
and exit edge for OMP_FOR. Handle OMP_SECTIONS_SWITCH.
(tree_redirect_edge_and_branch): Handle omp constructs.
* fortran/trans-openmp.c (gfc_trans_omp_sections): Build OMP_SECTIONS
with three arguments.
From-SVN: r127121
Diffstat (limited to 'gcc/tree.def')
-rw-r--r-- | gcc/tree.def | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/gcc/tree.def b/gcc/tree.def index aa95cb1..72c6d24 100644 --- a/gcc/tree.def +++ b/gcc/tree.def @@ -999,8 +999,14 @@ DEFTREECODE (OMP_FOR, "omp_for", tcc_statement, 6) /* OpenMP - #pragma omp sections [clause1 ... clauseN] Operand 0: OMP_SECTIONS_BODY: Sections body. - Operand 1: OMP_SECTIONS_CLAUSES: List of clauses. */ -DEFTREECODE (OMP_SECTIONS, "omp_sections", tcc_statement, 2) + Operand 1: OMP_SECTIONS_CLAUSES: List of clauses. + Operand 2: OMP_SECTIONS_CONTROL: The control variable used for deciding + which of the sections to execute. */ +DEFTREECODE (OMP_SECTIONS, "omp_sections", tcc_statement, 3) + +/* This tree immediatelly follows OMP_SECTIONS, and represents the switch + used to decide which branch is taken. */ +DEFTREECODE (OMP_SECTIONS_SWITCH, "omp_sections_switch", tcc_statement, 0) /* OpenMP - #pragma omp single Operand 0: OMP_SINGLE_BODY: Single section body. @@ -1028,8 +1034,9 @@ DEFTREECODE (OMP_CRITICAL, "omp_critical", tcc_statement, 2) DEFTREECODE (OMP_RETURN, "omp_return", tcc_statement, 0) /* OpenMP - An intermediate tree code to mark the location of the - loop or sections iteration in the partially lowered code. */ -DEFTREECODE (OMP_CONTINUE, "omp_continue", tcc_statement, 0) + loop or sections iteration in the partially lowered code. + The arguments are definition and use of the control variable. */ +DEFTREECODE (OMP_CONTINUE, "omp_continue", tcc_statement, 2) /* OpenMP - #pragma omp atomic Operand 0: The address at which the atomic operation is to be performed. |