Re: [PATCH] Support threading of just the exit edge

2022-08-18 Thread Andrew MacLeod via Gcc-patches
On 8/18/22 03:08, Richard Biener wrote: The caveat is that it is only a partial solution... it will only work for names on that stmt.  if you have anything more complex, ie if (a == 0 || b == 0)  we have a seqeunce feeding the ctrl stmt.. c_1 = a == 0 c_2 = b == 0 c_3 = c_1 && c_2 if (c_3 =

Re: [PATCH] Support threading of just the exit edge

2022-08-18 Thread Richard Biener via Gcc-patches
On Wed, 17 Aug 2022, Andrew MacLeod wrote: > > On 8/17/22 03:42, Richard Biener wrote: > > On Tue, 16 Aug 2022, Andrew MacLeod wrote: > > > >> On 8/16/22 05:18, Richard Biener wrote: > >>> On Mon, 15 Aug 2022, Aldy Hernandez wrote: > >>> > On Mon, Aug 15, 2022 at 9:24 PM Andrew MacLeod > >>

Re: [PATCH] Support threading of just the exit edge

2022-08-17 Thread Andrew MacLeod via Gcc-patches
On 8/17/22 03:42, Richard Biener wrote: On Tue, 16 Aug 2022, Andrew MacLeod wrote: On 8/16/22 05:18, Richard Biener wrote: On Mon, 15 Aug 2022, Aldy Hernandez wrote: On Mon, Aug 15, 2022 at 9:24 PM Andrew MacLeod wrote: heh. or just + int_range<2> r; + if (!fold_range (r, cons

Re: [PATCH] Support threading of just the exit edge

2022-08-17 Thread Richard Biener via Gcc-patches
On Tue, 16 Aug 2022, Andrew MacLeod wrote: > > On 8/16/22 05:18, Richard Biener wrote: > > On Mon, 15 Aug 2022, Aldy Hernandez wrote: > > > >> On Mon, Aug 15, 2022 at 9:24 PM Andrew MacLeod wrote: > >>> heh. or just > >>> > >>> > >>> + int_range<2> r; > >>> + if (!fold_range (r, const_

Re: [PATCH] Support threading of just the exit edge

2022-08-16 Thread Andrew MacLeod via Gcc-patches
On 8/16/22 05:18, Richard Biener wrote: On Mon, 15 Aug 2022, Aldy Hernandez wrote: On Mon, Aug 15, 2022 at 9:24 PM Andrew MacLeod wrote: heh. or just + int_range<2> r; + if (!fold_range (r, const_cast (cond_stmt)) + || !r.singleton_p (&val)) if you do not provide a range

Re: [PATCH] Support threading of just the exit edge

2022-08-16 Thread Richard Biener via Gcc-patches
On Tue, 16 Aug 2022, Richard Biener wrote: > On Tue, 16 Aug 2022, Aldy Hernandez wrote: > > > On Tue, Aug 16, 2022 at 11:18 AM Richard Biener wrote: > > > > > > On Mon, 15 Aug 2022, Aldy Hernandez wrote: > > > > > > > On Mon, Aug 15, 2022 at 9:24 PM Andrew MacLeod > > > > wrote: > > > > > > >

Re: [PATCH] Support threading of just the exit edge

2022-08-16 Thread Aldy Hernandez via Gcc-patches
On Tue, Aug 16, 2022 at 1:32 PM Richard Biener wrote: > > On Tue, 16 Aug 2022, Aldy Hernandez wrote: > > > On Tue, Aug 16, 2022 at 11:18 AM Richard Biener wrote: > > > > > > On Mon, 15 Aug 2022, Aldy Hernandez wrote: > > > > > > > On Mon, Aug 15, 2022 at 9:24 PM Andrew MacLeod > > > > wrote: >

Re: [PATCH] Support threading of just the exit edge

2022-08-16 Thread Richard Biener via Gcc-patches
On Tue, 16 Aug 2022, Aldy Hernandez wrote: > On Tue, Aug 16, 2022 at 11:18 AM Richard Biener wrote: > > > > On Mon, 15 Aug 2022, Aldy Hernandez wrote: > > > > > On Mon, Aug 15, 2022 at 9:24 PM Andrew MacLeod > > > wrote: > > > > > > > > heh. or just > > > > > > > > > > > > + int_range<2> r

Re: [PATCH] Support threading of just the exit edge

2022-08-16 Thread Aldy Hernandez via Gcc-patches
On Tue, Aug 16, 2022 at 11:18 AM Richard Biener wrote: > > On Mon, 15 Aug 2022, Aldy Hernandez wrote: > > > On Mon, Aug 15, 2022 at 9:24 PM Andrew MacLeod wrote: > > > > > > heh. or just > > > > > > > > > + int_range<2> r; > > > + if (!fold_range (r, const_cast (cond_stmt)) > > > +

Re: [PATCH] Support threading of just the exit edge

2022-08-16 Thread Richard Biener via Gcc-patches
On Mon, 15 Aug 2022, Aldy Hernandez wrote: > On Mon, Aug 15, 2022 at 9:24 PM Andrew MacLeod wrote: > > > > heh. or just > > > > > > + int_range<2> r; > > + if (!fold_range (r, const_cast (cond_stmt)) > > + || !r.singleton_p (&val)) > > > > > > if you do not provide a range_query t

Re: [PATCH] Support threading of just the exit edge

2022-08-15 Thread Aldy Hernandez via Gcc-patches
On Mon, Aug 15, 2022 at 9:24 PM Andrew MacLeod wrote: > > heh. or just > > > + int_range<2> r; > + if (!fold_range (r, const_cast (cond_stmt)) > + || !r.singleton_p (&val)) > > > if you do not provide a range_query to any of the fold_using_range code, > it defaults to: > > fur_sour

Re: [PATCH] Support threading of just the exit edge

2022-08-15 Thread Andrew MacLeod via Gcc-patches
heh. or just +  int_range<2> r; +  if (!fold_range (r, const_cast (cond_stmt)) +      || !r.singleton_p (&val)) if you do not provide a range_query to any of the fold_using_range code, it defaults to: fur_source::fur_source (range_query *q) {   if (q)     m_query = q;   else if (cf

Re: [PATCH] Support threading of just the exit edge

2022-08-15 Thread Aldy Hernandez via Gcc-patches
On Mon, Aug 15, 2022 at 11:39 AM Richard Biener wrote: > > On Fri, 12 Aug 2022, Aldy Hernandez wrote: > > > On Fri, Aug 12, 2022 at 2:01 PM Richard Biener wrote: > > > > > > This started with noticing we add ENTRY_BLOCK to our threads > > > just for the sake of simplifying the conditional at the

Re: [PATCH] Support threading of just the exit edge

2022-08-15 Thread Jeff Law via Gcc-patches
On 8/12/2022 10:03 AM, Aldy Hernandez wrote: On Fri, Aug 12, 2022 at 2:01 PM Richard Biener wrote: This started with noticing we add ENTRY_BLOCK to our threads just for the sake of simplifying the conditional at the end of the first block in a function. That's not really threading anything

Re: [PATCH] Support threading of just the exit edge

2022-08-15 Thread Richard Biener via Gcc-patches
On Fri, 12 Aug 2022, Aldy Hernandez wrote: > On Fri, Aug 12, 2022 at 2:01 PM Richard Biener wrote: > > > > This started with noticing we add ENTRY_BLOCK to our threads > > just for the sake of simplifying the conditional at the end of > > the first block in a function. That's not really threadin

Re: [PATCH] Support threading of just the exit edge

2022-08-12 Thread Aldy Hernandez via Gcc-patches
On Fri, Aug 12, 2022 at 2:01 PM Richard Biener wrote: > > This started with noticing we add ENTRY_BLOCK to our threads > just for the sake of simplifying the conditional at the end of > the first block in a function. That's not really threading > anything but it ends up duplicating the entry bloc