This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch 10/10] debug-early merge: compiler proper
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: Aldy Hernandez <aldyh at redhat dot com>
- Cc: Richard Biener <richard dot guenther at gmail dot com>, Jan Hubicka <hubicka at ucw dot cz>, Jason Merrill <jason at redhat dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 20 May 2015 23:01:49 +0200
- Subject: Re: [patch 10/10] debug-early merge: compiler proper
- Authentication-results: sourceware.org; auth=none
- References: <554C060F dot 6000609 at redhat dot com> <CAFiYyc16u2na9VeyMb5cVf4cH=caiBy6PRTJkX9DndzHcFxkBQ at mail dot gmail dot com> <555CAD35 dot 5040304 at redhat dot com> <555CF12C dot 7080300 at redhat dot com>
>
> commit 8824b5ecba26cef065e47b34609c72677c3c36fc
> Author: Aldy Hernandez <aldyh@redhat.com>
> Date: Wed May 20 16:31:14 2015 -0400
>
> Set DECL_IGNORED_P on temporary arrays created in the switch
> conversion pass.
>
> diff --git a/gcc/tree-switch-conversion.c b/gcc/tree-switch-conversion.c
> index 6b68a16..a4bcdba 100644
> --- a/gcc/tree-switch-conversion.c
> +++ b/gcc/tree-switch-conversion.c
> @@ -1097,6 +1097,7 @@ build_one_array (gswitch *swtch, int num, tree
> arr_index_type,
> DECL_ARTIFICIAL (decl) = 1;
> TREE_CONSTANT (decl) = 1;
> TREE_READONLY (decl) = 1;
> + DECL_IGNORED_P (decl) = 1;
> varpool_node::finalize_decl (decl);
This looks obvious enough to me. Technically speaking the array type constructed
probalby should be TREE_ARTIFICAIL, but probably it does not matter.
If you grep for finalize_decl, there are several other calls:
asan.c: varpool_node::finalize_decl (var);
asan.c: varpool_node::finalize_decl (var);
cgraphbuild.c: varpool_node::finalize_decl (decl);
cgraphunit.c: - varpool_finalize_decl
cgraphunit.c: varpool_node::finalize_decl (decl);
cgraphunit.c:varpool_node::finalize_decl (tree decl)
coverage.c: varpool_node::finalize_decl (var);
coverage.c: varpool_node::finalize_decl (var);
coverage.c: varpool_node::finalize_decl (fn_info_ary);
coverage.c: varpool_node::finalize_decl (gcov_info_var);
omp-low.c: varpool_node::finalize_decl (t);
omp-low.c: varpool_node::finalize_decl (t);
omp-low.c: varpool_node::finalize_decl (decl);
omp-low.c: varpool_node::finalize_decl (vars_decl);
omp-low.c: varpool_node::finalize_decl (funcs_decl);
passes.c: varpool_node::finalize_decl (decl);
tree-chkp.c: varpool_node::finalize_decl (var);
tree-chkp.c: varpool_node::finalize_decl (bnd_var);
tree-profile.c: varpool_node::finalize_decl (ic_void_ptr_var);
tree-profile.c: varpool_node::finalize_decl (ic_gcov_type_ptr_var);
tree-switch-conversion.c: varpool_node::finalize_decl (decl);
ubsan.c: varpool_node::finalize_decl (decl);
ubsan.c: varpool_node::finalize_decl (var);
ubsan.c: varpool_node::finalize_decl (array);
varasm.c: varpool_node::finalize_decl (decl);
varpool.c: Unlike finalize_decl function is intended to be used
varpool.c: varpool_node::finalize_decl (decl);
I would say most of them needs similar treatment (I am not 100% sure about OMP
ones that may be user visible)
Honza
>
> fetch = build4 (ARRAY_REF, value_type, decl, tidx, NULL_TREE,