diff options
author | Richard Henderson <rth@redhat.com> | 2009-09-01 07:37:52 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2009-09-01 07:37:52 -0700 |
commit | cd6ea7a2df112ac0a9e1afb01aef3b70b354f829 (patch) | |
tree | 0d26fd11397c9b6e1e2da0ef0abcefda20d1f05a /gcc/tree-ssa-ccp.c | |
parent | fd58da50fd14dff9640caf4b3a760d880d270f45 (diff) | |
download | gcc-cd6ea7a2df112ac0a9e1afb01aef3b70b354f829.zip gcc-cd6ea7a2df112ac0a9e1afb01aef3b70b354f829.tar.gz gcc-cd6ea7a2df112ac0a9e1afb01aef3b70b354f829.tar.bz2 |
Force block enders to be simulated once.
From-SVN: r151273
Diffstat (limited to 'gcc/tree-ssa-ccp.c')
-rw-r--r-- | gcc/tree-ssa-ccp.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c index b359d4c..949c4b5 100644 --- a/gcc/tree-ssa-ccp.c +++ b/gcc/tree-ssa-ccp.c @@ -650,7 +650,15 @@ ccp_initialize (void) for (i = gsi_start_bb (bb); !gsi_end_p (i); gsi_next (&i)) { gimple stmt = gsi_stmt (i); - bool is_varying = surely_varying_stmt_p (stmt); + bool is_varying; + + /* If the statement is a control insn, then we do not + want to avoid simulating the statement once. Failure + to do so means that those edges will never get added. */ + if (stmt_ends_bb_p (stmt)) + is_varying = false; + else + is_varying = surely_varying_stmt_p (stmt); if (is_varying) { |