This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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.

Index: gcc/dwarf2out.c
--- 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;
     case DW_OP_addr:
-      return rtx_equal_p (valx1->v.val_addr, valx2->v.val_addr);
+      return rtx_equal_p (valx1->v.val_addr, valy1->v.val_addr);
     case DW_OP_GNU_implicit_pointer:
       return valx1->val_class == dw_val_class_die_ref
 	     && valx1->val_class == valy1->val_class

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]