]> git.ipfire.org Git - people/ms/gcc.git/commit
Add a return value to intersect and speed it up.
authorAndrew MacLeod <amacleod@redhat.com>
Mon, 9 May 2022 17:20:06 +0000 (13:20 -0400)
committerAndrew MacLeod <amacleod@redhat.com>
Fri, 13 May 2022 14:42:52 +0000 (10:42 -0400)
commit1d3d7e88aac0db20a4b59044f9b7cd35e847e8d3
tree931a3a72b17c8f3e164180cee85c5c336c966604
parent98e475a8f58ca3ba6e9bd5c9276efce4236f5d26
Add a return value to intersect and speed it up.

Return true if the intersection of ranges changed the original value.
Speed up the case when there is no change by calling an efficient
contains routine.

* value-range.cc (irange::legacy_verbose_intersect): Add return value.
(irange::irange_contains_p): New.
(irange::irange_intersect): Add return value.
* value-range.h (class irange): Adjust prototypes.
gcc/value-range.cc
gcc/value-range.h