diff options
author | jamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-10-01 11:48:24 +0000 |
---|---|---|
committer | jamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-10-01 11:48:24 +0000 |
commit | b0fb674bbbabe1c89bc528b3ff05ff99e90435e9 (patch) | |
tree | 8886f0e8934210d9bcc586890b5986c4b0124661 /gcc/tree-sra.c | |
parent | 80f96752696cb2e7066add579aec8036e44870a7 (diff) | |
download | gcc-b0fb674bbbabe1c89bc528b3ff05ff99e90435e9.tar.gz |
2009-10-01 Martin Jambor <mjambor@suse.cz>
PR middle-end/12392
* tree-sra.c (convert_callers): Do not call
compute_inline_parameters on one caller more than once.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@152368 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-sra.c')
-rw-r--r-- | gcc/tree-sra.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c index e5b141f289e..3922c22d824 100644 --- a/gcc/tree-sra.c +++ b/gcc/tree-sra.c @@ -3646,6 +3646,7 @@ convert_callers (struct cgraph_node *node, ipa_parm_adjustment_vec adjustments) tree old_cur_fndecl = current_function_decl; struct cgraph_edge *cs; basic_block this_block; + bitmap recomputed_callers = BITMAP_ALLOC (NULL); for (cs = node->callers; cs; cs = cs->next_caller) { @@ -3653,15 +3654,24 @@ convert_callers (struct cgraph_node *node, ipa_parm_adjustment_vec adjustments) push_cfun (DECL_STRUCT_FUNCTION (cs->caller->decl)); if (dump_file) - fprintf (dump_file, "Adjusting call %s -> %s\n", + fprintf (dump_file, "Adjusting call (%i -> %i) %s -> %s\n", + cs->caller->uid, cs->callee->uid, cgraph_node_name (cs->caller), cgraph_node_name (cs->callee)); ipa_modify_call_arguments (cs, cs->call_stmt, adjustments); - compute_inline_parameters (cs->caller); pop_cfun (); } + + for (cs = node->callers; cs; cs = cs->next_caller) + if (!bitmap_bit_p (recomputed_callers, cs->caller->uid)) + { + compute_inline_parameters (cs->caller); + bitmap_set_bit (recomputed_callers, cs->caller->uid); + } + BITMAP_FREE (recomputed_callers); + current_function_decl = old_cur_fndecl; FOR_EACH_BB (this_block) { |