GCC Middle and Back End API Reference
cfgloopmanip.h
Go to the documentation of this file.
1/* Loop manipulation header.
2 Copyright (C) 2014-2024 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
14for 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_CFGLOOPMANIP_H
21#define GCC_CFGLOOPMANIP_H
22
23enum
24{
27};
28
29#define DLTHE_FLAG_UPDATE_FREQ 1 /* Update frequencies in
30 duplicate_loop_to_header_edge. */
31#define DLTHE_RECORD_COPY_NUMBER 2 /* Record copy number in the aux
32 field of newly create BB. */
33#define DLTHE_FLAG_COMPLETTE_PEEL 4 /* Update frequencies expecting
34 a complete peeling. */
35#define DLTHE_FLAG_FLAT_PROFILE 8 /* Profile is flat; do not reduce
36 count by unroll factor. */
37extern edge mfb_kj_edge;
38
39extern bool remove_path (edge, bool * = NULL, bitmap = NULL);
40extern void place_new_loop (struct function *, class loop *);
41extern void add_loop (class loop *, class loop *);
46 tree *, tree *, class loop *);
47extern void unloop (class loop *, bool *, bitmap);
51 bitmap loop_closed_ssa_invalidated,
52 bool *irred_invalidated);
53extern void copy_loop_info (class loop *loop, class loop *target);
54extern class loop * duplicate_loop (class loop *, class loop *,
55 class loop * = NULL);
56extern void duplicate_subloops (class loop *, class loop *);
57extern bool can_duplicate_loop_p (const class loop *loop);
58extern bool
60 vec<edge> *, int);
61extern bool mfb_keep_just (edge);
62basic_block create_preheader (class loop *, int);
63extern void create_preheaders (int);
64extern void force_single_succ_latches (void);
65class loop * loop_version (class loop *, void *,
69void adjust_loop_info_after_peeling (class loop *loop, int npeel, bool precise);
73 (class loop *loop, edge exit_edge = NULL,
76
77#endif /* GCC_CFGLOOPMANIP_H */
class loop * loop_version(class loop *, void *, basic_block *, profile_probability, profile_probability, profile_probability, profile_probability, bool)
Definition cfgloopmanip.cc:1779
void adjust_loop_info_after_peeling(class loop *loop, int npeel, bool precise)
Definition tree-ssa-loop-ivcanon.cc:1060
class loop * duplicate_loop(class loop *, class loop *, class loop *=NULL)
Definition cfgloopmanip.cc:1108
edge mfb_kj_edge
Definition cfgloopmanip.cc:1546
bool can_duplicate_loop_p(const class loop *loop)
Definition cfgloopmanip.cc:1176
bool mfb_keep_just(edge)
Definition cfgloopmanip.cc:1548
edge update_loop_exit_probability_scale_dom_bbs(class loop *loop, edge exit_edge=NULL, profile_count desired_count=profile_count::uninitialized())
Definition cfgloopmanip.cc:556
void create_preheaders(int)
Definition cfgloopmanip.cc:1675
void place_new_loop(struct function *, class loop *)
Definition cfgloopmanip.cc:431
void copy_loop_info(class loop *loop, class loop *target)
Definition cfgloopmanip.cc:1078
bool duplicate_loop_body_to_header_edge(class loop *, edge, unsigned, sbitmap, edge, vec< edge > *, int)
basic_block create_preheader(class loop *, int)
Definition cfgloopmanip.cc:1576
void add_loop(class loop *, class loop *)
Definition cfgloopmanip.cc:442
void scale_dominated_blocks_in_loop(class loop *loop, basic_block bb, profile_count num, profile_count den)
Definition cfgloopmanip.cc:507
void force_single_succ_latches(void)
Definition cfgloopmanip.cc:1688
void scale_loop_frequencies(class loop *, profile_probability)
Definition cfgloopmanip.cc:494
void update_exit_probability_after_unrolling(class loop *loop, edge new_exit)
@ CP_FALLTHRU_PREHEADERS
Definition cfgloopmanip.h:26
@ CP_SIMPLE_PREHEADERS
Definition cfgloopmanip.h:25
edge create_empty_if_region_on_edge(edge, tree)
Definition cfgloopmanip.cc:824
void unloop_loops(vec< class loop * > &loops_to_unloop, vec< int > &loops_to_unloop_nunroll, vec< edge > &edges_to_remove, bitmap loop_closed_ssa_invalidated, bool *irred_invalidated)
Definition tree-ssa-loop-ivcanon.cc:680
void scale_loop_profile(class loop *, profile_probability, gcov_type)
Definition cfgloopmanip.cc:689
class loop * create_empty_loop_on_edge(edge, tree, tree, tree, tree, tree *, tree *, class loop *)
Definition cfgloopmanip.cc:903
void duplicate_subloops(class loop *, class loop *)
Definition cfgloopmanip.cc:1129
void unloop(class loop *, bool *, bitmap)
Definition cfgloopmanip.cc:997
bool remove_path(edge, bool *=NULL, bitmap=NULL)
Definition cfgloopmanip.cc:301
Definition cfgloop.h:120
int num
Definition cfgloop.h:124
Definition profile-count.h:147
class edge_def * edge
Definition coretypes.h:352
class bitmap_head * bitmap
Definition coretypes.h:51
int64_t gcov_type
Definition coretypes.h:46
union tree_node * tree
Definition coretypes.h:97
Definition basic-block.h:117
Definition function.h:249
Definition profile-count.h:750
static profile_count uninitialized()
Definition profile-count.h:826
Definition sbitmap.h:87
Definition vec.h:450
#define NULL
Definition system.h:50
static vec< int > loops_to_unloop_nunroll
Definition tree-ssa-loop-ivcanon.cc:662
static vec< edge > edges_to_remove
Definition tree-ssa-loop-ivcanon.cc:663
static vec< loop_p > loops_to_unloop
Definition tree-ssa-loop-ivcanon.cc:661