optabs-tree.h 1.7 KB

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