public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <richard.guenther@gmail.com>
To: "Martin Liška" <mliska@suse.cz>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Add missing vn_reference_t::punned initialization
Date: Mon, 24 Aug 2020 09:26:00 +0200	[thread overview]
Message-ID: <CAFiYyc3MXXoRjOuK_Dmt9FfGQxT=t1xDsx0X=qiO_cECZ0xuWw@mail.gmail.com> (raw)
In-Reply-To: <3094032c-a4f6-e1f4-091d-d83cda4cb7d3@suse.cz>

On Thu, Aug 13, 2020 at 2:49 PM Martin Liška <mliska@suse.cz> wrote:
>
> As mentioned in the PR, we miss one initialization of ::punned
> in vn_reference_lookup_call.
>
> Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
>
> Ready to be installed?

OK.

Thanks,
Richard.

> Thanks,
> Martin
>
> gcc/ChangeLog:
>
>         PR tree-optimization/96597
>         * tree-ssa-sccvn.c (vn_reference_lookup_call): Add missing
>         initialization of ::punned.
>         (vn_reference_insert): Use consistently false instead of 0.
>         (vn_reference_insert_pieces): Likewise.
> ---
>   gcc/tree-ssa-sccvn.c | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c
> index 934ae40670d..789d3664db5 100644
> --- a/gcc/tree-ssa-sccvn.c
> +++ b/gcc/tree-ssa-sccvn.c
> @@ -3578,6 +3578,7 @@ vn_reference_lookup_call (gcall *call, vn_reference_t *vnresult,
>     vr->vuse = vuse ? SSA_VAL (vuse) : NULL_TREE;
>     vr->operands = valueize_shared_reference_ops_from_call (call);
>     vr->type = gimple_expr_type (call);
> +  vr->punned = false;
>     vr->set = 0;
>     vr->base_set = 0;
>     vr->hashcode = vn_reference_compute_hash (vr);
> @@ -3601,7 +3602,7 @@ vn_reference_insert (tree op, tree result, tree vuse, tree vdef)
>     vr1->vuse = vuse_ssa_val (vuse);
>     vr1->operands = valueize_shared_reference_ops_from_ref (op, &tem).copy ();
>     vr1->type = TREE_TYPE (op);
> -  vr1->punned = 0;
> +  vr1->punned = false;
>     ao_ref op_ref;
>     ao_ref_init (&op_ref, op);
>     vr1->set = ao_ref_alias_set (&op_ref);
> @@ -3661,7 +3662,7 @@ vn_reference_insert_pieces (tree vuse, alias_set_type set,
>     vr1->vuse = vuse_ssa_val (vuse);
>     vr1->operands = valueize_refs (operands);
>     vr1->type = type;
> -  vr1->punned = 0;
> +  vr1->punned = false;
>     vr1->set = set;
>     vr1->base_set = base_set;
>     vr1->hashcode = vn_reference_compute_hash (vr1);
> --
> 2.28.0
>

      reply	other threads:[~2020-08-24  7:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-13 12:49 Martin Liška
2020-08-24  7:26 ` Richard Biener [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFiYyc3MXXoRjOuK_Dmt9FfGQxT=t1xDsx0X=qiO_cECZ0xuWw@mail.gmail.com' \
    --to=richard.guenther@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=mliska@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).