]>
Commit | Line | Data |
---|---|---|
71343877 | 1 | /* Header file for High-level loop manipulation functions. |
99dee823 | 2 | Copyright (C) 2013-2021 Free Software Foundation, Inc. |
71343877 AM |
3 | |
4 | This file is part of GCC. | |
5 | ||
6 | GCC is free software; you can redistribute it and/or modify it under | |
7 | the terms of the GNU General Public License as published by the Free | |
8 | Software Foundation; either version 3, or (at your option) any later | |
9 | version. | |
10 | ||
11 | GCC is distributed in the hope that it will be useful, but WITHOUT ANY | |
12 | WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
13 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
14 | for more details. | |
15 | ||
16 | You should have received a copy of the GNU General Public License | |
17 | along with GCC; see the file COPYING3. If not see | |
18 | <http://www.gnu.org/licenses/>. */ | |
19 | ||
20 | #ifndef GCC_TREE_SSA_LOOP_MANIP_H | |
21 | #define GCC_TREE_SSA_LOOP_MANIP_H | |
22 | ||
99b1c316 | 23 | typedef void (*transform_callback)(class loop *, void *); |
71343877 | 24 | |
99b1c316 | 25 | extern void create_iv (tree, tree, tree, class loop *, gimple_stmt_iterator *, |
71343877 | 26 | bool, tree *, tree *); |
28df8730 | 27 | extern void rewrite_into_loop_closed_ssa_1 (bitmap, unsigned, int, |
99b1c316 | 28 | class loop *); |
71343877 | 29 | extern void rewrite_into_loop_closed_ssa (bitmap, unsigned); |
99b1c316 MS |
30 | extern void rewrite_virtuals_into_loop_closed_ssa (class loop *); |
31 | extern void verify_loop_closed_ssa (bool, class loop * = NULL); | |
b2b29377 MM |
32 | |
33 | static inline void | |
99b1c316 | 34 | checking_verify_loop_closed_ssa (bool verify_ssa_p, class loop *loop = NULL) |
b2b29377 MM |
35 | { |
36 | if (flag_checking) | |
d80d5c38 | 37 | verify_loop_closed_ssa (verify_ssa_p, loop); |
b2b29377 MM |
38 | } |
39 | ||
733441e2 | 40 | extern basic_block split_loop_exit_edge (edge, bool = false); |
99b1c316 MS |
41 | extern basic_block ip_end_pos (class loop *); |
42 | extern basic_block ip_normal_pos (class loop *); | |
43 | extern void standard_iv_increment_position (class loop *, | |
71343877 | 44 | gimple_stmt_iterator *, bool *); |
99b1c316 | 45 | extern bool gimple_duplicate_loop_to_header_edge (class loop *, edge, |
71343877 AM |
46 | unsigned int, sbitmap, |
47 | edge, vec<edge> *, | |
48 | int); | |
99b1c316 MS |
49 | extern bool can_unroll_loop_p (class loop *loop, unsigned factor, |
50 | class tree_niter_desc *niter); | |
51 | extern gcov_type niter_for_unrolled_loop (class loop *, unsigned); | |
52 | extern void tree_transform_and_unroll_loop (class loop *, unsigned, | |
0ee3dc60 | 53 | tree_niter_desc *, |
71343877 | 54 | transform_callback, void *); |
0ee3dc60 | 55 | extern void tree_unroll_loop (class loop *, unsigned, tree_niter_desc *); |
99b1c316 | 56 | extern tree canonicalize_loop_ivs (class loop *, tree *, bool); |
ac91af71 | 57 | extern unsigned int loop_invariant_motion_in_fun (function *, bool); |
71343877 AM |
58 | |
59 | ||
60 | #endif /* GCC_TREE_SSA_LOOP_MANIP_H */ |