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