This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Doubts regarding the _Dependent_ptr keyword
- From: "Paul E. McKenney" <paulmck at linux dot ibm dot com>
- To: Ramana Radhakrishnan <ramana dot gcc at googlemail dot com>
- Cc: Akshat Garg <xkspr7 at gmail dot com>, gcc mailing list <gcc at gcc dot gnu dot org>
- Date: Tue, 2 Jul 2019 05:38:09 -0700
- Subject: Re: Doubts regarding the _Dependent_ptr keyword
- References: <CAMEQ7YyLp0YymRiYD4O_1A=YswbbDBh0gQz9kGtw4t8mfvU4Jg@mail.gmail.com> <20190619164145.GJ26519@linux.ibm.com> <20190620140600.GA15142@linux.ibm.com> <CAMEQ7Yx=dg0TWcXKA8eZk=RCN+az116Y9whKGQSB3fRVZwbvQw@mail.gmail.com> <CAJA7tRbj6eoOj_fr+Nnm1rS=kdc0jPxkb77AoPCFrJEaaPsCSA@mail.gmail.com> <CAMEQ7YwBuaBLZXbYhR6_r==Y=6MG0UpqXd=1gOk7VMTu4-UXwQ@mail.gmail.com> <CAMEQ7Yy_gV8UkCK52ppZ9MPjCGzzvGGd29Y3WGTNOfP-56sRUw@mail.gmail.com> <CAJA7tRZ4k_5nYYhiffwVGk=wwXOmqB2vqHv-q8dwZFmhw1HPxg@mail.gmail.com> <CAMEQ7YyKmBSdyTxsZsw-nnKdfp7P7Pi2Pz6fZ2Fbsk5XApp4yA@mail.gmail.com> <CAJA7tRZn535y_+-HkGX4MBh4PKtZ11PX9RQ+xA-Z10Pk5PXZWA@mail.gmail.com>
- Reply-to: paulmck at linux dot ibm dot com
On Tue, Jul 02, 2019 at 12:01:00PM +0100, Ramana Radhakrishnan wrote:
> >>
> >> It's worth figuring out what passes are doing this - however the worry
> >> I have is that every pass now needs to be handling this case with
> >> respect to pointer attributes. Is there some place that you are
> >> storing said information and what is the transitive nature of
> >> assignments with these attributes ?
> >>
> >> regards
> >> Ramana
> >
> > I don't understand what information to store, can you explain? I was thinking of putting some code inside the pass, which breaks the dependency chains, which will avoid this type of conversions when it finds out that the pointer is _Dependent_ptr qualified otherwise don't do anything. Can you let me know what I am missing on?
> >
>
> That the pointer has an attribute that it's a dependent pointer . How
> do you expect the later passes to detect it has a dependent_ptr
> attribute attached to it ?
>
> > In transitive nature, are you talking about the dependent pointer being assigned to some non-dependent pointer and after further assigned to some other pointer?
>
> Yes. What's the expected behaviour as per the document ?
Once a user-created non-dependent pointer is assigned to, it is OK to
break the dependency.
Or am I missing the point here?
Thanx, Paul
> Ramana
> >>
> >>
> >> > Does this sounds like a workable plan for ? Let me know your thoughts. If this sounds good then, we can do this for all the optimizations that may kill the dependencies at somepoint.
> >> >
> >> > -Akshat
>