diff options
author | Kazu Hirata <kazu@cs.umass.edu> | 2005-04-17 17:57:10 +0000 |
---|---|---|
committer | Kazu Hirata <kazu@gcc.gnu.org> | 2005-04-17 17:57:10 +0000 |
commit | 838bdb354907cc5bc648ebc97a658dc4288cbea3 (patch) | |
tree | 6780e4789ad5be47442116df69fb1ac9b3a2fbae /gcc | |
parent | 30abf79348ff8927f4069bf8c48693afd658556f (diff) | |
download | gcc-838bdb354907cc5bc648ebc97a658dc4288cbea3.zip gcc-838bdb354907cc5bc648ebc97a658dc4288cbea3.tar.gz gcc-838bdb354907cc5bc648ebc97a658dc4288cbea3.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/tree-vrp.c | 8 |
2 files changed, 11 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8cf5ee3..ed75fa9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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 diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c index 3bb4a6b..bb68df6 100644 --- a/gcc/tree-vrp.c +++ b/gcc/tree-vrp.c @@ -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); |