[LLVMdev] fields in structure re-arranged for alignment?
Holger Schurig
hs4233 at mail.mn-solutions.de
Mon Jul 16 01:50:51 PDT 2007
> For example would this structure on a 32-bit machine:
>
> { i16, i32, i16 }
>
> get re-arranged to
>
> { i16, i16, i32 } or { i32, i16, i16 }
If there will ever be a re-arrangement mechanism in the future,
then LLVM needs some way to encode the equivalent of the
packed/align attributes of GCC.
Sometimes it is OK to re-arrange, e.g. for things that are "just"
structs. Sometimes it's very bad to re-arrange, e.g. for
structures that have 1:1 representations in hardware, e.g. when
you communicate an USB URB or a WLAN packet.
More information about the llvm-dev
mailing list