This is the mail archive of the
mailing list for the GCC project.
[1/2] Reducing the overhead of dwarf2 location trracking
- From: Richard Sandiford <richard dot sandiford at linaro dot org>
- To: gcc-patches at gcc dot gnu dot org
- Cc: patches at linaro dot org
- Date: Fri, 04 Mar 2011 13:53:30 +0000
- Subject: [1/2] Reducing the overhead of dwarf2 location trracking
A typo in dwarf2out.c:compare_loc_operands means that we fail to
detect equivalent addresses in location lists. On this ARM testcase:
the patch below reduces the number of lines of assembly from
39,230,550 to 1,266,183 when compiling with -O2 -g. (On my box,
the original code triggers an OOM in the assembler, so I can't measure
the difference in object sizes.)
Normally I'd install this as obvious, but I'm not sure whether
it qualifies for stage 4. I hope it does though. Not being able
to build this file (due to the assembler OOM) is a regression from 4.4.
Bootstrapped & regression-tested on x86_64-linux-gnu. OK for 4.6?
* dwarf2out.c (compare_loc_operands): Fix address handling.
--- gcc/dwarf2out.c 2011-03-04 13:08:38.000000000 +0000
+++ gcc/dwarf2out.c 2011-03-04 13:15:28.000000000 +0000
@@ -23178,7 +23178,7 @@ compare_loc_operands (dw_loc_descr_ref x
&& valx2->v.val_int == valy2->v.val_int;
- return rtx_equal_p (valx1->v.val_addr, valx2->v.val_addr);
+ return rtx_equal_p (valx1->v.val_addr, valy1->v.val_addr);
return valx1->val_class == dw_val_class_die_ref
&& valx1->val_class == valy1->val_class