This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]