diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-03-08 17:36:05 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-03-08 17:36:05 +0000 |
commit | a2a1fde2638e7f0ac847a9aaecbbcc522eac2c15 (patch) | |
tree | fa8cc8f84a345de54e6ab532ecec5b191cd7a5ca /gcc/tree-ssa-threadedge.c | |
parent | 4d9301a8521476c8837830fbad62c750e42a11c5 (diff) | |
download | gcc-a2a1fde2638e7f0ac847a9aaecbbcc522eac2c15.tar.gz |
./:
* tree-vrp.c: Include "intl.h".
(usable_range_p): New static function.
(compare_values_warnv): Don't test TYPE_OVERFLOW_UNDEFINED for
overflowed values, juts set *strict_overflow_p.
(compare_values): Only return -2 if one of the operands is not a
constant.
(compare_ranges): Call usable_range_p.
(compare_range_with_value): Likewise.
(vrp_evaluate_conditional_warnv): Rename from
vrp_evaluate_conditional. Make static. Change all callers.
(vrp_evaluate_conditional): New function.
(simplify_div_or_mod_using_ranges): Issue warning about reliance
on signed overflow.
(simplify_abs_using_ranges): Likewise.
(simplify_stmt_for_jump_threading): Add within_stmt parameter.
* tree-ssa-dom.c (simplify_stmt_for_jump_threading): Add
within_stmt parameter.
* tree-ssa-propagate.c (fold_predicate_in): Update call to
vrp_evaluate_conditional.
* tree-ssa-threadedge.c
(record_temporary_equivalences_from_stmts_at_dest): Change
simplify parameter to take a second tree parameter.
(simplify_control_stmt_condition): Likewise.
(thread_across_edge): Likewise.
* tree-flow.h (vrp_evaluate_conditional): Update declaration.
(thread_across_edge): Likewise.
* gcc/Makefile.in (tree-vrp.o): Depend upon intl.h.
testsuite/:
* gcc.dg/no-strict-overflow-5.c: New test.
* gcc.dg/no-strict-overflow-6.c: New test.
* gcc.dg/Wstrict-overflow-11.c: New test.
* gcc.dg/Wstrict-overflow-12.c: New test.
* gcc.dg/Wstrict-overflow-13.c: New test.
* gcc.dg/Wstrict-overflow-14.c: New test.
* gcc.dg/Wstrict-overflow-15.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122706 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-threadedge.c')
-rw-r--r-- | gcc/tree-ssa-threadedge.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/gcc/tree-ssa-threadedge.c b/gcc/tree-ssa-threadedge.c index 72018c02ede..777685af652 100644 --- a/gcc/tree-ssa-threadedge.c +++ b/gcc/tree-ssa-threadedge.c @@ -211,7 +211,8 @@ record_temporary_equivalences_from_phis (edge e, VEC(tree, heap) **stack) static tree record_temporary_equivalences_from_stmts_at_dest (edge e, VEC(tree, heap) **stack, - tree (*simplify) (tree)) + tree (*simplify) (tree, + tree)) { block_stmt_iterator bsi; tree stmt = NULL; @@ -315,7 +316,7 @@ record_temporary_equivalences_from_stmts_at_dest (edge e, cached_lhs = fold (pre_fold_expr); if (TREE_CODE (cached_lhs) != SSA_NAME && !is_gimple_min_invariant (cached_lhs)) - cached_lhs = (*simplify) (stmt); + cached_lhs = (*simplify) (stmt, stmt); } /* Restore the statement's original uses/defs. */ @@ -353,7 +354,7 @@ static tree simplify_control_stmt_condition (edge e, tree stmt, tree dummy_cond, - tree (*simplify) (tree), + tree (*simplify) (tree, tree), bool handle_dominating_asserts) { tree cond, cached_lhs; @@ -439,7 +440,7 @@ simplify_control_stmt_condition (edge e, /* If we have not simplified the condition down to an invariant, then use the pass specific callback to simplify the condition. */ if (! is_gimple_min_invariant (cached_lhs)) - cached_lhs = (*simplify) (dummy_cond); + cached_lhs = (*simplify) (dummy_cond, stmt); } /* We can have conditionals which just test the state of a variable @@ -466,7 +467,7 @@ simplify_control_stmt_condition (edge e, /* If we haven't simplified to an invariant yet, then use the pass specific callback to try and simplify it further. */ if (cached_lhs && ! is_gimple_min_invariant (cached_lhs)) - cached_lhs = (*simplify) (stmt); + cached_lhs = (*simplify) (stmt, stmt); } else cached_lhs = NULL; @@ -494,7 +495,7 @@ thread_across_edge (tree dummy_cond, edge e, bool handle_dominating_asserts, VEC(tree, heap) **stack, - tree (*simplify) (tree)) + tree (*simplify) (tree, tree)) { tree stmt; |