From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31881 invoked by alias); 28 Aug 2014 13:58:14 -0000 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 Received: (qmail 31864 invoked by uid 89); 28 Aug 2014 13:58:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-wg0-f46.google.com Received: from mail-wg0-f46.google.com (HELO mail-wg0-f46.google.com) (74.125.82.46) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 28 Aug 2014 13:58:11 +0000 Received: by mail-wg0-f46.google.com with SMTP id x13so791360wgg.5 for ; Thu, 28 Aug 2014 06:58:06 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.180.187.7 with SMTP id fo7mr6433372wic.58.1409234286227; Thu, 28 Aug 2014 06:58:06 -0700 (PDT) Received: by 10.194.20.69 with HTTP; Thu, 28 Aug 2014 06:58:06 -0700 (PDT) In-Reply-To: <53FD45A7.4000804@redhat.com> References: <53FD45A7.4000804@redhat.com> Date: Thu, 28 Aug 2014 13:58:00 -0000 Message-ID: Subject: Re: [debug-early] reuse variable DIEs and fix their context From: Richard Biener To: Aldy Hernandez Cc: gcc-patches Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-08/txt/msg02575.txt.bz2 On Wed, Aug 27, 2014 at 4:42 AM, Aldy Hernandez wrote: > This patch fixes a bunch of guality failures. With it I get 144 guality.exp > failures vs. 163 for "make check-gcc RUNTESTFLAGS=guality.exp". A lot > better than 100% fail rate ;-). > > Variable DIEs were not being reused. Instead, variable DIEs even had the > wrong context (unilaterally the compilation unit). The attached patch > reuses variable DIEs that have been outputted earlier. It also fixes the > context by correcting the context on the second round. > > I have also added a bit field to the DIE structure to record if a DIE has > been generated early. > > Again, this is all a rough draft, but feel free to comment. I wonder if we can't not force a proper context die (ISTR dwarf2out.c lazily handles some contexts in some circumstances). All parent "trees" should be readily available and we should be able to create DIEs for them. Richard. > Committed to branch. > Aldy