From: Richard Biener <rguenther@suse.de>
To: Richard Sandiford <richard.sandiford@arm.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] Remove SLP_TREE_VEC_STMTS in favor of SLP_TREE_VEC_DEFS
Date: Mon, 24 Jul 2023 12:31:16 +0000 (UTC) [thread overview]
Message-ID: <nycvar.YFH.7.77.849.2307241226480.12935@jbgna.fhfr.qr> (raw)
In-Reply-To: <mpt351diorm.fsf@arm.com>
On Mon, 24 Jul 2023, Richard Sandiford wrote:
> Richard Biener <rguenther@suse.de> writes:
> > The following unifies SLP_TREE_VEC_STMTS into SLP_TREE_VEC_DEFS
> > which can handle all cases we need.
> >
> > Bootstrap & regtest running on x86_64-unknown-linux-gnu.
>
> Nice! Just curious...
>
> > @@ -149,6 +147,20 @@ _slp_tree::~_slp_tree ()
> > free (failed);
> > }
> >
> > +/* Push the single SSA definition in DEF to the vector of vector defs. */
> > +
> > +void
> > +_slp_tree::push_vec_def (gimple *def)
> > +{
> > + if (gphi *phi = dyn_cast <gphi *> (def))
> > + vec_defs.quick_push (gimple_phi_result (phi));
> > + else
> > + {
> > + def_operand_p defop = single_ssa_def_operand (def, SSA_OP_ALL_DEFS);
> > + vec_defs.quick_push (get_def_from_ptr (defop));
> > + }
> > +}
>
> ...what does this handle that gimple_get_lhs wouldn't? asms?
I was worried about stores where this would pick up the virtual
definition. But double-checking reveals we don't push vector
defs in vectorizable_store for SLP. I haven't made up my mind
whether we should (for consistency). It also makes sure we
don't end up with calls with a LHS and a virtual definition - that's
what we eventually are going to trip over here.
In principle when there's no 'LHS' we can use any SSA def.
That said, I'm not sure either, just wanted to make a few cases
more to work in odd code we might have here or there ...
Btw, the above function is eventually going to be legacy though
currently it's the most used.
Richard.
prev parent reply other threads:[~2023-07-24 12:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-24 10:24 Richard Biener
2023-07-24 10:31 ` Richard Sandiford
2023-07-24 12:31 ` 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=nycvar.YFH.7.77.849.2307241226480.12935@jbgna.fhfr.qr \
--to=rguenther@suse.de \
--cc=gcc-patches@gcc.gnu.org \
--cc=richard.sandiford@arm.com \
/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).