This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: DATA_ALIGNMENT vs. DECL_USER_ALIGNMENT
- From: David Edelsohn <dje at watson dot ibm dot com>
- To: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- Cc: gcc-patches at gcc dot gnu dot org, gcc at gcc dot gnu dot org
- Date: Thu, 10 Apr 2003 17:50:57 -0400
- Subject: Re: DATA_ALIGNMENT vs. DECL_USER_ALIGNMENT
>>>>> Richard Kenner writes:
Richard> The issue isn't *minimum*, but *exact*. The front end needs to know what
Richard> the alignment for a particular type will be. Yes, it is possible for it
Richard> to make on-the-fly calls to the back end to lay out types incrementally, but
Richard> that's a very difficult thing to do due to dependencies of types on variables.
Richard> It's not clear it's worth it.
I am sorry that I was not clear enough in my previous response.
1) If the front-end has to specify USER_ALIGN so that the alignment is
static and the backend will not modify the alignment,
2) and the front-end is allowed to align the type more strictly,
3) and the target has minimum alignment requirements,
then it seems that the front-end needs to know the minimum alignment so
that it does not specify USER_ALIGN which conflicts with the target
requirements. The front-end will use USER_ALIGN and will specify an exact
alignment, but the alignment will be compatible with the target's own
minimum alignment requirements.
David