dwarf2out tree expression expansion improvements
Jakub Jelinek
jakub@redhat.com
Thu Sep 17 10:32:00 GMT 2009
On Wed, Sep 16, 2009 at 10:02:58PM +0200, Jan Hubicka wrote:
> There are some changes we discussed with Jakub. In particular mem_loc_descriptor
> no longer handles VAR_LOCATION and CONCAT. I also removed existing CONCATN code since
> it is not safe. Declaration handling in loc_list_from_tree is now updated so
> want_address==2 imply loc_descriptor call only that should subsume later handling
> via mem_loc_descriptor in all cases.
>
> OK if Ada/gdb testing passes?
Making sure it works well with Ada before committing is certainly desirable.
> * dwarf2out.c: Include tree-pass.h and gimple.h
Missing full stop.
> (loc_list_plus_const): New function.
> (loc_descriptor_from_tree_1): Rename to ...
> (loc_descriptor_from_tree): ... remove original.
> (loc_list_from_tree): New function.
> (add_AT_location_description): Accept location list.
> (tls_mem_loc_descriptor): Update call of loc_descriptor_from_tree.
> (concatn_mem_loc_descriptor): Remove.
> (mem_loc_descriptor): Handle CONCAT/CONCATN and VAR_LOCATION by
> returning NULL..
s/\.\././
> +static void
> +expansion_failed (tree expr, rtx rtl, char const *reason)
> +{
> + if (dump_file && (dump_flags & TDF_DETAILS))
> + {
> + fprintf (dump_file, "Failed to expand as dwarf: ");
> + if (expr)
> + print_generic_expr (dump_file, expr, dump_flags);
> + if (rtl)
> + {
> + fprintf (dump_file, "\n");
> + print_rtl (dump_file, rtl);
> + }
> + fprintf (dump_file, "\nReason: %s\n", reason);
> + }
You mix 8 spaces and tabs, please use tabs.
> + while (copy->dw_loc_next)
> + {
> + dw_loc_descr_ref new_copy = GGC_CNEW (dw_loc_descr_node);
> + memcpy (new_copy, copy->dw_loc_next, sizeof (dw_loc_descr_node));
> + copy->dw_loc_next = new_copy;
> + copy = new_copy;
> + }
> + list = list->dw_loc_next;
> + }
Likewise (and in couple of other places).
Other than that it looks good to me now, though, you know, I'm not a dwarf2
reviewer.
Jakub
More information about the Gcc-patches
mailing list