[PATCH 1/2] Change vec<, , vl_embed>::m_vecdata refrences into address ()

2023-02-24 Thread Richard Biener via Gcc-patches
As preparation to remove m_vecdata in the vl_embed vector this changes references to it into calls to address (). As I was here it also fixes ::contains to avoid repeated bounds checking and the same issue in ::lower_bound which also suffers from unnecessary copying around values. * vec.h

[PATCH 1/2] Change vec<, , vl_embed>::m_vecdata refrences into address ()

2023-02-24 Thread Richard Biener via Gcc-patches
As preparation to remove m_vecdata in the vl_embed vector this changes references to it into calls to address (). As I was here it also fixes ::contains to avoid repeated bounds checking and the same issue in ::lower_bound which also suffers from unnecessary copying around values. * vec.h

Re: [PATCH 1/2] Change vec<, , vl_embed>::m_vecdata refrences into address ()

2023-02-24 Thread Jakub Jelinek via Gcc-patches
On Fri, Feb 24, 2023 at 12:32:45PM +0100, Richard Biener via Gcc-patches wrote: > --- a/gcc/vec.h > +++ b/gcc/vec.h > @@ -614,7 +614,7 @@ public: >T *bsearch (const void *key, int (*compar)(const void *, const void *)); >T *bsearch (const void *key, > int (*compar)(const void *,

Re: [PATCH 1/2] Change vec<, , vl_embed>::m_vecdata refrences into address ()

2023-02-24 Thread Richard Biener via Gcc-patches
On Fri, 24 Feb 2023, Jakub Jelinek wrote: > On Fri, Feb 24, 2023 at 12:32:45PM +0100, Richard Biener via Gcc-patches > wrote: > > --- a/gcc/vec.h > > +++ b/gcc/vec.h > > @@ -614,7 +614,7 @@ public: > >T *bsearch (const void *key, int (*compar)(const void *, const void *)); > >T *bsearch (

Re: [PATCH 1/2] Change vec<,,vl_embed>::m_vecdata refrences into address ()

2023-02-24 Thread Jakub Jelinek via Gcc-patches
On Fri, Feb 24, 2023 at 02:46:21PM +0100, Richard Biener wrote: > As preparation to remove m_vecdata in the vl_embed vector this > changes references to it into calls to address (). > > As I was here it also fixes ::contains to avoid repeated bounds > checking and the same issue in ::lower_bound w