ggc-common.c (ggc_mark_rtx_children_1): Rename from...
* ggc-common.c (ggc_mark_rtx_children_1): Rename from... (ggc_mark_rtx_children): New. From-SVN: r52864
This commit is contained in:
parent
7a03f82f06
commit
349a4b40eb
|
@ -1,3 +1,9 @@
|
||||||
|
2002-04-28 Richard Henderson <rth@redhat.com>
|
||||||
|
|
||||||
|
PR c/5154
|
||||||
|
* ggc-common.c (ggc_mark_rtx_children_1): Rename from...
|
||||||
|
(ggc_mark_rtx_children): New.
|
||||||
|
|
||||||
2002-04-28 Jakub Jelinek <jakub@redhat.com>
|
2002-04-28 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
PR target/6496
|
PR target/6496
|
||||||
|
|
|
@ -38,6 +38,7 @@ static ggc_statistics *ggc_stats;
|
||||||
/* Trees that have been marked, but whose children still need marking. */
|
/* Trees that have been marked, but whose children still need marking. */
|
||||||
varray_type ggc_pending_trees;
|
varray_type ggc_pending_trees;
|
||||||
|
|
||||||
|
static void ggc_mark_rtx_children_1 PARAMS ((rtx));
|
||||||
static void ggc_mark_rtx_ptr PARAMS ((void *));
|
static void ggc_mark_rtx_ptr PARAMS ((void *));
|
||||||
static void ggc_mark_tree_ptr PARAMS ((void *));
|
static void ggc_mark_tree_ptr PARAMS ((void *));
|
||||||
static void ggc_mark_rtx_varray_ptr PARAMS ((void *));
|
static void ggc_mark_rtx_varray_ptr PARAMS ((void *));
|
||||||
|
@ -271,6 +272,43 @@ ggc_mark_roots ()
|
||||||
void
|
void
|
||||||
ggc_mark_rtx_children (r)
|
ggc_mark_rtx_children (r)
|
||||||
rtx r;
|
rtx r;
|
||||||
|
{
|
||||||
|
rtx i, last;
|
||||||
|
|
||||||
|
/* Special case the instruction chain. This is a data structure whose
|
||||||
|
chain length is potentially unbounded, and which contain references
|
||||||
|
within the chain (e.g. label_ref and insn_list). If do nothing here,
|
||||||
|
we risk blowing the stack recursing through a long chain of insns.
|
||||||
|
|
||||||
|
Combat this by marking all of the instructions in the chain before
|
||||||
|
marking the contents of those instructions. */
|
||||||
|
|
||||||
|
switch (GET_CODE (r))
|
||||||
|
{
|
||||||
|
case INSN:
|
||||||
|
case JUMP_INSN:
|
||||||
|
case CALL_INSN:
|
||||||
|
case NOTE:
|
||||||
|
case CODE_LABEL:
|
||||||
|
case BARRIER:
|
||||||
|
for (i = NEXT_INSN (r); ; i = NEXT_INSN (i))
|
||||||
|
if (! ggc_test_and_set_mark (i))
|
||||||
|
break;
|
||||||
|
last = i;
|
||||||
|
|
||||||
|
for (i = NEXT_INSN (r); i != last; i = NEXT_INSN (i))
|
||||||
|
ggc_mark_rtx_children_1 (i);
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
ggc_mark_rtx_children_1 (r);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
ggc_mark_rtx_children_1 (r)
|
||||||
|
rtx r;
|
||||||
{
|
{
|
||||||
const char *fmt;
|
const char *fmt;
|
||||||
int i;
|
int i;
|
||||||
|
|
Loading…
Reference in New Issue