RFC: add inheritance support to nonoverlapping_component_refs_p

Richard Henderson rth@redhat.com
Wed May 29 23:33:00 GMT 2002


On Wed, May 29, 2002 at 09:36:46PM -0700, Dan Nicolaescu wrote:
>   > > I have a fix (that I am still testing) for the last one, it adds
>   > > 
>   > >     declx = TREE_OPERAND (x, 0);
>   > >     decly = TREE_OPERAND (y, 0);
>   > >     if (declx && decly && DECL_P (declx) && DECL_P (decly)
>   > >         && (TREE_CODE (declx) == PARM_DECL)
>   > >         && (TREE_CODE (decly) == PARM_DECL)
>   > >         && declx != decly)
>   > >       return 1;
>   > > 
>   > > to the beginning of nonoverlapping_component_refs_p
>   > 
>   > This is the wrong place to test this.
> 
> Is nonoverlapping_memrefs_p better? 

Yes.

>   > If they're really passed by value, yes.  But some ABIs pass
>   > by invisible reference.
> 
> Is there a way to test for that? 

Inside the compiler?  Yes.  FUNCTION_ARG_PASS_BY_REFERENCE.
Outside the compiler?  No.


r~



More information about the Gcc-patches mailing list