[gomp4.1] Pretty print '+' for sink positive offsets

Jakub Jelinek jakub@redhat.com
Mon Jul 20 15:05:00 GMT 2015


On Mon, Jul 20, 2015 at 07:47:25AM -0700, Aldy Hernandez wrote:
> Positive numbers get no '+' by default, so the dumps look like this:
> 
>                 #pragma omp ordered depend(sink:i1)
> 
> The attached patch fixes this oversight to print:
> 
>                 #pragma omp ordered depend(sink:i+1)
> 
> OK for branch?

Ok, thanks.

> commit fc23dda3b860931ca72bf00236e3f929b48c751e
> Author: Aldy Hernandez <aldyh@redhat.com>
> Date:   Mon Jul 20 07:44:52 2015 -0700
> 
>     	* tree-pretty-print.c (dump_omp_clause): Print '+' for positive
>     	numbers.
> 
> diff --git a/gcc/tree-pretty-print.c b/gcc/tree-pretty-print.c
> index bd28844..d3cc245 100644
> --- a/gcc/tree-pretty-print.c
> +++ b/gcc/tree-pretty-print.c
> @@ -566,8 +566,12 @@ dump_omp_clause (pretty_printer *pp, tree clause, int spc, int flags)
>  	      {
>  		dump_generic_node (pp, TREE_VALUE (t), spc, flags, false);
>  		if (TREE_PURPOSE (t) != integer_zero_node)
> -		  dump_generic_node (pp, TREE_PURPOSE (t), spc, flags,
> -				     false);
> +		  {
> +		    if (!wi::neg_p (TREE_PURPOSE (t)))
> +		      pp_plus (pp);
> +		    dump_generic_node (pp, TREE_PURPOSE (t), spc, flags,
> +				       false);
> +		  }
>  		if (TREE_CHAIN (t))
>  		  pp_comma (pp);
>  	      }


	Jakub



More information about the Gcc-patches mailing list