From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6819 invoked by alias); 18 Sep 2009 15:52:30 -0000 Received: (qmail 6736 invoked by uid 48); 18 Sep 2009 15:52:01 -0000 Date: Fri, 18 Sep 2009 15:52:00 -0000 Message-ID: <20090918155201.6735.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug middle-end/12392] very long optimized compile In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "jamborm at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2009-09/txt/msg01711.txt.bz2 ------- 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 * 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