Commit 838bdb35 by Kazu Hirata Committed by Kazu Hirata

tree-vrp.c (maybe_add_assert_expr): Don't assert ASSERT_EXPRs for single-use variable.

	* tree-vrp.c (maybe_add_assert_expr): Don't assert
	ASSERT_EXPRs for single-use variable.

From-SVN: r98278
parent 30abf793
......@@ -3,6 +3,9 @@
* tree-vrp.c (compare_values): Check that VAL1 and VAL2 are
both pointers or both integers.
* tree-vrp.c (maybe_add_assert_expr): Don't assert
ASSERT_EXPRs for single-use variable.
2005-04-17 Richard Sandiford <rsandifo@redhat.com>
* config/mips/iris6.h (DRIVER_SELF_SPECS): Check -march as well as
......
......@@ -1446,6 +1446,14 @@ maybe_add_assert_expr (basic_block bb)
{
tree cond;
/* If OP is used only once, namely in this STMT, don't
bother inserting an ASSERT_EXPR for it. Such an
ASSERT_EXPR would do nothing but increase compile time.
Experiments show that with this simple check, we can save
more than 20% of ASSERT_EXPRs. */
if (has_single_use (op))
continue;
SET_BIT (found, SSA_NAME_VERSION (op));
cond = infer_value_range (stmt, op);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment