cfgloopmanip.h 2.6 KB

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