diff options
author | rakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-02-17 16:41:44 +0000 |
---|---|---|
committer | rakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-02-17 16:41:44 +0000 |
commit | f9cce2dcaaf2f076df995c819b410d07d8636c04 (patch) | |
tree | 871928dcce64f79c8e877a86be241c2ed02c9cf3 /gcc/loop-init.c | |
parent | d42ddab15e6682e46bbeb8f4dcdaac64868329e9 (diff) | |
download | gcc-f9cce2dcaaf2f076df995c819b410d07d8636c04.tar.gz |
* loop-iv.c: New file.
* Makefile.in (loop-iv.o): New.
* basic_block.h (FOR_BB_INSNS, FOR_BB_INSNS_REVERSE): New macros.
* cfgloop.c (fill_sons_in_loop, get_loop_body_in_dom_order,
num_loop_branches): New functions.
* cfgloop.h (get_loop_body_in_dom_order, num_loop_branches,
iv_analysis_loop_init, iv_get_reaching_def, iv_analyse, get_iv_value,
find_simple_exit, iv_number_of_iterations, iv_analysis_done,
get_simple_loop_desc, free_simple_loop_desc): Declare.
(simple_loop_desc): New inline function.
(struct rtx_iv, struct niter_desc): New.
* cfgloopmanip.c (loopify): Specify semantics more precisely.
* expr.c (force_operand): Handle subregs of expressions created by
loop unroller.
* loop-init.c (loop_optimizer_init, loop_optimizer_finalize): Move
parts of the initialization to toplev.c
* loop-unroll.c (loop_exit_at_end_p): New.
(unroll_and_peel_loops): Call iv_analysis_done.
(decide_peel_once_rolling, decide_peel_completely,
decide_unroll_stupid, decide_unroll_constant_iterations,
decide_unroll_runtime_iterations, decide_peel_simple,
peel_loop_simple, unroll_loop_stupid, unroll_loop_constant_iterations,
unroll_loop_runtime_iterations): Use new simple loop analysis.
* loop-unswitch.c (compare_and_jump_seq): New.
(may_unswitch_on_p): Renamed to ...
(may_unswitch_on): Use new iv analysis.
(reversed_condition): Export.
(unswitch_single_loop, unswitch_loop): Use new iv analysis.
* predict.c (estimate_probability): Use new simple loop analysis.
* rtl.h (get_mode_bounds, reversed_condition,compare_and_jump_seq,
canon_condition, simplify_using_condition): Declare.
* stor-layout.c (get_mode_bounds): New.
* toplev.c (rest_of_handle_loop2): Some parts of
initialization/finalization moved here from loop-init.c.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@77951 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/loop-init.c')
-rw-r--r-- | gcc/loop-init.c | 26 |
1 files changed, 7 insertions, 19 deletions
diff --git a/gcc/loop-init.c b/gcc/loop-init.c index 0b882d9e163..19d53e112bd 100644 --- a/gcc/loop-init.c +++ b/gcc/loop-init.c @@ -36,9 +36,6 @@ loop_optimizer_init (FILE *dumpfile) struct loops *loops = xcalloc (1, sizeof (struct loops)); edge e; - /* Initialize structures for layout changes. */ - cfg_layout_initialize (); - /* Avoid annoying special cases of edges going to exit block. */ for (e = EXIT_BLOCK_PTR->pred; e; e = e->pred_next) @@ -49,18 +46,11 @@ loop_optimizer_init (FILE *dumpfile) if (flow_loops_find (loops, LOOP_TREE) <= 1) { - basic_block bb; - /* No loops. */ flow_loops_free (loops); free_dominance_info (CDI_DOMINATORS); free (loops); - /* Make chain. */ - FOR_EACH_BB (bb) - if (bb->next_bb != EXIT_BLOCK_PTR) - bb->rbi->next = bb->next_bb; - cfg_layout_finalize (); return NULL; } @@ -94,13 +84,14 @@ loop_optimizer_init (FILE *dumpfile) void loop_optimizer_finalize (struct loops *loops, FILE *dumpfile) { - basic_block bb; + unsigned i; - /* Finalize layout changes. */ - /* Make chain. */ - FOR_EACH_BB (bb) - if (bb->next_bb != EXIT_BLOCK_PTR) - bb->rbi->next = bb->next_bb; + if (!loops) + return; + + for (i = 1; i < loops->num; i++) + if (loops->parray[i]) + free_simple_loop_desc (loops->parray[i]); /* Another dump. */ flow_loops_dump (loops, dumpfile, NULL, 1); @@ -110,9 +101,6 @@ loop_optimizer_finalize (struct loops *loops, FILE *dumpfile) free_dominance_info (CDI_DOMINATORS); free (loops); - /* Finalize changes. */ - cfg_layout_finalize (); - /* Checking. */ #ifdef ENABLE_CHECKING verify_flow_info (); |