From 07aee51bcca17ced904c5175705b72795b0c914c Mon Sep 17 00:00:00 2001 From: rguenth Date: Tue, 22 Sep 2009 08:30:34 +0000 Subject: 2009-09-22 Richard Guenther * tree-ssa-propagate.h (ssa_prop_fold_stmt_fn): Declare. (substitute_and_fold): Adjust prototype. * tree-vrp.c (vrp_evaluate_conditional): Make static. (simplify_stmt_using_ranges): Likewise. (fold_predicate_in): Move here from tree-ssa-propagate.c. (vrp_fold_stmt): New function. (vrp_finalize): Pass it to substitute_and_fold. * tree-flow.h (vrp_evaluate_conditional): Remove. (simplify_stmt_using_ranges): Likewise. * tree-ssa-ccp.c (ccp_finalize): Adjust call to substitute_and_fold. * tree-ssa-copy.c (fini_copy_prop): Likewise. * tree-ssa-propagate.c (struct prop_stats_d): Rename num_pred_folded member. (fold_predicate_in): Move to tree-vrp.c. (substitute_and_fold): Use the callback instead of calling into tree-vrp.c functions directly. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151968 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree-ssa-propagate.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gcc/tree-ssa-propagate.h') diff --git a/gcc/tree-ssa-propagate.h b/gcc/tree-ssa-propagate.h index 3c267247717..e8f4f03dfb3 100644 --- a/gcc/tree-ssa-propagate.h +++ b/gcc/tree-ssa-propagate.h @@ -110,6 +110,7 @@ typedef struct value_range_d value_range_t; /* Call-back functions used by the value propagation engine. */ typedef enum ssa_prop_result (*ssa_prop_visit_stmt_fn) (gimple, edge *, tree *); typedef enum ssa_prop_result (*ssa_prop_visit_phi_fn) (gimple); +typedef bool (*ssa_prop_fold_stmt_fn) (gimple_stmt_iterator *gsi); /* In tree-ssa-propagate.c */ @@ -119,6 +120,6 @@ bool valid_gimple_call_p (tree); void move_ssa_defining_stmt_for_defs (gimple, gimple); bool update_call_from_tree (gimple_stmt_iterator *, tree); bool stmt_makes_single_store (gimple); -bool substitute_and_fold (prop_value_t *, bool); +bool substitute_and_fold (prop_value_t *, ssa_prop_fold_stmt_fn); #endif /* _TREE_SSA_PROPAGATE_H */ -- cgit v1.2.1