summaryrefslogtreecommitdiff
path: root/gcc/optabs.h
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2011-10-25 21:29:48 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2011-10-25 21:29:48 +0000
commite21c468f20819a1d6545741af280a77e4f89c8e0 (patch)
tree646bec23201b08685d3560602023733c6d9f7259 /gcc/optabs.h
parent4b50824be623275a757eacd82ef171fd69cf455f (diff)
downloadgcc-e21c468f20819a1d6545741af280a77e4f89c8e0.tar.gz
Change vec_perm checking and expansion level.
The can_vec_perm_p interface changed to use a C integer array. This allows easy re-use from the rtl level and the gimple level within the vectorizer. It allows both to determine if a given permutation is (un-)supported without having to create tree/rtl garbage. The expand_vec_perm interface changed to use rtl. This allows easy re-use from the rtl level, so that expand_vec_perm can be used in the fallback implementation of other optabs. * target.def (vec_perm_const_ok): Change parameters to mode and array of indicies. * doc/tm.texi: Rebuild. * config/i386/i386.c (ix86_vectorize_vec_perm_const_ok): Change parameters to mode and array of indicies. * expr.c (expand_expr_real_2) [VEC_PERM_EXPR]: Expand operands here. * optabs.c (can_vec_perm_p): Rename from can_vec_perm_expr_p. Change parameters to mode and array of indicies. (expand_vec_perm_1): Rename from expand_vec_perm_expr_1. (expand_vec_perm): Rename from expand_vec_perm_expr. Change parameters to mode and rtx inputs. Try lowering to QImode vec_perm_const before trying fully variable permutation. * optabs.h: Update decls. * tree-vect-generic.c (lower_vec_perm): Extract array of indices from VECTOR_CST to pass to can_vec_perm_p. * tree-vect-slp.c (vect_get_mask_element): Change mask parameter type from int pointer to unsigned char pointer. (vect_transform_slp_perm_load): Update for change to can_vec_perm_p. * tree-vect-stmts.c (perm_mask_for_reverse): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180449 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/optabs.h')
-rw-r--r--gcc/optabs.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/optabs.h b/gcc/optabs.h
index 86e0ec93bc1..9e3c5b06fc4 100644
--- a/gcc/optabs.h
+++ b/gcc/optabs.h
@@ -901,10 +901,10 @@ extern rtx expand_vec_cond_expr (tree, tree, tree, tree, rtx);
extern rtx expand_vec_shift_expr (sepops, rtx);
/* Return tree if target supports vector operations for VEC_PERM_EXPR. */
-extern bool can_vec_perm_expr_p (tree, tree);
+extern bool can_vec_perm_p (enum machine_mode, bool, const unsigned char *);
/* Generate code for VEC_PERM_EXPR. */
-extern rtx expand_vec_perm_expr (tree, tree, tree, tree, rtx);
+extern rtx expand_vec_perm (enum machine_mode, rtx, rtx, rtx, rtx);
/* Return the insn used to implement mode MODE of OP, or CODE_FOR_nothing
if the target does not have such an insn. */