+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
/* Track if RTL has been initialized. */
bool target_specific_initialized;
- bool lang_dependent_initialized;
};
extern GTY(()) struct target_rtl default_target_rtl;
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. */
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.
/* 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. */