diff options
author | Jan Hubicka <jh@suse.cz> | 2007-01-12 19:07:57 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2007-01-12 18:07:57 +0000 |
commit | 3d283195f78bbfc85038982de371ab89477e9b63 (patch) | |
tree | b05bf93d2ac070a4af5f7ef1caa2f4637cf25426 /gcc | |
parent | 6270df4c21eb9114e9023f0da513e68cf465553d (diff) | |
download | gcc-3d283195f78bbfc85038982de371ab89477e9b63.zip gcc-3d283195f78bbfc85038982de371ab89477e9b63.tar.gz gcc-3d283195f78bbfc85038982de371ab89477e9b63.tar.bz2 |
re PR middle-end/30443 (4.3 internal compiler error: verify_cgraph_node failed)
PR tree-optimization/30443
* tree-inline.c (tree_function_versioning): Do not optimize when
cloning for inlining.
From-SVN: r120730
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/tree-inline.c | 29 |
2 files changed, 24 insertions, 11 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 00dca63..dcec75d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2007-01-12 Jan Hubicka <jh@suse.cz> + + PR tree-optimization/30443 + * tree-inline.c (tree_function_versioning): Do not optimize when + cloning for inlining. + 2007-01-12 Zdenek Dvorak <dvorakz@suse.cz> * doc/loop.texi: Document recording of loop exits. diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index 3775585..3da2cc2 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -3209,16 +3209,17 @@ tree_function_versioning (tree old_decl, tree new_decl, varray_type tree_map, DECL_ARTIFICIAL (new_decl) = 1; DECL_ABSTRACT_ORIGIN (new_decl) = DECL_ORIGIN (old_decl); + /* Prepare the data structures for the tree copy. */ + memset (&id, 0, sizeof (id)); + /* Generate a new name for the new version. */ if (!update_clones) { DECL_NAME (new_decl) = create_tmp_var_name (NULL); SET_DECL_ASSEMBLER_NAME (new_decl, DECL_NAME (new_decl)); SET_DECL_RTL (new_decl, NULL_RTX); + id.statements_to_fold = pointer_set_create (); } - - /* Prepare the data structures for the tree copy. */ - memset (&id, 0, sizeof (id)); id.decl_map = splay_tree_new (splay_tree_compare_pointers, NULL, NULL); id.src_fn = old_decl; @@ -3233,7 +3234,6 @@ tree_function_versioning (tree old_decl, tree new_decl, varray_type tree_map, id.transform_new_cfg = true; id.transform_return_to_modify = false; id.transform_lang_insert_block = false; - id.statements_to_fold = pointer_set_create (); current_function_decl = new_decl; old_entry_block = ENTRY_BLOCK_PTR_FOR_FUNCTION @@ -3299,18 +3299,25 @@ tree_function_versioning (tree old_decl, tree new_decl, varray_type tree_map, /* Clean up. */ splay_tree_delete (id.decl_map); - fold_marked_statements (0, id.statements_to_fold); - pointer_set_destroy (id.statements_to_fold); - fold_cond_expr_cond (); + if (!update_clones) + { + fold_marked_statements (0, id.statements_to_fold); + pointer_set_destroy (id.statements_to_fold); + fold_cond_expr_cond (); + } if (gimple_in_ssa_p (cfun)) { free_dominance_info (CDI_DOMINATORS); free_dominance_info (CDI_POST_DOMINATORS); - delete_unreachable_blocks (); + if (!update_clones) + delete_unreachable_blocks (); update_ssa (TODO_update_ssa); - fold_cond_expr_cond (); - if (need_ssa_update_p ()) - update_ssa (TODO_update_ssa); + if (!update_clones) + { + fold_cond_expr_cond (); + if (need_ssa_update_p ()) + update_ssa (TODO_update_ssa); + } } free_dominance_info (CDI_DOMINATORS); free_dominance_info (CDI_POST_DOMINATORS); |