[patch][PR10367] Fix the design of GlobalAlias

Duncan P. N. Exon Smith dexonsmith at apple.com
Tue May 13 11:03:07 PDT 2014


On 2014-May-13, at 10:31, Rafael EspĂ­ndola <rafael.espindola at gmail.com> wrote:

>> It was nice that `Alignment` was packed in here before.
>> 
>> I wonder if it's worth the complexity of storing `Alignment` in
>> `GlobalValue`, even though it's only valid for `GlobalObject`?  Maybe
>> using the `Value::SubclassData` model?  I'm not sure how much this
>> bloat matters (1M globals => 8 MB).
> 
> Probably. This revised patch fixes the style issue and uses the parent
> padding bits.
> 
> The sizes I get with the patch on x86_64 are:
> 
> Constant:       56
> GlobalValue:    64
> GlobalObject:   88
> GlobalVariable: 112
> Function:       152
> 
> Without the patch they are
> 
> Constant:       56
> GlobalValue:    88
> GlobalObject:   X
> GlobalVariable: 112
> Function:       152
> 
> Cheers,
> Rafael
> <llvm-1.patch>

Nice.  LGTM.



More information about the llvm-commits mailing list