Re: [PATCH] Restrict LOOP_ALIGN to loop headers only.

2019-10-29 Thread Martin Liška
On 8/9/19 2:51 PM, Martin Liška wrote: > On 8/9/19 2:13 PM, Michael Matz wrote: >> Hi, >> >> On Fri, 9 Aug 2019, Richard Biener wrote: >> >>> Of course I'm still afraid that the other code exists for a reason >>> (tuning/hack/whatever...). >>> >>> Note that with the patch we're now applying

Re: [PATCH] Restrict LOOP_ALIGN to loop headers only.

2019-08-09 Thread Martin Liška
On 8/9/19 2:13 PM, Michael Matz wrote: > Hi, > > On Fri, 9 Aug 2019, Richard Biener wrote: > >> Of course I'm still afraid that the other code exists for a reason >> (tuning/hack/whatever...). >> >> Note that with the patch we're now applying LOOP_ALIGN to L2 here: >> if (a) >> foo = bar;

Re: [PATCH] Restrict LOOP_ALIGN to loop headers only.

2019-08-09 Thread Michael Matz
Hi, On Fri, 9 Aug 2019, Richard Biener wrote: > Of course I'm still afraid that the other code exists for a reason > (tuning/hack/whatever...). > > Note that with the patch we're now applying LOOP_ALIGN to L2 here: > if (a) > foo = bar; > L2: > blah; > > because there's a jump-around

Re: [PATCH] Restrict LOOP_ALIGN to loop headers only.

2019-08-09 Thread Richard Biener
On Thu, Aug 8, 2019 at 2:24 PM Michael Matz wrote: > > Hi, > > On Thu, 8 Aug 2019, Martin Liška wrote: > > > > So docs have > > > > > > @defmac JUMP_ALIGN (@var{label}) > > > The alignment (log base 2) to put in front of @var{label}, which is > > > a common destination of jumps and has no

Re: [PATCH] Restrict LOOP_ALIGN to loop headers only.

2019-08-08 Thread Michael Matz
Hi, On Thu, 8 Aug 2019, Martin Liška wrote: > > So docs have > > > > @defmac JUMP_ALIGN (@var{label}) > > The alignment (log base 2) to put in front of @var{label}, which is > > a common destination of jumps and has no fallthru incoming edge. So, per docu: JUMP_ALIGN implies !fallthru ... > >

Re: [PATCH] Restrict LOOP_ALIGN to loop headers only.

2019-08-08 Thread Martin Liška
On 7/11/19 11:42 AM, Richard Biener wrote: > On Wed, Jul 10, 2019 at 5:52 PM Richard Biener > wrote: >> >> On July 10, 2019 2:11:17 PM GMT+02:00, Michael Matz wrote: >>> Hi, >>> >>> On Tue, 9 Jul 2019, Richard Biener wrote: >>> > The basic block index is not a DFS index, so no, that's not a

Re: [PATCH] Restrict LOOP_ALIGN to loop headers only.

2019-07-11 Thread Richard Biener
On Wed, Jul 10, 2019 at 5:52 PM Richard Biener wrote: > > On July 10, 2019 2:11:17 PM GMT+02:00, Michael Matz wrote: > >Hi, > > > >On Tue, 9 Jul 2019, Richard Biener wrote: > > > >> >The basic block index is not a DFS index, so no, that's not a test > >for > >> >backedge. > >> > >> I think in

Re: [PATCH] Restrict LOOP_ALIGN to loop headers only.

2019-07-10 Thread Richard Biener
On July 10, 2019 2:11:17 PM GMT+02:00, Michael Matz wrote: >Hi, > >On Tue, 9 Jul 2019, Richard Biener wrote: > >> >The basic block index is not a DFS index, so no, that's not a test >for >> >backedge. >> >> I think in CFG RTL mode the BB index designates the order of the BBs >in >> the object

Re: [PATCH] Restrict LOOP_ALIGN to loop headers only.

2019-07-10 Thread Michael Matz
Hi, On Tue, 9 Jul 2019, Richard Biener wrote: > >The basic block index is not a DFS index, so no, that's not a test for > >backedge. > > I think in CFG RTL mode the BB index designates the order of the BBs in > the object file? So this is a way to identify backwards jumps? Even if it means a

Re: [PATCH] Restrict LOOP_ALIGN to loop headers only.

2019-07-09 Thread Richard Biener
On July 9, 2019 3:10:19 PM GMT+02:00, Michael Matz wrote: >Hi, > >On Tue, 9 Jul 2019, Richard Biener wrote: > >> > So a "backedge" in this sense would be e->dest->index < >e->src->index. >> > No? >> >> To me the following would make sense. > >The basic block index is not a DFS index, so no,

Re: [PATCH] Restrict LOOP_ALIGN to loop headers only.

2019-07-09 Thread Michael Matz
Hi, On Tue, 9 Jul 2019, Richard Biener wrote: > > So a "backedge" in this sense would be e->dest->index < e->src->index. > > No? > > To me the following would make sense. The basic block index is not a DFS index, so no, that's not a test for backedge. Ciao, Michael.

Re: [PATCH] Restrict LOOP_ALIGN to loop headers only.

2019-07-09 Thread Richard Biener
On Tue, Jul 9, 2019 at 12:23 PM Richard Biener wrote: > > On Tue, Jul 9, 2019 at 12:22 PM Richard Biener > wrote: > > > > On Tue, Jul 9, 2019 at 11:56 AM Jan Hubicka wrote: > > > > > > > Hi. > > > > > > > > I'm suggesting to restrict LOOP_ALIGN to only loop headers. That are the > > > > basic

Re: [PATCH] Restrict LOOP_ALIGN to loop headers only.

2019-07-09 Thread Richard Biener
On Tue, Jul 9, 2019 at 12:22 PM Richard Biener wrote: > > On Tue, Jul 9, 2019 at 11:56 AM Jan Hubicka wrote: > > > > > Hi. > > > > > > I'm suggesting to restrict LOOP_ALIGN to only loop headers. That are the > > > basic blocks for which it makes the biggest sense. I quite some binary > > > size

Re: [PATCH] Restrict LOOP_ALIGN to loop headers only.

2019-07-09 Thread Richard Biener
On Tue, Jul 9, 2019 at 11:56 AM Jan Hubicka wrote: > > > Hi. > > > > I'm suggesting to restrict LOOP_ALIGN to only loop headers. That are the > > basic blocks for which it makes the biggest sense. I quite some binary > > size reductions on SPEC2006 and SPEC2017. Speed numbers are also slightly >

Re: [PATCH] Restrict LOOP_ALIGN to loop headers only.

2019-07-09 Thread Martin Liška
On 7/9/19 11:56 AM, Jan Hubicka wrote: >> Hi. >> >> I'm suggesting to restrict LOOP_ALIGN to only loop headers. That are the >> basic blocks for which it makes the biggest sense. I quite some binary >> size reductions on SPEC2006 and SPEC2017. Speed numbers are also slightly >> positive. >> >>

Re: [PATCH] Restrict LOOP_ALIGN to loop headers only.

2019-07-09 Thread Jan Hubicka
> Hi. > > I'm suggesting to restrict LOOP_ALIGN to only loop headers. That are the > basic blocks for which it makes the biggest sense. I quite some binary > size reductions on SPEC2006 and SPEC2017. Speed numbers are also slightly > positive. > > Patch can bootstrap on x86_64-linux-gnu and