tree-ssa-loop-manip.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /* Header file for High-level loop manipulation functions.
  2. Copyright (C) 2013-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_TREE_SSA_LOOP_MANIP_H
  16. #define GCC_TREE_SSA_LOOP_MANIP_H
  17. typedef void (*transform_callback)(struct loop *, void *);
  18. extern void create_iv (tree, tree, tree, struct loop *, gimple_stmt_iterator *,
  19. bool, tree *, tree *);
  20. extern void rewrite_into_loop_closed_ssa_1 (bitmap, unsigned, int,
  21. struct loop *);
  22. extern void rewrite_into_loop_closed_ssa (bitmap, unsigned);
  23. extern void rewrite_virtuals_into_loop_closed_ssa (struct loop *);
  24. extern void verify_loop_closed_ssa (bool, struct loop * = NULL);
  25. static inline void
  26. checking_verify_loop_closed_ssa (bool verify_ssa_p, struct loop *loop = NULL)
  27. {
  28. if (flag_checking)
  29. verify_loop_closed_ssa (verify_ssa_p, loop);
  30. }
  31. extern basic_block split_loop_exit_edge (edge, bool = false);
  32. extern basic_block ip_end_pos (struct loop *);
  33. extern basic_block ip_normal_pos (struct loop *);
  34. extern void standard_iv_increment_position (struct loop *,
  35. gimple_stmt_iterator *, bool *);
  36. extern bool gimple_duplicate_loop_to_header_edge (struct loop *, edge,
  37. unsigned int, sbitmap,
  38. edge, vec<edge> *,
  39. int);
  40. extern bool can_unroll_loop_p (struct loop *loop, unsigned factor,
  41. struct tree_niter_desc *niter);
  42. extern gcov_type niter_for_unrolled_loop (struct loop *, unsigned);
  43. extern void tree_transform_and_unroll_loop (struct loop *, unsigned,
  44. edge, struct tree_niter_desc *,
  45. transform_callback, void *);
  46. extern void tree_unroll_loop (struct loop *, unsigned,
  47. edge, struct tree_niter_desc *);
  48. extern tree canonicalize_loop_ivs (struct loop *, tree *, bool);
  49. #endif /* GCC_TREE_SSA_LOOP_MANIP_H */