Re: vector alignment

2019-04-17 Thread Joseph Myers
On Wed, 3 Apr 2019, Richard Biener wrote: > > 1) Is there some reason to align vectors on the same boundary > > as their size no matter how big it is? I can't find such > > a requirement in the ABIs I looked at. Or would it be more > > appropriate to align the big ones on the preferr

Re: vector alignment

2019-04-04 Thread Martin Sebor
On 4/3/19 11:40 PM, Richard Biener wrote: On April 3, 2019 7:59:47 PM GMT+02:00, Martin Sebor wrote: On 4/3/19 5:13 AM, Richard Biener wrote: On Tue, Apr 2, 2019 at 6:20 PM Martin Sebor wrote: GCC tries to align a vector on its natural boundary, i.e., that given by its size, up to MAX_OBJEC

Re: vector alignment

2019-04-03 Thread Richard Biener
ow do you suggest to deal with it? (Presumably for GCC 10.) >Issuing an ABI warning and adding an option to override >the new setting come to mind as possible mitigating solutions. We could reject these vector types in aggregates in favor of arrays. Of course that ship has sailed... &

Re: vector alignment

2019-04-03 Thread Martin Sebor
0.) Issuing an ABI warning and adding an option to override the new setting come to mind as possible mitigating solutions. 2) If not, is it then appropriate to underalign very large vectors on a boundary less than their size? Yes. Ack. 3) Should the aligned attribute not override t

Re: vector alignment

2019-04-03 Thread Richard Biener
If not, is it then appropriate to underalign very large > vectors on a boundary less than their size? Yes. > 3) Should the aligned attribute not override the default vector > alignment? Yes, but doesn't it already? > I would like to think the answer to (1) is that vectors sho

vector alignment

2019-04-02 Thread Martin Sebor
oes it make more sense to align a 64KB vector on a 64KB boundary than on, say, a 64-byte boundary (or some other boundary less than 64K?) 2) If not, is it then appropriate to underalign very large vectors on a boundary less than their size? 3) Should the aligned attribute not override t

Re: Vector alignment tracking

2011-10-14 Thread Richard Guenther
On Thu, Oct 13, 2011 at 6:57 PM, Andi Kleen wrote: >> Or I am missing someting? > > I often see the x86 vectorizer with -mtune=generic generate a lot of > complicated code just to adjust for potential misalignment. > > My thought was just if the alias oracle knows what the original > declaration i

Re: Vector alignment tracking

2011-10-13 Thread Jakub Jelinek
On Thu, Oct 13, 2011 at 06:57:47PM +0200, Andi Kleen wrote: > > Or I am missing someting? > > I often see the x86 vectorizer with -mtune=generic generate a lot of > complicated code just to adjust for potential misalignment. > > My thought was just if the alias oracle knows what the original > de

Re: Vector alignment tracking

2011-10-13 Thread Andi Kleen
> Or I am missing someting? I often see the x86 vectorizer with -mtune=generic generate a lot of complicated code just to adjust for potential misalignment. My thought was just if the alias oracle knows what the original declaration is, and it's available for changes (e.g. LTO), it would be like

Re: Vector alignment tracking

2011-10-13 Thread Artem Shinkarov
On Thu, Oct 13, 2011 at 4:54 PM, Andi Kleen wrote: > Artem Shinkarov writes: >> >> 1) Currently in C we cannot provide information that an array is >> aligned to a certain number.  The problem is hidden in the fact, that > > Have you considered doing it the other way round: when an optimization >

Re: Vector alignment tracking

2011-10-13 Thread Andi Kleen
Artem Shinkarov writes: > > 1) Currently in C we cannot provide information that an array is > aligned to a certain number. The problem is hidden in the fact, that Have you considered doing it the other way round: when an optimization needs something to be aligned, make the declaration aligned?

Vector alignment tracking

2011-10-13 Thread Artem Shinkarov
Hi I would like to share some plans about improving the situation with vector alignment tracking. First of all, I would like to start with a well-known bug: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50716. There are several aspects of the problem: 1) We would like to avoid the quiet

Re: vector alignment question

2005-06-08 Thread Steve Ellcey
> On Wed, Jun 08, 2005 at 12:50:32PM -0700, Steve Ellcey wrote: > > I noticed that vectors are always aligned based on their size, i.e. an > > 8 byte vector has an aligment of 8 bytes, 16 byte vectors an alignment > > of 16, a 256 byte vector an alignment of 256, etc. > > > > Is this really inten

Re: vector alignment question

2005-06-08 Thread Richard Henderson
On Wed, Jun 08, 2005 at 12:50:32PM -0700, Steve Ellcey wrote: > I noticed that vectors are always aligned based on their size, i.e. an > 8 byte vector has an aligment of 8 bytes, 16 byte vectors an alignment > of 16, a 256 byte vector an alignment of 256, etc. > > Is this really intended? Yes.

vector alignment question

2005-06-08 Thread Steve Ellcey
I noticed that vectors are always aligned based on their size, i.e. an 8 byte vector has an aligment of 8 bytes, 16 byte vectors an alignment of 16, a 256 byte vector an alignment of 256, etc. Is this really intended? I looked in stor-layout.c and found: /* Always naturally align vectors