diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-09-01 14:37:52 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-09-01 14:37:52 +0000 |
commit | 2193544ef363a21c1312afb8b877b39bb81a017e (patch) | |
tree | 0d26fd11397c9b6e1e2da0ef0abcefda20d1f05a /gcc/tree-vrp.c | |
parent | 8ef1f1cb71e25d9b963834faaa88e24d496d0552 (diff) | |
download | gcc-2193544ef363a21c1312afb8b877b39bb81a017e.tar.gz |
Force block enders to be simulated once.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151273 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-vrp.c')
-rw-r--r-- | gcc/tree-vrp.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c index 5379b7555ac..237245e761c 100644 --- a/gcc/tree-vrp.c +++ b/gcc/tree-vrp.c @@ -5317,7 +5317,12 @@ vrp_initialize (void) { gimple stmt = gsi_stmt (si); - if (!stmt_interesting_for_vrp (stmt)) + /* 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)) + prop_set_simulate_again (stmt, true); + else if (!stmt_interesting_for_vrp (stmt)) { ssa_op_iter i; tree def; @@ -5326,9 +5331,7 @@ vrp_initialize (void) prop_set_simulate_again (stmt, false); } else - { - prop_set_simulate_again (stmt, true); - } + prop_set_simulate_again (stmt, true); } } } @@ -6087,7 +6090,9 @@ vrp_visit_stmt (gimple stmt, edge *taken_edge_p, tree *output_p) fprintf (dump_file, "\n"); } - if (is_gimple_assign (stmt) || is_gimple_call (stmt)) + if (!stmt_interesting_for_vrp (stmt)) + gcc_assert (stmt_ends_bb_p (stmt)); + else if (is_gimple_assign (stmt) || is_gimple_call (stmt)) { /* In general, assignments with virtual operands are not useful for deriving ranges, with the obvious exception of calls to |