diff options
author | Kazu Hirata <kazu@cs.umass.edu> | 2004-10-28 02:56:50 +0000 |
---|---|---|
committer | Kazu Hirata <kazu@gcc.gnu.org> | 2004-10-28 02:56:50 +0000 |
commit | 269da1e916910bcac1ddb8d82fba86eb5d0fc419 (patch) | |
tree | 1074891cf9cb826c113cc1053ac87841b2391ec8 /gcc | |
parent | 425834072ea3ccf0da56e91e31260c1e240dd050 (diff) | |
download | gcc-269da1e916910bcac1ddb8d82fba86eb5d0fc419.zip gcc-269da1e916910bcac1ddb8d82fba86eb5d0fc419.tar.gz gcc-269da1e916910bcac1ddb8d82fba86eb5d0fc419.tar.bz2 |
tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Use EDGE_COUNT instead of GOTO_DESTINATION.
* tree-ssa-dce.c (mark_stmt_if_obviously_necessary)
<COND_EXPR>: Use EDGE_COUNT instead of GOTO_DESTINATION.
From-SVN: r89729
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/tree-ssa-dce.c | 12 |
2 files changed, 6 insertions, 11 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 07ac74a..dd448d1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2004-10-28 Kazu Hirata <kazu@cs.umass.edu> + + * tree-ssa-dce.c (mark_stmt_if_obviously_necessary) + <COND_EXPR>: Use EDGE_COUNT instead of GOTO_DESTINATION. + 2004-10-28 Joseph S. Myers <jsm@polyomino.org.uk> * doc/contrib.texi, doc/cpp.texi, doc/cppopts.texi, diff --git a/gcc/tree-ssa-dce.c b/gcc/tree-ssa-dce.c index 563a99b..47038ad 100644 --- a/gcc/tree-ssa-dce.c +++ b/gcc/tree-ssa-dce.c @@ -330,17 +330,7 @@ mark_stmt_if_obviously_necessary (tree stmt, bool aggressive) return; case COND_EXPR: - if (GOTO_DESTINATION (COND_EXPR_THEN (stmt)) - == GOTO_DESTINATION (COND_EXPR_ELSE (stmt))) - { - /* A COND_EXPR is obviously dead if the target labels are the same. - We cannot kill the statement at this point, so to prevent the - statement from being marked necessary, we replace the condition - with a constant. The stmt is killed later on in cfg_cleanup. */ - COND_EXPR_COND (stmt) = integer_zero_node; - modify_stmt (stmt); - return; - } + gcc_assert (EDGE_COUNT (bb_for_stmt (stmt)->succs) == 2); /* Fall through. */ case SWITCH_EXPR: |