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: rearnsha@arm.com (Richard Earnshaw),
	       gcc-patches@gcc.gnu.org (gcc-patches@gcc.gnu.org),
	       ramana.radhakrishnan@linaro.org
Subject: [RFA 4.7/4.6] Re: [PATCH v2] Target-specific limits on vector alignment
Date: Tue, 07 Aug 2012 14:57:00 -0000	[thread overview]
Message-ID: <201208071456.q77EucUF024143@d06av02.portsmouth.uk.ibm.com> (raw)
In-Reply-To: <CAFiYyc1V3uC=SHdjEgKaFU8_TNgYZ2XUB18Kj3-icQMi1DJGwQ@mail.gmail.com> from "Richard Guenther" at Jul 30, 2012 11:28:51 AM

Richard Guenther wrote:
> On Fri, Jul 27, 2012 at 5:24 PM, Ulrich Weigand <uweigand@de.ibm.com> wrote:
> > ChangeLog:
> >
> >         * target.def (vector_alignment): New target hook.
> >         * doc/tm.texi.in (TARGET_VECTOR_ALIGNMENT): Document new hook.
> >         * doc/tm.texi: Regenerate.
> >         * targhooks.c (default_vector_alignment): New function.
> >         * targhooks.h (default_vector_alignment): Add prototype.
> >         * stor-layout.c (layout_type): Use targetm.vector_alignment.
> >         * config/arm/arm.c (arm_vector_alignment): New function.
> >         (TARGET_VECTOR_ALIGNMENT): Define.
> >
> >         * tree-vect-data-refs.c (vect_update_misalignment_for_peel): Use
> >         vector type alignment instead of size.
> >         * tree-vect-loop-manip.c (vect_do_peeling_for_loop_bound): Use
> >         element type size directly instead of computing it from alignment.
> >         Fix variable naming and comment.
> >
> > testsuite/ChangeLog:
> >
> >         * lib/target-supports.exp
> >         (check_effective_target_vect_natural_alignment): New function.
> >         * gcc.dg/align-2.c: Only run on targets with natural alignment
> >         of vector types.
> >         * gcc.dg/vect/slp-25.c: Adjust tests for targets without natural
> >         alignment of vector types.


> > OK for mainline?
> 
> Ok.

Would it be OK to backport this to 4.7 and possibly 4.6?

This patch represents a change in the ABI on ARM (the alignment could
potentially affect struct member offsets, for example), which could
conceivably cause incompatibilities with code compiled with older
versions of GCC.  We had originally decided we nevertheless want to
implement this change on ARM, because:

- GCC is now in compliance with the platform ABI document
- the old code could actually be buggy since GCC *assumed* 16-byte
  alignment that wasn't actually guaranteed
- code actually affected by this change ought to be rare (code using
  NEON vector types is rare in the first place, code using *structure
  members* of such types is even rarer, and code using such structures
  in cross-module APIs seems to be extremely rare)

Nevertheless, given we do want to make this change, it would be best
to roll it out as quickly as possible, to minimize the time period
where people might use old (not yet fixed) compilers to generate
non-ABI-compliant binaries.  Thus, we think it would be good for
the change to be applied to all still open release branches as well.

(Note that while the patch contains changes to common code, those
should be no-ops for all targets that do not implement the new hook.)

Bye,
Ulrich

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

  parent reply	other threads:[~2012-08-07 14:57 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-11 13:39 [RFC] " Richard Earnshaw
2012-06-11 14:19 ` Richard Guenther
2012-06-11 14:46   ` Richard Earnshaw
2012-06-11 14:53     ` Richard Guenther
2012-06-11 15:38       ` Richard Earnshaw
2012-06-11 18:37         ` Richard Guenther
2012-07-27 15:36           ` [PATCH v2] " Ulrich Weigand
2012-07-30  3:15             ` Hans-Peter Nilsson
2012-07-30 11:12             ` Richard Guenther
2012-07-30 14:44               ` Ulrich Weigand
2012-08-07 14:57               ` Ulrich Weigand [this message]
2012-08-07 15:04                 ` [RFA 4.7/4.6] " Richard Guenther
2012-08-07 15:09                   ` Richard Earnshaw
2012-08-07 15:15                   ` Ramana Radhakrishnan
2012-08-10 13:44                     ` [RFA wwwdocs] " Ulrich Weigand
2012-08-10 14:57                       ` Richard Earnshaw
2012-08-10 15:18                         ` Ulrich Weigand
2012-08-10 16:07                           ` Richard Earnshaw
2012-08-10 16:28                             ` Ulrich Weigand
2012-08-10 13:30                   ` [commit 4.7] " Ulrich Weigand
2012-08-10 13:31                   ` [commit 4.6] " Ulrich Weigand
2012-06-11 23:05 ` [RFC] " Hans-Peter Nilsson
2012-07-24 17:39   ` Ulrich Weigand
2012-07-26  0:10     ` Hans-Peter Nilsson

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=201208071456.q77EucUF024143@d06av02.portsmouth.uk.ibm.com \
    --to=uweigand@de.ibm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=ramana.radhakrishnan@linaro.org \
    --cc=rearnsha@arm.com \
    --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).