This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [vta] various fixes that immensely reduce memory use
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 13 May 2008 05:31:48 -0300
- Subject: Re: [vta] various fixes that immensely reduce memory use
- References: <ormymwyn3m.fsf@oliva.athome.lsd.ic.unicamp.br>
On May 12, 2008, Alexandre Oliva <aoliva@redhat.com> wrote:
> * var-tracking.c [...]
> (remove_unavailable_values): Deal with zero var parts. Do not
> remove last ref to a variable.
This part was incomplete. It marked zero-var-parts locs for removal,
but it didn't actually remove them unless all such locs were deemed as
removable. This fixes it.
I'm having second thoughts on this, however. Maybe I'll revert both
parts, and keep values around. This may be important when the time
comes to implement proper propagation and intersection of information
across blocks.
Anyhow, in the mean time, I'm going to check this in such that it's
self-consistent. Tested on x86_64-linux-gnu, i686-pc-linux-gnu,
ia64-linux-gnu and ppc64-linux-gnu, with bootstrap-debug and
g0 bootstrap4-debug for libs, and also bootstrap-debug with -O3 on all
4 platforms, and -O1 on the first two.
for gcc/ChangeLog.vta
from Alexandre Oliva <aoliva@redhat.com>
* var-tracking.c (remove_unavailable_values): Actually remove
slots with zero variable parts.
Index: gcc/var-tracking.c
===================================================================
--- gcc/var-tracking.c.orig 2008-05-12 04:54:33.000000000 -0300
+++ gcc/var-tracking.c 2008-05-12 05:10:10.000000000 -0300
@@ -1699,7 +1699,7 @@ remove_unavailable_values (void **slot,
dv = dv_from_value (loc->loc);
valslot = htab_find_slot_with_hash (vars, &dv, dv_htab_hash (dv),
NO_INSERT);
- if (valslot)
+ if (valslot && ((variable)*valslot)->n_var_parts)
locp = &loc->next;
else
{
--
Alexandre Oliva http://www.lsd.ic.unicamp.br/~oliva/
Free Software Evangelist oliva@{lsd.ic.unicamp.br, gnu.org}
FSFLA Board Member ÂSÃ Libre! => http://www.fsfla.org/
Red Hat Compiler Engineer aoliva@{redhat.com, gcc.gnu.org}