diff options
author | rakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-06-20 21:31:32 +0000 |
---|---|---|
committer | rakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-06-20 21:31:32 +0000 |
commit | 3a0ecac2446ed396f0ab9cbc849a5d87d8a9cada (patch) | |
tree | ba006d95fa2c6cd2214ff0411ebeceffe1b217d0 /gcc/loop-init.c | |
parent | 187d4486729c4f0211637898ed8bdbca948f8359 (diff) | |
download | gcc-3a0ecac2446ed396f0ab9cbc849a5d87d8a9cada.tar.gz |
* loop-invariant.c: New file.
* Makefile.in (loop-invariant.o): New.
* cfgloop.h (global_cost_for_size, init_set_costs,
move_loop_invariants): Declare.
* cfgloopanal.c (seq_cost, init_set_costs, global_cost_for_size): New
functions.
(avail_regs, res_regs, small_cost, pres_cost, spill_cost): New
variables.
* common.opt (floop-optimize2, fmove-loop-invariants): New options.
* loop-init.c (loop_optimizer_init): Call init_set_costs.
* passes.c (rest_of_handle_loop2): Call move_loop_invariants.
(rest_of_compilation): Check flag_loop_optimize2.
* toplev.c (process_options): Handle flag_loop_optimize2.
* doc/invoke.texi (-floop-optimize2, -fmove-loop-invariants): Document.
* doc/passes.texi (loop-invariant.c): Document.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83419 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/loop-init.c')
-rw-r--r-- | gcc/loop-init.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/loop-init.c b/gcc/loop-init.c index eed3e195bd5..ff441e8c56d 100644 --- a/gcc/loop-init.c +++ b/gcc/loop-init.c @@ -35,6 +35,13 @@ loop_optimizer_init (FILE *dumpfile) { struct loops *loops = xcalloc (1, sizeof (struct loops)); edge e; + static bool first_time = true; + + if (first_time) + { + first_time = false; + init_set_costs (); + } /* Avoid annoying special cases of edges going to exit block. */ |