This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[12/27] Use target structures for init_excess_precision


This patch starts the same process for lang_dependent_init_target:

    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 ();

Richard


gcc/
	* flags.h (target_flagstate): Add x_flag_excess_precision.
	(flag_excess_precision): Redefine as a macro.
	* toplev.c (flag_excess_precision): Delete.

Index: gcc/flags.h
===================================================================
--- gcc/flags.h	2010-07-01 22:30:15.000000000 +0100
+++ gcc/flags.h	2010-07-01 22:30:26.000000000 +0100
@@ -232,10 +232,6 @@ enum excess_precision
 /* The excess precision specified on the command line, or defaulted by
    the front end.  */
 extern enum excess_precision flag_excess_precision_cmdline;
-
-/* The excess precision currently in effect.  */
-extern enum excess_precision flag_excess_precision;
-
 
 /* Other basic status info about current function.  */
 
@@ -251,6 +247,9 @@ struct target_flag_state {
   int x_align_labels_log;
   int x_align_labels_max_skip;
   int x_align_functions_log;
+
+  /* The excess precision currently in effect.  */
+  enum excess_precision x_flag_excess_precision;
 };
 
 extern struct target_flag_state default_target_flag_state;
@@ -274,6 +273,8 @@ #define align_labels_max_skip \
   (this_target_flag_state->x_align_labels_max_skip)
 #define align_functions_log \
   (this_target_flag_state->x_align_functions_log)
+#define flag_excess_precision \
+  (this_target_flag_state->x_flag_excess_precision)
 
 /* Nonzero if subexpressions must be evaluated from left-to-right.  */
 extern int flag_evaluation_order;
Index: gcc/toplev.c
===================================================================
--- gcc/toplev.c	2010-07-01 22:30:15.000000000 +0100
+++ gcc/toplev.c	2010-07-01 22:30:26.000000000 +0100
@@ -259,7 +259,6 @@ enum ira_region flag_ira_region = IRA_RE
 /* Set the default for excess precision.  */
 
 enum excess_precision flag_excess_precision_cmdline = EXCESS_PRECISION_DEFAULT;
-enum excess_precision flag_excess_precision = EXCESS_PRECISION_DEFAULT;
 
 /* Nonzero means change certain warnings into errors.
    Usually these are warnings about failure to conform to some standard.  */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]