diff options
Diffstat (limited to 'gcc/target.def')
-rw-r--r-- | gcc/target.def | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/gcc/target.def b/gcc/target.def index 38903eb..5dd8f25 100644 --- a/gcc/target.def +++ b/gcc/target.def @@ -1918,17 +1918,21 @@ implementation approaches itself.", NULL) /* Return true if the target supports misaligned store/load of a - specific factor denoted in the third parameter. The last parameter - is true if the access is defined in a packed struct. */ + specific factor denoted in the third parameter. The second to the last + parameter is true if the access is defined in a packed struct and + the last parameter is true if the access is a gather/scatter. */ DEFHOOK (support_vector_misalignment, "This hook should return true if the target supports misaligned vector\n\ store/load of a specific factor denoted in the @var{misalignment}\n\ parameter. The vector store/load should be of machine mode @var{mode} and\n\ -the elements in the vectors should be of type @var{type}. @var{is_packed}\n\ -parameter is true if the memory access is defined in a packed struct.", +the elements in the vectors should be of type @var{type}. The\n\ +@var{is_packed} parameter is true if the misalignment is unknown and the\n\ +memory access is defined in a packed struct. @var{is_gather_scatter} is true\n\ +if the load/store is a gather or scatter.", bool, - (machine_mode mode, const_tree type, int misalignment, bool is_packed), + (machine_mode mode, const_tree type, int misalignment, bool is_packed, + bool is_gather_scatter), default_builtin_support_vector_misalignment) /* Returns the preferred mode for SIMD operations for the specified @@ -2056,6 +2060,20 @@ all zeros. GCC can then try to branch around the instruction instead.", (unsigned ifn), default_empty_mask_is_expensive) +/* Prefer gather/scatter loads/stores to e.g. elementwise accesses if\n\ +we cannot use a contiguous access. */ +DEFHOOK +(prefer_gather_scatter, + "This hook returns TRUE if gather loads or scatter stores are cheaper on\n\ +this target than a sequence of elementwise loads or stores. The @var{mode}\n\ +and @var{scale} correspond to the @code{gather_load} and\n\ +@code{scatter_store} instruction patterns. The @var{group_size} is the\n\ +number of scalar elements in each scalar loop iteration that are to be\n\ +combined into the vector.", + bool, + (machine_mode mode, int scale, unsigned int group_size), + hook_bool_mode_int_unsigned_false) + /* Target builtin that implements vector gather operation. */ DEFHOOK (builtin_gather, |