From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: richard.guenther@gmail.com (Richard Guenther)
Cc: ira.rosen@linaro.org (Ira Rosen),
gcc-patches@gcc.gnu.org,
patches@linaro.org (Patch Tracking)
Subject: Re: [patch] Fix PR tree-optimization/49771
Date: Mon, 25 Jul 2011 16:12:00 -0000 [thread overview]
Message-ID: <201107251525.p6PFPmiG031656@d06av02.portsmouth.uk.ibm.com> (raw)
In-Reply-To: <CAFiYyc3LcdAe94pfwHhdTKBPbiQj=S6JfxAQq_DPGL9PcwsSPQ@mail.gmail.com> from "Richard Guenther" at Jul 25, 2011 04:43:10 PM
Richard Guenther wrote:
> On Mon, Jul 25, 2011 at 4:23 PM, Ulrich Weigand <uweigand@de.ibm.com> wrote:
> > I had always understood this to reflect the simple fact that a
> > pointer to some type must never hold a value that is not properly
> > aligned for that type. (Maybe this is only true on STRICT_ALIGNMENT
> > targets?) This has always been an important property to generate
> > good code on SPU ...
>
> We do not preserve pointer type casts in the middle-end (anymore).
Huh, OK. I was not aware of that ...
> >> nonzero_bits1 seems to be the only consumer of REGNO_POINTER_ALIGN
> >> apart from maybe alpha.c and spu.c.
There's also a use in find_reloads_subreg_address, as well as in the
i386/predicates.md and arm/arm.md files.
> > This means I need to generate a rotate to fix up the value that was
> > loaded by the (forced aligned) load instruction. However, the form
> > of this rotate can be simpler if I know that e.g. reg X is always
> > guaranteed to be 128-bits aligned and only reg Y introduces the
> > potential misalignment. If on the other hand neither of the base
> > registers is guaranteed to be 128-bit aligned, I need to generate
> > more complex rotate code ...
>
> Because then you need the value of X + Y instead of just picking either?
Yes, exactly.
> Why not expand this explicitly when you still have the per-SSA name
> alignment information around?
When would that be? The expansion does happen in the initial expand
stage, but I'm getting called from the middle-end via emit_move_insn etc.
which already provides me with a MEM ...
Can I use REG_ATTRS->decl to get at the register's DECL and use
get_pointer_alignment on that? [ On the other hand, don't we have
the same problems with reliability of REG_ATTRS that we have with
REGNO_POINTER_ALIGN, given e.g. the coalescing you mentioned? ]
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com
next prev parent reply other threads:[~2011-07-25 15:26 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-19 8:24 Ira Rosen
2011-07-19 9:49 ` Richard Guenther
2011-07-19 14:01 ` Ira Rosen
2011-07-19 14:03 ` Richard Guenther
2011-07-20 19:47 ` Ulrich Weigand
2011-07-21 12:54 ` Ira Rosen
2011-07-24 14:32 ` Ira Rosen
2011-07-24 18:46 ` Richard Guenther
2011-07-25 9:44 ` Ulrich Weigand
2011-07-25 10:08 ` Richard Guenther
2011-07-25 11:26 ` Ira Rosen
2011-07-25 11:41 ` Richard Guenther
2011-07-25 12:33 ` Ira Rosen
2011-07-25 13:01 ` Richard Guenther
2011-07-25 13:07 ` Richard Guenther
2011-07-25 13:47 ` Ulrich Weigand
2011-07-25 14:01 ` Richard Guenther
2011-07-25 14:10 ` Richard Guenther
2011-07-25 14:14 ` Richard Guenther
2011-07-25 14:54 ` Ulrich Weigand
2011-07-25 14:59 ` Richard Guenther
2011-07-25 16:12 ` Ulrich Weigand [this message]
2011-07-26 8:25 ` Richard Guenther
2011-07-26 8:59 ` Andrew Pinski
2011-07-26 14:23 ` Ulrich Weigand
2011-07-26 14:25 ` Michael Matz
2011-07-26 16:18 ` Merge alignments from coalesced SSA pointers Michael Matz
2011-07-26 17:23 ` Michael Matz
2011-08-08 16:34 ` Ulrich Weigand
2011-08-09 12:01 ` Michael Matz
2011-08-12 16:41 ` [rfa] Set alignment of pseudos via get_pointer_alignment Michael Matz
2011-08-12 22:53 ` Richard Guenther
2011-08-23 15:04 ` Michael Matz
2011-07-26 17:28 ` Merge alignments from coalesced SSA pointers Ulrich Weigand
2011-07-27 9:13 ` 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=201107251525.p6PFPmiG031656@d06av02.portsmouth.uk.ibm.com \
--to=uweigand@de.ibm.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=ira.rosen@linaro.org \
--cc=patches@linaro.org \
--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).