From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 71099 invoked by alias); 8 May 2015 15:22:31 -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 71085 invoked by uid 89); 8 May 2015 15:22:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.1 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 08 May 2015 15:22:29 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id 6E26FAC7D1; Fri, 8 May 2015 15:22:28 +0000 (UTC) Received: from reynosa.quesejoda.com (vpn-62-176.rdu2.redhat.com [10.10.62.176]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t48FMR6Y026048; Fri, 8 May 2015 11:22:27 -0400 Message-ID: <554CD4B2.3020509@redhat.com> Date: Fri, 08 May 2015 15:22:00 -0000 From: Aldy Hernandez User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Richard Biener , Eric Botcazou CC: GCC Patches Subject: Re: [patch 1/10] debug-early merge: Ada front-end References: <554C0417.8020300@redhat.com> <6819186.gzK1HFtdtl@polaris> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2015-05/txt/msg00687.txt.bz2 On 05/08/2015 03:35 AM, Richard Biener wrote: > On Fri, May 8, 2015 at 12:26 PM, Eric Botcazou wrote: >>> @@ -5204,28 +5199,6 @@ gnat_write_global_declarations (void) >>> types_used_by_var_decl_insert (t, dummy_global); >>> } >>> } >>> - >>> - /* Output debug information for all global type declarations first. This >>> - ensures that global types whose compilation hasn't been finalized >>> yet, - for example pointers to Taft amendment types, have their >>> compilation - finalized in the right context. */ >>> - FOR_EACH_VEC_SAFE_ELT (global_decls, i, iter) >>> - if (TREE_CODE (iter) == TYPE_DECL && !DECL_IGNORED_P (iter)) >>> - debug_hooks->global_decl (iter); > > Shouldn't that have used ->type_decl (iter) anyway? That is, are they not > already processed via rest_of_type_compilation or does the Ada FE not > use that? My question exactly. Perhaps that was my confusion. Why is this using ->global_decl? For example, the C front-end uses rest_of_type_compilation (see finish_struct() in c/c-decl.c) which calls ->type_decl(), or it calls ->type_decl() from record_builtin_type(). > >>> - /* Proceed to optimize and emit assembly. */ >>> - symtab->finalize_compilation_unit (); >>> - >>> - /* After cgraph has had a chance to emit everything that's going to >>> - be emitted, output debug information for the rest of globals. */ >>> - if (!seen_error ()) >>> - { >>> - timevar_push (TV_SYMOUT); >>> - FOR_EACH_VEC_SAFE_ELT (global_decls, i, iter) >>> - if (TREE_CODE (iter) != TYPE_DECL && !DECL_IGNORED_P (iter)) >>> - debug_hooks->global_decl (iter); >>> - timevar_pop (TV_SYMOUT); >>> - } >>> } >> >> What's the replacement mechanism for the first pass on global_decls? The >> comment explains that generating debug info must be delayed in this case. > > But yes, I don't think the patches add any replacement for processing > TYPE_DECLs that happen to be in global_decls. I can put the code back, but calling ->type_decl()? Assuming you folks (Ada) don't want to use rest_of_type_compilation(). Aldy