DATA_ALIGNMENT vs. DECL_USER_ALIGNMENT

David Edelsohn dje@watson.ibm.com
Thu Apr 10 21:52:00 GMT 2003


>>>>> 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



More information about the Gcc-patches mailing list