From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21674 invoked by alias); 21 Feb 2013 09:59:52 -0000 Received: (qmail 21664 invoked by uid 22791); 21 Feb 2013 09:59:51 -0000 X-SWARE-Spam-Status: No, hits=-5.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-wi0-f181.google.com (HELO mail-wi0-f181.google.com) (209.85.212.181) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 21 Feb 2013 09:59:46 +0000 Received: by mail-wi0-f181.google.com with SMTP id hm6so7325075wib.2 for ; Thu, 21 Feb 2013 01:59:45 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.180.87.170 with SMTP id az10mr38915283wib.3.1361440785004; Thu, 21 Feb 2013 01:59:45 -0800 (PST) Received: by 10.194.56.100 with HTTP; Thu, 21 Feb 2013 01:59:44 -0800 (PST) In-Reply-To: References: Date: Thu, 21 Feb 2013 09:59:00 -0000 Message-ID: Subject: Re: [patch] df-scan: split df_insn_delete for clearer dumps and better speed From: Richard Biener To: Steven Bosscher Cc: GCC Patches , Paolo Bonzini Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2013-02/txt/msg00974.txt.bz2 On Thu, Feb 21, 2013 at 1:10 AM, Steven Bosscher wrote: > Hello, > > The attached patch splits a new function df_insn_info_delete from > df_insn_delete. The original motivation was to get rid of the silly > "deleting insn with uid = ..." messages when re-scanning an insn, > because the mentioned insn isn't deleted at all (it's just rescanned). > But it turns out that there is also a modest but measurable speed-up > (especially at -O0), probably because of avoiding the overhead of > df_grow_bb_info and df_grow_reg_info in common usage of > df_insn_delete. > > Bootstrapped&tested on powerpc64-unknown-linux-gnu and on > x86_64-unknown-linux-gnu. OK for trunk? +/* Delete all of the refs information from the insn with UID. + Internal helper for df_insn_info_delete, df_insn_rescan, and other df_insn_delete I suppose + df-scan routines that don't have to work in deferred mode and don't + have to mark basic blocks for re-processing. */ -void -df_insn_delete (basic_block bb, unsigned int uid) +static void +df_insn_info_delete (unsigned int uid) { +/* Delete all of the refs information from INSN, either right now + or marked for later in deferred mode. + + FIXME: BB must be passed in, to mark the basic block containing + the insn as dirty, but emit-rtl.c doesn't do so. */ you mean the remove_insn call? So it should call df_insn_info_delete instead? It _does_ mark the block as dirtly later, if it is not a debug insn. Your change changes behavior for df->changeable_flags & DF_DEFER_INSN_RESCAN btw, so it needs someone DF aware to review and that makes it stage1 material as well I think. It's also odd how insn_info == NULL is handled here. Richard. > Ciao! > Steven