Re: [PATCH 1/3] loop-invariant: Don't move cold bb instructions to preheader in RTL

2021-12-29 Thread Xionghu Luo via Gcc-patches
On 2021/12/29 20:55, Jan Hubicka wrote: >>> >>> From: Xiong Hu Luo >>> >>> gcc/ChangeLog: >>> >>> * loop-invariant.c (find_invariants_bb): Check profile count >>> before motion. >>> (find_invariants_body): Add argument. >>> >>> gcc/testsuite/ChangeLog: >>> >>> *

Re: [PATCH 1/3] loop-invariant: Don't move cold bb instructions to preheader in RTL

2021-12-29 Thread Jan Hubicka via Gcc-patches
> > > > From: Xiong Hu Luo > > > > gcc/ChangeLog: > > > > * loop-invariant.c (find_invariants_bb): Check profile count > > before motion. > > (find_invariants_body): Add argument. > > > > gcc/testsuite/ChangeLog: > > > > * gcc.dg/loop-invariant-2.c: New. OK, thanks! Honza

Re: [PATCH 1/3] loop-invariant: Don't move cold bb instructions to preheader in RTL

2021-12-28 Thread Xionghu Luo via Gcc-patches
is based on BB before the FOR_BB_INSNS loop... >> >> always_executed is useful here to avoid the situation where bb->count or >> preheader->count is wrong and it would disable wanted transformation. >> >> always_executed is just a bug I noticed while looking at

Re: [PATCH 1/3] loop-invariant: Don't move cold bb instructions to preheader in RTL

2021-12-16 Thread Xionghu Luo via Gcc-patches
test is based on BB before the FOR_BB_INSNS loop... > > always_executed is useful here to avoid the situation where bb->count or > preheader->count is wrong and it would disable wanted transformation. > > always_executed is just a bug I noticed while looking at the c

Re: [PATCH 1/3] loop-invariant: Don't move cold bb instructions to preheader in RTL

2021-12-16 Thread Jan Hubicka via Gcc-patches
> > OK. Comments like? > > /* Don't move insn of cold BB out of loop to preheader to reduce calculations >and register live range in hot loop with cold BB. */ Looks good. > > > And maybe some dump log will help tracking in xxx.c.271r.loop2_invariant. > > --- a/gcc/loop-invariant.c >

Re: [PATCH 1/3] loop-invariant: Don't move cold bb instructions to preheader in RTL

2021-12-14 Thread Xionghu Luo via Gcc-patches
On 2021/12/13 18:24, Jan Hubicka wrote: >>> gcc/ChangeLog: >>> >>> * loop-invariant.c (find_invariants_bb): Check profile count >>> before motion. >>> (find_invariants_body): Add argument. >>> --- >>> gcc/loop-invariant.c | 10 +++--- >>> 1 file changed, 7 insertions(+), 3

Re: [PATCH 1/3] loop-invariant: Don't move cold bb instructions to preheader in RTL

2021-12-13 Thread Jan Hubicka via Gcc-patches
> > gcc/ChangeLog: > > > > * loop-invariant.c (find_invariants_bb): Check profile count > > before motion. > > (find_invariants_body): Add argument. > > --- > > gcc/loop-invariant.c | 10 +++--- > > 1 file changed, 7 insertions(+), 3 deletions(-) > > > > diff --git

Re: [PATCH 1/3] loop-invariant: Don't move cold bb instructions to preheader in RTL

2021-12-13 Thread Jan Hubicka via Gcc-patches
> gcc/ChangeLog: > > * loop-invariant.c (find_invariants_bb): Check profile count > before motion. > (find_invariants_body): Add argument. > --- > gcc/loop-invariant.c | 10 +++--- > 1 file changed, 7 insertions(+), 3 deletions(-) > > diff --git a/gcc/loop-invariant.c

Re: [PATCH 1/3] loop-invariant: Don't move cold bb instructions to preheader in RTL

2021-12-08 Thread Jeff Law via Gcc-patches
On 12/7/2021 10:54 PM, Xionghu Luo via Gcc-patches wrote: gcc/ChangeLog: * loop-invariant.c (find_invariants_bb): Check profile count before motion. (find_invariants_body): Add argument. OK jeff

[PATCH 1/3] loop-invariant: Don't move cold bb instructions to preheader in RTL

2021-12-07 Thread Xionghu Luo via Gcc-patches
gcc/ChangeLog: * loop-invariant.c (find_invariants_bb): Check profile count before motion. (find_invariants_body): Add argument. --- gcc/loop-invariant.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/gcc/loop-invariant.c