aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vrp.h
diff options
context:
space:
mode:
authorAldy Hernandez <aldyh@redhat.com>2019-08-16 06:54:23 +0000
committerAldy Hernandez <aldyh@gcc.gnu.org>2019-08-16 06:54:23 +0000
commit97ecc8d5769e947e8659d32be51846d40c90f50c (patch)
tree7451af2bf9f9c04582fba7f75cfc275b2619ddbb /gcc/tree-vrp.h
parente3cfbeaf6b655b9c00d77efb8220a8a16341cb2e (diff)
downloadgcc-97ecc8d5769e947e8659d32be51846d40c90f50c.zip
gcc-97ecc8d5769e947e8659d32be51846d40c90f50c.tar.gz
gcc-97ecc8d5769e947e8659d32be51846d40c90f50c.tar.bz2
Add type to VR_VARYING.
From-SVN: r274561
Diffstat (limited to 'gcc/tree-vrp.h')
-rw-r--r--gcc/tree-vrp.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/gcc/tree-vrp.h b/gcc/tree-vrp.h
index b583085..c879a8c 100644
--- a/gcc/tree-vrp.h
+++ b/gcc/tree-vrp.h
@@ -58,7 +58,7 @@ public:
bool constant_p () const;
bool undefined_p () const;
bool varying_p () const;
- void set_varying ();
+ void set_varying (tree type);
void set_undefined ();
void union_ (const value_range_base *);
@@ -75,7 +75,9 @@ public:
bool nonzero_p () const;
bool singleton_p (tree *result = NULL) const;
void dump (FILE *) const;
+ void dump () const;
+ static bool supports_type_p (tree);
value_range_base normalize_symbolics () const;
protected:
@@ -135,7 +137,7 @@ class GTY((user)) value_range : public value_range_base
/* Types of value ranges. */
void set_undefined ();
- void set_varying ();
+ void set_varying (tree);
/* Equivalence bitmap methods. */
bitmap equiv () const;
@@ -145,6 +147,7 @@ class GTY((user)) value_range : public value_range_base
/* Misc methods. */
void deep_copy (const value_range *);
void dump (FILE *) const;
+ void dump () const;
private:
/* Deep-copies bitmap argument. */
@@ -254,6 +257,17 @@ struct assert_info
tree expr;
};
+// Return true if TYPE is a valid type for value_range to operate on.
+// Otherwise return FALSE.
+
+inline bool
+value_range_base::supports_type_p (tree type)
+{
+ if (type && (INTEGRAL_TYPE_P (type) || POINTER_TYPE_P (type)))
+ return type;
+ return NULL;
+}
+
extern void register_edge_assert_for (tree, edge, enum tree_code,
tree, tree, vec<assert_info> &);
extern bool stmt_interesting_for_vrp (gimple *);