toplev.c (lang_dependent_init): Call init_set_costs.
authorZdenek Dvorak <dvorakz@suse.cz>
Thu, 1 Feb 2007 14:57:08 +0000 (15:57 +0100)
committerZdenek Dvorak <rakdver@gcc.gnu.org>
Thu, 1 Feb 2007 14:57:08 +0000 (14:57 +0000)
* toplev.c (lang_dependent_init): Call init_set_costs.
* loop-init.c (loop_optimizer_init): Do not call init_set_costs.

From-SVN: r121464

gcc/ChangeLog
gcc/loop-init.c
gcc/toplev.c

index 2b6fd693d3b29b7a69d0d6fde102d97d56bfe15e..0a3ee339f90284b5396b09fdf05cd7fb3587a032 100644 (file)
@@ -1,3 +1,8 @@
+2007-02-01  Zdenek Dvorak <dvorakz@suse.cz>
+
+       * toplev.c (lang_dependent_init): Call init_set_costs.
+       * loop-init.c (loop_optimizer_init): Do not call init_set_costs.
+
 2007-02-01  Richard Guenther  <rguenther@suse.de>
 
        PR middle-end/30656
index 1f049c1ad4de9c5175ac1c73ce24dac54e33a6ad..2c7f37a3f61b2d28b31b1b5aa231b257d05f084f 100644 (file)
@@ -42,15 +42,8 @@ loop_optimizer_init (unsigned flags)
 {
   edge e;
   edge_iterator ei;
-  static bool first_time = true;
   struct loops *loops;
 
-  if (first_time)
-    {
-      first_time = false;
-      init_set_costs ();
-    }
-
   gcc_assert (!current_loops);
   loops = XCNEW (struct loops);
 
index cf95f02c94eefd693e28178c01177e6ee0f09566..28d93b3e87385ed69c4a29bd05b048ec8b2511f5 100644 (file)
@@ -1992,6 +1992,11 @@ lang_dependent_init (const char *name)
      provide a dummy function context for them.  */
   init_dummy_function_start ();
   init_expr_once ();
+
+  /* Although the actions of init_set_costs are language-independent,
+     it uses optabs, so we cannot call it from backend_init.  */
+  init_set_costs ();
+
   expand_dummy_function_end ();
 
   /* If dbx symbol table desired, initialize writing it and output the