Hi Segher,
Thanks a lot for your time and helpful comments!
Segher Boessenkool writes:
> Hi Jiufu,
>
> On Thu, Jul 09, 2020 at 04:01:38PM +0800, Jiufu Guo wrote:
>> Segher Boessenkool writes:
...
> If the generic code decides to unroll big loops with calls *and* jumps,
> there is a big problem
Hi,
Segher Boessenkool writes:
> Hi Jiufu,
>
> On Thu, Jul 09, 2020 at 04:01:38PM +0800, Jiufu Guo wrote:
>> Segher Boessenkool writes:
>> >> But for each single condition, loop unrolling may still be helpful.
>> >> While, if these conditions are all occur in a loop, it would be more
>> >> po
Hi Jiufu,
On Thu, Jul 09, 2020 at 04:01:38PM +0800, Jiufu Guo wrote:
> Segher Boessenkool writes:
> >> But for each single condition, loop unrolling may still be helpful.
> >> While, if these conditions are all occur in a loop, it would be more
> >> possible to get negative impacts after unrolled
Segher Boessenkool writes:
Hi,
> On Wed, Jul 08, 2020 at 11:39:56AM +0800, Jiufu Guo wrote:
>> Segher Boessenkool writes:
>> > I am not happy about what is considered "a complex loop" here.
>> For early exit, which may cause and *next* unrolled iterations may be
>> not executed, then unroll may
On Wed, Jul 08, 2020 at 11:39:56AM +0800, Jiufu Guo wrote:
> Segher Boessenkool writes:
> > I am not happy about what is considered "a complex loop" here.
> For early exit, which may cause and *next* unrolled iterations may be
> not executed, then unroll may be not benifit.
Yes, and it can well r
Segher Boessenkool writes:
Thanks all!
> Hi!
>
> On Mon, Jul 06, 2020 at 03:13:13PM +0800, guojiufu wrote:
>> For very small loops (< 6 insns), it would be fine to unroll 4
>> times to use cache line better. Like below loops:
>> `while (i) a[--i] = NULL; while (p < e) *d++ = *p++;`
>
> Yes,
will schmidt writes:
Thanks!
> On Mon, 2020-07-06 at 15:13 +0800, guojiufu via Gcc-patches wrote:
>
> Hi,
>
> Assorted comments below. thanks :-)
>
>> For very small loops (< 6 insns), it would be fine to unroll 4
>> times to use cache line better. Like below loops:
>> `while (i) a[--i] = NUL
Hi!
On Mon, Jul 06, 2020 at 03:13:13PM +0800, guojiufu wrote:
> For very small loops (< 6 insns), it would be fine to unroll 4
> times to use cache line better. Like below loops:
> `while (i) a[--i] = NULL; while (p < e) *d++ = *p++;`
Yes, definitely.
> And for very complex loops which may
On Mon, 2020-07-06 at 15:13 +0800, guojiufu via Gcc-patches wrote:
Hi,
Assorted comments below. thanks :-)
> For very small loops (< 6 insns), it would be fine to unroll 4
> times to use cache line better. Like below loops:
> `while (i) a[--i] = NULL; while (p < e) *d++ = *p++;`
>
> And