summaryrefslogtreecommitdiff
path: root/gcc/builtins.h
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2014-08-08 09:18:40 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2014-08-08 09:18:40 +0000
commitb9ea678c30842c814d5f071cda0a7668d86ec330 (patch)
tree621bf63e4a68ad2ac887a0c87d72c5746a320a34 /gcc/builtins.h
parent9c3d0685d3c1326b09b7ed914a09be21f4985653 (diff)
downloadgcc-b9ea678c30842c814d5f071cda0a7668d86ec330.tar.gz
2014-08-08 Richard Biener <rguenther@suse.de>
* builtins.c (c_getstr, readonly_data_expr, init_target_chars, target_percent, target_percent_s): Export. (var_decl_component_p, fold_builtin_memory_op, fold_builtin_memset, fold_builtin_bzero, fold_builtin_strcpy, fold_builtin_strncpy, fold_builtin_strcat, fold_builtin_fputs, fold_builtin_memory_chk, fold_builtin_stxcpy_chk, fold_builtin_stxncpy_chk, fold_builtin_sprintf_chk_1, fold_builtin_snprintf_chk_1): Move to gimple-fold.c. (fold_builtin_2): Remove handling of bzero, fputs, fputs_unlocked, strcat and strcpy. (fold_builtin_3): Remove handling of memset, bcopy, memcpy, mempcpy, memmove, strncpy, strcpy_chk and stpcpy_chk. (fold_builtin_4): Remove handling of memcpy_chk, mempcpy_chk, memmove_chk, memset_chk, strncpy_chk and stpncpy_chk. (rewrite_call_expr_array): Remove. (fold_builtin_sprintf_chk): Likewise. (fold_builtin_snprintf_chk): Likewise. (fold_builtin_varargs): Remove handling of sprintf_chk, vsprintf_chk, snprintf_chk and vsnprintf_chk. (gimple_fold_builtin_sprintf_chk): Remove. (gimple_fold_builtin_snprintf_chk): Likewise. (gimple_fold_builtin_varargs): Likewise. (fold_call_stmt): Do not call gimple_fold_builtin_varargs. * predict.c (optimize_bb_for_size_p): Handle NULL bb. * gimple.c (gimple_seq_add_seq_without_update): New function. * gimple.h (gimple_seq_add_seq_without_update): Declare. * gimple-fold.c: Include output.h. (gsi_replace_with_seq_vops): New function, split out from ... (gimplify_and_update_call_from_tree): ... here. (replace_call_with_value): New function. (replace_call_with_call_and_fold): Likewise. (var_decl_component_p): Moved from builtins.c. (gimple_fold_builtin_memory_op): Moved from builtins.c fold_builtin_memory_op and rewritten to GIMPLE. (gimple_fold_builtin_memset): Likewise. (gimple_fold_builtin_strcpy): Likewise. (gimple_fold_builtin_strncpy): Likewise. (gimple_fold_builtin_strcat): Likewise. (gimple_fold_builtin_fputs): Likewise. (gimple_fold_builtin_memory_chk): Likewise. (gimple_fold_builtin_stxcpy_chk): Likewise. (gimple_fold_builtin_stxncpy_chk): Likewise. (gimple_fold_builtin_snprintf_chk): Likewise. (gimple_fold_builtin_sprintf_chk): Likewise. (gimple_fold_builtin_strlen): New function. (gimple_fold_builtin_with_strlen): New function split out from gimple_fold_builtin. (gimple_fold_builtin): Change signature and handle bzero, memset, bcopy, memcpy, mempcpy and memmove folding here. Call gimple_fold_builtin_with_strlen. (gimple_fold_call): Adjust. * gcc.dg/strlenopt-8.c: Remove XFAIL. * gcc.dg/tree-prof/stringop-2.c: Adjust. * gfortran.dg/array_memcpy_4.f90: Likewise. * gfortran.dg/trim_optimize_1.f90: Likewise. * gfortran.dg/trim_optimize_2.f90: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213753 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/builtins.h')
-rw-r--r--gcc/builtins.h18
1 files changed, 6 insertions, 12 deletions
diff --git a/gcc/builtins.h b/gcc/builtins.h
index 8be990e8d8a..cac2de6a06f 100644
--- a/gcc/builtins.h
+++ b/gcc/builtins.h
@@ -71,29 +71,23 @@ extern void expand_builtin_trap (void);
extern rtx expand_builtin (tree, rtx, rtx, enum machine_mode, int);
extern enum built_in_function builtin_mathfn_code (const_tree);
extern tree fold_builtin_expect (location_t, tree, tree, tree);
-extern tree fold_builtin_strcpy (location_t, tree, tree, tree, tree);
-extern tree fold_builtin_strncpy (location_t, tree, tree, tree, tree, tree);
extern tree fold_fma (location_t, tree, tree, tree, tree);
extern bool avoid_folding_inline_builtin (tree);
extern tree fold_call_expr (location_t, tree, bool);
extern tree fold_builtin_call_array (location_t, tree, tree, int, tree *);
extern bool validate_gimple_arglist (const_gimple, ...);
extern rtx default_expand_builtin (tree, rtx, rtx, enum machine_mode, int);
-extern tree fold_builtin_strcat (location_t, tree, tree, tree);
-extern tree fold_builtin_fputs (location_t, tree, tree, bool, bool, tree);
extern bool fold_builtin_next_arg (tree, bool);
-extern tree fold_builtin_memory_chk (location_t, tree, tree, tree, tree, tree,
- tree, bool, enum built_in_function);
-extern tree fold_builtin_stxcpy_chk (location_t, tree, tree, tree, tree, tree,
- bool, enum built_in_function);
-extern tree fold_builtin_stxncpy_chk (location_t, tree, tree, tree, tree, tree,
- bool, enum built_in_function);
-extern tree gimple_fold_builtin_snprintf_chk (gimple, tree,
- enum built_in_function);
extern tree do_mpc_arg2 (tree, tree, tree, int, int (*)(mpc_ptr, mpc_srcptr, mpc_srcptr, mpc_rnd_t));
extern tree fold_call_stmt (gimple, bool);
extern void set_builtin_user_assembler_name (tree decl, const char *asmspec);
extern bool is_simple_builtin (tree);
extern bool is_inexpensive_builtin (tree);
+extern bool readonly_data_expr (tree exp);
+extern const char *c_getstr (tree);
+extern bool init_target_chars (void);
+extern unsigned HOST_WIDE_INT target_percent;
+extern char target_percent_s[3];
+
#endif