* df-problems.c (struct dead_debug): Add to_rescan field.
(dead_debug_init): Clear to_rescan field.
(dead_debug_finish): Rescan all debug insns in to_rescan
bitmap and free the bitmap.
(dead_debug_insert_before): Instead of rescanning debug insns
immediately queue their rescanning until dead_debug_finish.
(df_note_bb_compute): After dead_debug_add do continue instead
of break.
* gcc.dg/pr44023.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159254
138bc75d-0d04-0410-961f-
82ee72b054a4
+2010-05-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/44023
+ * df-problems.c (struct dead_debug): Add to_rescan field.
+ (dead_debug_init): Clear to_rescan field.
+ (dead_debug_finish): Rescan all debug insns in to_rescan
+ bitmap and free the bitmap.
+ (dead_debug_insert_before): Instead of rescanning debug insns
+ immediately queue their rescanning until dead_debug_finish.
+ (df_note_bb_compute): After dead_debug_add do continue instead
+ of break.
+
2010-05-10 Jakub Jelinek <jakub@redhat.com>
PR debug/44028
2010-05-10 Jakub Jelinek <jakub@redhat.com>
PR debug/44028
/* Standard problems for dataflow support routines.
Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
/* Standard problems for dataflow support routines.
Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
- 2008, 2009 Free Software Foundation, Inc.
+ 2008, 2009, 2010 Free Software Foundation, Inc.
Originally contributed by Michael P. Hayes
(m.hayes@elec.canterbury.ac.nz, mhayes@redhat.com)
Major rewrite contributed by Danny Berlin (dberlin@dberlin.org)
Originally contributed by Michael P. Hayes
(m.hayes@elec.canterbury.ac.nz, mhayes@redhat.com)
Major rewrite contributed by Danny Berlin (dberlin@dberlin.org)
{
struct dead_debug_use *head;
bitmap used;
{
struct dead_debug_use *head;
bitmap used;
};
/* Initialize DEBUG to an empty list, and clear USED, if given. */
};
/* Initialize DEBUG to an empty list, and clear USED, if given. */
{
debug->head = NULL;
debug->used = used;
{
debug->head = NULL;
debug->used = used;
+ debug->to_rescan = NULL;
if (used)
bitmap_clear (used);
}
if (used)
bitmap_clear (used);
}
{
INSN_VAR_LOCATION_LOC (insn) = gen_rtx_UNKNOWN_VAR_LOC ();
df_insn_rescan_debug_internal (insn);
{
INSN_VAR_LOCATION_LOC (insn) = gen_rtx_UNKNOWN_VAR_LOC ();
df_insn_rescan_debug_internal (insn);
+ if (debug->to_rescan)
+ bitmap_clear_bit (debug->to_rescan, INSN_UID (insn));
}
debug->head = head->next;
XDELETE (head);
}
}
debug->head = head->next;
XDELETE (head);
}
+
+ if (debug->to_rescan)
+ {
+ bitmap_iterator bi;
+ unsigned int uid;
+
+ EXECUTE_IF_SET_IN_BITMAP (debug->to_rescan, 0, uid, bi)
+ {
+ struct df_insn_info *insn_info = DF_INSN_UID_SAFE_GET (uid);
+ if (insn_info)
+ df_insn_rescan (insn_info->insn);
+ }
+ BITMAP_FREE (debug->to_rescan);
+ }
}
/* Add USE to DEBUG. It must be a dead reference to UREGNO in a debug
}
/* Add USE to DEBUG. It must be a dead reference to UREGNO in a debug
*DF_REF_REAL_LOC (cur->use)
= gen_lowpart_SUBREG (GET_MODE (*DF_REF_REAL_LOC (cur->use)), dval);
/* ??? Should we simplify subreg of subreg? */
*DF_REF_REAL_LOC (cur->use)
= gen_lowpart_SUBREG (GET_MODE (*DF_REF_REAL_LOC (cur->use)), dval);
/* ??? Should we simplify subreg of subreg? */
- df_insn_rescan (DF_REF_INSN (cur->use));
+ if (debug->to_rescan == NULL)
+ debug->to_rescan = BITMAP_ALLOC (NULL);
+ bitmap_set_bit (debug->to_rescan, INSN_UID (DF_REF_INSN (cur->use)));
uses = cur->next;
XDELETE (cur);
}
uses = cur->next;
XDELETE (cur);
}
if (debug_insn)
{
if (debug_insn > 0)
if (debug_insn)
{
if (debug_insn > 0)
- dead_debug_add (&debug, use, uregno);
+ {
+ dead_debug_add (&debug, use, uregno);
+ continue;
+ }
+2010-05-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/44023
+ * gcc.dg/pr44023.c: New test.
+
2010-05-10 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/lto7.adb: New test.
2010-05-10 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/lto7.adb: New test.