From 7a9ae52e6008024bf73981125267f1e61ec9579f Mon Sep 17 00:00:00 2001 From: rakdver Date: Thu, 1 Feb 2007 14:57:08 +0000 Subject: [PATCH] * toplev.c (lang_dependent_init): Call init_set_costs. * loop-init.c (loop_optimizer_init): Do not call init_set_costs. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@121464 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/loop-init.c | 7 ------- gcc/toplev.c | 5 +++++ 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2b6fd69..0a3ee33 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2007-02-01 Zdenek Dvorak + + * 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 PR middle-end/30656 diff --git a/gcc/loop-init.c b/gcc/loop-init.c index 1f049c1..2c7f37a 100644 --- a/gcc/loop-init.c +++ b/gcc/loop-init.c @@ -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); diff --git a/gcc/toplev.c b/gcc/toplev.c index cf95f02..28d93b3 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -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 -- 2.7.4