diff options
Diffstat (limited to 'gcc/pointer-query.h')
-rw-r--r-- | gcc/pointer-query.h | 39 |
1 files changed, 18 insertions, 21 deletions
diff --git a/gcc/pointer-query.h b/gcc/pointer-query.h index fbea331..82cb81b 100644 --- a/gcc/pointer-query.h +++ b/gcc/pointer-query.h @@ -61,8 +61,7 @@ class pointer_query; struct access_ref { /* Set the bounds of the reference. */ - access_ref (range_query *query = nullptr, tree = NULL_TREE, - gimple * = nullptr, bool = false); + access_ref (); /* Return the PHI node REF refers to or null if it doesn't. */ gphi *phi () const; @@ -129,11 +128,6 @@ struct access_ref offset_int sizrng[2]; /* The minimum and maximum offset computed. */ offset_int offmax[2]; - /* Range of the bound of the access: denotes that the access - is at least BNDRNG[0] bytes but no more than BNDRNG[1]. - For string functions the size of the actual access is - further constrained by the length of the string. */ - offset_int bndrng[2]; /* Used to fold integer expressions when called from front ends. */ tree (*eval)(tree); @@ -206,23 +200,18 @@ struct access_data { /* Set the access to at most MAXWRITE and MAXREAD bytes, and at least 1 when MINWRITE or MINREAD, respectively, is set. */ - access_data (range_query *query, gimple *stmt, access_mode mode, - tree maxwrite = NULL_TREE, bool minwrite = false, - tree maxread = NULL_TREE, bool minread = false) - : stmt (stmt), call (), - dst (query, maxwrite, stmt, minwrite), - src (query, maxread, stmt, minread), - mode (mode) { } + access_data (range_query *, gimple *, access_mode, + tree = NULL_TREE, bool = false, + tree = NULL_TREE, bool = false); /* Set the access to at most MAXWRITE and MAXREAD bytes, and at least 1 when MINWRITE or MINREAD, respectively, is set. */ - access_data (range_query *query, tree expr, access_mode mode, - tree maxwrite = NULL_TREE, bool minwrite = false, - tree maxread = NULL_TREE, bool minread = false) - : stmt (), call (expr), - dst (query, maxwrite, nullptr, minwrite), - src (query, maxread, nullptr, minread), - mode (mode) { } + access_data (range_query *, tree, access_mode, + tree = NULL_TREE, bool = false, + tree = NULL_TREE, bool = false); + + /* Constructor helper. */ + static void set_bound (offset_int[2], tree, bool, range_query *, gimple *); /* Access statement. */ gimple *stmt; @@ -230,6 +219,14 @@ struct access_data tree call; /* Destination and source of the access. */ access_ref dst, src; + + /* Range of the bound of the access: denotes that the access is at + least XXX_BNDRNG[0] bytes but no more than XXX_BNDRNG[1]. For + string functions the size of the actual access is further + constrained by the length of the string. */ + offset_int dst_bndrng[2]; + offset_int src_bndrng[2]; + /* Read-only for functions like memcmp or strlen, write-only for memset, read-write for memcpy or strcat. */ access_mode mode; |