erichkeane added a comment.

In D126642#3547496 <https://reviews.llvm.org/D126642#3547496>, @sdesmalen wrote:

> In D126642#3547284 <https://reviews.llvm.org/D126642#3547284>, @erichkeane 
> wrote:
>
>> I'm not sure I'm grokking hte difference between the ExtraBitfields and 
>> ExtParamInfos here.
>
> The reason I repurposed the bit was because I previously tried adding a bit 
> to `unsigned ExtInfo : 13;` but that fails
>
>   static_assert(sizeof(*this) <= 8 + sizeof(ExtQualsTypeCommonBase), 
> "changing bitfields changed sizeof(Type)!");

Right, yeah.  One thing to consider: `ExtInfo` was 'first', and so it got to 
keep the 'in bitfield bits'. However, much of what is in there is, IMO, not 
something that is used often enough to be worth having in there.  Of the bits 
being used there, I think 'NoReturn' is the only one used with any regularity 
(other than perhaps 'this call' in Windows-32-bit machines).  I wonder if we 
should consider moving as much of that as possible over.

> so perhaps incorrectly I assumed I couldn't add any new bits to FunctionType 
> and thought I'd repurpose this one bit, because it's only ever used for 
> FunctionProtoType (never for FunctionNoProtoType).
>
> But I now realised I can just add an extra bit, so that we can leave this bit 
> as-is. What do you think?

I think there is probably value to that, yes.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D126642/new/

https://reviews.llvm.org/D126642

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to