8sa1-gcc/gcc/tree-ssa-loop-niter.h
Richard Biener f10d2d85c9 cfgloop.h (get_loop_exit_edges): Add extra parameter denoting loop body, defaulted to NULL.
2019-11-25  Richard Biener  <rguenther@suse.de>

	* cfgloop.h (get_loop_exit_edges): Add extra parameter denoting
	loop body, defaulted to NULL.
	(single_likely_exit): Add exit vector argument
	* tree-ssa-loop-niter.h (loop_only_exit_p): Add loop body argument.
	(number_of_iterations_exit): Likewise.
	(number_of_iterations_exit_assumptions): Likewise.
	* cfgloop.c (get_loop_exit_edges): Use passed in loop body
	if not NULL.
	* cfgloopanal.c (single_likely_exit): Use passed in exit vector.
	* tree-ssa-loop-ivcanon.c (canonicalize_loop_induction_variables):
	Compute exit vector around call to single_likely_exit.
	* tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Pass down
	loop body to loop_only_exit_p.
	* tree-ssa-loop-niter.c (loop_only_exit_p): Get loop body from
	caller.
	(number_of_iterations_exit_assumptions): Get loop body from caller
	if not NULL.
	(number_of_iterations_exit): Pass through new loop body arg.
	(infer_loop_bounds_from_undefined): Get loop body from caller.
	(estimate_numbers_of_iterations): Compute loop body once.

From-SVN: r278667
2019-11-25 07:51:38 +00:00

65 lines
2.9 KiB
C++

/* Header file for loop interation estimates.
Copyright (C) 2013-2019 Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 3, or (at your option) any later
version.
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
#ifndef GCC_TREE_SSA_LOOP_NITER_H
#define GCC_TREE_SSA_LOOP_NITER_H
extern tree expand_simple_operations (tree, tree = NULL);
extern tree simplify_using_initial_conditions (class loop *, tree);
extern bool loop_only_exit_p (const class loop *, basic_block *body,
const_edge);
extern bool number_of_iterations_exit (class loop *, edge,
class tree_niter_desc *niter, bool,
bool every_iteration = true,
basic_block * = NULL);
extern bool number_of_iterations_exit_assumptions (class loop *, edge,
class tree_niter_desc *,
gcond **, bool = true,
basic_block * = NULL);
extern tree find_loop_niter (class loop *, edge *);
extern bool finite_loop_p (class loop *);
extern tree loop_niter_by_eval (class loop *, edge);
extern tree find_loop_niter_by_eval (class loop *, edge *);
extern bool estimated_loop_iterations (class loop *, widest_int *);
extern HOST_WIDE_INT estimated_loop_iterations_int (class loop *);
extern bool max_loop_iterations (class loop *, widest_int *);
extern HOST_WIDE_INT max_loop_iterations_int (class loop *);
extern bool likely_max_loop_iterations (class loop *, widest_int *);
extern HOST_WIDE_INT likely_max_loop_iterations_int (class loop *);
extern HOST_WIDE_INT max_stmt_executions_int (class loop *);
extern HOST_WIDE_INT likely_max_stmt_executions_int (class loop *);
extern HOST_WIDE_INT estimated_stmt_executions_int (class loop *);
extern bool max_stmt_executions (class loop *, widest_int *);
extern bool likely_max_stmt_executions (class loop *, widest_int *);
extern bool estimated_stmt_executions (class loop *, widest_int *);
extern void estimate_numbers_of_iterations (function *);
extern void estimate_numbers_of_iterations (class loop *);
extern bool stmt_dominates_stmt_p (gimple *, gimple *);
extern bool nowrap_type_p (tree);
extern bool scev_probably_wraps_p (tree, tree, tree, gimple *,
class loop *, bool);
extern void free_numbers_of_iterations_estimates (class loop *);
extern void free_numbers_of_iterations_estimates (function *);
extern tree simplify_replace_tree (tree, tree,
tree, tree (*)(tree, void *) = NULL,
void * = NULL);
extern void substitute_in_loop_info (class loop *, tree, tree);
#endif /* GCC_TREE_SSA_LOOP_NITER_H */