Re: [PATCH] [RTL/fwprop] Allow propagations from inner loop to outer loop.

2022-01-07 Thread Richard Sandiford via Gcc-patches
liuhongt via Gcc-patches writes: >>Huh, loop_father should never be NULL. Maybe when fwprop is run after RTL >>loop opts you instead want to add a check for current_loops or >>alternelatively initialize loops in fwprop. > > Oh, I didn't know that, i once saw there's ICE and thought it's related

[PATCH] [RTL/fwprop] Allow propagations from inner loop to outer loop.

2022-01-06 Thread liuhongt via Gcc-patches
>Huh, loop_father should never be NULL. Maybe when fwprop is run after RTL loop >opts you instead want to add a check for current_loops or alternelatively >initialize loops in fwprop. Oh, I didn't know that, i once saw there's ICE and thought it's related to NULL loop. But I can't reproduce the

Re: [PATCH] [RTL/fwprop] Allow propagations from inner loop to outer loop.

2022-01-06 Thread Richard Biener via Gcc-patches
On January 6, 2022 7:51:48 AM GMT+01:00, liuhongt wrote: >> that's flow_loop_nested_p (loop *outer, loop *inner) which >> is implemented in O(1). Note behavior for outer == inner >> might be different (didn't check your implementation too hard) >> >Thanks, it seems flow_loop_nested_p assume outer

[PATCH] [RTL/fwprop] Allow propagations from inner loop to outer loop.

2022-01-05 Thread liuhongt via Gcc-patches
> that's flow_loop_nested_p (loop *outer, loop *inner) which > is implemented in O(1). Note behavior for outer == inner > might be different (didn't check your implementation too hard) > Thanks, it seems flow_loop_nested_p assume outer and inner not to be NULL. So I add some conditions to check NU

Re: [PATCH] [RTL/fwprop] Allow propagations from inner loop to outer loop.

2022-01-05 Thread Richard Biener via Gcc-patches
On Wed, Jan 5, 2022 at 6:39 AM liuhongt via Gcc-patches wrote: > > Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}. > Ok for trunk. > > gcc/ChangeLog: > > PR rtl/103750 > * cfgloop.h (loop_contains_p): New function. > * fwprop.c (forward_propagate_into): Allow prop

[PATCH] [RTL/fwprop] Allow propagations from inner loop to outer loop.

2022-01-04 Thread liuhongt via Gcc-patches
Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}. Ok for trunk. gcc/ChangeLog: PR rtl/103750 * cfgloop.h (loop_contains_p): New function. * fwprop.c (forward_propagate_into): Allow propagations from inner loop to outer loop. gcc/testsuite/ChangeLog: