Re: [PATCH] constexprify some tree variables

2023-01-26 Thread Jakub Jelinek via Gcc-patches
On Thu, Jan 26, 2023 at 03:51:07PM +0100, Jakub Jelinek via Gcc-patches wrote: > On Thu, Jan 26, 2023 at 09:45:35AM -0500, Patrick Palka via Gcc-patches wrote: > > > -extern const unsigned char tree_code_length[]; > > > + > > > +#define DEFTREECODE(SYM, NAME, TYPE, LENGTH) LENGTH, > > > +#define

Re: [PATCH] constexprify some tree variables

2023-01-26 Thread Jakub Jelinek via Gcc-patches
On Thu, Jan 26, 2023 at 09:45:35AM -0500, Patrick Palka via Gcc-patches wrote: > > -extern const unsigned char tree_code_length[]; > > + > > +#define DEFTREECODE(SYM, NAME, TYPE, LENGTH) LENGTH, > > +#define END_OF_BASE_TREE_CODES 0, > > +constexpr unsigned char tree_code_length[] = { > >

Re: [PATCH] constexprify some tree variables

2023-01-26 Thread Patrick Palka via Gcc-patches
On Fri, 18 Nov 2022, apinski--- via Gcc-patches wrote: > From: Andrew Pinski > > Since we use C++11 by default now, we can > use constexpr for some const decls in tree-core.h. > > This patch does that and it allows for better optimizations > of GCC code with checking enabled and without LTO. >

Re: [PATCH] constexprify some tree variables

2022-11-19 Thread Jeff Law via Gcc-patches
On 11/18/22 19:53, Andrew Pinski wrote: On Fri, Nov 18, 2022 at 12:06 PM Jeff Law via Gcc-patches wrote: On 11/18/22 11:05, apinski--- via Gcc-patches wrote: From: Andrew Pinski Since we use C++11 by default now, we can use constexpr for some const decls in tree-core.h. This patch does

Re: [PATCH] constexprify some tree variables

2022-11-18 Thread Andrew Pinski via Gcc-patches
On Fri, Nov 18, 2022 at 12:06 PM Jeff Law via Gcc-patches wrote: > > > On 11/18/22 11:05, apinski--- via Gcc-patches wrote: > > From: Andrew Pinski > > > > Since we use C++11 by default now, we can > > use constexpr for some const decls in tree-core.h. > > > > This patch does that and it allows

Re: [PATCH] constexprify some tree variables

2022-11-18 Thread Jeff Law via Gcc-patches
On 11/18/22 11:05, apinski--- via Gcc-patches wrote: From: Andrew Pinski Since we use C++11 by default now, we can use constexpr for some const decls in tree-core.h. This patch does that and it allows for better optimizations of GCC code with checking enabled and without LTO. For an

[PATCH] constexprify some tree variables

2022-11-18 Thread apinski--- via Gcc-patches
From: Andrew Pinski Since we use C++11 by default now, we can use constexpr for some const decls in tree-core.h. This patch does that and it allows for better optimizations of GCC code with checking enabled and without LTO. For an example generic-match.cc compiling is speed up due to the less