[llvm] r238655 - [MC] Reorder MCSymbol members to reduce padding.

Rafael EspĂ­ndola rafael.espindola at gmail.com
Sat May 30 07:04:26 PDT 2015


Thanks!
On May 30, 2015 9:58 AM, "Benjamin Kramer" <benny.kra at googlemail.com> wrote:

> Author: d0k
> Date: Sat May 30 08:52:30 2015
> New Revision: 238655
>
> URL: http://llvm.org/viewvc/llvm-project?rev=238655&view=rev
> Log:
> [MC] Reorder MCSymbol members to reduce padding.
>
> sizeof(MCSymbol) goes from 72 to 64 bytes on x86_64.
>
> Modified:
>     llvm/trunk/include/llvm/MC/MCSymbol.h
>
> Modified: llvm/trunk/include/llvm/MC/MCSymbol.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCSymbol.h?rev=238655&r1=238654&r2=238655&view=diff
>
> ==============================================================================
> --- llvm/trunk/include/llvm/MC/MCSymbol.h (original)
> +++ llvm/trunk/include/llvm/MC/MCSymbol.h Sat May 30 08:52:30 2015
> @@ -72,11 +72,6 @@ class MCSymbol {
>    /// symbol has no size this field will be NULL.
>    const MCExpr *SymbolSize = nullptr;
>
> -  /// The alignment of the symbol, if it is 'common', or -1.
> -  //
> -  // FIXME: Pack this in with other fields?
> -  unsigned CommonAlign = -1U;
> -
>    union {
>      /// The offset to apply to the fragment address to form this symbol's
> value.
>      uint64_t Offset;
> @@ -85,6 +80,11 @@ class MCSymbol {
>      uint64_t CommonSize;
>    };
>
> +  /// The alignment of the symbol, if it is 'common', or -1.
> +  //
> +  // FIXME: Pack this in with other fields?
> +  unsigned CommonAlign = -1U;
> +
>    /// The Flags field is used by object file implementations to store
>    /// additional per symbol information which is not easily classified.
>    mutable uint32_t Flags = 0;
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150530/7222a40e/attachment.html>


More information about the llvm-commits mailing list