public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: richard.guenther@gmail.com (Richard Guenther)
Cc: mjambor@suse.cz (Martin Jambor),
	gcc-patches@gcc.gnu.org (GCC Patches),
	       rguenther@suse.de
Subject: Re: [PATCH, PR 49094] Refrain from creating misaligned accesses in SRA
Date: Wed, 20 Jul 2011 18:35:00 -0000	[thread overview]
Message-ID: <201107201811.p6KIB6jS009963@d06av02.portsmouth.uk.ibm.com> (raw)
In-Reply-To: <CAFiYyc2pjkcakW6ZvVhx75pabJWzfVUUnPEL=EDuoZht0dwCDQ@mail.gmail.com> from "Richard Guenther" at Jul 20, 2011 09:47:43 AM

Richard Guenther wrote:
> On Tue, Jul 19, 2011 at 8:20 PM, Ulrich Weigand <uweigand@de.ibm.com> wrote:
> > The problem is that in this expression
> >   disappear = VIEW_CONVERT_EXPR<struct VecClass>(x_8);
> > the rhs is considered unaligned and blocks the SRA transformation.
> >
> > The check you added for SSA_NAMEs doesn't hit, because the SSA_NAME is
> > encapsulated in a VIEW_CONVERT_EXPR. When get_object_alignment is called,
> > the VIEW_CONVERT_EXPR is stripped off by get_inner_reference and the
> > SSA_NAME appears, but then get_object_alignment doesn't handle it
> > and just returns the default alignment of 8 bits.
> >
> > Maybe get_object_alignment should itself handle SSA_NAMEs?
> 
> But what should it return for a rvalue?  There is no "alignment" here.
> I think SRA should avoid asking for rvalues.

I must admit I do not fully understand what the SRA code is attempting
to achieve here ...  Could you elaborate on what you mean by "avoid
asking for rvalues"?  Should the SRA code never check the RHS of an
assignment for alignment, only the LHS?  Or should it classify the RHS
tree according to whether the access is rvalue or lvalue (how would
that work?)?

Thanks,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com

  reply	other threads:[~2011-07-20 18:11 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-26 19:54 Martin Jambor
2011-06-27 13:59 ` Richard Guenther
2011-06-28 12:16   ` Martin Jambor
2011-06-30 13:57     ` Martin Jambor
2011-06-30 17:09       ` Martin Jambor
2011-07-01  7:03         ` Richard Guenther
2011-07-01 15:55         ` Martin Jambor
2011-07-19 19:49       ` Ulrich Weigand
2011-07-20  8:33         ` Richard Guenther
2011-07-20 18:35           ` Ulrich Weigand [this message]
2011-07-21  9:11             ` Richard Guenther
2011-07-21 11:23               ` Martin Jambor
2011-07-25 19:10                 ` Martin Jambor
2011-07-25 19:27                   ` Ulrich Weigand
2011-07-26  8:33                   ` Richard Guenther
2011-07-26 17:32                     ` Martin Jambor
2011-07-27 12:50                       ` Ulrich Weigand
2011-07-27 13:19                         ` Martin Jambor
2011-07-27 14:06                           ` Ulrich Weigand
2011-07-27 21:01                           ` Ulrich Weigand
2011-07-28  8:48                             ` Richard Guenther

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=201107201811.p6KIB6jS009963@d06av02.portsmouth.uk.ibm.com \
    --to=uweigand@de.ibm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=mjambor@suse.cz \
    --cc=rguenther@suse.de \
    --cc=richard.guenther@gmail.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).