summaryrefslogtreecommitdiffstats
path: root/gcc/expr.h
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2005-05-03 22:22:02 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2005-05-03 22:22:02 +0000
commit0b25db2159a2082ba5b70c17bd8ca2800036e50c (patch)
tree4366b13e06448d5bee414e03f73b1dc515a238a0 /gcc/expr.h
parentb53451fc9637f05de2a734820c168df6fb155561 (diff)
downloadppe42-gcc-0b25db2159a2082ba5b70c17bd8ca2800036e50c.tar.gz
ppe42-gcc-0b25db2159a2082ba5b70c17bd8ca2800036e50c.zip
PR middle-end/21265
* expr.h (enum block_op_methods): Add BLOCK_OP_TAILCALL. (clear_storage): Add argument. * expr.c (emit_block_move_via_libcall, clear_storage_via_libcall): Add tailcall argument, set CALL_EXPR_TAILCALL of the CALL_EXPR to tailcall. (emit_block_move): Handle BLOCK_OP_TAILCALL method. (clear_storage): Add method argument, handle BLOCK_OP_TAILCALL. (store_expr, store_constructor): Adjust callers. * builtins.c (expand_builtin_memcpy): Pass BLOCK_OP_TAILCALL to emit_block_move if CALL_EXPR_TAILCALL (exp). (expand_builtin_memmove): Add ORIG_EXP argument, copy CALL_EXPR_TAILCALL from ORIG_EXP to the new CALL_EXPR. (expand_builtin_bcopy): Replace ARGLIST and TYPE arguments with EXP. Pass EXP to expand_builtin_memmove. (expand_builtin_memset): Add ORIG_EXP argument, pass BLOCK_OP_TAILCALL to clear_storage if CALL_EXPR_TAILCALL (orig_exp). (expand_builtin_bzero): Replace ARGLIST argument with EXP. Pass EXP to expand_builtin_memset. (expand_builtin_strcmp): Copy CALL_EXPR_TAILCALL from EXP to the new CALL_EXPR. (expand_builtin_strncmp): Likewise. (expand_builtin_printf): Replace ARGLIST argument with EXP. Copy CALL_EXPR_TAILCALL from EXP to the new CALL_EXPR. (expand_builtin_fprintf): Likewise. (expand_builtin): Adjust calls to expand_builtin_{memmove,bcopy,memset,bzero,{,f}printf}. * gcc.dg/20050503-1.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99187 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expr.h')
-rw-r--r--gcc/expr.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/expr.h b/gcc/expr.h
index f462dc84b47..267daf0119f 100644
--- a/gcc/expr.h
+++ b/gcc/expr.h
@@ -367,7 +367,9 @@ enum block_op_methods
{
BLOCK_OP_NORMAL,
BLOCK_OP_NO_LIBCALL,
- BLOCK_OP_CALL_PARM
+ BLOCK_OP_CALL_PARM,
+ /* Like BLOCK_OP_NORMAL, but the libcall can be tail call optimized. */
+ BLOCK_OP_TAILCALL
};
extern void init_block_move_fn (const char *);
@@ -419,7 +421,7 @@ extern void use_group_regs (rtx *, rtx);
/* Write zeros through the storage of OBJECT.
If OBJECT has BLKmode, SIZE is its length in bytes. */
-extern rtx clear_storage (rtx, rtx);
+extern rtx clear_storage (rtx, rtx, enum block_op_methods);
/* Determine whether the LEN bytes can be moved by using several move
instructions. Return nonzero if a call to move_by_pieces should
OpenPOWER on IntegriCloud