Re: [RFC] Don't move cold code out of loop by checking bb count

2021-11-04 Thread Richard Biener via Gcc-patches
On Wed, Nov 3, 2021 at 2:29 PM Xionghu Luo wrote: > > > > On 2021/10/29 19:48, Richard Biener wrote: > > I'm talking about the can_sm_ref_p call, in that context 'loop' will > > be the outermost loop of > > interest, and we are calling this for all stores in a loop. We're doing > > > > +bool > >

Re: [RFC] Don't move cold code out of loop by checking bb count

2021-11-03 Thread Xionghu Luo via Gcc-patches
On 2021/10/29 19:48, Richard Biener wrote: > I'm talking about the can_sm_ref_p call, in that context 'loop' will > be the outermost loop of > interest, and we are calling this for all stores in a loop. We're doing > > +bool > +ref_in_loop_hot_body::operator () (mem_ref_loc *loc) > +{ > +

Re: [RFC] Don't move cold code out of loop by checking bb count

2021-11-03 Thread Xionghu Luo via Gcc-patches
On 2021/10/29 19:48, Richard Biener wrote: > I'm talking about the can_sm_ref_p call, in that context 'loop' will > be the outermost loop of > interest, and we are calling this for all stores in a loop. We're doing > > +bool > +ref_in_loop_hot_body::operator () (mem_ref_loc *loc) > +{ > +

Re: [RFC] Don't move cold code out of loop by checking bb count

2021-10-29 Thread Richard Biener via Gcc-patches
On Wed, Oct 27, 2021 at 4:40 AM Xionghu Luo wrote: > > > > On 2021/10/26 21:20, Richard Biener wrote: > > On Mon, Oct 18, 2021 at 6:29 AM Xionghu Luo wrote: > >> > >> > >> > >> On 2021/10/15 16:11, Richard Biener wrote: > >>> On Sat, Oct 9, 2021 at 5:45 AM Xionghu Luo wrote: > > Hi, >

Re: [RFC] Don't move cold code out of loop by checking bb count

2021-10-27 Thread Xionghu Luo via Gcc-patches
On 2021/10/27 20:54, Jan Hubicka wrote: >> Hi, >> >> On 2021/9/28 20:09, Richard Biener wrote: >>> On Fri, Sep 24, 2021 at 8:29 AM Xionghu Luo wrote: Update the patch to v3, not sure whether you prefer the paste style and continue to link the previous thread as Segher dislikes

Re: [RFC] Don't move cold code out of loop by checking bb count

2021-10-27 Thread Jan Hubicka via Gcc-patches
> Hi, > > On 2021/9/28 20:09, Richard Biener wrote: > > On Fri, Sep 24, 2021 at 8:29 AM Xionghu Luo wrote: > >> > >> Update the patch to v3, not sure whether you prefer the paste style > >> and continue to link the previous thread as Segher dislikes this... > >> > >> > >> [PATCH v3] Don't move

Re: [RFC] Don't move cold code out of loop by checking bb count

2021-10-26 Thread Xionghu Luo via Gcc-patches
On 2021/10/26 21:20, Richard Biener wrote: > On Mon, Oct 18, 2021 at 6:29 AM Xionghu Luo wrote: >> >> >> >> On 2021/10/15 16:11, Richard Biener wrote: >>> On Sat, Oct 9, 2021 at 5:45 AM Xionghu Luo wrote: Hi, On 2021/9/28 20:09, Richard Biener wrote: > On Fri, Sep 24,

Re: [RFC] Don't move cold code out of loop by checking bb count

2021-10-26 Thread Richard Biener via Gcc-patches
On Mon, Oct 18, 2021 at 6:29 AM Xionghu Luo wrote: > > > > On 2021/10/15 16:11, Richard Biener wrote: > > On Sat, Oct 9, 2021 at 5:45 AM Xionghu Luo wrote: > >> > >> Hi, > >> > >> On 2021/9/28 20:09, Richard Biener wrote: > >>> On Fri, Sep 24, 2021 at 8:29 AM Xionghu Luo wrote: > >

Re: [RFC] Don't move cold code out of loop by checking bb count

2021-10-17 Thread Xionghu Luo via Gcc-patches
On 2021/10/15 16:11, Richard Biener wrote: > On Sat, Oct 9, 2021 at 5:45 AM Xionghu Luo wrote: >> >> Hi, >> >> On 2021/9/28 20:09, Richard Biener wrote: >>> On Fri, Sep 24, 2021 at 8:29 AM Xionghu Luo wrote: Update the patch to v3, not sure whether you prefer the paste style

Re: [RFC] Don't move cold code out of loop by checking bb count

2021-10-15 Thread Richard Biener via Gcc-patches
On Sat, Oct 9, 2021 at 5:45 AM Xionghu Luo wrote: > > Hi, > > On 2021/9/28 20:09, Richard Biener wrote: > > On Fri, Sep 24, 2021 at 8:29 AM Xionghu Luo wrote: > >> > >> Update the patch to v3, not sure whether you prefer the paste style > >> and continue to link the previous thread as Segher

Re: [RFC] Don't move cold code out of loop by checking bb count

2021-10-08 Thread Xionghu Luo via Gcc-patches
Hi, On 2021/9/28 20:09, Richard Biener wrote: > On Fri, Sep 24, 2021 at 8:29 AM Xionghu Luo wrote: >> >> Update the patch to v3, not sure whether you prefer the paste style >> and continue to link the previous thread as Segher dislikes this... >> >> >> [PATCH v3] Don't move cold code out of loop

Re: [RFC] Don't move cold code out of loop by checking bb count

2021-09-28 Thread Richard Biener via Gcc-patches
On Fri, Sep 24, 2021 at 8:29 AM Xionghu Luo wrote: > > Update the patch to v3, not sure whether you prefer the paste style > and continue to link the previous thread as Segher dislikes this... > > > [PATCH v3] Don't move cold code out of loop by checking bb count > > > Changes: > 1. Handle

Re: [RFC] Don't move cold code out of loop by checking bb count

2021-09-24 Thread Xionghu Luo via Gcc-patches
Update the patch to v3, not sure whether you prefer the paste style and continue to link the previous thread as Segher dislikes this... [PATCH v3] Don't move cold code out of loop by checking bb count Changes: 1. Handle max_loop in determine_max_movement instead of outermost_invariant_loop. 2.

Re: [RFC] Don't move cold code out of loop by checking bb count

2021-09-22 Thread Xionghu Luo via Gcc-patches
On 2021/9/23 10:13, Xionghu Luo via Gcc-patches wrote: On 2021/9/22 17:14, Richard Biener wrote: On Thu, Sep 9, 2021 at 3:56 AM Xionghu Luo wrote: On 2021/8/26 19:33, Richard Biener wrote: On Tue, Aug 10, 2021 at 4:03 AM Xionghu Luo wrote: Hi, On 2021/8/6 20:15, Richard Biener

Re: [RFC] Don't move cold code out of loop by checking bb count

2021-09-22 Thread Xionghu Luo via Gcc-patches
On 2021/9/22 17:14, Richard Biener wrote: On Thu, Sep 9, 2021 at 3:56 AM Xionghu Luo wrote: On 2021/8/26 19:33, Richard Biener wrote: On Tue, Aug 10, 2021 at 4:03 AM Xionghu Luo wrote: Hi, On 2021/8/6 20:15, Richard Biener wrote: On Mon, Aug 2, 2021 at 7:05 AM Xiong Hu Luo wrote:

Re: [RFC] Don't move cold code out of loop by checking bb count

2021-09-22 Thread Richard Biener via Gcc-patches
On Thu, Sep 9, 2021 at 3:56 AM Xionghu Luo wrote: > > > > On 2021/8/26 19:33, Richard Biener wrote: > > On Tue, Aug 10, 2021 at 4:03 AM Xionghu Luo wrote: > >> > >> Hi, > >> > >> On 2021/8/6 20:15, Richard Biener wrote: > >>> On Mon, Aug 2, 2021 at 7:05 AM Xiong Hu Luo wrote: > >

Re: [RFC] Don't move cold code out of loop by checking bb count

2021-09-08 Thread Xionghu Luo via Gcc-patches
On 2021/8/26 19:33, Richard Biener wrote: On Tue, Aug 10, 2021 at 4:03 AM Xionghu Luo wrote: Hi, On 2021/8/6 20:15, Richard Biener wrote: On Mon, Aug 2, 2021 at 7:05 AM Xiong Hu Luo wrote: There was a patch trying to avoid move cold block out of loop:

Re: [RFC] Don't move cold code out of loop by checking bb count

2021-08-26 Thread Richard Biener via Gcc-patches
On Tue, Aug 10, 2021 at 4:03 AM Xionghu Luo wrote: > > Hi, > > On 2021/8/6 20:15, Richard Biener wrote: > > On Mon, Aug 2, 2021 at 7:05 AM Xiong Hu Luo wrote: > >> > >> There was a patch trying to avoid move cold block out of loop: > >> > >>

Re: [RFC] Don't move cold code out of loop by checking bb count

2021-08-09 Thread Ulrich Drepper via Gcc-patches
On Tue, Aug 10, 2021 at 4:03 AM Xionghu Luo via Gcc-patches wrote: > For this case, theorotically I think the master GCC will optimize it to: > > invariant; > for (;;) > if (unlikely_cond) > for (;;) > ; > > 'invariant' is moved out of outer loop, but with the patch, it

Re: [RFC] Don't move cold code out of loop by checking bb count

2021-08-09 Thread Xionghu Luo via Gcc-patches
Hi, On 2021/8/6 20:15, Richard Biener wrote: > On Mon, Aug 2, 2021 at 7:05 AM Xiong Hu Luo wrote: >> >> There was a patch trying to avoid move cold block out of loop: >> >> https://gcc.gnu.org/pipermail/gcc/2014-November/215551.html >> >> Richard suggested to "never hoist anything from a bb with

Re: [RFC] Don't move cold code out of loop by checking bb count

2021-08-06 Thread Richard Biener via Gcc-patches
On Mon, Aug 2, 2021 at 7:05 AM Xiong Hu Luo wrote: > > There was a patch trying to avoid move cold block out of loop: > > https://gcc.gnu.org/pipermail/gcc/2014-November/215551.html > > Richard suggested to "never hoist anything from a bb with lower execution > frequency to a bb with higher one

[RFC] Don't move cold code out of loop by checking bb count

2021-08-01 Thread Xiong Hu Luo via Gcc-patches
There was a patch trying to avoid move cold block out of loop: https://gcc.gnu.org/pipermail/gcc/2014-November/215551.html Richard suggested to "never hoist anything from a bb with lower execution frequency to a bb with higher one in LIM invariantness_dom_walker before_dom_children". This patch