This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [2/2] Reducing the overhead of dwarf2 location tracking
- From: Jakub Jelinek <jakub at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org, patches at linaro dot org, richard dot sandiford at linaro dot org
- Date: Fri, 4 Mar 2011 16:22:05 +0100
- Subject: Re: [2/2] Reducing the overhead of dwarf2 location tracking
- References: <g4aahbvviw.fsf@linaro.org>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Fri, Mar 04, 2011 at 01:56:55PM +0000, Richard Sandiford wrote:
> * dwarf2out.c (dw_loc_list_node): Add resolved_addr and replaced.
> (cached_dw_loc_list_def): New structure.
> (cached_dw_loc_list): New typedef.
> (cached_dw_loc_list_table): New variable.
> (cached_dw_loc_list_table_hash): New function.
> (cached_dw_loc_list_table_eq): Likewise.
> (add_location_or_const_value_attribute): Take a bool cache_p.
> Cache the list when the parameter is true.
> (gen_formal_parameter_die): Update caller.
> (gen_variable_die): Likewise.
> (dwarf2out_finish): Likewise.
> (dwarf2out_function_decl): Clear cached_dw_loc_list_table.
> (dwarf2out_init): Initialize cached_dw_loc_list_table.
> (resolve_addr): Cache the result of resolving a chain of
> location lists.
I think you should handle the cached_dw_loc_list_table in
dwarf2out_abstract_function similarly to say decl_loc_table, i.e.
save/clear for the duration of the of recursive dwarf2out_decl
call, restore afterwards and in the places where you actually use
it guard it also with cached_dw_loc_list_table != NULL.
Jakub