sched-deps.c (free_deps): Avoid calling free_INSN_LIST_list on empty lists.

* sched-deps.c (free_deps): Avoid calling free_INSN_LIST_list
        on empty lists.

From-SVN: r54347
This commit is contained in:
Jeff Law 2002-06-07 12:00:44 -06:00 committed by Jeff Law
parent 8081570653
commit f28468203d
2 changed files with 11 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2002-06-07 Jeffrey Law <law@redhat.com>
* sched-deps.c (free_deps): Avoid calling free_INSN_LIST_list
on empty lists.
2002-06-07 H.J. Lu (hjl@gnu.org)
* configure.in: Add --enable-__cxa_atexit.

View File

@ -1508,9 +1508,12 @@ free_deps (deps)
EXECUTE_IF_SET_IN_REG_SET (&deps->reg_last_in_use, 0, i,
{
struct deps_reg *reg_last = &deps->reg_last[i];
free_INSN_LIST_list (&reg_last->uses);
free_INSN_LIST_list (&reg_last->sets);
free_INSN_LIST_list (&reg_last->clobbers);
if (reg_last->uses)
free_INSN_LIST_list (&reg_last->uses);
if (reg_last->sets)
free_INSN_LIST_list (&reg_last->sets);
if (reg_last->clobbers)
free_INSN_LIST_list (&reg_last->clobbers);
});
CLEAR_REG_SET (&deps->reg_last_in_use);