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: [PATCH][RFC] Conservative alignment extraction & propagation (2nd try)


On Sun, 8 Aug 2010, Eric Botcazou wrote:

> > Align is the power-of-two alignment of the pointer in bytes if
> > misaligned == 0.  When misaligned is != 0 then the lower bits
> > of the pointer up to the alignment will be equal to it.
> 
> Is the couple unique when misaligned is != 0? I mean, if (A1, MA1) is a valid 
> couple, then (A1 << 1, MA1 | (ptr & A1)) is too.  If so, how do you pick A1?

A1 is the biggest alignment we can infer for the base address of the
object ptr points to.  Thus, if ptr points somewhere inside a decl
it will be at most DECL_ALIGN_UNIT.  If it points somewhere inside
allocated storage it will be at most MALLOC_ABI_ALIGNMENT.

Richard.


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