This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: How to determine access alignment in RTL ?
- From: Yossi Markovich <YOSSIM at il dot ibm dot com>
- To: Jim Wilson <wilson at specifixinc dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 23 Dec 2003 11:07:22 +0200
- Subject: Re: How to determine access alignment in RTL ?
Jim Wilson wrote:
>Attribute align does not work that way for arrays. ints have size 32
>bits, and thus a random array element has only 32-bit alignment. Even
>if we align the base address of A to 128 bits, A[1] is that address plus
>32-bits, and thus can only have 32-bit alignment. If you want each
>array element to have 128-bit alignment, then the array elements must
>each be 128-bits in size.
I see; so is there some other attribute at the RTL level which provides
alignment-of-arrays information, similar to that which is available in
trees?
>>In certain cases (e.g. allocations on the stack) the compiler can infer
>>alignment properties of variables, or enforce them. Is such inference or
>>enforcement available, or planned?
What about this? Knowledge about the alignment of stack frames could be
used
to infer alignment properties of local variables, for example.
yossi