diff options
author | Andrew Pinski <andrew_pinski@playstation.sony.com> | 2007-08-20 07:42:55 +0000 |
---|---|---|
committer | Andrew Pinski <pinskia@gcc.gnu.org> | 2007-08-20 00:42:55 -0700 |
commit | a9eafe819c64a5f6dbc52dbe908ca680de8ca103 (patch) | |
tree | d3d8854762eccbab4fae6d8c86b3a9bad23068eb /gcc/tree-inline.c | |
parent | 5a4ac6841c58e0e0fa97c46f363736728c029215 (diff) | |
download | gcc-a9eafe819c64a5f6dbc52dbe908ca680de8ca103.zip gcc-a9eafe819c64a5f6dbc52dbe908ca680de8ca103.tar.gz gcc-a9eafe819c64a5f6dbc52dbe908ca680de8ca103.tar.bz2 |
re PR tree-optimization/30564 (ice for legal code with -O3)
2007-08-20 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR middle-end/30564
* tree-inline.c (optimize_inline_calls): Move the cgraph checking
code in front of the compacting of basic blocks.
Move the folding of statements inbetween the cgraph checking
and compacting of basic blocks.
2007-08-20 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR middle-end/30564
* gcc.c-torture/compile/pr30564-1.c: New test.
* gcc.c-torture/compile/pr30564-2.c: New test.
From-SVN: r127638
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r-- | gcc/tree-inline.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index 3609480..c078166 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -2823,10 +2823,6 @@ optimize_inline_calls (tree fn) gimple_expand_calls_inline (bb, &id); pop_gimplify_context (NULL); - /* Renumber the (code) basic_blocks consecutively. */ - compact_blocks (); - /* Renumber the lexical scoping (non-code) blocks consecutively. */ - number_blocks (fn); #ifdef ENABLE_CHECKING { @@ -2839,13 +2835,20 @@ optimize_inline_calls (tree fn) gcc_assert (e->inline_failed); } #endif + + /* Fold the statements before compacting/renumbering the basic blocks. */ + fold_marked_statements (last, id.statements_to_fold); + pointer_set_destroy (id.statements_to_fold); + + /* Renumber the (code) basic_blocks consecutively. */ + compact_blocks (); + /* Renumber the lexical scoping (non-code) blocks consecutively. */ + number_blocks (fn); /* We are not going to maintain the cgraph edges up to date. Kill it so it won't confuse us. */ cgraph_node_remove_callees (id.dst_node); - fold_marked_statements (last, id.statements_to_fold); - pointer_set_destroy (id.statements_to_fold); fold_cond_expr_cond (); if (current_function_has_nonlocal_label) make_nonlocal_label_edges (); |