diff options
author | Jakub Jelinek <jakub@redhat.com> | 2008-12-23 00:34:07 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2008-12-23 00:34:07 +0100 |
commit | 805903b5251042186344830f35161eaec7fedb69 (patch) | |
tree | 5971e3d6c2cd233e84f89d0395f6d5c1beecc681 /gcc/expr.h | |
parent | d797a4ed797b6ba140e7fc9059835b74335cbcf5 (diff) | |
download | gcc-805903b5251042186344830f35161eaec7fedb69.zip gcc-805903b5251042186344830f35161eaec7fedb69.tar.gz gcc-805903b5251042186344830f35161eaec7fedb69.tar.bz2 |
re PR target/38488 (x86_64 generates much larger and slightly slower code for memset)
* config/i386/i386.c (expand_setmem_via_rep_stos): Add ORIG_VALUE
argument. If ORIG_VALUE is const0_rtx and COUNT is constant,
set MEM_SIZE on DESTMEM.
(ix86_expand_setmem): Adjust callers.
PR target/38488
* expr.h (get_mem_align_offset): New prototype.
* emit-rtl.c (get_mem_align_offset): New function.
* config/i386/i386.c (expand_movmem_via_rep_mov): Set MEM_SIZE correctly.
(expand_constant_movmem_prologue, expand_constant_setmem_prologue):
New functions.
(ix86_expand_movmem): Optimize if COUNT_EXP
is constant, desired_align > align and dst & (desired_align - 1)
is computable at compile time.
(ix86_expand_setmem): Likewise.
* builtins.c (get_memory_rtx): Try to derive MEM_ATTRS from not yet
resolved SAVE_EXPR or POINTER_PLUS_EXPR.
From-SVN: r142891
Diffstat (limited to 'gcc/expr.h')
-rw-r--r-- | gcc/expr.h | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -695,6 +695,11 @@ extern void set_mem_attributes (rtx, tree, int); expecting that it'll be added back in later. */ extern void set_mem_attributes_minus_bitpos (rtx, tree, int, HOST_WIDE_INT); +/* Return OFFSET if XEXP (MEM, 0) - OFFSET is known to be ALIGN + bits aligned for 0 <= OFFSET < ALIGN / BITS_PER_UNIT, or + -1 if not known. */ +extern int get_mem_align_offset (rtx, int); + /* Assemble the static constant template for function entry trampolines. */ extern rtx assemble_trampoline_template (void); |