var-tracking.c (var_reg_delete): Don't delete the association between REGs and values or one-part variables if...

* var-tracking.c (var_reg_delete): Don't delete the association
	between REGs and values or one-part variables if the register
	isn't clobbered.

From-SVN: r155918
This commit is contained in:
Alexandre Oliva 2010-01-14 22:39:25 +00:00 committed by Jakub Jelinek
parent d17af14789
commit 7d2a845248
2 changed files with 20 additions and 8 deletions

View File

@ -1,3 +1,9 @@
2010-01-14 Alexandre Oliva <aoliva@redhat.com>
* var-tracking.c (var_reg_delete): Don't delete the association
between REGs and values or one-part variables if the register
isn't clobbered.
2010-01-14 Jakub Jelinek <jakub@redhat.com>
PR debug/42657

View File

@ -1401,14 +1401,15 @@ var_reg_delete_and_set (dataflow_set *set, rtx loc, bool modify,
var_reg_set (set, loc, initialized, set_src);
}
/* Delete current content of register LOC in dataflow set SET. If
CLOBBER is true, also delete any other live copies of the same
variable part. */
/* Delete the association of register LOC in dataflow set SET with any
variables that aren't onepart. If CLOBBER is true, also delete any
other live copies of the same variable part, and delete the
association with onepart dvs too. */
static void
var_reg_delete (dataflow_set *set, rtx loc, bool clobber)
{
attrs *reg = &set->regs[REGNO (loc)];
attrs *nextp = &set->regs[REGNO (loc)];
attrs node, next;
if (clobber)
@ -1421,13 +1422,18 @@ var_reg_delete (dataflow_set *set, rtx loc, bool clobber)
clobber_variable_part (set, NULL, dv_from_decl (decl), offset, NULL);
}
for (node = *reg; node; node = next)
for (node = *nextp; node; node = next)
{
next = node->next;
delete_variable_part (set, node->loc, node->dv, node->offset);
pool_free (attrs_pool, node);
if (clobber || !dv_onepart_p (node->dv))
{
delete_variable_part (set, node->loc, node->dv, node->offset);
pool_free (attrs_pool, node);
*nextp = next;
}
else
nextp = &node->next;
}
*reg = NULL;
}
/* Delete content of register with number REGNO in dataflow set SET. */