aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2014-07-24 15:18:09 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2014-07-24 15:18:09 +0000
commitd4cf94779ff35d46313e9ff5faad76e320ab1281 (patch)
tree3629f5a97b5846f8e55be0d88df35de4ce99df93
parent2175bf4930b19cb7cb93567277a931a950213751 (diff)
downloadgcc-d4cf94779ff35d46313e9ff5faad76e320ab1281.zip
gcc-d4cf94779ff35d46313e9ff5faad76e320ab1281.tar.gz
gcc-d4cf94779ff35d46313e9ff5faad76e320ab1281.tar.bz2
rtl.h (target_rtl): Remove lang_dependent_initialized.
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
-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 3218429..44eb7a7 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 8eb215c..7f93f0a 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 2886df7..c2d4232 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. */