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.
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
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.
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. */
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