aboutsummaryrefslogtreecommitdiff
path: root/gcc/value-range.h
diff options
context:
space:
mode:
authorAndrew MacLeod <amacleod@redhat.com>2023-10-23 14:52:45 -0400
committerAndrew MacLeod <amacleod@redhat.com>2023-10-25 09:49:02 -0400
commitf7dbf6230453c76a19921607601eff968bb70169 (patch)
treebe671a3a10272cb3b487f0130623ca4777c4850a /gcc/value-range.h
parent4912418dc1b51d49aca5982c6a2061bb912b92b7 (diff)
downloadgcc-f7dbf6230453c76a19921607601eff968bb70169.zip
gcc-f7dbf6230453c76a19921607601eff968bb70169.tar.gz
gcc-f7dbf6230453c76a19921607601eff968bb70169.tar.bz2
Faster irange union for appending ranges.
A common pattern to to append a range to an existing range via union. This optimizes that process. * value-range.cc (irange::union_append): New. (irange::union_): Call union_append when appropriate. * value-range.h (irange::union_append): New prototype.
Diffstat (limited to 'gcc/value-range.h')
-rw-r--r--gcc/value-range.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/value-range.h b/gcc/value-range.h
index c00b151..e9d81d2 100644
--- a/gcc/value-range.h
+++ b/gcc/value-range.h
@@ -339,6 +339,7 @@ private:
bool set_range_from_bitmask ();
bool intersect (const wide_int& lb, const wide_int& ub);
+ bool union_append (const irange &r);
unsigned char m_num_ranges;
bool m_resizable;
unsigned char m_max_ranges;