This is the mail archive of the gcc-patches@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: RFC: add inheritance support to nonoverlapping_component_refs_p


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~


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