aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssanames.c
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2021-09-13 10:37:49 -0700
committerIan Lance Taylor <iant@golang.org>2021-09-13 10:37:49 -0700
commite252b51ccde010cbd2a146485d8045103cd99533 (patch)
treee060f101cdc32bf5e520de8e5275db9d4236b74c /gcc/tree-ssanames.c
parentf10c7c4596dda99d2ee872c995ae4aeda65adbdf (diff)
parent104c05c5284b7822d770ee51a7d91946c7e56d50 (diff)
downloadgcc-e252b51ccde010cbd2a146485d8045103cd99533.zip
gcc-e252b51ccde010cbd2a146485d8045103cd99533.tar.gz
gcc-e252b51ccde010cbd2a146485d8045103cd99533.tar.bz2
Merge from trunk revision 104c05c5284b7822d770ee51a7d91946c7e56d50.
Diffstat (limited to 'gcc/tree-ssanames.c')
-rw-r--r--gcc/tree-ssanames.c73
1 files changed, 0 insertions, 73 deletions
diff --git a/gcc/tree-ssanames.c b/gcc/tree-ssanames.c
index 51a26d2..2165ad7 100644
--- a/gcc/tree-ssanames.c
+++ b/gcc/tree-ssanames.c
@@ -423,60 +423,6 @@ set_range_info (tree name, const value_range &vr)
set_range_info (name, vr.kind (), min, max);
}
-/* Gets range information MIN, MAX and returns enum value_range_kind
- corresponding to tree ssa_name NAME. enum value_range_kind returned
- is used to determine if MIN and MAX are valid values. */
-
-enum value_range_kind
-get_range_info (const_tree expr, wide_int *min, wide_int *max)
-{
- gcc_assert (!POINTER_TYPE_P (TREE_TYPE (expr)));
- gcc_assert (min && max);
- if (TREE_CODE (expr) == INTEGER_CST)
- {
- *min = wi::to_wide (expr);
- *max = *min;
- return VR_RANGE;
- }
- if (TREE_CODE (expr) != SSA_NAME)
- return VR_VARYING;
-
- range_info_def *ri = SSA_NAME_RANGE_INFO (expr);
-
- /* Return VR_VARYING for SSA_NAMEs with NULL RANGE_INFO or SSA_NAMEs
- with integral types width > 2 * HOST_BITS_PER_WIDE_INT precision. */
- if (!ri || (GET_MODE_PRECISION (SCALAR_INT_TYPE_MODE (TREE_TYPE (expr)))
- > 2 * HOST_BITS_PER_WIDE_INT))
- return VR_VARYING;
-
- *min = ri->get_min ();
- *max = ri->get_max ();
- return SSA_NAME_RANGE_TYPE (expr);
-}
-
-/* Gets range information corresponding to ssa_name NAME and stores it
- in a value_range VR. Returns the value_range_kind. */
-
-enum value_range_kind
-get_range_info (const_tree name, irange &vr)
-{
- tree min, max;
- wide_int wmin, wmax;
- enum value_range_kind kind = get_range_info (name, &wmin, &wmax);
-
- if (kind == VR_VARYING)
- vr.set_varying (TREE_TYPE (name));
- else if (kind == VR_UNDEFINED)
- vr.set_undefined ();
- else
- {
- min = wide_int_to_tree (TREE_TYPE (name), wmin);
- max = wide_int_to_tree (TREE_TYPE (name), wmax);
- vr.set (min, max, kind);
- }
- return kind;
-}
-
/* Set nonnull attribute to pointer NAME. */
void
@@ -487,25 +433,6 @@ set_ptr_nonnull (tree name)
pi->pt.null = 0;
}
-/* Return nonnull attribute of pointer NAME. */
-bool
-get_ptr_nonnull (const_tree name)
-{
- gcc_assert (POINTER_TYPE_P (TREE_TYPE (name)));
- struct ptr_info_def *pi = SSA_NAME_PTR_INFO (name);
- if (pi == NULL)
- return false;
- /* TODO Now pt->null is conservatively set to true in PTA
- analysis. vrp is the only pass (including ipa-vrp)
- that clears pt.null via set_ptr_nonull when it knows
- for sure. PTA will preserves the pt.null value set by VRP.
-
- When PTA analysis is improved, pt.anything, pt.nonlocal
- and pt.escaped may also has to be considered before
- deciding that pointer cannot point to NULL. */
- return !pi->pt.null;
-}
-
/* Change non-zero bits bitmask of NAME. */
void