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