Re: [PATCH v5] c++: extend cold, hot attributes to classes

2023-09-06 Thread Javier Martinez via Gcc-patches
reminder: ready for commit? - Javier On Wed 23. Aug 2023 at 15:02, Javier Martinez < javier.martinez.bugzi...@gmail.com> wrote: > On Tue, Aug 22, 2023 at 7:50 PM Jason Merrill wrote: > > You still need an update to doc/extend.texi for this additional use of > > the attribute. Sorry I didn't

[PATCH v5] c++: extend cold, hot attributes to classes

2023-08-23 Thread Javier Martinez via Gcc-patches
On Tue, Aug 22, 2023 at 7:50 PM Jason Merrill wrote: > You still need an update to doc/extend.texi for this additional use of > the attribute. Sorry I didn't think of that before. I should have caught that too, many thanks. Also addressed the formatting comments. Patch attached.

[PATCH v4] c++: extend cold, hot attributes to classes

2023-08-15 Thread Javier Martinez via Gcc-patches
On Mon, Aug 14, 2023 at 8:32 PM Jason Merrill wrote: > I think you also want to check for ATTR_FLAG_TYPE_IN_PLACE. > [...] > > + propagate_class_warmth_attribute (t); > Maybe call this in check_bases_and_members instead? Yes, that is sensible. Done. Thanks, Javier Signed-off-by: Javier

[PATCH v3] c++: extend cold, hot attributes to classes

2023-08-11 Thread Javier Martinez via Gcc-patches
Hi Jason, Regarding the initialization example - no, the set of classes that we consider cold is more loosely defined. On Thu, Aug 10, 2023 at 11:01 PM Jason Merrill wrote: > Yes, but that's because the implicit op== isn't declared lazily like > some other special member functions

[RFC PATCH v2] c++: extend cold, hot attributes to classes

2023-08-10 Thread Javier Martinez via Gcc-patches
Thanks for the comments, Jason. v2: + Fix formatting, remove unnecessarily warning. On Tue, Aug 8, 2023 at 10:28 PM Jason Merrill wrote: > Seems reasonable, but how do you expect this to be used? We have large applications where some large classes are known to be used only at startup. Marking

[RFC] c++: extend cold, hot attributes to classes

2023-08-03 Thread Javier Martinez via Gcc-patches
Most code is cold. This patch extends support for attribute ((cold)) to C++ Classes, Unions, and Structs (RECORD_TYPES and UNION_TYPES) to benefit from encapsulation - reducing the verbosity of using the attribute where deserved. The ((hot)) attribute is also extended for its semantic relation.