tree-ssa-loop-niter.h 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /* Header file for loop interation estimates.
  2. Copyright (C) 2013-2019 Free Software Foundation, Inc.
  3. This file is part of GCC.
  4. GCC is free software; you can redistribute it and/or modify it under
  5. the terms of the GNU General Public License as published by the Free
  6. Software Foundation; either version 3, or (at your option) any later
  7. version.
  8. GCC is distributed in the hope that it will be useful, but WITHOUT ANY
  9. WARRANTY; without even the implied warranty of MERCHANTABILITY or
  10. FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
  11. 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_TREE_SSA_LOOP_NITER_H
  16. #define GCC_TREE_SSA_LOOP_NITER_H
  17. extern tree expand_simple_operations (tree, tree = NULL);
  18. extern tree simplify_using_initial_conditions (struct loop *, tree);
  19. extern bool loop_only_exit_p (const struct loop *, const_edge);
  20. extern bool number_of_iterations_exit (struct loop *, edge,
  21. struct tree_niter_desc *niter, bool,
  22. bool every_iteration = true);
  23. extern bool number_of_iterations_exit_assumptions (struct loop *, edge,
  24. struct tree_niter_desc *,
  25. gcond **, bool = true);
  26. extern tree find_loop_niter (struct loop *, edge *);
  27. extern bool finite_loop_p (struct loop *);
  28. extern tree loop_niter_by_eval (struct loop *, edge);
  29. extern tree find_loop_niter_by_eval (struct loop *, edge *);
  30. extern bool estimated_loop_iterations (struct loop *, widest_int *);
  31. extern HOST_WIDE_INT estimated_loop_iterations_int (struct loop *);
  32. extern bool max_loop_iterations (struct loop *, widest_int *);
  33. extern HOST_WIDE_INT max_loop_iterations_int (struct loop *);
  34. extern bool likely_max_loop_iterations (struct loop *, widest_int *);
  35. extern HOST_WIDE_INT likely_max_loop_iterations_int (struct loop *);
  36. extern HOST_WIDE_INT max_stmt_executions_int (struct loop *);
  37. extern HOST_WIDE_INT likely_max_stmt_executions_int (struct loop *);
  38. extern HOST_WIDE_INT estimated_stmt_executions_int (struct loop *);
  39. extern bool max_stmt_executions (struct loop *, widest_int *);
  40. extern bool likely_max_stmt_executions (struct loop *, widest_int *);
  41. extern bool estimated_stmt_executions (struct loop *, widest_int *);
  42. extern void estimate_numbers_of_iterations (function *);
  43. extern void estimate_numbers_of_iterations (struct loop *);
  44. extern bool stmt_dominates_stmt_p (gimple *, gimple *);
  45. extern bool nowrap_type_p (tree);
  46. extern bool scev_probably_wraps_p (tree, tree, tree, gimple *,
  47. struct loop *, bool);
  48. extern void free_numbers_of_iterations_estimates (struct loop *);
  49. extern void free_numbers_of_iterations_estimates (function *);
  50. extern tree simplify_replace_tree (tree, tree, tree, tree (*)(tree) = NULL);
  51. extern void substitute_in_loop_info (struct loop *, tree, tree);
  52. #endif /* GCC_TREE_SSA_LOOP_NITER_H */