Re: [PATCH] Add auto-resizing capability to irange's [PR109695]

2023-05-16 Thread Aldy Hernandez via Gcc-patches
On 5/15/23 20:14, Aldy Hernandez wrote: On 5/15/23 17:07, Aldy Hernandez wrote: On 5/15/23 12:42, Jakub Jelinek wrote: On Mon, May 15, 2023 at 12:35:23PM +0200, Aldy Hernandez wrote: gcc/ChangeLog: PR tree-optimization/109695 * value-range.cc (irange::operator=): Resize range.    

Re: [PATCH] Add auto-resizing capability to irange's [PR109695]

2023-05-15 Thread Aldy Hernandez via Gcc-patches
On 5/15/23 17:07, Aldy Hernandez wrote: On 5/15/23 12:42, Jakub Jelinek wrote: On Mon, May 15, 2023 at 12:35:23PM +0200, Aldy Hernandez wrote: gcc/ChangeLog: PR tree-optimization/109695 * value-range.cc (irange::operator=): Resize range. (irange::union_): Same. (irange::inter

Re: [PATCH] Add auto-resizing capability to irange's [PR109695]

2023-05-15 Thread Aldy Hernandez via Gcc-patches
On Mon, May 15, 2023 at 5:03 PM Aldy Hernandez wrote: > > > > On 5/15/23 13:08, Richard Biener wrote: > > On Mon, May 15, 2023 at 12:35 PM Aldy Hernandez wrote: > >> > >> > >> We can now have int_range for automatically > >> resizable ranges. int_range_max is now int_range<3, true> > >> for a 6

Re: [PATCH] Add auto-resizing capability to irange's [PR109695]

2023-05-15 Thread Aldy Hernandez via Gcc-patches
On 5/15/23 12:42, Jakub Jelinek wrote: On Mon, May 15, 2023 at 12:35:23PM +0200, Aldy Hernandez wrote: gcc/ChangeLog: PR tree-optimization/109695 * value-range.cc (irange::operator=): Resize range. (irange::union_): Same. (irange::intersect): Same. (ir

Re: [PATCH] Add auto-resizing capability to irange's [PR109695]

2023-05-15 Thread Aldy Hernandez via Gcc-patches
On 5/15/23 13:08, Richard Biener wrote: On Mon, May 15, 2023 at 12:35 PM Aldy Hernandez wrote: We can now have int_range for automatically resizable ranges. int_range_max is now int_range<3, true> for a 69X reduction in size from current trunk, and 6.9X reduction from GCC12. This incurs a

Re: [PATCH] Add auto-resizing capability to irange's [PR109695]

2023-05-15 Thread Aldy Hernandez via Gcc-patches
On 5/15/23 16:24, Bernhard Reutner-Fischer wrote: On Mon, 15 May 2023 12:35:23 +0200 Aldy Hernandez via Gcc-patches wrote: +// For resizable ranges, resize the range up to HARD_MAX_RANGES if the +// NEEDED pairs is greater than the current capacity of the range. + +inline void +irange::mayb

Re: [PATCH] Add auto-resizing capability to irange's [PR109695]

2023-05-15 Thread Bernhard Reutner-Fischer via Gcc-patches
On Mon, 15 May 2023 12:35:23 +0200 Aldy Hernandez via Gcc-patches wrote: > +// For resizable ranges, resize the range up to HARD_MAX_RANGES if the > +// NEEDED pairs is greater than the current capacity of the range. > + > +inline void > +irange::maybe_resize (int needed) > +{ > + if (!m_resizab

Re: [PATCH] Add auto-resizing capability to irange's [PR109695]

2023-05-15 Thread Jakub Jelinek via Gcc-patches
On Mon, May 15, 2023 at 01:08:51PM +0200, Richard Biener wrote: > Btw, why's there a trailing underscore for union but not intersect? Because union is a C++ keyword, while intersect is not. Jakub

Re: [PATCH] Add auto-resizing capability to irange's [PR109695]

2023-05-15 Thread Richard Biener via Gcc-patches
On Mon, May 15, 2023 at 12:35 PM Aldy Hernandez wrote: > > > We can now have int_range for automatically > resizable ranges. int_range_max is now int_range<3, true> > for a 69X reduction in size from current trunk, and 6.9X reduction from > GCC12. This incurs a 5% performance penalty for VRP th

Re: [PATCH] Add auto-resizing capability to irange's [PR109695]

2023-05-15 Thread Jakub Jelinek via Gcc-patches
On Mon, May 15, 2023 at 12:35:23PM +0200, Aldy Hernandez wrote: > gcc/ChangeLog: > > PR tree-optimization/109695 > * value-range.cc (irange::operator=): Resize range. > (irange::union_): Same. > (irange::intersect): Same. > (irange::invert): Same. > (int_range_m

[PATCH] Add auto-resizing capability to irange's [PR109695]

2023-05-15 Thread Aldy Hernandez via Gcc-patches
We can now have int_range for automatically resizable ranges. int_range_max is now int_range<3, true> for a 69X reduction in size from current trunk, and 6.9X reduction from GCC12. This incurs a 5% performance penalty for VRP that is more than covered by our > 13% improvements recently. int_ra