Re: [PATCH] MIPS: don't expand large block move

2023-05-30 Thread Maciej W. Rozycki
On Wed, 24 May 2023, YunQiang Su wrote: > > or even: > > > > if (INTVAL (length) <= MIPS_MAX_MOVE_BYTES_STRAIGHT) > > ... > > else if (INTVAL (length) < 64 && optimize) > > ... > > > > I don't think this is a good option, since somebody may add some code, > and may bre

Re: [PATCH] MIPS: don't expand large block move

2023-05-23 Thread YunQiang Su
Maciej W. Rozycki 于2023年5月20日周六 03:21写道: > > On Fri, 19 May 2023, Jeff Law wrote: > > > > diff --git a/gcc/config/mips/mips.cc b/gcc/config/mips/mips.cc > > > index ca491b981a3..00f26d5e923 100644 > > > --- a/gcc/config/mips/mips.cc > > > +++ b/gcc/config/mips/mips.cc > > > @@ -8313,6 +8313,12 @@

Re: [PATCH] MIPS: don't expand large block move

2023-05-19 Thread Maciej W. Rozycki
On Fri, 19 May 2023, Jeff Law wrote: > > diff --git a/gcc/config/mips/mips.cc b/gcc/config/mips/mips.cc > > index ca491b981a3..00f26d5e923 100644 > > --- a/gcc/config/mips/mips.cc > > +++ b/gcc/config/mips/mips.cc > > @@ -8313,6 +8313,12 @@ mips_expand_block_move (rtx dest, rtx src, rtx > > length

Re: [PATCH] MIPS: don't expand large block move

2023-05-19 Thread Jeff Law via Gcc-patches
On 5/19/23 00:11, YunQiang Su wrote: On platform with LWL/LWR, mips_block_move_loop is always used, which expand __buildin_memcpy/strcpy to a loop of lwl/lwr/swl/swl etc. For short (normally <=64), it has better performance, but when the src/dest are long, use memcpy/strcpy lib call may have

[PATCH] MIPS: don't expand large block move

2023-05-18 Thread YunQiang Su
On platform with LWL/LWR, mips_block_move_loop is always used, which expand __buildin_memcpy/strcpy to a loop of lwl/lwr/swl/swl etc. For short (normally <=64), it has better performance, but when the src/dest are long, use memcpy/strcpy lib call may have better performance. At the same time, lib