This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch 1/10] debug-early merge: Ada front-end
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Eric Botcazou <ebotcazou at adacore dot com>
- Cc: Aldy Hernandez <aldyh at redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 8 May 2015 12:35:17 +0200
- Subject: Re: [patch 1/10] debug-early merge: Ada front-end
- Authentication-results: sourceware.org; auth=none
- References: <554C0417 dot 8020300 at redhat dot com> <6819186 dot gzK1HFtdtl at polaris>
On Fri, May 8, 2015 at 12:26 PM, Eric Botcazou <ebotcazou@adacore.com> 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?
>> - /* 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.
Richard.
> --
> Eric Botcazou