This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug debug/49676] inefficiency: DW_AT_GNU_call_site_value calculates everything << 32
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 11 Jul 2011 16:57:48 +0000
- Subject: [Bug debug/49676] inefficiency: DW_AT_GNU_call_site_value calculates everything << 32
- Auto-submitted: auto-generated
- References: <bug-49676-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49676
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-07-11 16:57:29 UTC ---
Author: jakub
Date: Mon Jul 11 16:57:25 2011
New Revision: 176167
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=176167
Log:
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.
* gcc.dg/guality/csttest.c: New test.
Added:
trunk/gcc/testsuite/gcc.dg/guality/csttest.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/dwarf2out.c
trunk/gcc/testsuite/ChangeLog