GCC Middle and Back End API Reference
tree-ssa-loop-manip.h
Go to the documentation of this file.
1/* Header file for High-level loop manipulation functions.
2 Copyright (C) 2013-2026 Free Software Foundation, Inc.
3
4This file is part of GCC.
5
6GCC is free software; you can redistribute it and/or modify it under
7the terms of the GNU General Public License as published by the Free
8Software Foundation; either version 3, or (at your option) any later
9version.
10
11GCC is distributed in the hope that it will be useful, but WITHOUT ANY
12WARRANTY; without even the implied warranty of MERCHANTABILITY or
13FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 for more details.
15
16You should have received a copy of the GNU General Public License
17along 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
23typedef void (*transform_callback)(class loop *, void *);
24
25extern void reset_debug_uses_outside_loop (class loop *, basic_block *,
26 unsigned);
28extern void create_iv (tree, tree_code, tree, tree, class loop *,
29 gimple_stmt_iterator *, bool, tree *, tree *,
30 bool = true);
31extern void rewrite_into_loop_closed_ssa (bitmap, unsigned);
32extern void verify_loop_closed_ssa (bool, class loop * = NULL);
33
34inline void
35checking_verify_loop_closed_ssa (bool verify_ssa_p, class loop *loop = NULL)
36{
37 if (flag_checking)
38 verify_loop_closed_ssa (verify_ssa_p, loop);
39}
40
41extern basic_block split_loop_exit_edge (edge, bool = false);
42extern basic_block ip_end_pos (class loop *);
43extern basic_block ip_normal_pos (class loop *);
44extern void standard_iv_increment_position (class loop *,
45 gimple_stmt_iterator *, bool *);
46extern bool
48 sbitmap, edge, vec<edge> *, int);
49extern bool can_unroll_loop_p (class loop *loop, unsigned factor,
50 class tree_niter_desc *niter);
51extern gcov_type niter_for_unrolled_loop (class loop *, unsigned);
52extern void tree_transform_and_unroll_loop (class loop *, unsigned,
54 transform_callback, void *);
55extern void tree_unroll_loop (class loop *, unsigned, tree_niter_desc *);
56extern tree canonicalize_loop_ivs (class loop *, tree *, bool);
57extern unsigned int loop_invariant_motion_in_fun (function *, bool);
58
59
60#endif /* GCC_TREE_SSA_LOOP_MANIP_H */
Definition cfgloop.h:120
Definition tree-ssa-loop.h:44
struct basic_block_def * basic_block
Definition coretypes.h:359
class edge_def * edge
Definition coretypes.h:356
gimple * gimple_seq
Definition coretypes.h:100
struct simple_bitmap_def * sbitmap
Definition coretypes.h:54
class bitmap_head * bitmap
Definition coretypes.h:51
int64_t gcov_type
Definition coretypes.h:46
union tree_node * tree
Definition coretypes.h:97
tree_code
Definition genmatch.cc:1011
Definition function.h:249
Definition gimple-iterator.h:26
Definition vec.h:450
#define NULL
Definition system.h:55
unsigned int loop_invariant_motion_in_fun(function *fun, bool store_motion)
Definition tree-ssa-loop-im.cc:3790
void reset_debug_uses_outside_loop(class loop *loop, basic_block *bbs, unsigned num_nodes)
Definition tree-ssa-loop-manip.cc:54
void rewrite_into_loop_closed_ssa(bitmap changed_bbs, unsigned update_flag)
Definition tree-ssa-loop-manip.cc:688
bool gimple_duplicate_loop_body_to_header_edge(class loop *loop, edge e, unsigned int ndupl, sbitmap wont_exit, edge orig, vec< edge > *to_remove, int flags)
Definition tree-ssa-loop-manip.cc:909
void standard_iv_increment_position(class loop *loop, gimple_stmt_iterator *bsi, bool *insert_after)
Definition tree-ssa-loop-manip.cc:861
void tree_unroll_loop(class loop *loop, unsigned factor, class tree_niter_desc *desc)
Definition tree-ssa-loop-manip.cc:1386
tree canonicalize_loop_ivs(class loop *loop, tree *nit, bool bump_in_latch)
Definition tree-ssa-loop-manip.cc:1468
basic_block ip_normal_pos(class loop *loop)
Definition tree-ssa-loop-manip.cc:833
void insert_iv_increment(gimple_stmt_iterator *incr_pos, bool after, gimple_seq stmts)
Definition tree-ssa-loop-manip.cc:100
void create_iv(tree base, tree_code incr_op, tree step, tree var, class loop *loop, gimple_stmt_iterator *incr_pos, bool after, tree *var_before, tree *var_after, bool loop_invariant)
Definition tree-ssa-loop-manip.cc:142
basic_block split_loop_exit_edge(edge exit, bool copy_constants_p)
Definition tree-ssa-loop-manip.cc:785
void tree_transform_and_unroll_loop(class loop *loop, unsigned factor, class tree_niter_desc *desc, transform_callback transform, void *data)
Definition tree-ssa-loop-manip.cc:1164
bool can_unroll_loop_p(class loop *loop, unsigned factor, class tree_niter_desc *niter)
Definition tree-ssa-loop-manip.cc:941
DEBUG_FUNCTION void verify_loop_closed_ssa(bool verify_ssa_p, class loop *loop)
Definition tree-ssa-loop-manip.cc:743
basic_block ip_end_pos(class loop *loop)
Definition tree-ssa-loop-manip.cc:824
void(*) transform_callback(class loop *, void *)
Definition tree-ssa-loop-manip.h:23
gcov_type niter_for_unrolled_loop(class loop *, unsigned)
void checking_verify_loop_closed_ssa(bool verify_ssa_p, class loop *loop=NULL)
Definition tree-ssa-loop-manip.h:35