This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [gomp4.1] Pretty print '+' for sink positive offsets
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Aldy Hernandez <aldyh at redhat dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 20 Jul 2015 16:51:19 +0200
- Subject: Re: [gomp4.1] Pretty print '+' for sink positive offsets
- Authentication-results: sourceware.org; auth=none
- References: <55AD09FD dot 4090704 at redhat dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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