This is the mail archive of the gcc@gcc.gnu.org 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: Is there really only one symbol_ref object referring to eachsymbolic label?


Hi Geoff,

> Yup.  They should look like
> 
> gen_rtx_SYMBOL_REF (xxx, ggc_strdup ("yyy"))
> 
> You don't want to make the ggc_strdup be part of gen_rtx_* because 99%
> of the time it's not necessary and the extra hash-table lookup is slow...
> 
> Perhaps there should be a check in gen_rtx_fmt_* when debugging is on
> so that when it does
> 
>   XSTR (rt, 0) = arg0;
> 
> it also does:
> 
> #if ENABLE_CHECKING_XXX
>  if (ggc_strdup (arg0) != arg0)
>    abort ();
> #endif

Thanks for the info.  I will probably post a patch soon regarding this
stuff.  I hope no latent bugs are hiding in the bush, except obvious
ones like gen_rtx_SYMBOL_REF (Pmode, "hello").

Kazu Hirata


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