From eb69361d0c5e98423e7ad7a537bc3250e083de4a Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Thu, 17 May 2018 10:51:42 +0000 Subject: Allow gimple_build with internal functions This patch makes the function versions of gimple_build and gimple_simplify take combined_fns rather than built_in_codes, so that they work with internal functions too. The old gimple_builds were unused, so no existing callers need to be updated. 2018-05-17 Richard Sandiford gcc/ * gimple-fold.h (gimple_build): Make the function forms take combined_fn rather than built_in_function. (gimple_simplify): Likewise. * gimple-match-head.c (gimple_simplify): Likewise. * gimple-fold.c (gimple_build): Likewise. * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build rather than gimple_build_call_internal. (get_initial_defs_for_reduction): Likewise. (vect_create_epilog_for_reduction): Likewise. (vectorizable_live_operation): Likewise. From-SVN: r260315 --- gcc/gimple-fold.h | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) (limited to 'gcc/gimple-fold.h') diff --git a/gcc/gimple-fold.h b/gcc/gimple-fold.h index d0c4044..282b1d6 100644 --- a/gcc/gimple-fold.h +++ b/gcc/gimple-fold.h @@ -86,28 +86,25 @@ gimple_build (gimple_seq *seq, { return gimple_build (seq, UNKNOWN_LOCATION, code, type, op0, op1, op2); } -extern tree gimple_build (gimple_seq *, location_t, - enum built_in_function, tree, tree); +extern tree gimple_build (gimple_seq *, location_t, combined_fn, tree, tree); inline tree -gimple_build (gimple_seq *seq, - enum built_in_function fn, tree type, tree arg0) +gimple_build (gimple_seq *seq, combined_fn fn, tree type, tree arg0) { return gimple_build (seq, UNKNOWN_LOCATION, fn, type, arg0); } -extern tree gimple_build (gimple_seq *, location_t, - enum built_in_function, tree, tree, tree); +extern tree gimple_build (gimple_seq *, location_t, combined_fn, + tree, tree, tree); inline tree -gimple_build (gimple_seq *seq, - enum built_in_function fn, tree type, tree arg0, tree arg1) +gimple_build (gimple_seq *seq, combined_fn fn, + tree type, tree arg0, tree arg1) { return gimple_build (seq, UNKNOWN_LOCATION, fn, type, arg0, arg1); } -extern tree gimple_build (gimple_seq *, location_t, - enum built_in_function, tree, tree, tree, tree); +extern tree gimple_build (gimple_seq *, location_t, combined_fn, + tree, tree, tree, tree); inline tree -gimple_build (gimple_seq *seq, - enum built_in_function fn, tree type, - tree arg0, tree arg1, tree arg2) +gimple_build (gimple_seq *seq, combined_fn fn, + tree type, tree arg0, tree arg1, tree arg2) { return gimple_build (seq, UNKNOWN_LOCATION, fn, type, arg0, arg1, arg2); } @@ -153,11 +150,11 @@ extern tree gimple_simplify (enum tree_code, tree, tree, tree, gimple_seq *, tree (*)(tree)); extern tree gimple_simplify (enum tree_code, tree, tree, tree, tree, gimple_seq *, tree (*)(tree)); -extern tree gimple_simplify (enum built_in_function, tree, tree, +extern tree gimple_simplify (combined_fn, tree, tree, gimple_seq *, tree (*)(tree)); -extern tree gimple_simplify (enum built_in_function, tree, tree, tree, +extern tree gimple_simplify (combined_fn, tree, tree, tree, gimple_seq *, tree (*)(tree)); -extern tree gimple_simplify (enum built_in_function, tree, tree, tree, tree, +extern tree gimple_simplify (combined_fn, tree, tree, tree, tree, gimple_seq *, tree (*)(tree)); #endif /* GCC_GIMPLE_FOLD_H */ -- cgit v1.1