1*38fd1498Szrj /* Tree-based target query functions relating to optabs 2*38fd1498Szrj Copyright (C) 2001-2018 Free Software Foundation, Inc. 3*38fd1498Szrj 4*38fd1498Szrj This file is part of GCC. 5*38fd1498Szrj 6*38fd1498Szrj GCC is free software; you can redistribute it and/or modify 7*38fd1498Szrj it under the terms of the GNU General Public License as published by 8*38fd1498Szrj the Free Software Foundation; either version 3, or (at your option) 9*38fd1498Szrj any later version. 10*38fd1498Szrj 11*38fd1498Szrj GCC is distributed in the hope that it will be useful, 12*38fd1498Szrj but WITHOUT ANY WARRANTY; without even the implied warranty of 13*38fd1498Szrj MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14*38fd1498Szrj GNU General Public License for more details. 15*38fd1498Szrj 16*38fd1498Szrj You should have received a copy of the GNU General Public License 17*38fd1498Szrj along with GCC; see the file COPYING3. If not see 18*38fd1498Szrj <http://www.gnu.org/licenses/>. */ 19*38fd1498Szrj 20*38fd1498Szrj #ifndef GCC_OPTABS_TREE_H 21*38fd1498Szrj #define GCC_OPTABS_TREE_H 22*38fd1498Szrj 23*38fd1498Szrj #include "optabs-query.h" 24*38fd1498Szrj 25*38fd1498Szrj /* An extra flag to control optab_for_tree_code's behavior. This is needed to 26*38fd1498Szrj distinguish between machines with a vector shift that takes a scalar for the 27*38fd1498Szrj shift amount vs. machines that take a vector for the shift amount. */ 28*38fd1498Szrj enum optab_subtype 29*38fd1498Szrj { 30*38fd1498Szrj optab_default, 31*38fd1498Szrj optab_scalar, 32*38fd1498Szrj optab_vector 33*38fd1498Szrj }; 34*38fd1498Szrj 35*38fd1498Szrj /* Return the optab used for computing the given operation on the type given by 36*38fd1498Szrj the second argument. The third argument distinguishes between the types of 37*38fd1498Szrj vector shifts and rotates. */ 38*38fd1498Szrj optab optab_for_tree_code (enum tree_code, const_tree, enum optab_subtype); 39*38fd1498Szrj bool supportable_convert_operation (enum tree_code, tree, tree, tree *, 40*38fd1498Szrj enum tree_code *); 41*38fd1498Szrj bool expand_vec_cmp_expr_p (tree, tree, enum tree_code); 42*38fd1498Szrj bool expand_vec_cond_expr_p (tree, tree, enum tree_code); 43*38fd1498Szrj void init_tree_optimization_optabs (tree); 44*38fd1498Szrj bool target_supports_op_p (tree, enum tree_code, 45*38fd1498Szrj enum optab_subtype = optab_default); 46*38fd1498Szrj 47*38fd1498Szrj #endif 48