summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/rtl.h1
-rw-r--r--gcc/toplev.c31
3 files changed, 19 insertions, 22 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 3218429aa16..44eb7a78f0a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,14 @@
2014-07-24 Richard Sandiford <rdsandiford@googlemail.com>
+ * rtl.h (target_rtl): Remove lang_dependent_initialized.
+ * toplev.c (initialize_rtl): Don't use it. Move previously
+ "language-dependent" calls to...
+ (backend_init): ...here.
+ (lang_dependent_init_target): Don't set lang_dependent_initialized.
+ Assert that RTL initialization hasn't happend yet.
+
+2014-07-24 Richard Sandiford <rdsandiford@googlemail.com>
+
PR rtl-optimization/61629
* reginfo.c (reinit_regs): Only call ira_init and recog_init if
they have already been initialized.
diff --git a/gcc/rtl.h b/gcc/rtl.h
index 8eb215cbaa1..7f93f0a48ef 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -2517,7 +2517,6 @@ struct GTY(()) target_rtl {
/* Track if RTL has been initialized. */
bool target_specific_initialized;
- bool lang_dependent_initialized;
};
extern GTY(()) struct target_rtl default_target_rtl;
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 2886df71bc0..c2d4232523e 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -1607,6 +1607,10 @@ backend_init_target (void)
on a mode change. */
init_expmed ();
init_lower_subreg ();
+ init_set_costs ();
+
+ init_expr_target ();
+ ira_init ();
/* We may need to recompute regno_save_code[] and regno_restore_code[]
after a mode change as well. */
@@ -1685,7 +1689,8 @@ lang_dependent_init_target (void)
front end is initialized. It also depends on the HAVE_xxx macros
generated from the target machine description. */
init_optabs ();
- this_target_rtl->lang_dependent_initialized = false;
+
+ gcc_assert (!this_target_rtl->target_specific_initialized);
}
/* Perform initializations that are lang-dependent or target-dependent.
@@ -1704,26 +1709,10 @@ initialize_rtl (void)
/* Target specific RTL backend initialization. */
if (!this_target_rtl->target_specific_initialized)
- backend_init_target ();
- this_target_rtl->target_specific_initialized = true;
-
- if (this_target_rtl->lang_dependent_initialized)
- return;
- this_target_rtl->lang_dependent_initialized = true;
-
- /* The following initialization functions need to generate rtl, so
- provide a dummy function context for them. */
- init_dummy_function_start ();
-
- /* Do the target-specific parts of expr initialization. */
- init_expr_target ();
-
- /* Although the actions of these functions are language-independent,
- they use optabs, so we cannot call them from backend_init. */
- init_set_costs ();
- ira_init ();
-
- expand_dummy_function_end ();
+ {
+ backend_init_target ();
+ this_target_rtl->target_specific_initialized = true;
+ }
}
/* Language-dependent initialization. Returns nonzero on success. */