From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30452 invoked by alias); 22 Jul 2006 17:13:03 -0000 Received: (qmail 30296 invoked by alias); 22 Jul 2006 17:12:47 -0000 Date: Sat, 22 Jul 2006 17:13:00 -0000 Message-ID: <20060722171247.30295.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug rtl-optimization/28071] [4.1/4.2 regression] A file that can not be compiled in reasonable time/space In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "hubicka at ucw dot cz" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-07/txt/msg01701.txt.bz2 List-Id: ------- Comment #11 from hubicka at ucw dot cz 2006-07-22 17:12 ------- Subject: Re: [4.1/4.2 regression] A file that can not be compiled in reasonable time/space Hi, this avoids inliner to produce quadratically many STMT list nodes, so inlining is now resonably fast. Next offenders are alias info, PRE, regmove, global alloc and schedulers. Index: tree-cfg.c =================================================================== *** tree-cfg.c (revision 115645) --- tree-cfg.c (working copy) *************** tree_redirect_edge_and_branch_force (edg *** 4158,4164 **** static basic_block tree_split_block (basic_block bb, void *stmt) { ! block_stmt_iterator bsi, bsi_tgt; tree act; basic_block new_bb; edge e; --- 4158,4165 ---- static basic_block tree_split_block (basic_block bb, void *stmt) { ! block_stmt_iterator bsi; ! tree_stmt_iterator tsi_tgt; tree act; basic_block new_bb; edge e; *************** tree_split_block (basic_block bb, void * *** 4192,4204 **** } } ! bsi_tgt = bsi_start (new_bb); ! while (!bsi_end_p (bsi)) ! { ! act = bsi_stmt (bsi); ! bsi_remove (&bsi, false); ! bsi_insert_after (&bsi_tgt, act, BSI_NEW_STMT); ! } return new_bb; } --- 4193,4209 ---- } } ! if (bsi_end_p (bsi)) ! return new_bb; ! ! /* Split the statement list - avoid re-creating new containers as this ! brings ugly quadratic memory consumption in the inliner. ! (We are still quadratic since we need to update stmt BB pointers, ! sadly) */ ! new_bb->stmt_list = tsi_split_statement_list_before (&bsi.tsi); ! for (tsi_tgt = tsi_start (new_bb->stmt_list); ! !tsi_end_p (tsi_tgt); tsi_next (&tsi_tgt)) ! set_bb_for_stmt (tsi_stmt (tsi_tgt), new_bb); return new_bb; } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28071