]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/vec-perm-indices.h
Remove vec_perm_const optab
[thirdparty/gcc.git] / gcc / vec-perm-indices.h
CommitLineData
f151c9e1
RS
1/* A representation of vector permutation indices.
2 Copyright (C) 2017 Free Software Foundation, Inc.
3
4This file is part of GCC.
5
6GCC is free software; you can redistribute it and/or modify it under
7the terms of the GNU General Public License as published by the Free
8Software Foundation; either version 3, or (at your option) any later
9version.
10
11GCC is distributed in the hope that it will be useful, but WITHOUT ANY
12WARRANTY; without even the implied warranty of MERCHANTABILITY or
13FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14for more details.
15
16You should have received a copy of the GNU General Public License
17along 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. */
25class 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
30public:
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
38private:
39 vec_perm_indices (const vec_perm_indices &);
40};
41
42/* Temporary. */
43typedef vec_perm_indices vec_perm_builder;
44typedef vec_perm_indices auto_vec_perm_indices;
45
46bool tree_to_vec_perm_builder (vec_perm_builder *, tree);
47rtx vec_perm_indices_to_rtx (machine_mode, const vec_perm_indices &);
48
49#endif