This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Speed up var-tracking on various KDE sources (PR debug/41371)
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Richard Guenther <rguenther at suse dot de>, Richard Henderson <rth at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Tue, 19 Jan 2010 09:31:10 -0200
- Subject: Re: [PATCH] Speed up var-tracking on various KDE sources (PR debug/41371)
- References: <20100113102630.GF16723@hs20-bc2-1.build.redhat.com>
On Jan 13, 2010, Jakub Jelinek <jakub@redhat.com> wrote:
> Ok for trunk?
> 2010-01-13 Jakub Jelinek <jakub@redhat.com>
> PR debug/41371
> * var-tracking.c (values_to_unmark): New variable.
> (find_loc_in_1pdv): Clear VALUE_RECURSED_INTO of values in
> values_to_unmark vector. Moved body to...
> (find_loc_in_1pdv_1): ... this. Don't clear VALUE_RECURSED_INTO,
> instead queue it into values_to_unmark vector.
> (vt_find_locations): Free values_to_unmark vector.
I know you've already checked this in, but this much simpler patch
should have a similar effect, without requiring an additional vector.
The effect should be similar because we'd then be looking for values in
a star-canonicalized table, and the star shape is designed precisely to
avoid the kind of repetitive walks that you observed. It was a mistake
to merge tables the way we did; we should have always done it the other
way round.
Thoughts? Should this go in? Should the other patch be backed out?
for gcc/ChangeLog
from Alexandre Oliva <aoliva@redhat.com>
* var-tracking.c (dataflow_set_merge): Swap src and src2.
Index: gcc/var-tracking.c
===================================================================
--- gcc/var-tracking.c.orig 2010-01-15 22:34:49.000000000 -0200
+++ gcc/var-tracking.c 2010-01-15 22:36:29.000000000 -0200
@@ -3319,14 +3319,14 @@ dataflow_set_merge (dataflow_set *dst, d
attrs_list_mpdv_union (&dst->regs[i], src->regs[i], src2.regs[i]);
dsm.dst = dst;
- dsm.src = &src2;
- dsm.cur = src;
+ dsm.src = src;
+ dsm.cur = &src2;
dsm.src_onepart_cnt = 0;
- htab_traverse (shared_hash_htab (dsm.src->vars), variable_merge_over_src,
- &dsm);
htab_traverse (shared_hash_htab (dsm.cur->vars), variable_merge_over_cur,
&dsm);
+ htab_traverse (shared_hash_htab (dsm.src->vars), variable_merge_over_src,
+ &dsm);
if (dsm.src_onepart_cnt)
dst_can_be_shared = false;
--
Alexandre Oliva, freedom fighter http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/ FSF Latin America board member
Free Software Evangelist Red Hat Brazil Compiler Engineer