From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30490 invoked by alias); 8 Oct 2004 19:20:48 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 30471 invoked from network); 8 Oct 2004 19:20:47 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 8 Oct 2004 19:20:47 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.10) with ESMTP id i98JKj6Q014594; Fri, 8 Oct 2004 15:20:45 -0400 Received: from [172.16.83.132] (vpn83-132.boston.redhat.com [172.16.83.132]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i98JKir14168; Fri, 8 Oct 2004 15:20:44 -0400 Subject: Re: [PATCH] Fix PR tree-optimization/17724 From: Jeffrey A Law Reply-To: law@redhat.com To: Jakub Jelinek Cc: Kazu Hirata , rth@redhat.com, dnovillo@redhat.com, gcc-patches@gcc.gnu.org In-Reply-To: <20041008053138.GQ31909@devserv.devel.redhat.com> References: <20041007200445.GN31909@devserv.devel.redhat.com> <20041007.181556.07457730.kazu@cs.umass.edu> <20041008053138.GQ31909@devserv.devel.redhat.com> Content-Type: text/plain Organization: Red Hat, Inc Message-Id: <1097263242.4227.4.camel@localhost.localdomain> Mime-Version: 1.0 Date: Fri, 08 Oct 2004 19:32:00 -0000 Content-Transfer-Encoding: 7bit X-SW-Source: 2004-10/txt/msg00767.txt.bz2 On Thu, 2004-10-07 at 23:31, Jakub Jelinek wrote: > On Thu, Oct 07, 2004 at 06:15:56PM -0400, Kazu Hirata wrote: > > Hi Jakub, > > > > > The first patch calls free_dominance_info in cleanup_tree_cfg whenever > > > delete_unreachable_blocks deleted some basic blocks. It should be safe, but > > > might be expensive. > > > > I guess so. thread_jumps, which is called right after > > delete_unreachable_blocks in cleanup_tree_cfg, tries to maintain the > > dominator info, so if you are freeing it, you might want to remove the > > code to maintain it in thread_jumps. > > Yeah, my preferred patch is 3 (recomputing some dominators in > delete_unreachable_blocks). Possibly if that turns out to be too expensive > when there are too many basic blocks as predecessors or successors of > unreachable blocks (that aren't unreachable themselves), we could add > later on some ceiling (the one 3rd of basic blocks below is completely > arbitrary), e.g. > if (nsuccs * 3 > n_basic_blocks) > free_dominance_info (CDI_DOMINATORS); > else > for (i = 0; i < nsuccs; ++i) > recompute one by one; Well, if you want a testcase you might peek at 15524; it's spending over 20% of its time in the tree CFG cleanup code. I haven't looked into what it's doing that is so bloody bad, but it's clearly doing something goofy (I'm up to my eyeballs in driving down the time for DOM for that testcase right now :-) Anyway, the only tidbit I could pass along is that the CFG cleanup time has basically been unchanged, even with Kazu's recent work. Jeff