xref: /netbsd-src/external/gpl3/gcc.old/dist/gcc/optabs-tree.h (revision 8feb0f0b7eaff0608f8350bbfa3098827b4bb91b)
11debfc3dSmrg /* Tree-based target query functions relating to optabs
2*8feb0f0bSmrg    Copyright (C) 2001-2020 Free Software Foundation, Inc.
31debfc3dSmrg 
41debfc3dSmrg This file is part of GCC.
51debfc3dSmrg 
61debfc3dSmrg GCC is free software; you can redistribute it and/or modify
71debfc3dSmrg it under the terms of the GNU General Public License as published by
81debfc3dSmrg the Free Software Foundation; either version 3, or (at your option)
91debfc3dSmrg any later version.
101debfc3dSmrg 
111debfc3dSmrg GCC is distributed in the hope that it will be useful,
121debfc3dSmrg but WITHOUT ANY WARRANTY; without even the implied warranty of
131debfc3dSmrg MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
141debfc3dSmrg GNU General Public License for more details.
151debfc3dSmrg 
161debfc3dSmrg You should have received a copy of the GNU General Public License
171debfc3dSmrg along with GCC; see the file COPYING3.  If not see
181debfc3dSmrg <http://www.gnu.org/licenses/>.  */
191debfc3dSmrg 
201debfc3dSmrg #ifndef GCC_OPTABS_TREE_H
211debfc3dSmrg #define GCC_OPTABS_TREE_H
221debfc3dSmrg 
231debfc3dSmrg #include "optabs-query.h"
241debfc3dSmrg 
251debfc3dSmrg /* An extra flag to control optab_for_tree_code's behavior.  This is needed to
261debfc3dSmrg    distinguish between machines with a vector shift that takes a scalar for the
271debfc3dSmrg    shift amount vs. machines that take a vector for the shift amount.  */
281debfc3dSmrg enum optab_subtype
291debfc3dSmrg {
301debfc3dSmrg   optab_default,
311debfc3dSmrg   optab_scalar,
321debfc3dSmrg   optab_vector
331debfc3dSmrg };
341debfc3dSmrg 
351debfc3dSmrg /* Return the optab used for computing the given operation on the type given by
361debfc3dSmrg    the second argument.  The third argument distinguishes between the types of
371debfc3dSmrg    vector shifts and rotates.  */
381debfc3dSmrg optab optab_for_tree_code (enum tree_code, const_tree, enum optab_subtype);
39*8feb0f0bSmrg bool supportable_convert_operation (enum tree_code, tree, tree,
401debfc3dSmrg 				    enum tree_code *);
411debfc3dSmrg bool expand_vec_cmp_expr_p (tree, tree, enum tree_code);
421debfc3dSmrg bool expand_vec_cond_expr_p (tree, tree, enum tree_code);
431debfc3dSmrg void init_tree_optimization_optabs (tree);
44a2dc1f3fSmrg bool target_supports_op_p (tree, enum tree_code,
45a2dc1f3fSmrg 			   enum optab_subtype = optab_default);
461debfc3dSmrg 
471debfc3dSmrg #endif
48