This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Create smaller DWARF ops for some int_loc_descriptor constants etc. (PR debug/49676)
- From: Richard Henderson <rth at redhat dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Jason Merrill <jason at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Mon, 11 Jul 2011 09:52:48 -0700
- Subject: Re: [PATCH] Create smaller DWARF ops for some int_loc_descriptor constants etc. (PR debug/49676)
- References: <20110711163300.GJ2687@tyan-ft48-01.lab.bos.redhat.com>
On 07/11/2011 09:33 AM, Jakub Jelinek wrote:
> PR debug/49676
> * dwarf2out.c (int_shift_loc_descriptor): New function.
> (int_loc_descriptor): If shorter, emit i as
> (i >> shift), shift, DW_OP_shl for suitable shift value.
> Similarly, try to optimize large negative values using
> DW_OP_neg of a positive value if shorter.
> (size_of_int_shift_loc_descriptor): New function.
> (size_of_int_loc_descriptor): Adjust to match int_loc_descriptor
> changes.
> (mem_loc_descriptor) <case CONST_INT>: Emit zero-extended constants
> that fit into DWARF2_ADDR_SIZE bytes as int_loc_descriptor +
> DW_OP_GNU_convert instead of DW_OP_GNU_const_type if the former
> is shorter.
> (resolve_addr_in_expr): Optimize DW_OP_plus_uconst with a large
> addend as added DW_OP_plus if it is shorter.
Ok.
r~