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