[LLVMdev] PROPOSAL: IR representation of detailed struct assignment information

Alex Rosenberg alexr at leftfield.org
Mon Aug 27 11:51:31 PDT 2012


On Aug 27, 2012, at 11:37 AM, gohman at apple.com wrote:

> On Aug 24, 2012, at 5:56 PM, Alex Rosenberg <alexr at leftfield.org> wrote:
> 
> > If we can also describe the alignment padding inserted at the end of a struct when it is placed in an array, then we can improve the current LoopIdiom pass to build more memcpys. I would think that would be attached to the struct definition. 
> 
> Perhaps, though that would be unrelated in implementation and use from
> what I'm working on.

You're describing structure padding and doing so as metadata on memcpy operations. I think it would be better to describe it in the struct definition itself, which is where the end of struct alignment padding I mentioned would also want to be described. Is padding really metadata? One might argue that the end padding is, but between proper elements, it seems quite first-class to me.

+------------------------------------------------------------+
| Alexander M. Rosenberg        <mailto:alexr at leftfield.org> |
| Nobody cares what I say, so no disclaimer appears here.    |





More information about the llvm-dev mailing list