1*38fd1498Szrj /* Loop manipulation header. 2*38fd1498Szrj Copyright (C) 2014-2018 Free Software Foundation, Inc. 3*38fd1498Szrj 4*38fd1498Szrj This file is part of GCC. 5*38fd1498Szrj 6*38fd1498Szrj GCC is free software; you can redistribute it and/or modify it under 7*38fd1498Szrj the terms of the GNU General Public License as published by the Free 8*38fd1498Szrj Software Foundation; either version 3, or (at your option) any later 9*38fd1498Szrj version. 10*38fd1498Szrj 11*38fd1498Szrj GCC is distributed in the hope that it will be useful, but WITHOUT ANY 12*38fd1498Szrj WARRANTY; without even the implied warranty of MERCHANTABILITY or 13*38fd1498Szrj FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14*38fd1498Szrj for more details. 15*38fd1498Szrj 16*38fd1498Szrj You should have received a copy of the GNU General Public License 17*38fd1498Szrj along with GCC; see the file COPYING3. If not see 18*38fd1498Szrj <http://www.gnu.org/licenses/>. */ 19*38fd1498Szrj 20*38fd1498Szrj #ifndef GCC_CFGLOOPMANIP_H 21*38fd1498Szrj #define GCC_CFGLOOPMANIP_H 22*38fd1498Szrj 23*38fd1498Szrj enum 24*38fd1498Szrj { 25*38fd1498Szrj CP_SIMPLE_PREHEADERS = 1, 26*38fd1498Szrj CP_FALLTHRU_PREHEADERS = 2 27*38fd1498Szrj }; 28*38fd1498Szrj 29*38fd1498Szrj #define DLTHE_FLAG_UPDATE_FREQ 1 /* Update frequencies in 30*38fd1498Szrj duplicate_loop_to_header_edge. */ 31*38fd1498Szrj #define DLTHE_RECORD_COPY_NUMBER 2 /* Record copy number in the aux 32*38fd1498Szrj field of newly create BB. */ 33*38fd1498Szrj #define DLTHE_FLAG_COMPLETTE_PEEL 4 /* Update frequencies expecting 34*38fd1498Szrj a complete peeling. */ 35*38fd1498Szrj extern edge mfb_kj_edge; 36*38fd1498Szrj 37*38fd1498Szrj extern bool remove_path (edge, bool * = NULL, bitmap = NULL); 38*38fd1498Szrj extern void place_new_loop (struct function *, struct loop *); 39*38fd1498Szrj extern void add_loop (struct loop *, struct loop *); 40*38fd1498Szrj extern void scale_loop_frequencies (struct loop *, profile_probability); 41*38fd1498Szrj extern void scale_loop_profile (struct loop *, profile_probability, gcov_type); 42*38fd1498Szrj extern edge create_empty_if_region_on_edge (edge, tree); 43*38fd1498Szrj extern struct loop *create_empty_loop_on_edge (edge, tree, tree, tree, tree, 44*38fd1498Szrj tree *, tree *, struct loop *); 45*38fd1498Szrj extern struct loop *loopify (edge, edge, 46*38fd1498Szrj basic_block, edge, edge, bool, 47*38fd1498Szrj profile_probability, profile_probability); 48*38fd1498Szrj extern void unloop (struct loop *, bool *, bitmap); 49*38fd1498Szrj extern void copy_loop_info (struct loop *loop, struct loop *target); 50*38fd1498Szrj extern struct loop * duplicate_loop (struct loop *, struct loop *, 51*38fd1498Szrj struct loop * = NULL); 52*38fd1498Szrj extern void duplicate_subloops (struct loop *, struct loop *); 53*38fd1498Szrj extern bool can_duplicate_loop_p (const struct loop *loop); 54*38fd1498Szrj extern bool duplicate_loop_to_header_edge (struct loop *, edge, 55*38fd1498Szrj unsigned, sbitmap, edge, 56*38fd1498Szrj vec<edge> *, int); 57*38fd1498Szrj extern bool mfb_keep_just (edge); 58*38fd1498Szrj basic_block create_preheader (struct loop *, int); 59*38fd1498Szrj extern void create_preheaders (int); 60*38fd1498Szrj extern void force_single_succ_latches (void); 61*38fd1498Szrj struct loop * loop_version (struct loop *, void *, 62*38fd1498Szrj basic_block *, 63*38fd1498Szrj profile_probability, profile_probability, 64*38fd1498Szrj profile_probability, profile_probability, bool); 65*38fd1498Szrj 66*38fd1498Szrj #endif /* GCC_CFGLOOPMANIP_H */ 67