aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>2017-11-09 16:04:20 -0700
committerJeff Law <law@gcc.gnu.org>2017-11-09 16:04:20 -0700
commitf2a7f77b2da15227e2f97a75a16cd8fdd3612d85 (patch)
tree5a231d399f1655ae9f60242dc971a503f9eb4d27 /gcc
parent51308fc3b6cb2d73b52eed78b431a8fd7223c00d (diff)
downloadgcc-f2a7f77b2da15227e2f97a75a16cd8fdd3612d85.zip
gcc-f2a7f77b2da15227e2f97a75a16cd8fdd3612d85.tar.gz
gcc-f2a7f77b2da15227e2f97a75a16cd8fdd3612d85.tar.bz2
tree-vrp.c (vrp_prop): Move class to earlier point in the file.
* tree-vrp.c (vrp_prop): Move class to earlier point in the file. (vrp_folder): Likewise. From-SVN: r254612
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog3
-rw-r--r--gcc/tree-vrp.c28
2 files changed, 17 insertions, 14 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 16bec6e..9b93a85 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,8 @@
2017-11-09 Jeff Law <law@redhat.com>
+ * tree-vrp.c (vrp_prop): Move class to earlier point in the file.
+ (vrp_folder): Likewise.
+
* tree-vrp.c (set_value_range): Do not reference vrp_equiv_obstack.
Get it from the existing bitmap instead.
(vrp_intersect_ranges_1): Likewise.
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c
index 8e86b06..fc9ad4a 100644
--- a/gcc/tree-vrp.c
+++ b/gcc/tree-vrp.c
@@ -6635,6 +6635,13 @@ insert_range_assertions (void)
BITMAP_FREE (need_assert_for);
}
+class vrp_prop : public ssa_propagation_engine
+{
+ public:
+ enum ssa_prop_result visit_stmt (gimple *, edge *, tree *) FINAL OVERRIDE;
+ enum ssa_prop_result visit_phi (gphi *) FINAL OVERRIDE;
+};
+
/* Checks one ARRAY_REF in REF, located at LOCUS. Ignores flexible arrays
and "struct" hacks. If VRP can determine that the
array subscript is a constant, check if it is outside valid
@@ -8066,13 +8073,6 @@ extract_range_from_stmt (gimple *stmt, edge *taken_edge_p,
vrp_visit_switch_stmt (as_a <gswitch *> (stmt), taken_edge_p);
}
-class vrp_prop : public ssa_propagation_engine
-{
- public:
- enum ssa_prop_result visit_stmt (gimple *, edge *, tree *) FINAL OVERRIDE;
- enum ssa_prop_result visit_phi (gphi *) FINAL OVERRIDE;
-};
-
/* Evaluate statement STMT. If the statement produces a useful range,
return SSA_PROP_INTERESTING and record the SSA name with the
interesting range into *OUTPUT_P.
@@ -10450,6 +10450,13 @@ simplify_stmt_using_ranges (gimple_stmt_iterator *gsi)
return false;
}
+class vrp_folder : public substitute_and_fold_engine
+{
+ public:
+ tree get_value (tree) FINAL OVERRIDE;
+ bool fold_stmt (gimple_stmt_iterator *) FINAL OVERRIDE;
+};
+
/* If the statement pointed by SI has a predicate whose value can be
computed using the value range information computed by VRP, compute
its value and return true. Otherwise, return false. */
@@ -10512,13 +10519,6 @@ fold_predicate_in (gimple_stmt_iterator *si)
return false;
}
-class vrp_folder : public substitute_and_fold_engine
-{
- public:
- tree get_value (tree) FINAL OVERRIDE;
- bool fold_stmt (gimple_stmt_iterator *) FINAL OVERRIDE;
-};
-
/* Callback for substitute_and_fold folding the stmt at *SI. */
bool