tree-ssa-threadupdate.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /* Communication between registering jump thread requests and
  2. updating the SSA/CFG for jump threading.
  3. Copyright (C) 2013-2019 Free Software Foundation, Inc.
  4. This file is part of GCC.
  5. GCC is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 3, or (at your option)
  8. any later version.
  9. GCC is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with GCC; see the file COPYING3. If not see
  15. <http://www.gnu.org/licenses/>. */
  16. #ifndef _TREE_SSA_THREADUPDATE_H
  17. #define _TREE_SSA_THREADUPDATE_H 1
  18. /* In tree-ssa-threadupdate.c. */
  19. extern bool thread_through_all_blocks (bool);
  20. enum jump_thread_edge_type
  21. {
  22. EDGE_START_JUMP_THREAD,
  23. EDGE_FSM_THREAD,
  24. EDGE_COPY_SRC_BLOCK,
  25. EDGE_COPY_SRC_JOINER_BLOCK,
  26. EDGE_NO_COPY_SRC_BLOCK
  27. };
  28. class jump_thread_edge
  29. {
  30. public:
  31. jump_thread_edge (edge e, enum jump_thread_edge_type type)
  32. : e (e), type (type) {}
  33. edge e;
  34. enum jump_thread_edge_type type;
  35. };
  36. extern void register_jump_thread (vec <class jump_thread_edge *> *);
  37. extern void remove_jump_threads_including (edge);
  38. extern void delete_jump_thread_path (vec <class jump_thread_edge *> *);
  39. extern void remove_ctrl_stmt_and_useless_edges (basic_block, basic_block);
  40. extern void free_dom_edge_info (edge);
  41. extern unsigned int estimate_threading_killed_stmts (basic_block);
  42. enum bb_dom_status
  43. {
  44. /* BB does not dominate latch of the LOOP. */
  45. DOMST_NONDOMINATING,
  46. /* The LOOP is broken (there is no path from the header to its latch. */
  47. DOMST_LOOP_BROKEN,
  48. /* BB dominates the latch of the LOOP. */
  49. DOMST_DOMINATING
  50. };
  51. enum bb_dom_status determine_bb_domination_status (struct loop *, basic_block);
  52. #endif