This is the mail archive of the
mailing list for the GCC project.
Re: PR target/30213 (x86 memset if wrong for small block sizes)
- From: Roger Sayle <roger at eyesopen dot com>
- To: Jan Hubicka <jh at suse dot cz>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 19 Dec 2006 20:56:13 -0700 (MST)
- Subject: Re: PR target/30213 (x86 memset if wrong for small block sizes)
On Tue, 19 Dec 2006, Jan Hubicka wrote:
> PR target/30213
> * i386.c (expand_setmem_epilogue): Fix formating.
> (dsmalest_pow2_greater_than): New function.
> (ix86_expand_movmem): Improve comments; avoid re-computing of
> epilogue size.
> (promote_duplicated_reg_to_size): Break out from ...
> (expand_setmem): ... this one; reorganize promotion code;
> improve comments; avoid recomputation of epilogue size.
> ! profitable. expand_clrmem contains similar code. The code is depends
> ! on architecture and epilogue, but is aways has the same overall
> ! structure:
"The code depends upon architecture and alignment, but always has the same
> ! also needed for correctness, since prologue assume the blocks is
> ! greater than desired alignment.
"... since prologue assume the block is larger than the desrired
> ! to DESIRED_ALIGN. It is emit only when ALIGN is smaller and up to
> ! DESIRED_ALIGN - ALIGN bytes can be copied.
"It is emitted only when ALIGN is less than DESIRED_ALIGN and ..."
> ! We emit either jump tree on power of two sized blocks, or a byte loop.
"We emit either a jump tree ..."
> ! /* Step 0: decide on preffered algorithm, desired alignment and
> ! size of chunks to be copied by main loop. */
"Step 0: Decide on preferred algorithm ..." We capitalize the first
letter after "Step N:" in all the other comments.
> ! /* Epilogue always copy COUNT_EXP & EPILOGUE_SIZE_NEEDED bytes.
"Epilogue always copies COUNT_EXP & ..."
> ! /* When the main loop was done, COUNT_EXP might hold original count,
> ! while we want to copy only COUNT_EXP & SIZE_NEEDED bytes.
"When the main loop is done, ..."
> + /* Duplicate value VAL using promote_duplicated_reg into maximal size that will
> + be needed by main loop copygin SIZE_NEEDED chunks and prologue getting
> + allignment from ALIGN to DESIRED_ALIGN. */
"... copying ... alignment ... "
> /* Expand string clear operation (bzero). Use i386 string operations when
> ! profitable. See expand_movmem comment for explanation of individual
> ! steps performed.. */
"... steps performed. */"
[Most of these typos are then repeated in the new comments in the memset
Ok for mainline with those changes.