Re: Doubts regarding the _Dependent_ptr keyword

2019-07-23 Thread Akshat Garg
On Wed, Jul 24, 2019 at 1:41 AM Akshat Garg wrote: > Hi all, > > I have tried to make the dependent_ptr qualification act as volatile > during the RTL passes to bypass the RTL optimizations for now. Here is the > patch >

Re: Doubts regarding the _Dependent_ptr keyword

2019-07-23 Thread Akshat Garg
Hi all, I have tried to make the dependent_ptr qualification act as volatile during the RTL passes to bypass the RTL optimizations for now. Here is the patch https://github.com/AKG001/gcc/commit/14c05ae546554f822f667fdb72080b7fe52fea32 For this

Re: Doubts regarding the _Dependent_ptr keyword

2019-07-22 Thread Richard Biener
On Mon, Jul 22, 2019 at 10:54 AM Akshat Garg wrote: > On Mon, Jul 22, 2019 at 2:11 PM Richard Biener > wrote: > >> On Mon, Jul 22, 2019 at 2:27 AM Akshat Garg wrote: >> >>> Hi all, >>> Consider part of an example(figure 20) from doc P0190R4( >>>

Re: Doubts regarding the _Dependent_ptr keyword

2019-07-22 Thread Akshat Garg
On Mon, Jul 22, 2019 at 2:11 PM Richard Biener wrote: > On Mon, Jul 22, 2019 at 2:27 AM Akshat Garg wrote: > >> Hi all, >> Consider part of an example(figure 20) from doc P0190R4( >> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0190r4.pdf) >> shown below: >> >> 1. void thread1

Re: Doubts regarding the _Dependent_ptr keyword

2019-07-22 Thread Richard Biener
On Mon, Jul 22, 2019 at 2:27 AM Akshat Garg wrote: > Hi all, > Consider part of an example(figure 20) from doc P0190R4( > http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0190r4.pdf) > shown below: > > 1. void thread1 (void) > 2. { > 3.int * volatile p; > 4.p =

Re: Doubts regarding the _Dependent_ptr keyword

2019-07-21 Thread Akshat Garg
Hi all, Consider part of an example(figure 20) from doc P0190R4( http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0190r4.pdf) shown below: 1. void thread1 (void) 2. { 3.int * volatile p; 4.p = rcu_dereference(gip); 5.if (p) 6.assert(*(p+p[0]) == 42); 7. } The .gimple

Re: Doubts regarding the _Dependent_ptr keyword

2019-07-17 Thread Akshat Garg
On Tue, Jul 2, 2019 at 9:06 PM Jason Merrill wrote: > On Mon, Jul 1, 2019 at 8:59 PM Paul E. McKenney > wrote: > > > > On Tue, Jul 02, 2019 at 05:58:48AM +0530, Akshat Garg wrote: > > > On Tue, Jun 25, 2019 at 9:49 PM Akshat Garg wrote: > > > > > > > On Tue, Jun 25, 2019 at 4:04 PM Ramana

Re: Doubts regarding the _Dependent_ptr keyword

2019-07-07 Thread Akshat Garg
On Sun, Jul 7, 2019 at 9:48 PM Akshat Garg wrote: > On Sun, Jul 7, 2019 at 7:49 PM Paul E. McKenney > wrote: > >> On Sat, Jul 06, 2019 at 12:39:45PM +0530, Akshat Garg wrote: >> > On Sat, Jul 6, 2019 at 1:09 AM Akshat Garg wrote: >> > >> > > On Fri, Jul 5, 2019 at 7:18 AM Paul E. McKenney < >>

Re: Doubts regarding the _Dependent_ptr keyword

2019-07-05 Thread Akshat Garg
On Fri, 5 Jul, 2019, 4:50 PM Richard Biener, wrote: > On Fri, Jul 5, 2019 at 1:08 AM Akshat Garg wrote: > > > > On Thu, Jul 4, 2019 at 11:39 PM Jakub Jelinek wrote: > >> > >> On Thu, Jul 04, 2019 at 10:40:15AM -0700, Paul E. McKenney wrote: > >> > > I think fully guaranteeing this is hard

Re: Doubts regarding the _Dependent_ptr keyword

2019-07-05 Thread Richard Biener
On Fri, Jul 5, 2019 at 1:08 AM Akshat Garg wrote: > > On Thu, Jul 4, 2019 at 11:39 PM Jakub Jelinek wrote: >> >> On Thu, Jul 04, 2019 at 10:40:15AM -0700, Paul E. McKenney wrote: >> > > I think fully guaranteeing this is hard (besides when you use >> > > volatile), we have the very same issue

Re: Doubts regarding the _Dependent_ptr keyword

2019-07-04 Thread Akshat Garg
On Thu, Jul 4, 2019 at 11:39 PM Jakub Jelinek wrote: > On Thu, Jul 04, 2019 at 10:40:15AM -0700, Paul E. McKenney wrote: > > > I think fully guaranteeing this is hard (besides when you use > > > volatile), we have the very same issue when dealing with > > > pointer provenance rules, known for

Re: Doubts regarding the _Dependent_ptr keyword

2019-07-04 Thread Jakub Jelinek
On Thu, Jul 04, 2019 at 10:40:15AM -0700, Paul E. McKenney wrote: > > I think fully guaranteeing this is hard (besides when you use > > volatile), we have the very same issue when dealing with > > pointer provenance rules, known for years and not fixed > > (and I don't see a good way to fix these

Re: Doubts regarding the _Dependent_ptr keyword

2019-07-04 Thread Paul E. McKenney
On Thu, Jul 04, 2019 at 01:00:18PM +0200, Richard Biener wrote: > On Wed, Jul 3, 2019 at 6:33 PM Paul E. McKenney wrote: > > > > On Wed, Jul 03, 2019 at 05:47:56PM +0200, Richard Biener wrote: > > > On July 3, 2019 5:14:58 PM GMT+02:00, "Paul E. McKenney" > > > wrote: > > > >On Wed, Jul 03,

Re: Doubts regarding the _Dependent_ptr keyword

2019-07-04 Thread Richard Biener
On Wed, Jul 3, 2019 at 6:33 PM Paul E. McKenney wrote: > > On Wed, Jul 03, 2019 at 05:47:56PM +0200, Richard Biener wrote: > > On July 3, 2019 5:14:58 PM GMT+02:00, "Paul E. McKenney" > > wrote: > > >On Wed, Jul 03, 2019 at 12:39:41AM +0530, Akshat Garg wrote: > > >> On Tue, Jul 2, 2019 at 8:40

Re: Doubts regarding the _Dependent_ptr keyword

2019-07-03 Thread Paul E. McKenney
On Wed, Jul 03, 2019 at 05:47:56PM +0200, Richard Biener wrote: > On July 3, 2019 5:14:58 PM GMT+02:00, "Paul E. McKenney" > wrote: > >On Wed, Jul 03, 2019 at 12:39:41AM +0530, Akshat Garg wrote: > >> On Tue, Jul 2, 2019 at 8:40 PM Paul E. McKenney > > > >> wrote: > >> > >> > On Tue, Jul 02,

Re: Doubts regarding the _Dependent_ptr keyword

2019-07-03 Thread Richard Biener
On July 3, 2019 5:14:58 PM GMT+02:00, "Paul E. McKenney" wrote: >On Wed, Jul 03, 2019 at 12:39:41AM +0530, Akshat Garg wrote: >> On Tue, Jul 2, 2019 at 8:40 PM Paul E. McKenney > >> wrote: >> >> > On Tue, Jul 02, 2019 at 02:15:55PM +0100, Ramana Radhakrishnan >wrote: >> > > On Tue, Jul 2, 2019

Re: Doubts regarding the _Dependent_ptr keyword

2019-07-03 Thread Paul E. McKenney
On Wed, Jul 03, 2019 at 12:39:41AM +0530, Akshat Garg wrote: > On Tue, Jul 2, 2019 at 8:40 PM Paul E. McKenney > wrote: > > > On Tue, Jul 02, 2019 at 02:15:55PM +0100, Ramana Radhakrishnan wrote: > > > On Tue, Jul 2, 2019 at 1:38 PM Paul E. McKenney > > wrote: > > > > > > > > > > > Once a

Re: Doubts regarding the _Dependent_ptr keyword

2019-07-03 Thread Paul E. McKenney
On Tue, Jul 02, 2019 at 07:53:20PM +0200, Richard Biener wrote: > On July 2, 2019 5:36:08 PM GMT+02:00, Jason Merrill wrote: > >On Mon, Jul 1, 2019 at 8:59 PM Paul E. McKenney > >wrote: > >> > >> On Tue, Jul 02, 2019 at 05:58:48AM +0530, Akshat Garg wrote: > >> > On Tue, Jun 25, 2019 at 9:49 PM

Re: Doubts regarding the _Dependent_ptr keyword

2019-07-02 Thread Akshat Garg
On Tue, Jul 2, 2019 at 9:06 PM Jason Merrill wrote: > On Mon, Jul 1, 2019 at 8:59 PM Paul E. McKenney > wrote: > > > > On Tue, Jul 02, 2019 at 05:58:48AM +0530, Akshat Garg wrote: > > > On Tue, Jun 25, 2019 at 9:49 PM Akshat Garg wrote: > > > > > > > On Tue, Jun 25, 2019 at 4:04 PM Ramana

Re: Doubts regarding the _Dependent_ptr keyword

2019-07-02 Thread Akshat Garg
On Tue, Jul 2, 2019 at 8:40 PM Paul E. McKenney wrote: > On Tue, Jul 02, 2019 at 02:15:55PM +0100, Ramana Radhakrishnan wrote: > > On Tue, Jul 2, 2019 at 1:38 PM Paul E. McKenney > wrote: > > > > > > > > Once a user-created non-dependent pointer is assigned to, it is OK to > > > break the

Re: Doubts regarding the _Dependent_ptr keyword

2019-07-02 Thread Richard Biener
On July 2, 2019 5:36:08 PM GMT+02:00, Jason Merrill wrote: >On Mon, Jul 1, 2019 at 8:59 PM Paul E. McKenney >wrote: >> >> On Tue, Jul 02, 2019 at 05:58:48AM +0530, Akshat Garg wrote: >> > On Tue, Jun 25, 2019 at 9:49 PM Akshat Garg >wrote: >> > >> > > On Tue, Jun 25, 2019 at 4:04 PM Ramana

Re: Doubts regarding the _Dependent_ptr keyword

2019-07-02 Thread Jason Merrill
On Mon, Jul 1, 2019 at 8:59 PM Paul E. McKenney wrote: > > On Tue, Jul 02, 2019 at 05:58:48AM +0530, Akshat Garg wrote: > > On Tue, Jun 25, 2019 at 9:49 PM Akshat Garg wrote: > > > > > On Tue, Jun 25, 2019 at 4:04 PM Ramana Radhakrishnan < > > > ramana@googlemail.com> wrote: > > > > > >> On

Re: Doubts regarding the _Dependent_ptr keyword

2019-07-02 Thread Paul E. McKenney
On Tue, Jul 02, 2019 at 02:15:55PM +0100, Ramana Radhakrishnan wrote: > On Tue, Jul 2, 2019 at 1:38 PM Paul E. McKenney wrote: > > > > > Once a user-created non-dependent pointer is assigned to, it is OK to > > break the dependency. > > Ok, that's good. > > > > Or am I missing the point here? >

Re: Doubts regarding the _Dependent_ptr keyword

2019-07-02 Thread Ramana Radhakrishnan
On Tue, Jul 2, 2019 at 1:38 PM Paul E. McKenney wrote: > > Once a user-created non-dependent pointer is assigned to, it is OK to > break the dependency. Ok, that's good. > > Or am I missing the point here? I was just trying to make sure we were on the same page. I wonder if marking this

Re: Doubts regarding the _Dependent_ptr keyword

2019-07-02 Thread Paul E. McKenney
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 > >>

Re: Doubts regarding the _Dependent_ptr keyword

2019-07-02 Thread Ramana Radhakrishnan
>> >> 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

Re: Doubts regarding the _Dependent_ptr keyword

2019-07-02 Thread Akshat Garg
On Tue, 2 Jul, 2019, 3:52 PM Ramana Radhakrishnan, < ramana@googlemail.com> wrote: > On Tue, Jul 2, 2019 at 1:29 AM Akshat Garg wrote: > > > > On Tue, Jun 25, 2019 at 9:49 PM Akshat Garg wrote: > >> > >> On Tue, Jun 25, 2019 at 4:04 PM Ramana Radhakrishnan < > ramana@googlemail.com>

Re: Doubts regarding the _Dependent_ptr keyword

2019-07-02 Thread Ramana Radhakrishnan
On Tue, Jul 2, 2019 at 1:29 AM Akshat Garg wrote: > > On Tue, Jun 25, 2019 at 9:49 PM Akshat Garg wrote: >> >> On Tue, Jun 25, 2019 at 4:04 PM Ramana Radhakrishnan >> wrote: >>> >> [CCing gcc mailing list] >> >> So, shall I start looking over the pointer optimizations only and see what >>

Re: Doubts regarding the _Dependent_ptr keyword

2019-07-01 Thread nick
On 2019-07-01 8:59 p.m., Paul E. McKenney wrote: > On Tue, Jul 02, 2019 at 05:58:48AM +0530, Akshat Garg wrote: >> On Tue, Jun 25, 2019 at 9:49 PM Akshat Garg wrote: >> >>> On Tue, Jun 25, 2019 at 4:04 PM Ramana Radhakrishnan < >>> ramana@googlemail.com> wrote: >>> On Tue, Jun 25,

Re: Doubts regarding the _Dependent_ptr keyword

2019-07-01 Thread Paul E. McKenney
On Tue, Jul 02, 2019 at 05:58:48AM +0530, Akshat Garg wrote: > On Tue, Jun 25, 2019 at 9:49 PM Akshat Garg wrote: > > > On Tue, Jun 25, 2019 at 4:04 PM Ramana Radhakrishnan < > > ramana@googlemail.com> wrote: > > > >> On Tue, Jun 25, 2019 at 11:03 AM Akshat Garg wrote: > >> > > >> > As we

Re: Doubts regarding the _Dependent_ptr keyword

2019-07-01 Thread Akshat Garg
On Tue, Jun 25, 2019 at 9:49 PM Akshat Garg wrote: > On Tue, Jun 25, 2019 at 4:04 PM Ramana Radhakrishnan < > ramana@googlemail.com> wrote: > >> On Tue, Jun 25, 2019 at 11:03 AM Akshat Garg wrote: >> > >> > As we have some working front-end code for _Dependent_ptr, What should >> we do

Re: Doubts regarding the _Dependent_ptr keyword

2019-06-25 Thread Akshat Garg
On Tue, Jun 25, 2019 at 4:04 PM Ramana Radhakrishnan < ramana@googlemail.com> wrote: > On Tue, Jun 25, 2019 at 11:03 AM Akshat Garg wrote: > > > > As we have some working front-end code for _Dependent_ptr, What should > we do next? What I understand, we can start adding the library for >