On Tue, Jul 03, 2018 at 01:24:28PM +0200, Jakub Jelinek wrote:
> On Tue, Jul 03, 2018 at 11:58:31AM +0200, Richard Biener wrote:
> > On Tue, Jul 3, 2018 at 11:43 AM Jakub Jelinek <ja...@redhat.com> wrote:
> > >
> > > On Tue, Jul 03, 2018 at 11:34:51AM +0200, Richard Biener wrote:
> > > > Can we make them DECL_ARTIFICIAL and/or make name-lookup never
> > >
> > > They are DECL_ARTIFICIAL already.
> > >
> > > > lookup DECL_ARTIFICIAL vars instead?
> > >
> > > Not sure about that, will try to gather some statistics on how often we
> > > rely on name-lookup of DECL_ARTIFICIALs.
> > 
> > Hmm, we might indeed.  At least we should make sure those
> > cases never have valid identifiers?  Or is the implementation
> 
> At least __FUNCTION__, __PRETTY_FUNCTION__, __func__ are all local
> VAR_DECLs with DECL_ARTIFICIAL that need to be found by name lookup
> (so far gathered stats just show __FUNCTION__ in lookup_name_real_1).

And it isn't limited to that, omp_priv/omp_orig/omp_in/omp_out too (the
OpenMP UDR artifical vars), also variables captured in lambdas,
anon union fields, ...
So I'm afraid it is not possible to ignore DECL_ARTIFICIAL VAR_DECLs in name
lookup and generally it is ok that they have user accessible names.
Just the range for vars are a special case.

        Jakub

Reply via email to