aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vrp.c
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>2017-11-22 17:04:07 -0700
committerJeff Law <law@gcc.gnu.org>2017-11-22 17:04:07 -0700
commit3e406d3330ca865244cd867572cdd02627a8757a (patch)
tree3dda1b044f1ae730bf711bfbf9af55eafb61a65f /gcc/tree-vrp.c
parentd057fdc8e968b701df4e50be2a823f3f9a54e60e (diff)
downloadgcc-3e406d3330ca865244cd867572cdd02627a8757a.zip
gcc-3e406d3330ca865244cd867572cdd02627a8757a.tar.gz
gcc-3e406d3330ca865244cd867572cdd02627a8757a.tar.bz2
gimple-ssa-evrp-analyze.c (evrp_range_analyzer::try_find_new_range): Use new method allocate_value_range rather than accessing the...
* gimple-ssa-evrp-analyze.c (evrp_range_analyzer::try_find_new_range): Use new method allocate_value_range rather than accessing the vrp_value_range_pool data member directly. * tree-vrp.c (simplify_stmt_for_jump_threading): Tweak slightly to use extract_range_from_stmt method to avoid need for extract_range_from_assignment method. (vrp_prop::vrp_finalize): Use set_lattice_propagation_complete method rather than setting values_propgated data member directly. * vr-values.h (class vr_values): Privatize vrp_value_range_pool, and values propagated data members and extract_range_from_assignment method. Reorder private data members to conform to standards. Add new methods set_lattice_propagation_complete and allocate_value_range. From-SVN: r255086
Diffstat (limited to 'gcc/tree-vrp.c')
-rw-r--r--gcc/tree-vrp.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c
index ea56e9d..5f9baa3 100644
--- a/gcc/tree-vrp.c
+++ b/gcc/tree-vrp.c
@@ -6580,14 +6580,17 @@ simplify_stmt_for_jump_threading (gimple *stmt, gimple *within_stmt,
if (gassign *assign_stmt = dyn_cast <gassign *> (stmt))
{
- value_range new_vr = VR_INITIALIZER;
tree lhs = gimple_assign_lhs (assign_stmt);
-
if (TREE_CODE (lhs) == SSA_NAME
&& (INTEGRAL_TYPE_P (TREE_TYPE (lhs))
- || POINTER_TYPE_P (TREE_TYPE (lhs))))
+ || POINTER_TYPE_P (TREE_TYPE (lhs)))
+ && stmt_interesting_for_vrp (stmt))
{
- vr_values->extract_range_from_assignment (&new_vr, assign_stmt);
+ edge dummy_e;
+ tree dummy_tree;
+ value_range new_vr = VR_INITIALIZER;
+ vr_values->extract_range_from_stmt (stmt, &dummy_e,
+ &dummy_tree, &new_vr);
if (range_int_cst_singleton_p (&new_vr))
return new_vr.min;
}
@@ -6755,7 +6758,8 @@ vrp_prop::vrp_finalize (bool warn_array_bounds_p)
{
size_t i;
- vr_values.values_propagated = true;
+ /* We have completed propagating through the lattice. */
+ vr_values.set_lattice_propagation_complete ();
if (dump_file)
{