From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23296 invoked by alias); 16 Jan 2015 10:55:39 -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 23282 invoked by uid 89); 16 Jan 2015 10:55:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-ob0-f174.google.com Received: from mail-ob0-f174.google.com (HELO mail-ob0-f174.google.com) (209.85.214.174) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Fri, 16 Jan 2015 10:55:37 +0000 Received: by mail-ob0-f174.google.com with SMTP id wo20so8426224obc.5 for ; Fri, 16 Jan 2015 02:55:35 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.182.94.133 with SMTP id dc5mr9110156obb.32.1421405735264; Fri, 16 Jan 2015 02:55:35 -0800 (PST) Received: by 10.76.69.196 with HTTP; Fri, 16 Jan 2015 02:55:35 -0800 (PST) In-Reply-To: <54B88149.1040906@redhat.com> References: <54B87E5B.1090502@redhat.com> <54B88149.1040906@redhat.com> Date: Fri, 16 Jan 2015 11:03:00 -0000 Message-ID: Subject: Re: [debug-early] C++ clones and limbo DIEs From: Richard Biener To: Jason Merrill Cc: Aldy Hernandez , gcc-patches Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-01/txt/msg01321.txt.bz2 On Fri, Jan 16, 2015 at 4:11 AM, Jason Merrill wrote: > On 01/15/2015 09:58 PM, Aldy Hernandez wrote: >> >> The attached patch generates early DIEs for the C++ >> clones in the C++ parser. > > > This strikes me as an unnecessary abstraction violation. I'd hope that in the very distant future all early DIEs would be "created" by the frontends (that is, dwarf2out.c wouldn't walk into parents/siblings so much). >> + /* Emit debug information for clones. */ >> + symtab_node *node; >> + FOR_EACH_DEFINED_SYMBOL (node) >> + if (DECL_ABSTRACT_ORIGIN (node->decl)) >> + debug_hooks->early_global_decl (DECL_ABSTRACT_ORIGIN (node->decl)); > > > And I note that you aren't even doing anything with the clone here, which > suggests even more strongly that this is not what we want to do. There must be a better place in the frontend to call early_global_decl for those? Maybe the point where we create the clone? >> Now back to limbdo_die_list... My approach is to flush the limbo list, >> generically, after the front-ends have finished, by adding a new >> "early_finish" debug hook. This gets rid of any permanence into LTO >> time. Then I flush it out again, if the middle end (or LTO, etc) has >> added any limbo DIEs. > > > Can you remove the first flush and just do it in the second place? I hoped we wouldn't need the limbo list at all ... that is, parent DIEs are always present when we create children. I think that should work in principle if the frontends would create DIEs while parsing. Note that dwarf2out forces parent DIE creation in some cases but not in some others - it would be interesting to sort out which parent DIEs it thinks it cannot create when we create the DIE for a sibling. Maybe it's just poor ordering of early_global_decl calls? Richard. > Jason >