From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28808 invoked by alias); 4 Mar 2011 14:30:47 -0000 Received: (qmail 28798 invoked by uid 22791); 4 Mar 2011 14:30:46 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-iw0-f175.google.com (HELO mail-iw0-f175.google.com) (209.85.214.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 04 Mar 2011 14:30:36 +0000 Received: by iwn10 with SMTP id 10so2225427iwn.20 for ; Fri, 04 Mar 2011 06:30:34 -0800 (PST) MIME-Version: 1.0 Received: by 10.43.63.66 with SMTP id xd2mr923334icb.76.1299249034156; Fri, 04 Mar 2011 06:30:34 -0800 (PST) Received: by 10.231.10.201 with HTTP; Fri, 4 Mar 2011 06:30:34 -0800 (PST) In-Reply-To: References: Date: Fri, 04 Mar 2011 14:30:00 -0000 Message-ID: Subject: Re: [2/2] Reducing the overhead of dwarf2 location tracking From: Richard Guenther To: gcc-patches@gcc.gnu.org, patches@linaro.org, richard.sandiford@linaro.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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-03/txt/msg00200.txt.bz2 On Fri, Mar 4, 2011 at 2:56 PM, Richard Sandiford wrote: > Suppose we have a function F that is inlined several times. =A0Suppose too > that F has a local variable X, and that no "real" (as opposed to debug) > references to X remain after pre-inlining optimisations. =A0In this case, > we will add X to BLOCK_NONLOCALIZED_VARS rather than duplicate it each > time F is inlined. =A0Location notes for each inlining of F will then > refer to the same non-localised X decl. =A0This in turn means that each > inlining of F has the same location list for X, with the list specifying > the location of X for all inlinings of F. > > Jakub confirms that this indeed the intended behaviour, and I haven't > seen any problem with the output. Hm, but isn't it incorrect debug info? I would have expected this non-localized var to be the abstract origin of a copy for location list purposes. Well, for static inline int foo (int p) { int q =3D p; return q; } int bar1 (int i) { return foo (i); } int bar2 (int j) { return foo (j); } I don't even see location lists for q, but maybe I'm blind ;) Richard.