]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
rtl.h (target_rtl): Remove lang_dependent_initialized.
authorRichard Sandiford <rdsandiford@googlemail.com>
Thu, 24 Jul 2014 15:18:09 +0000 (15:18 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Thu, 24 Jul 2014 15:18:09 +0000 (15:18 +0000)
gcc/
* 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.

From-SVN: r213004

gcc/ChangeLog
gcc/rtl.h
gcc/toplev.c

index 3218429aa167434f28f697dcd64f7b579105ef4d..44eb7a78f0ab0ca125c8077f2eb39ab5f24e8bb7 100644 (file)
@@ -1,3 +1,12 @@
+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
index 8eb215cbaa1ebe19edf4b33c580a5ae62ad67d14..7f93f0a48ef255cf3dc1870acfca4e47bb6fbed9 100644 (file)
--- 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;
index 2886df71bc05325b2501110d446a4fcbcb4af65b..c2d4232523e8ad2a9db47aa1c27f02aedb8cf492 100644 (file)
@@ -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.  */