diff options
author | rakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-02-08 14:29:00 +0000 |
---|---|---|
committer | rakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-02-08 14:29:00 +0000 |
commit | 6a606e3ca54b94355b76625a904ca6d45dc33cbf (patch) | |
tree | a5f2166463824a1a17e45cfd6cfe1c23ebc0c708 /gcc/cfgloop.h | |
parent | 17cb77de2f4983570c6defc432c9012fbb5ab9ef (diff) | |
download | gcc-6a606e3ca54b94355b76625a904ca6d45dc33cbf.tar.gz |
* cfgloop.h (fix_loop_placement, can_duplicate_loop_p,
duplicate_loop_to_header_edge, loopify, remove_path, split_loop_bb):
Declare.
(DLTHE_FLAG_UPDATE_FREQ): New.
* cfgloopmanip.c (duplicate_loop, duplicate_subloops, copy_loops_to,
loop_redirect_edge, loop_delete_branch_edge, copy_bbs, remove_bbs,
rpe_enum_p, find_branch, alp_enum_p, add_loop, fix_loop_placements,
fix_bb_placement, fix_bb_placements, place_new_loop,
scale_loop_frequencies, scale_bbs_frequencies, record_exit_edges):
New static functions.
(fix_loop_placement, can_duplicate_loop_p,
duplicate_loop_to_header_edge, loopify, remove_path, split_loop_bb):
New functions.
* cfgloop.h (loop_optimizer_init, loop_optimizer_finalize,
unswitch_loops): Declare.
* loop-init.c: New file.
* loop-unswitch.c: New file.
* Makefile.in (loop-init.o, loop-unswitch.o): New.
* params.def (PARAM_MAX_UNSWITCH_INSNS, PARAM_MAX_UNSWITCH_LEVEL): New.
* toplev.c (DFI_loop2): New dump.
(flag_unswitch_loops): New.
(lang_independent_options): Add it.
(rest_of_compilation): Call new loop optimizer.
(parse_options_and_default_flags): Turn flag_unswitch_loops on with -O3.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@62578 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfgloop.h')
-rw-r--r-- | gcc/cfgloop.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc/cfgloop.h b/gcc/cfgloop.h index 0d4142fafee..c46602f790a 100644 --- a/gcc/cfgloop.h +++ b/gcc/cfgloop.h @@ -293,6 +293,7 @@ extern void cancel_loop PARAMS ((struct loops *, struct loop *)); extern void cancel_loop_tree PARAMS ((struct loops *, struct loop *)); extern basic_block loop_split_edge_with PARAMS ((edge, rtx, struct loops *)); +extern int fix_loop_placement PARAMS ((struct loop *)); enum { @@ -312,3 +313,27 @@ extern rtx count_loop_iterations PARAMS ((struct loop_desc *, rtx, rtx)); extern bool just_once_each_iteration_p PARAMS ((struct loops *,struct loop *, basic_block)); extern unsigned expected_loop_iterations PARAMS ((const struct loop *)); + +/* Loop manipulation. */ +extern bool can_duplicate_loop_p PARAMS ((struct loop *loop)); + +#define DLTHE_FLAG_UPDATE_FREQ 1 /* Update frequencies in + duplicate_loop_to_header_edge. */ + +extern int duplicate_loop_to_header_edge PARAMS ((struct loop *, edge, + struct loops *, unsigned, + sbitmap, edge, edge *, + unsigned *, int)); +extern struct loop *loopify PARAMS ((struct loops *, edge, + edge, basic_block)); +extern bool remove_path PARAMS ((struct loops *, edge)); +extern edge split_loop_bb PARAMS ((struct loops *, basic_block, + rtx)); + +/* Loop optimizer initialization. */ +extern struct loops *loop_optimizer_init PARAMS ((FILE *)); +extern void loop_optimizer_finalize PARAMS ((struct loops *, FILE *)); + +/* Optimization passes. */ +extern void unswitch_loops PARAMS ((struct loops *)); + |