* tree-flow.h: Move some protoypes. Include new tree-ssa-loop.h.
(struct affine_iv, struct tree_niter_desc): Move to tree-ssa-loop.h.
(enum move_pos): Move to tree-ssa-loop-niter.h
* cfgloop.h: Move some prototypes.
* tree-ssa-loop.h: New File. Include other tree-ssa-loop-*.h files.
(struct affine_iv, struct tree_niter_desc): Relocate from tree-flow.h.
* tree-ssa-loop-ch.c: (do_while_loop_p): Make static.
* tree-ssa-loop-im.h: New file. Add prototypes.
(enum move_pos): Move here.
* tree-ssa-loop-ivcanon.c (loop_edge_to_cancel, unloop_loops): Make
static.
* tree-ssa-loop-ivcanon.h: New file. Add prototypes.
* tree-ssa-loop-ivopts.c: Remove local prototypes.
(stmt_invariant_in_loop_p): Remove unused function.
* tree-ssa-loop-ivopts.h: New file. Add prototypes.
* tree-ssa-loop-manip.h: New file. Add prototypes.
* tree-ssa-loop-niter.c (double_int_cmp, bound_index,
estimate_numbers_of_iterations_loop): Make static.
* tree-ssa-loop-niter.h: New file. Add prototypes.
* tree-ssa-loop-prefetch.h: New file. Add prototypes.
* tree-ssa-loop-unswitch.h: New file. Add prototypes.
* tree-ssa-loop.c: Include tree-ssa-loop-{prefetch,unswitch}.h
* loop-iv.c: Include tree-ssa-loop-niter.h.
* loop-unroll.c: Include tree-ssa-loop-niter.h.
* loop-unswitch.c: Include tree-ssa-loop-niter.h.
===================================================================
*************** along with GCC; see the file COPYING3.
#include "tree-pretty-print.h"
#include "gimple-low.h"
#include "tree-into-ssa.h"
+ #include "tree-ssa-loop.h"
/* This structure is used to map a gimple statement to a label,
or list of labels to represent transaction restart. */
*************** extern basic_block move_sese_region_to_f
void remove_edge_and_dominated_blocks (edge);
bool tree_node_can_be_shared (tree);
- /* In tree-ssa-loop-ch.c */
- bool do_while_loop_p (struct loop *);
-
- /* Affine iv. */
-
- typedef struct
- {
- /* Iv = BASE + STEP * i. */
- tree base, step;
-
- /* True if this iv does not overflow. */
- bool no_overflow;
- } affine_iv;
-
- /* Description of number of iterations of a loop. All the expressions inside
- the structure can be evaluated at the end of the loop's preheader
- (and due to ssa form, also anywhere inside the body of the loop). */
-
- struct tree_niter_desc
- {
- tree assumptions; /* The boolean expression. If this expression evaluates
- to false, then the other fields in this structure
- should not be used; there is no guarantee that they
- will be correct. */
- tree may_be_zero; /* The boolean expression. If it evaluates to true,
- the loop will exit in the first iteration (i.e.
- its latch will not be executed), even if the niter
- field says otherwise. */
- tree niter; /* The expression giving the number of iterations of
- a loop (provided that assumptions == true and
- may_be_zero == false), more precisely the number
- of executions of the latch of the loop. */
- double_int max; /* The upper bound on the number of iterations of
- the loop. */
-
- /* The simplified shape of the exit condition. The loop exits if
- CONTROL CMP BOUND is false, where CMP is one of NE_EXPR,
- LT_EXPR, or GT_EXPR, and step of CONTROL is positive if CMP is
- LE_EXPR and negative if CMP is GE_EXPR. This information is used
- by loop unrolling. */
- affine_iv control;
- tree bound;
- enum tree_code cmp;
- };
/* In tree-ssa-loop*.c */
- unsigned int tree_ssa_lim (void);
- unsigned int tree_ssa_unswitch_loops (void);
- unsigned int canonicalize_induction_variables (void);
- unsigned int tree_unroll_loops_completely (bool, bool);
- unsigned int tree_ssa_prefetch_arrays (void);
- void tree_ssa_iv_optimize (void);
unsigned tree_predictive_commoning (void);
- tree canonicalize_loop_ivs (struct loop *, tree *, bool);
bool parallelize_loops (void);
- bool loop_only_exit_p (const struct loop *, const_edge);
- bool number_of_iterations_exit (struct loop *, edge,
- struct tree_niter_desc *niter, bool,
- bool every_iteration = true);
- tree find_loop_niter (struct loop *, edge *);
- tree loop_niter_by_eval (struct loop *, edge);
- tree find_loop_niter_by_eval (struct loop *, edge *);
- void estimate_numbers_of_iterations (void);
- bool scev_probably_wraps_p (tree, tree, gimple, struct loop *, bool);
bool convert_affine_scev (struct loop *, tree, tree *, tree *, gimple, bool);
- bool nowrap_type_p (tree);
enum ev_direction {EV_DIR_GROWS, EV_DIR_DECREASES, EV_DIR_UNKNOWN};
enum ev_direction scev_direction (const_tree);
- void free_numbers_of_iterations_estimates (void);
- void free_numbers_of_iterations_estimates_loop (struct loop *);
- void rewrite_into_loop_closed_ssa (bitmap, unsigned);
- void verify_loop_closed_ssa (bool);
- bool for_each_index (tree *, bool (*) (tree, tree *, void *), void *);
- void create_iv (tree, tree, tree, struct loop *, gimple_stmt_iterator *, bool,
- tree *, tree *);
- basic_block split_loop_exit_edge (edge);
- void standard_iv_increment_position (struct loop *, gimple_stmt_iterator *,
- bool *);
- basic_block ip_end_pos (struct loop *);
- basic_block ip_normal_pos (struct loop *);
- bool gimple_duplicate_loop_to_header_edge (struct loop *, edge,
- unsigned int, sbitmap,
- edge, vec<edge> *,
- int);
struct loop *slpeel_tree_duplicate_loop_to_edge_cfg (struct loop *, edge);
- tree expand_simple_operations (tree);
- void substitute_in_loop_info (struct loop *, tree, tree);
- edge single_dom_exit (struct loop *);
- bool can_unroll_loop_p (struct loop *loop, unsigned factor,
- struct tree_niter_desc *niter);
- void tree_unroll_loop (struct loop *, unsigned,
- edge, struct tree_niter_desc *);
- typedef void (*transform_callback)(struct loop *, void *);
- void tree_transform_and_unroll_loop (struct loop *, unsigned,
- edge, struct tree_niter_desc *,
- transform_callback, void *);
- bool contains_abnormal_ssa_name_p (tree);
- bool stmt_dominates_stmt_p (gimple, gimple);
/* In tree-ssa-threadedge.c */
extern void threadedge_initialize_values (void);
*************** extern void thread_across_edge (gimple,
vec<tree> *, tree (*) (gimple, gimple));
extern void propagate_threaded_block_debug_into (basic_block, basic_block);
- /* In tree-ssa-loop-im.c */
- /* The possibilities of statement movement. */
-
- enum move_pos
- {
- MOVE_IMPOSSIBLE, /* No movement -- side effect expression. */
- MOVE_PRESERVE_EXECUTION, /* Must not cause the non-executed statement
- become executed -- memory accesses, ... */
- MOVE_POSSIBLE /* Unlimited movement. */
- };
- extern enum move_pos movement_possibility (gimple);
- char *get_lsm_tmp_name (tree, unsigned);
-
/* In tree-flow-inline.h */
static inline bool unmodifiable_var_p (const_tree);
static inline bool ref_contains_array_ref (const_tree);
*************** extern void graphite_transform_loops (vo
/* In tree-data-ref.c */
extern void tree_check_data_deps (void);
- /* In tree-ssa-loop-ivopts.c */
- bool expr_invariant_in_loop_p (struct loop *, tree);
- bool stmt_invariant_in_loop_p (struct loop *, gimple);
- struct loop *outermost_invariant_loop_for_expr (struct loop *, tree);
- bool multiplier_allowed_in_address_p (HOST_WIDE_INT, enum machine_mode,
- addr_space_t);
- bool may_be_nonaddressable_p (tree expr);
-
/* In gimplify.c */
tree force_gimple_operand_1 (tree, gimple_seq *, gimple_predicate, tree);
tree force_gimple_operand (tree, gimple_seq *, bool, tree);
===================================================================
*************** extern bool flow_bb_inside_loop_p (const
extern struct loop * find_common_loop (struct loop *, struct loop *);
struct loop *superloop_at_depth (struct loop *, unsigned);
struct eni_weights_d;
- extern unsigned tree_num_loop_insns (struct loop *, struct eni_weights_d *);
extern int num_loop_insns (const struct loop *);
extern int average_num_loop_insns (const struct loop *);
extern unsigned get_loop_level (const struct loop *);
*************** gcov_type expected_loop_iterations_unbou
extern unsigned expected_loop_iterations (const struct loop *);
extern rtx doloop_condition_get (rtx);
- void estimate_numbers_of_iterations_loop (struct loop *);
- void record_niter_bound (struct loop *, double_int, bool, bool);
- bool estimated_loop_iterations (struct loop *, double_int *);
- bool max_loop_iterations (struct loop *, double_int *);
- HOST_WIDE_INT estimated_loop_iterations_int (struct loop *);
- HOST_WIDE_INT max_loop_iterations_int (struct loop *);
- bool max_stmt_executions (struct loop *, double_int *);
- bool estimated_stmt_executions (struct loop *, double_int *);
- HOST_WIDE_INT max_stmt_executions_int (struct loop *);
- HOST_WIDE_INT estimated_stmt_executions_int (struct loop *);
/* Loop manipulation. */
extern bool can_duplicate_loop_p (const struct loop *loop);
*************** enum
extern void unroll_and_peel_loops (int);
extern void doloop_optimize_loops (void);
extern void move_loop_invariants (void);
- extern bool finite_loop_p (struct loop *);
extern void scale_loop_profile (struct loop *loop, int scale, gcov_type iteration_bound);
extern vec<basic_block> get_loop_hot_path (const struct loop *loop);
===================================================================
***************
+ /* Header file for SSA loop optimizations.
+ Copyright (C) 2013 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_H
+ #define GCC_TREE_SSA_LOOP_H
+
+ /* Affine iv. */
+
+ typedef struct
+ {
+ /* Iv = BASE + STEP * i. */
+ tree base, step;
+
+ /* True if this iv does not overflow. */
+ bool no_overflow;
+ } affine_iv;
+
+ /* Description of number of iterations of a loop. All the expressions inside
+ the structure can be evaluated at the end of the loop's preheader
+ (and due to ssa form, also anywhere inside the body of the loop). */
+
+ struct tree_niter_desc
+ {
+ tree assumptions; /* The boolean expression. If this expression evaluates
+ to false, then the other fields in this structure
+ should not be used; there is no guarantee that they
+ will be correct. */
+ tree may_be_zero; /* The boolean expression. If it evaluates to true,
+ the loop will exit in the first iteration (i.e.
+ its latch will not be executed), even if the niter
+ field says otherwise. */
+ tree niter; /* The expression giving the number of iterations of
+ a loop (provided that assumptions == true and
+ may_be_zero == false), more precisely the number
+ of executions of the latch of the loop. */
+ double_int max; /* The upper bound on the number of iterations of
+ the loop. */
+
+ /* The simplified shape of the exit condition. The loop exits if
+ CONTROL CMP BOUND is false, where CMP is one of NE_EXPR,
+ LT_EXPR, or GT_EXPR, and step of CONTROL is positive if CMP is
+ LE_EXPR and negative if CMP is GE_EXPR. This information is used
+ by loop unrolling. */
+ affine_iv control;
+ tree bound;
+ enum tree_code cmp;
+ };
+
+ #include "tree-ssa-loop-im.h"
+ #include "tree-ssa-loop-ivcanon.h"
+ #include "tree-ssa-loop-ivopts.h"
+ #include "tree-ssa-loop-manip.h"
+ #include "tree-ssa-loop-niter.h"
+
+ #endif /* GCC_TREE_SSA_LOOP_H */
===================================================================
*************** along with GCC; see the file COPYING3.
#include "cfgloop.h"
#include "tree-inline.h"
#include "flags.h"
- #include "tree-inline.h"
/* Duplicates headers of loops if they are small enough, so that the statements
in the loop body are always executed when the loop is entered. This
*************** should_duplicate_loop_header_p (basic_bl
/* Checks whether LOOP is a do-while style loop. */
! bool
do_while_loop_p (struct loop *loop)
{
gimple stmt = last_stmt (loop->latch);
/* Checks whether LOOP is a do-while style loop. */
! static bool
do_while_loop_p (struct loop *loop)
{
gimple stmt = last_stmt (loop->latch);
===================================================================
***************
+ /* Header file for loop invariant motion.
+ Copyright (C) 2013 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_IM_H
+ #define GCC_TREE_SSA_LOOP_IM_H
+
+ /* The possibilities of statement movement. */
+ enum move_pos
+ {
+ MOVE_IMPOSSIBLE, /* No movement -- side effect expression. */
+ MOVE_PRESERVE_EXECUTION, /* Must not cause the non-executed statement
+ become executed -- memory accesses, ... */
+ MOVE_POSSIBLE /* Unlimited movement. */
+ };
+
+ extern bool for_each_index (tree *, bool (*) (tree, tree *, void *), void *);
+ extern enum move_pos movement_possibility (gimple);
+ extern char *get_lsm_tmp_name (tree, unsigned);
+ unsigned int tree_ssa_lim (void);
+
+ #endif /* GCC_TREE_SSA_LOOP_IM_H */
===================================================================
*************** estimated_unrolled_size (struct loop_siz
loop-niter identified as having undefined effect in the last iteration.
The other cases are hopefully rare and will be cleaned up later. */
! edge
loop_edge_to_cancel (struct loop *loop)
{
vec<edge> exits;
loop-niter identified as having undefined effect in the last iteration.
The other cases are hopefully rare and will be cleaned up later. */
! static edge
loop_edge_to_cancel (struct loop *loop)
{
vec<edge> exits;
*************** static vec<int> loops_to_unloop_nunroll;
LOOP_CLOSED_SSA_INVALIDATED is used to bookkepp the case
when we need to go into loop closed SSA form. */
! void
unloop_loops (bitmap loop_closed_ssa_invalidated,
bool *irred_invalidated)
{
LOOP_CLOSED_SSA_INVALIDATED is used to bookkepp the case
when we need to go into loop closed SSA form. */
! static void
unloop_loops (bitmap loop_closed_ssa_invalidated,
bool *irred_invalidated)
{
===================================================================
***************
+ /* Header file for Induction variable canonicalization and loop peeling.
+ Copyright (C) 2013 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_IVCANON_H
+ #define GCC_TREE_SSA_LOOP_IVCANON_H
+
+ extern unsigned tree_num_loop_insns (struct loop *, struct eni_weights_d *);
+ extern unsigned int canonicalize_induction_variables (void);
+ extern unsigned int tree_unroll_loops_completely (bool, bool);
+
+ #endif /* GCC_TREE_SSA_LOOP_IVCANON_H */
===================================================================
*************** single_dom_exit (struct loop *loop)
/* Dumps information about the induction variable IV to FILE. */
- extern void dump_iv (FILE *, struct iv *);
void
dump_iv (FILE *file, struct iv *iv)
{
*************** dump_iv (FILE *file, struct iv *iv)
/* Dumps information about the USE to FILE. */
- extern void dump_use (FILE *, struct iv_use *);
void
dump_use (FILE *file, struct iv_use *use)
{
*************** dump_use (FILE *file, struct iv_use *use
/* Dumps information about the uses to FILE. */
- extern void dump_uses (FILE *, struct ivopts_data *);
void
dump_uses (FILE *file, struct ivopts_data *data)
{
*************** dump_uses (FILE *file, struct ivopts_dat
/* Dumps information about induction variable candidate CAND to FILE. */
- extern void dump_cand (FILE *, struct iv_cand *);
void
dump_cand (FILE *file, struct iv_cand *cand)
{
*************** expr_invariant_in_loop_p (struct loop *l
return true;
}
-
- /* Returns true if statement STMT is obviously invariant in LOOP,
- i.e. if all its operands on the RHS are defined outside of the LOOP.
- LOOP should not be the function body. */
-
- bool
- stmt_invariant_in_loop_p (struct loop *loop, gimple stmt)
- {
- unsigned i;
- tree lhs;
-
- gcc_assert (loop_depth (loop) > 0);
-
- lhs = gimple_get_lhs (stmt);
- for (i = 0; i < gimple_num_ops (stmt); i++)
- {
- tree op = gimple_op (stmt, i);
- if (op != lhs && !expr_invariant_in_loop_p (loop, op))
- return false;
- }
-
- return true;
- }
/* Cumulates the steps of indices into DATA and replaces their values with the
initial ones. Returns false when the value of the index cannot be determined.
===================================================================
***************
+ /* Header file for Induction variable optimizations.
+ Copyright (C) 2013 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_IVOPTS_H
+ #define GCC_TREE_SSA_LOOP_IVOPTS_H
+
+ extern edge single_dom_exit (struct loop *);
+ extern void dump_iv (FILE *, struct iv *);
+ extern void dump_use (FILE *, struct iv_use *);
+ extern void dump_uses (FILE *, struct ivopts_data *);
+ extern void dump_cand (FILE *, struct iv_cand *);
+ extern bool contains_abnormal_ssa_name_p (tree);
+ extern struct loop *outermost_invariant_loop_for_expr (struct loop *, tree);
+ extern bool expr_invariant_in_loop_p (struct loop *, tree);
+ bool may_be_nonaddressable_p (tree expr);
+ bool multiplier_allowed_in_address_p (HOST_WIDE_INT, enum machine_mode,
+ addr_space_t);
+ void tree_ssa_iv_optimize (void);
+
+ #endif /* GCC_TREE_SSA_LOOP_IVOPTS_H */
===================================================================
***************
+ /* Header file for High-level loop manipulation functions.
+ Copyright (C) 2013 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_MANIP_H
+ #define GCC_TREE_SSA_LOOP_MANIP_H
+
+ typedef void (*transform_callback)(struct loop *, void *);
+
+ extern void create_iv (tree, tree, tree, struct loop *, gimple_stmt_iterator *,
+ bool, tree *, tree *);
+ extern void rewrite_into_loop_closed_ssa (bitmap, unsigned);
+ extern void verify_loop_closed_ssa (bool);
+ extern basic_block split_loop_exit_edge (edge);
+ extern basic_block ip_end_pos (struct loop *);
+ extern basic_block ip_normal_pos (struct loop *);
+ extern void standard_iv_increment_position (struct loop *,
+ gimple_stmt_iterator *, bool *);
+ extern bool gimple_duplicate_loop_to_header_edge (struct loop *, edge,
+ unsigned int, sbitmap,
+ edge, vec<edge> *,
+ int);
+ extern bool can_unroll_loop_p (struct loop *loop, unsigned factor,
+ struct tree_niter_desc *niter);
+ extern void tree_transform_and_unroll_loop (struct loop *, unsigned,
+ edge, struct tree_niter_desc *,
+ transform_callback, void *);
+ extern void tree_unroll_loop (struct loop *, unsigned,
+ edge, struct tree_niter_desc *);
+ extern tree canonicalize_loop_ivs (struct loop *, tree *, bool);
+
+
+
+ #endif /* GCC_TREE_SSA_LOOP_MANIP_H */
===================================================================
*************** gcov_type_to_double_int (gcov_type val)
/* Compare double ints, callback for qsort. */
! int
double_int_cmp (const void *p1, const void *p2)
{
const double_int *d1 = (const double_int *)p1;
/* Compare double ints, callback for qsort. */
! static int
double_int_cmp (const void *p1, const void *p2)
{
const double_int *d1 = (const double_int *)p1;
*************** double_int_cmp (const void *p1, const vo
/* Return index of BOUND in BOUNDS array sorted in increasing order.
Lookup by binary search. */
! int
bound_index (vec<double_int> bounds, double_int bound)
{
unsigned int end = bounds.length ();
/* Return index of BOUND in BOUNDS array sorted in increasing order.
Lookup by binary search. */
! static int
bound_index (vec<double_int> bounds, double_int bound)
{
unsigned int end = bounds.length ();
*************** maybe_lower_iteration_bound (struct loop
/* Records estimates on numbers of iterations of LOOP. If USE_UNDEFINED_P
is true also use estimates derived from undefined behavior. */
! void
estimate_numbers_of_iterations_loop (struct loop *loop)
{
vec<edge> exits;
/* Records estimates on numbers of iterations of LOOP. If USE_UNDEFINED_P
is true also use estimates derived from undefined behavior. */
! static void
estimate_numbers_of_iterations_loop (struct loop *loop)
{
vec<edge> exits;
===================================================================
***************
+ /* Header file for loop interation estimates.
+ Copyright (C) 2013 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);
+ extern bool loop_only_exit_p (const struct loop *, const_edge);
+ extern bool number_of_iterations_exit (struct loop *, edge,
+ struct tree_niter_desc *niter, bool,
+ bool every_iteration = true);
+ extern tree find_loop_niter (struct loop *, edge *);
+ extern bool finite_loop_p (struct loop *);
+ extern tree loop_niter_by_eval (struct loop *, edge);
+ extern tree find_loop_niter_by_eval (struct loop *, edge *);
+ extern void record_niter_bound (struct loop *, double_int, bool, bool);
+ extern bool estimated_loop_iterations (struct loop *, double_int *);
+ extern bool max_loop_iterations (struct loop *, double_int *);
+ extern HOST_WIDE_INT estimated_loop_iterations_int (struct loop *);
+ extern HOST_WIDE_INT max_loop_iterations_int (struct loop *);
+ extern HOST_WIDE_INT max_stmt_executions_int (struct loop *);
+ extern HOST_WIDE_INT estimated_stmt_executions_int (struct loop *);
+ extern bool max_stmt_executions (struct loop *, double_int *);
+ extern bool estimated_stmt_executions (struct loop *, double_int *);
+ extern void estimate_numbers_of_iterations (void);
+ extern bool stmt_dominates_stmt_p (gimple, gimple);
+ extern bool nowrap_type_p (tree);
+ extern bool scev_probably_wraps_p (tree, tree, gimple, struct loop *, bool);
+ extern void free_numbers_of_iterations_estimates_loop (struct loop *);
+ extern void free_numbers_of_iterations_estimates (void);
+ extern void substitute_in_loop_info (struct loop *, tree, tree);
+
+ #endif /* GCC_TREE_SSA_LOOP_NITER_H */
===================================================================
***************
+ /* Header file for Array Prefetching.
+ Copyright (C) 2013 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_PREFETCH_H
+ #define GCC_TREE_SSA_LOOP_PREFETCH_H
+
+ extern unsigned int tree_ssa_prefetch_arrays (void);
+
+ #endif /* GCC_TREE_SSA_LOOP_PREFETCH_H */
===================================================================
***************
+ /* Header file for loop unswitching.
+ Copyright (C) 2013 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_UNSWITCH_H
+ #define GCC_TREE_SSA_LOOP_UNSWITCH_H
+
+ unsigned int tree_ssa_unswitch_loops (void);
+
+ #endif /* GCC_TREE_SSA_LOOP_UNSWITCH_H */
===================================================================
*************** along with GCC; see the file COPYING3.
#include "tree-scalar-evolution.h"
#include "diagnostic-core.h"
#include "tree-vectorizer.h"
+ #include "tree-ssa-loop-prefetch.h"
+ #include "tree-ssa-loop-unswitch.h"
/* The loop superpass. */
===================================================================
*************** along with GCC; see the file COPYING3.
#include "df.h"
#include "hash-table.h"
#include "dumpfile.h"
+ #include "tree-ssa-loop-niter.h"
/* Possible return values of iv_get_reaching_def. */
===================================================================
*************** along with GCC; see the file COPYING3.
#include "recog.h"
#include "target.h"
#include "dumpfile.h"
+ #include "tree-ssa-loop-niter.h"
/* This pass performs loop unrolling and peeling. We only perform these
optimizations on innermost loops (with single exception) because
===================================================================
*************** along with GCC; see the file COPYING3.
#include "params.h"
#include "expr.h"
#include "dumpfile.h"
+ #include "tree-ssa-loop-niter.h"
/* This pass moves constant conditions out of loops, duplicating the loop
in progress, i.e. this code: