summaryrefslogtreecommitdiff
path: root/gcc/cfghooks.h
diff options
context:
space:
mode:
authorZdenek Dvorak <dvorakz@suse.cz>2007-02-05 00:47:09 +0100
committerZdenek Dvorak <rakdver@gcc.gnu.org>2007-02-04 23:47:09 +0000
commit14fa2cc05762323f22f92cdb1dee039277bc6292 (patch)
treef496fa9bd8e7472a0092f253d2c670a09063973a /gcc/cfghooks.h
parent284893341f2086559700fe966ea86e8e1196f775 (diff)
cfgloopmanip.c (loop_delete_branch_edge): Removed.
* cfgloopmanip.c (loop_delete_branch_edge): Removed. (remove_path): Use can_remove_branch_p and remove_branch instead of loop_delete_branch_edge. * tree-ssa-loop-manip.c (scale_dominated_blocks_in_loop): New function. (tree_transform_and_unroll_loop): Remove dead branches immediately. Update profile using scale_dominated_blocks_in_loop. * cfghooks.c (can_remove_branch_p, remove_branch): New functions. * cfghooks.h (struct cfg_hooks): Add can_remove_branch_p. (can_remove_branch_p, remove_branch): Declare. * tree-cfg.c (tree_can_remove_branch_p): New function. (tree_cfg_hooks): Add tree_can_remove_branch_p. * cfgrtl.c (rtl_can_remove_branch_p): New function. (rtl_cfg_hooks, cfg_layout_rtl_cfg_hook): Add rtl_can_remove_branch_p. From-SVN: r121583
Diffstat (limited to 'gcc/cfghooks.h')
-rw-r--r--gcc/cfghooks.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/cfghooks.h b/gcc/cfghooks.h
index fb6264df703..bd7d1b3195a 100644
--- a/gcc/cfghooks.h
+++ b/gcc/cfghooks.h
@@ -47,6 +47,10 @@ struct cfg_hooks
not be abnormal. */
basic_block (*redirect_edge_and_branch_force) (edge, basic_block);
+ /* Returns true if it is possible to remove the edge by redirecting it
+ to the destination of the other edge going from its source. */
+ bool (*can_remove_branch_p) (edge);
+
/* Remove statements corresponding to a given basic block. */
void (*delete_basic_block) (basic_block);
@@ -138,6 +142,8 @@ extern void verify_flow_info (void);
extern void dump_bb (basic_block, FILE *, int);
extern edge redirect_edge_and_branch (edge, basic_block);
extern basic_block redirect_edge_and_branch_force (edge, basic_block);
+extern bool can_remove_branch_p (edge);
+extern void remove_branch (edge);
extern edge split_block (basic_block, void *);
extern edge split_block_after_labels (basic_block);
extern bool move_block_after (basic_block, basic_block);