[LLVMdev] Alignment for Alloca Inst in llvm 2.6

Arushi Aggarwal arushi987 at gmail.com
Mon Mar 8 18:42:38 PST 2010


On Mon, Mar 8, 2010 at 7:50 PM, me22 <me22.ca at gmail.com> wrote:

> On 8 March 2010 19:51, Arushi Aggarwal <arushi987 at gmail.com> wrote:
> >
> > 2. I notice that the setAlignment method for an AllocaInst takes an
> > unsigned. For 64 bit systems, alignment could potentially be larger. Is
> > there a reason why the alignment should be restricted to this size?
> > Thanks in advance
> >
>
> Would it ever be practical to align a stack variable to an 8 GiB
> boundary?  I'm curious what use case you could think of for aligning
> to 64 KiB or more, since the unsigned is guaranteed to allow at least
> 0x8000.
>

I need objects aligned to the closest(largest) power of two boundary and the
same case also applies to globals.

Arushi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100308/25878933/attachment.html>


More information about the llvm-dev mailing list