Annotations for SYMBOL_REF

Geoff Keating
Fri Apr 11 23:04:00 GMT 2003

Richard Henderson <> writes:

> Adds two fields to a SYMBOL_REF -- the associated DECL, and a set
> of flags that cache interesting properties of the symbol.  This
> later is both to avoid re-computing data vs the decl, and to cope
> with the fact that middle and back-end creates symbol_refs out of
> thin air, and these symbols need marking as well.  Perhaps ideally
> we'd create DECLs for each of these, but not today.

[I hope you saw my mail on gcc-regression about the bootstrap failure
this causes on Darwin; I think it's because '0' fields are not
initialised by gen_rtx.]

> By itself, this patch does nothing, but now we can update targets
> one at a time to avoid the name frobbing that currently happens in
> encode_section_info.  The most common sorts of frobbing are already
> represented; target-specific widgetry can use bits starting at
> In addition, I believe we can avoid the problems with assemble_external
> as seen in prs c/10201 and c++/10202.

Have you measured the performance impact of this patch?  SYMBOL_REFs
are pretty common, and you're doubling their size.

- Geoffrey Keating <>

More information about the Gcc-patches mailing list