2015-12-18 Ville Voutilainen <ville.voutilainen@gmail.com>
[official-gcc.git] / gcc / optabs-tree.h
blob5b966ca92b8d2ed91f26d94cc92393d5b14b3427
1 /* Tree-based target query functions relating to optabs
2 Copyright (C) 2001-2015 Free Software Foundation, Inc.
4 This file is part of GCC.
6 GCC is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3, or (at your option)
9 any later version.
11 GCC is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
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/>. */
20 #ifndef GCC_OPTABS_TREE_H
21 #define GCC_OPTABS_TREE_H
23 #include "optabs-query.h"
25 /* An extra flag to control optab_for_tree_code's behavior. This is needed to
26 distinguish between machines with a vector shift that takes a scalar for the
27 shift amount vs. machines that take a vector for the shift amount. */
28 enum optab_subtype
30 optab_default,
31 optab_scalar,
32 optab_vector
35 /* Return the optab used for computing the given operation on the type given by
36 the second argument. The third argument distinguishes between the types of
37 vector shifts and rotates. */
38 optab optab_for_tree_code (enum tree_code, const_tree, enum optab_subtype);
39 optab scalar_reduc_to_vector (optab, const_tree);
40 bool supportable_convert_operation (enum tree_code, tree, tree, tree *,
41 enum tree_code *);
42 bool expand_vec_cmp_expr_p (tree, tree);
43 bool expand_vec_cond_expr_p (tree, tree);
44 void init_tree_optimization_optabs (tree);
46 #endif