------- Comment #28 from jamborm at gcc dot gnu dot org 2009-09-18 15:52 ------- (In reply to comment #27) > Today we regressed with the introduction of IPA-SRA at -O2 and -O3: >
The problem is that I call compute_inline_parameters() whenever I change a single call site, even when the caller is the same. The following patch (which I am about to bootstrap and test) should fix that: 2009-09-18 Martin Jambor <mjam...@suse.cz> * tree-sra.c (convert_callers): Do not call compute_inline_parameters on one caller more than once. Index: mine/gcc/tree-sra.c =================================================================== --- mine.orig/gcc/tree-sra.c 2009-09-18 14:53:07.000000000 +0200 +++ mine/gcc/tree-sra.c 2009-09-18 17:26:57.000000000 +0200 @@ -3637,6 +3637,7 @@ convert_callers (struct cgraph_node *nod 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) { @@ -3644,15 +3645,24 @@ convert_callers (struct cgraph_node *nod 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) { -- jamborm at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC|mjambor at suse dot cz |jamborm at gcc dot gnu dot | |org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12392