This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: needless deep recursion in gt-c-decl.h

> Date: Mon, 05 Aug 2002 10:13:18 -0700
> From: Per Bothner <>

> Geoff Keating wrote:
> > Nearly all of the remainder is still recursion on PREV_INSN fields.
> > This happens because the DECL_RTL of a LABEL_REF will refer to a
> > CODE_LABEL in the middle of the insn chain, and it happens that this
> > is the first place the insn chain is encountered when marking.  The
> > label involved is "plus_expr:" in expand_expr, line 7632.
> > expand_expr starts at line 6183, so there's a long way to go back.
> Is there any reason to mark the DECL_RTL of a LABEL_REF?  Is there any
> case (baring a serious internal compiler error) where the DECL_RTL
> could possibly be the only reference to an insn?  If not, why waste
> time (and stack space) marking it?

I'm sure there are circumstances, for instance when a CODE_LABEL is
deleted because the code that refers to it is unreachable.

Even if this particular case turns out to be impossible, it would be
very hard to make an argument that there's always another reference to
the DECL_RTL; and even if there actually always was another reference,
you'd have to ask yourself whether the (tiny) speed increase is worth
the extra complexity and the maintenance headache.

The patch I finally committed solves this problem in a more general

- Geoffrey Keating <> <>

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]