This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] More precise cfg for omp constructs


On 7/12/07 3:22 AM, Zdenek Dvorak wrote:

> 	* 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.
> 
> Index: tree-pretty-print.c
> ===================================================================
> *** tree-pretty-print.c	(revision 126547)
> --- tree-pretty-print.c	(working copy)
> *************** dump_generic_node (pretty_printer *buffe
> *** 1852,1860 ****
> --- 1852,1872 ----
>   
>       case OMP_SECTIONS:
>         pp_string (buffer, "#pragma omp sections");
> +       if (OMP_SECTIONS_CONTROL (node))
> + 	{
> + 	  pp_string (buffer, " (");

I prefer '<' instead.  Otherwise, it looks as if the control is part of
the syntax and not an internal artifact.

The rest is OK.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]