+/* Initialize the compiler back end. This function is called only once,
+ when starting the compiler. */
+static void
+backend_init (void)
+{
+ init_emit_once ();
+
+ init_rtlanal ();
+ init_inline_once ();
+ init_varasm_once ();
+ save_register_info ();
+
+ /* Initialize the target-specific back end pieces. */
+ ira_init_once ();
+ backend_init_target ();
+}
+
+/* Initialize excess precision settings. */
+static void
+init_excess_precision (void)
+{
+ /* Adjust excess precision handling based on the target options. If
+ the front end cannot handle it, flag_excess_precision_cmdline
+ will already have been set accordingly in the post_options
+ hook. */
+ gcc_assert (flag_excess_precision_cmdline != EXCESS_PRECISION_DEFAULT);
+ flag_excess_precision = flag_excess_precision_cmdline;
+ if (flag_unsafe_math_optimizations)
+ flag_excess_precision = EXCESS_PRECISION_FAST;
+ if (flag_excess_precision == EXCESS_PRECISION_STANDARD)
+ {
+ int flt_eval_method = TARGET_FLT_EVAL_METHOD;
+ switch (flt_eval_method)
+ {
+ case -1:
+ case 0:
+ /* Either the target acts unpredictably (-1) or has all the
+ operations required not to have excess precision (0). */
+ flag_excess_precision = EXCESS_PRECISION_FAST;
+ break;
+ case 1:
+ case 2:
+ /* In these cases, predictable excess precision makes
+ sense. */
+ break;
+ default:
+ /* Any other implementation-defined FLT_EVAL_METHOD values
+ require the compiler to handle the associated excess
+ precision rules in excess_precision_type. */
+ gcc_unreachable ();
+ }
+ }
+}
+
+/* Initialize things that are both lang-dependent and target-dependent.
+ This function can be called more than once if target parameters change. */
+static void
+lang_dependent_init_target (void)
+{
+ /* This determines excess precision settings. */
+ init_excess_precision ();
+
+ /* This creates various _DECL nodes, so needs to be called after the
+ front end is initialized. It also depends on the HAVE_xxx macros
+ generated from the target machine description. */
+ init_optabs ();
+
+ /* 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 ();
+}
+