On Sun, May 26, 2019 at 07:43:04PM +0200, Thomas Schwinge wrote:
> On Tue, 18 Oct 2005 03:01:40 -0400, Jakub Jelinek <[email protected]> wrote:
> > --- gcc/omp-low.c.jj 2005-10-15 12:00:06.000000000 +0200
> > +++ gcc/omp-low.c 2005-10-18 08:46:23.000000000 +0200
> > @@ -126,7 +126,7 @@ is_variable_sized (tree expr)
> > static inline bool
> > is_reference (tree decl)
> > {
> > - return TREE_CODE (TREE_TYPE (decl)) == REFERENCE_TYPE;
> > + return lang_hooks.decls.omp_privatize_by_reference (decl);
> > }
>
> With the same implementation, this function nowadays is known as
> 'omp_is_reference' ('gcc/omp-general.c'), and is used in 'omp-*' files
> only. The gimplifier directly calls
> 'lang_hooks.decls.omp_privatize_by_reference'.
>
> Will it be OK to commit the obvious patch to get rid of the
> 'omp_is_reference' function? Whenever I see it used in 'omp-*' files, I
No, omp_is_reference (something) is certainly more readable from
lang_hooks.decls.omp_privatize_by_reference (something), which is quite
long and would cause major issues in formatting etc.
What advantage do you see in removing that?
> wonder and have to look up what special things it might be doing -- but
> it actually isn't.
>
> gcc/
> * omp-general.c (omp_is_reference): Don't define. Adjust all users.
Jakub