* optc-gen.awk, opth-gen.awk: Handle Variable records. Don't
generate target_flags declarations explicitly. Don't define
VarExists variables for the driver.
* common.opt (target_flags): New Variable record.
(flag_dump_unnumbered, flag_dump_unnumbered_links,
flag_var_tracking, flag_var_tracking_assignments,
flag_var_tracking_assignments_toggle): Don't mark variables with
VarExists.
* config/i386/i386.c (ix86_isa_flags): Don't define here.
* config/i386/i386.opt (ix86_isa_flags): Define here.
* config/mcore/mcore.c (mcore_stack_increment): Don't define here.
* config/mcore/mcore.opt (mcore_stack_increment): Don't mark with
VarExists.
* flags.h (flag_dump_unnumbered, flag_var_tracking): Remove.
* print-rtl.c (flag_dump_unnumbered, flag_dump_unnumbered_links):
Only define for generator programs.
* rtlanal.c (target_flags): Remove.
* toplev.c (flag_var_tracking, flag_var_tracking_assignments,
flag_var_tracking_assignments_toggle): Remove.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164370
138bc75d-0d04-0410-961f-
82ee72b054a4
+2010-09-17 Joseph Myers <joseph@codesourcery.com>
+
+ * doc/options.texi (Variable): Document.
+ * optc-gen.awk, opth-gen.awk: Handle Variable records. Don't
+ generate target_flags declarations explicitly. Don't define
+ VarExists variables for the driver.
+ * common.opt (target_flags): New Variable record.
+ (flag_dump_unnumbered, flag_dump_unnumbered_links,
+ flag_var_tracking, flag_var_tracking_assignments,
+ flag_var_tracking_assignments_toggle): Don't mark variables with
+ VarExists.
+ * config/i386/i386.c (ix86_isa_flags): Don't define here.
+ * config/i386/i386.opt (ix86_isa_flags): Define here.
+ * config/mcore/mcore.c (mcore_stack_increment): Don't define here.
+ * config/mcore/mcore.opt (mcore_stack_increment): Don't mark with
+ VarExists.
+ * flags.h (flag_dump_unnumbered, flag_var_tracking): Remove.
+ * print-rtl.c (flag_dump_unnumbered, flag_dump_unnumbered_links):
+ Only define for generator programs.
+ * rtlanal.c (target_flags): Remove.
+ * toplev.c (flag_var_tracking, flag_var_tracking_assignments,
+ flag_var_tracking_assignments_toggle): Remove.
+
2010-09-17 Michael Matz <matz@suse.de>
PR tree-optimization/43432
; Please try to keep this file in ASCII collating order.
+Variable
+int target_flags
+
###
Driver
Suppress output of addresses in debugging dumps
fdump-unnumbered
-Common Report Var(flag_dump_unnumbered) VarExists
+Common Report Var(flag_dump_unnumbered)
Suppress output of instruction numbers, line number notes and addresses in debugging dumps
fdump-unnumbered-links
-Common Report Var(flag_dump_unnumbered_links) VarExists
+Common Report Var(flag_dump_unnumbered_links)
Suppress output of previous and next insn numbers in debugging dumps
fdwarf2-cfi-asm
fuse-linker-plugin
Common Undocumented
+; Positive if we should track variables, negative if we should run
+; the var-tracking pass only to discard debug annotations, zero if
+; we're not to run it. When flag_var_tracking == 2 (AUTODETECT_VALUE) it
+; will be set according to optimize, debug_info_level and debug_hooks
+; in process_options ().
fvar-tracking
-Common Report Var(flag_var_tracking) VarExists Optimization
+Common Report Var(flag_var_tracking) Init(2) Optimization
Perform variable tracking
+; Positive if we should track variables at assignments, negative if
+; we should run the var-tracking pass only to discard debug
+; annotations. When flag_var_tracking_assignments ==
+; AUTODETECT_VALUE it will be set according to flag_var_tracking.
fvar-tracking-assignments
-Common Report Var(flag_var_tracking_assignments) VarExists Optimization
+Common Report Var(flag_var_tracking_assignments) Init(2) Optimization
Perform variable tracking by annotating assignments
+; Nonzero if we should toggle flag_var_tracking_assignments after
+; processing options and computing its default. */
fvar-tracking-assignments-toggle
-Common Report Var(flag_var_tracking_assignments_toggle) VarExists Optimization
+Common Report Var(flag_var_tracking_assignments_toggle) Optimization
Toggle -fvar-tracking-assignments
fvar-tracking-uninit
static int ix86_tune_defaulted;
static int ix86_arch_specified;
-/* Bit flags that specify the ISA we are compiling for. */
-int ix86_isa_flags = TARGET_64BIT_DEFAULT | TARGET_SUBTARGET_ISA_DEFAULT;
-
/* A mask of ix86_isa_flags that includes bit X if X
was set or cleared on the command line. */
static int ix86_isa_flags_explicit;
; along with GCC; see the file COPYING3. If not see
; <http://www.gnu.org/licenses/>.
+; Bit flags that specify the ISA we are compiling for.
+Variable
+int ix86_isa_flags = TARGET_64BIT_DEFAULT | TARGET_SUBTARGET_ISA_DEFAULT
+
;; Definitions to add to the cl_target_option structure
;; -march= processor
TargetSave
#include "target-def.h"
#include "df.h"
-/* Maximum size we are allowed to grow the stack in a single operation.
- If we want more, we must do it in increments of at most this size.
- If this value is 0, we don't check at all. */
-int mcore_stack_increment = STACK_UNITS_MAXSTEP;
-
/* For dumping information about frame sizes. */
char * mcore_current_function_name = 0;
long mcore_current_compilation_timestamp = 0;
Target Report Mask(SLOW_BYTES)
Prefer word accesses over byte accesses
+; Maximum size we are allowed to grow the stack in a single operation.
+; If we want more, we must do it in increments of at most this size.
+; If this value is 0, we don't check at all.
mstack-increment=
-Target RejectNegative Joined UInteger Var(mcore_stack_increment) VarExists
+Target RejectNegative Joined UInteger Var(mcore_stack_increment) Init(STACK_UNITS_MAXSTEP)
Set the maximum amount for a single stack increment operation
mwide-bitfields
declaration type to go in the @code{cl_target_option} structure.
@item
+A variable record to define a variable used to store option
+information. These records have two fields: the string
+@samp{Variable}, and a declaration of the type and name of the
+variable, optionally with an initializer (but without any trailing
+@samp{;}). These records may be used for variables used for many
+options where declaring the variable and its initializer by omitting
+@code{VarExists} from a single option definition record would be
+inappropriate, or for variables set in option handlers rather than
+referenced by @code{Var} properties.
+
+@item
An option definition record. These records have the following fields:
@enumerate
@item
extern int flag_gen_aux_info;
-/* Nonzero means suppress output of instruction numbers and line number
- notes in debugging dumps. */
-
-extern int flag_dump_unnumbered;
-
/* True if printing into -fdump-final-insns= dump. */
extern bool final_insns_dump_p;
};
extern enum graph_dump_types graph_dump_format;
-/* Nonzero if we should track variables. */
-extern int flag_var_tracking;
-
/* True if flag_speculative_prefetching was set by user. Used to suppress
warning message in case flag was set by -fprofile-{generate,use}. */
extern bool flag_speculative_prefetching_set;
n_opts = 0
n_langs = 0
n_target_save = 0
+ n_extra_vars = 0
quote = "\042"
comma = ","
FS=SUBSEP
target_save_decl[n_target_save] = $2
n_target_save++
}
+ else if ($1 == "Variable") {
+ extra_vars[n_extra_vars] = $2
+ n_extra_vars++
+ }
else {
name = opt_args("Mask", $1)
if (name == "") {
print "#include " quote "intl.h" quote
print ""
print "#ifdef GCC_DRIVER"
-print "int target_flags;"
print "int target_flags_explicit;"
print "#else"
print "#include " quote "flags.h" quote
print ""
have_save = 0;
+for (i = 0; i < n_extra_vars; i++) {
+ print extra_vars[i] ";"
+}
for (i = 0; i < n_opts; i++) {
if (flag_set_p("Save", flags[i]))
have_save = 1;
continue;
if (flag_set_p("VarExists", flags[i])) {
- # Need it for the gcc driver.
- if (name in var_seen)
- continue;
- init = ""
- gcc_driver = 1
+ continue;
}
else {
init = opt_args("Init", flags[i])
init = " = " init;
else if (name in var_seen)
continue;
- gcc_driver = 0
}
- if (gcc_driver == 1)
- print "#ifdef GCC_DRIVER"
print "/* Set by -" opts[i] "."
print " " help[i] " */"
print var_type(flags[i]) name init ";"
- if (gcc_driver == 1)
- print "#endif /* GCC_DRIVER */"
print ""
var_seen[name] = 1;
n_opts = 0
n_langs = 0
n_target_save = 0
+ n_extra_vars = 0
n_extra_masks = 0
FS=SUBSEP
}
target_save_decl[n_target_save] = $2
n_target_save++
}
+ else if ($1 == "Variable") {
+ extra_vars[n_extra_vars] = $2
+ n_extra_vars++
+ }
else {
name = opt_args("Mask", $1)
if (name == "") {
print "#ifndef OPTIONS_H"
print "#define OPTIONS_H"
print ""
-print "extern int target_flags;"
print "extern int target_flags_explicit;"
print ""
have_save = 0;
+for (i = 0; i < n_extra_vars; i++) {
+ var = extra_vars[i]
+ sub(" *=.*", "", var)
+ print "extern " var ";"
+}
+
for (i = 0; i < n_opts; i++) {
if (flag_set_p("Save", flags[i]))
have_save = 1;
the assembly output file. */
const char *print_rtx_head = "";
+#ifdef GENERATOR_FILE
+/* These are defined from the .opt file when not used in generator
+ programs. */
+
/* Nonzero means suppress output of instruction numbers
in debugging dumps.
This must be defined here so that programs like gencodes can be linked. */
and next insns in debugging dumps.
This must be defined here so that programs like gencodes can be linked. */
int flag_dump_unnumbered_links = 0;
+#endif
/* Nonzero means use simplified format without flags, modes, etc. */
int flag_simple = 0;
/* Analyze RTL for GNU compiler.
Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
Free Software Foundation, Inc.
This file is part of GCC.
-1 if a code has no such operand. */
static int non_rtx_starting_operands[NUM_RTX_CODE];
-/* Bit flags that specify the machine subtype we are compiling for.
- Bits are tested using macros TARGET_... defined in the tm.h file
- and set by `-m...' switches. Must be defined in rtlanal.c. */
-
-int target_flags;
-
/* Truncation narrows the mode from SOURCE mode to DESTINATION mode.
If TARGET_MODE_REP_EXTENDED (DESTINATION, DESTINATION_REP) is
SIGN_EXTEND then while narrowing we also have to enforce the
the support provided depends on the backend. */
rtx stack_limit_rtx;
-/* Positive if we should track variables, negative if we should run
- the var-tracking pass only to discard debug annotations, zero if
- we're not to run it. When flag_var_tracking == AUTODETECT_VALUE it
- will be set according to optimize, debug_info_level and debug_hooks
- in process_options (). */
-int flag_var_tracking = AUTODETECT_VALUE;
-
-/* Positive if we should track variables at assignments, negative if
- we should run the var-tracking pass only to discard debug
- annotations. When flag_var_tracking_assignments ==
- AUTODETECT_VALUE it will be set according to flag_var_tracking. */
-int flag_var_tracking_assignments = AUTODETECT_VALUE;
-
-/* Nonzero if we should toggle flag_var_tracking_assignments after
- processing options and computing its default. */
-int flag_var_tracking_assignments_toggle = 0;
-
/* Type of stack check. */
enum stack_check_type flag_stack_check = NO_STACK_CHECK;