From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32675 invoked by alias); 8 Jul 2011 09:05:32 -0000 Received: (qmail 32665 invoked by uid 22791); 8 Jul 2011 09:05:31 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mailout-de.gmx.net (HELO mailout-de.gmx.net) (213.165.64.22) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Fri, 08 Jul 2011 09:05:18 +0000 Received: (qmail invoked by alias); 08 Jul 2011 09:05:15 -0000 Received: from mon.egee-see.org (EHLO [139.91.70.93]) [139.91.70.93] by mail.gmx.net (mp066) with SMTP; 08 Jul 2011 11:05:15 +0200 Date: Fri, 08 Jul 2011 09:09:00 -0000 From: Dimitrios Apostolou To: Jakub Jelinek cc: gcc-patches@gcc.gnu.org, Paolo Bonzini , Steven Bosscher Subject: Re: [df-scan.c] Optimise DF_REFs ordering in collection_rec, use HARD_REG_SETs instead of bitmaps In-Reply-To: <20110708063704.GU2687@tyan-ft48-01.lab.bos.redhat.com> Message-ID: References: <20110708063704.GU2687@tyan-ft48-01.lab.bos.redhat.com> User-Agent: Alpine 2.02 (LNX 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed 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: 2011-07/txt/msg00597.txt.bz2 On Fri, 8 Jul 2011, Jakub Jelinek wrote: > On Fri, Jul 08, 2011 at 06:20:04AM +0300, Dimitrios Apostolou wrote: >> The attached patch does two things for df_get_call_refs(): >> * First it uses HARD_REG_SETs for defs_generated and >> regs_invalidated_by_call, instead of bitmaps. Replacing in total >> more than 400K calls (for my testcase) to bitmap_bit_p() with the >> much faster TEST_HARD_REG_BIT, reduces the total instruction count >> from about 13M to 1.5M. > > Have you verified that collection_rec->def_vec never contains pseudo > register references? Otherwise you couldn't use > HARD_REG_SET... gcc_checking_assert might be useful. > Hi Jakub, Steve pointed me to the following from GCC Internals Manual: call_insn insns have the same extra fields as insn insns, accessed in the same way and in addition contain a field CALL_INSN_FUNCTION_USAGE, which contains a list (chain of expr_list expressions) containing use and clobber expressions that denote hard registers and MEMs used or clobbered by the called function. So doesn't that mean that for CALL insns it should contain only HARD_REG DEFs? I will ofcourse use an assert to be sure. Thanks, Dimitris