Mercurial > hg > CbC > CbC_gcc
diff gcc/optabs-query.h @ 132:d34655255c78
update gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 10:21:07 +0900 |
parents | 84e7813d76e9 |
children | 1830386684a0 |
line wrap: on
line diff
--- a/gcc/optabs-query.h Thu Oct 25 08:08:40 2018 +0900 +++ b/gcc/optabs-query.h Thu Oct 25 10:21:07 2018 +0900 @@ -1,5 +1,5 @@ /* IR-agnostic target query functions relating to optabs - Copyright (C) 2001-2017 Free Software Foundation, Inc. + Copyright (C) 2001-2018 Free Software Foundation, Inc. This file is part of GCC. @@ -23,6 +23,14 @@ #include "insn-opinit.h" #include "target.h" +/* Return true if OP is a conversion optab. */ + +inline bool +convert_optab_p (optab op) +{ + return op > unknown_optab && op <= LAST_CONV_OPTAB; +} + /* Return the insn used to implement mode MODE of OP, or CODE_FOR_nothing if the target does not have such an insn. */ @@ -43,7 +51,7 @@ machine_mode from_mode) { unsigned scode = (op << 16) | (from_mode << 8) | to_mode; - gcc_assert (op > unknown_optab && op <= LAST_CONV_OPTAB); + gcc_assert (convert_optab_p (op)); return raw_optab_handler (scode); } @@ -166,13 +174,16 @@ enum insn_code can_float_p (machine_mode, machine_mode, int); enum insn_code can_fix_p (machine_mode, machine_mode, int, bool *); bool can_conditionally_move_p (machine_mode mode); -bool can_vec_perm_p (machine_mode, bool, vec_perm_indices *); -enum insn_code widening_optab_handler (optab, machine_mode, machine_mode); +opt_machine_mode qimode_for_vec_perm (machine_mode); +bool selector_fits_mode_p (machine_mode, const vec_perm_indices &); +bool can_vec_perm_var_p (machine_mode); +bool can_vec_perm_const_p (machine_mode, const vec_perm_indices &, + bool = true); /* Find a widening optab even if it doesn't widen as much as we want. */ -#define find_widening_optab_handler(A,B,C,D) \ - find_widening_optab_handler_and_mode (A, B, C, D, NULL) +#define find_widening_optab_handler(A, B, C) \ + find_widening_optab_handler_and_mode (A, B, C, NULL) enum insn_code find_widening_optab_handler_and_mode (optab, machine_mode, - machine_mode, int, + machine_mode, machine_mode *); int can_mult_highpart_p (machine_mode, bool); bool can_vec_mask_load_store_p (machine_mode, machine_mode, bool); @@ -180,5 +191,23 @@ bool can_atomic_exchange_p (machine_mode, bool); bool can_atomic_load_p (machine_mode); bool lshift_cheap_p (bool); +bool supports_vec_gather_load_p (); +bool supports_vec_scatter_store_p (); + +/* Version of find_widening_optab_handler_and_mode that operates on + specific mode types. */ + +template<typename T> +inline enum insn_code +find_widening_optab_handler_and_mode (optab op, const T &to_mode, + const T &from_mode, T *found_mode) +{ + machine_mode tmp; + enum insn_code icode = find_widening_optab_handler_and_mode + (op, machine_mode (to_mode), machine_mode (from_mode), &tmp); + if (icode != CODE_FOR_nothing && found_mode) + *found_mode = as_a <T> (tmp); + return icode; +} #endif