]>
Commit | Line | Data |
---|---|---|
f151c9e1 RS |
1 | /* A representation of vector permutation indices. |
2 | Copyright (C) 2017 Free Software Foundation, Inc. | |
3 | ||
4 | This file is part of GCC. | |
5 | ||
6 | GCC is free software; you can redistribute it and/or modify it under | |
7 | the terms of the GNU General Public License as published by the Free | |
8 | Software Foundation; either version 3, or (at your option) any later | |
9 | version. | |
10 | ||
11 | GCC is distributed in the hope that it will be useful, but WITHOUT ANY | |
12 | WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
13 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
14 | for more details. | |
15 | ||
16 | You should have received a copy of the GNU General Public License | |
17 | along with GCC; see the file COPYING3. If not see | |
18 | <http://www.gnu.org/licenses/>. */ | |
19 | ||
20 | #ifndef GCC_VEC_PERN_INDICES_H | |
21 | #define GCC_VEC_PERN_INDICES_H 1 | |
22 | ||
23 | /* This class represents a constant permutation vector, such as that used | |
24 | as the final operand to a VEC_PERM_EXPR. */ | |
25 | class vec_perm_indices : public auto_vec<unsigned short, 32> | |
26 | { | |
27 | typedef unsigned short element_type; | |
28 | typedef auto_vec<element_type, 32> parent_type; | |
29 | ||
30 | public: | |
31 | vec_perm_indices () {} | |
32 | vec_perm_indices (unsigned int nunits) : parent_type (nunits) {} | |
33 | ||
34 | void new_expanded_vector (const vec_perm_indices &, unsigned int); | |
35 | ||
36 | bool all_in_range_p (element_type, element_type) const; | |
37 | ||
38 | private: | |
39 | vec_perm_indices (const vec_perm_indices &); | |
40 | }; | |
41 | ||
42 | /* Temporary. */ | |
43 | typedef vec_perm_indices vec_perm_builder; | |
44 | typedef vec_perm_indices auto_vec_perm_indices; | |
45 | ||
46 | bool tree_to_vec_perm_builder (vec_perm_builder *, tree); | |
47 | rtx vec_perm_indices_to_rtx (machine_mode, const vec_perm_indices &); | |
48 | ||
49 | #endif |