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 ?
On Tue, 2003-12-23 at 01:07, Yossi Markovich wrote:
> 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?
Not in the RTL. There is no array information in RTL. However, the
MEM_EXPR field will sometimes take you to the original decl that the MEM
rtl represents. If this decl is present, then you can examine it for
decl and/or type alignment, and from that you may be able to get back to
the original array alignment. I doubt that you can do much interesting
with this info at the RTL level though. RTL is too low level for
interesting array optimizations.
> What about this? Knowledge about the alignment of stack frames could be
> used
> to infer alignment properties of local variables, for example.
I believe we already do this. STACK_BOUNDARY is used in a number of
places to set alignment of stack pointers and objects.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com