On Tue, Apr 18, 2023 at 01:33:47PM +0200, Aldy Hernandez wrote:
> > > + const irange &r = as_a (v);
> > > + if (r.varying_p ())
> > > + hstate.add_int (VR_VARYING);
> > > + else
> > > + hstate.add_int (VR_RANGE);
> >
> > Shouldn't this also
> >hstate.add_int (r.num_pairs ()
On 4/18/23 12:59, Jakub Jelinek wrote:
On Tue, Apr 18, 2023 at 12:50:58PM +0200, Aldy Hernandez wrote:
--- a/gcc/value-range.cc
+++ b/gcc/value-range.cc
@@ -232,6 +232,58 @@ vrange::dump (FILE *file) const
pp_flush (&buffer);
}
+namespace inchash
+{
+
+void
+add_vrange (const vrange
On Tue, Apr 18, 2023 at 12:50:58PM +0200, Aldy Hernandez wrote:
> --- a/gcc/value-range.cc
> +++ b/gcc/value-range.cc
> @@ -232,6 +232,58 @@ vrange::dump (FILE *file) const
>pp_flush (&buffer);
> }
>
> +namespace inchash
> +{
> +
> +void
> +add_vrange (const vrange &v, inchash::hash &hstate,
On 4/18/23 12:32, Jakub Jelinek wrote:
On Tue, Apr 18, 2023 at 11:33:05AM +0200, Jakub Jelinek wrote:
On Tue, Apr 18, 2023 at 11:06:38AM +0200, Aldy Hernandez via Gcc-patches wrote:
This patch provides inchash support for vrange. It is along the lines
of the streaming support I just posted a
On Tue, Apr 18, 2023 at 11:33:05AM +0200, Jakub Jelinek wrote:
> On Tue, Apr 18, 2023 at 11:06:38AM +0200, Aldy Hernandez via Gcc-patches
> wrote:
> > This patch provides inchash support for vrange. It is along the lines
> > of the streaming support I just posted and will be used for IPA
> > hash
On Tue, Apr 18, 2023 at 11:06:38AM +0200, Aldy Hernandez via Gcc-patches wrote:
> This patch provides inchash support for vrange. It is along the lines
> of the streaming support I just posted and will be used for IPA
> hashing of ranges.
>
> Thoughts?
>
> gcc/ChangeLog:
>
> * inchash.cc
+namespace inchash
+{
+
+void
+add_vrange (const vrange &v, inchash::hash &hstate,
+unsigned int)
+{
+ if (v.undefined_p ())
+{
+ hstate.add_int (VR_UNDEFINED);
+ return;
+}
+ // Types are ignored throughout to inhibit two ranges being equal
+ // but having differe