X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=gcc%2Fflags.h;h=472df5426d608f5e769557e927c7b8d1fa013639;hb=1ddc6392b91a1279a5e3609149bceaea7abdd820;hp=de5b099d6c03a220bdad66604331bad3bc25cfae;hpb=9641f63cf58f87e338408cf329b849260569f3f1;p=pf3gnuchains%2Fgcc-fork.git diff --git a/gcc/flags.h b/gcc/flags.h index de5b099d6c0..472df5426d6 100644 --- a/gcc/flags.h +++ b/gcc/flags.h @@ -1,26 +1,27 @@ -/* Compilation switch flag definitions for GNU CC. - Copyright (C) 1987, 1988, 1994, 1995, 1996, 1997, 1998, 1999, 2000 +/* Compilation switch flag definitions for GCC. + Copyright (C) 1987, 1988, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002, + 2003, 2004 Free Software Foundation, Inc. -This file is part of GNU CC. +This file is part of GCC. -GNU CC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. +GCC is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 2, or (at your option) any later +version. -GNU CC is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. +GCC is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. You should have received a copy of the GNU General Public License -along with GNU CC; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ +along with GCC; see the file COPYING. If not, write to the Free +Software Foundation, 59 Temple Place - Suite 330, Boston, MA +02111-1307, USA. */ -/* Name of the input .c file being compiled. */ -extern const char *main_input_filename; +#ifndef GCC_FLAGS_H +#define GCC_FLAGS_H enum debug_info_type { @@ -29,17 +30,23 @@ enum debug_info_type SDB_DEBUG, /* Write COFF for (old) SDB (using sdbout.c). */ DWARF_DEBUG, /* Write Dwarf debug info (using dwarfout.c). */ DWARF2_DEBUG, /* Write Dwarf v2 debug info (using dwarf2out.c). */ - XCOFF_DEBUG /* Write IBM/Xcoff debug info (using dbxout.c). */ + XCOFF_DEBUG, /* Write IBM/Xcoff debug info (using dbxout.c). */ + VMS_DEBUG, /* Write VMS debug info (using vmsdbgout.c). */ + VMS_AND_DWARF2_DEBUG /* Write VMS debug info (using vmsdbgout.c). + and DWARF v2 debug info (using dwarf2out.c). */ }; /* Specify which kind of debugging info to generate. */ extern enum debug_info_type write_symbols; +/* Names of debug_info_type, for error messages. */ +extern const char *const debug_type_names[]; + enum debug_info_level { DINFO_LEVEL_NONE, /* Write no debugging info. */ DINFO_LEVEL_TERSE, /* Write minimal info to support tracebacks only. */ - DINFO_LEVEL_NORMAL, /* Write info for all declarations (and line table). */ + DINFO_LEVEL_NORMAL, /* Write info for all declarations (and line table). */ DINFO_LEVEL_VERBOSE /* Write normal info plus #define/#undef info. */ }; @@ -48,7 +55,10 @@ extern enum debug_info_level debug_info_level; /* Nonzero means use GNU-only extensions in the generated symbolic debugging information. */ -extern int use_gnu_debug_info_extensions; +extern bool use_gnu_debug_info_extensions; + +/* Nonzero means emit debugging information only for symbols which are used. */ +extern int flag_debug_only_used_symbols; /* Nonzero means do optimizations. -opt. */ @@ -63,111 +73,156 @@ extern int optimize_size; extern int quiet_flag; +/* Print memory still in use at end of compilation (which may have little + to do with peak memory consumption). -fmem-report. */ + +extern int mem_report; + /* Don't print warning messages. -w. */ -extern int inhibit_warnings; +extern bool inhibit_warnings; + +/* Don't suppress warnings from system headers. -Wsystem-headers. */ + +extern bool warn_system_headers; + +/* Do print extra warnings (such as for uninitialized variables). + -W/-Wextra. */ -/* Do print extra warnings (such as for uninitialized variables). -W. */ +extern bool extra_warnings; -extern int extra_warnings; +/* If -Werror. */ + +extern bool warnings_are_errors; /* Nonzero to warn about unused variables, functions et.al. Use set_Wunused() to update the -Wunused-* flags that correspond to the - -Wunused option. */ + -Wunused option. */ -extern void set_Wunused PARAMS ((int setting)); +extern void set_Wunused (int setting); -extern int warn_unused_function; -extern int warn_unused_label; -extern int warn_unused_parameter; -extern int warn_unused_variable; -extern int warn_unused_value; +extern bool warn_unused_function; +extern bool warn_unused_label; +extern bool warn_unused_parameter; +extern bool warn_unused_variable; +extern bool warn_unused_value; /* Nonzero to warn about code which is never reached. */ -extern int warn_notreached; +extern bool warn_notreached; /* Nonzero means warn if inline function is too large. */ -extern int warn_inline; +extern bool warn_inline; /* Nonzero to warn about variables used before they are initialized. */ extern int warn_uninitialized; -/* Zero if unknown pragmas are ignored - One if the compiler should warn about an unknown pragma not in - a system include file. - Greater than one if the compiler should warn for all unknown - pragmas. */ +/* Nonzero means warn about all declarations which shadow others. */ + +extern bool warn_shadow; -extern int warn_unknown_pragmas; +/* Warn if a switch on an enum, that does not have a default case, + fails to have a case for every enum value. */ -/* Nonzero means warn about all declarations which shadow others. */ +extern bool warn_switch; -extern int warn_shadow; +/* Warn if a switch does not have a default case. */ -/* Warn if a switch on an enum fails to have a case for every enum value. */ +extern bool warn_switch_default; -extern int warn_switch; +/* Warn if a switch on an enum fails to have a case for every enum + value (regardless of the presence or otherwise of a default case). */ + +extern bool warn_switch_enum; /* Nonzero means warn about function definitions that default the return type or that use a null return and have a return-type other than void. */ extern int warn_return_type; +/* Warn about functions which might be candidates for attribute noreturn. */ + +extern bool warn_missing_noreturn; + /* Nonzero means warn about pointer casts that increase the required alignment of the target type (and might therefore lead to a crash due to a misaligned access). */ -extern int warn_cast_align; - -/* Nonzero means warn about any identifiers that match in the first N - characters. The value N is in `id_clash_len'. */ - -extern int warn_id_clash; -extern int id_clash_len; +extern bool warn_cast_align; /* Nonzero means warn about any objects definitions whose size is larger than N bytes. Also want about function definitions whose returned values are larger than N bytes. The value N is in `larger_than_size'. */ -extern int warn_larger_than; +extern bool warn_larger_than; extern HOST_WIDE_INT larger_than_size; /* Warn if a function returns an aggregate, since there are often incompatible calling conventions for doing this. */ -extern int warn_aggregate_return; +extern bool warn_aggregate_return; /* Warn if packed attribute on struct is unnecessary and inefficient. */ -extern int warn_packed; +extern bool warn_packed; /* Warn when gcc pads a structure to an alignment boundary. */ -extern int warn_padded; +extern bool warn_padded; + +/* Warn when an optimization pass is disabled. */ + +extern bool warn_disabled_optimization; + +/* Nonzero means warn about uses of __attribute__((deprecated)) + declarations. */ + +extern bool warn_deprecated_decl; + +/* Nonzero means warn about constructs which might not be strict + aliasing safe. */ + +extern int warn_strict_aliasing; /* Nonzero if generating code to do profiling. */ extern int profile_flag; -/* Nonzero if generating code to do profiling on the basis of basic blocks. */ +/* Nonzero if generating code to profile program flow graph arcs. */ -extern int profile_block_flag; +extern int profile_arc_flag; -/* Nonzero if generating code to profile program flow graph arcs. */ +/* Nonzero if value profile should be measured. */ -extern int profile_arc_flag; +extern int flag_profile_values; -/* Nonzero if generating info for gcov to calculate line test coverage. */ +/* Nonzero if generating info for gcov to calculate line test coverage. */ extern int flag_test_coverage; -/* Nonzero indicates that branch taken probabilities should be calculated. */ +/* Nonzero indicates that branch taken probabilities should be calculated. */ extern int flag_branch_probabilities; +/* Nonzero if basic blocks should be reordered. */ + +extern int flag_reorder_blocks; + +/* Nonzero if basic blocks should be partitioned into hot and cold + sections of the .o file, in addition to being reordered. */ + +extern int flag_reorder_blocks_and_partition; + +/* Nonzero if functions should be reordered. */ + +extern int flag_reorder_functions; + +/* Nonzero if registers should be renamed. */ + +extern int flag_rename_registers; + /* Nonzero for -pedantic switch: warn about anything that standard C forbids. */ @@ -232,20 +287,24 @@ extern int flag_strength_reduce; UNROLL_MODULO) or at run-time (preconditioned to be UNROLL_MODULO) are unrolled. */ -extern int flag_unroll_loops; +extern int flag_old_unroll_loops; /* Nonzero enables loop unrolling in unroll.c. All loops are unrolled. This is generally not a win. */ -extern int flag_unroll_all_loops; +extern int flag_old_unroll_all_loops; /* Nonzero forces all invariant computations in loops to be moved - outside the loop. */ + outside the loop. */ extern int flag_move_all_movables; +/* Nonzero enables prefetch optimizations for arrays in loops. */ + +extern int flag_prefetch_loop_arrays; + /* Nonzero forces all general induction variables in loops to be - strength reduced. */ + strength reduced. */ extern int flag_reduce_all_givs; @@ -263,11 +322,6 @@ extern int flag_cse_skip_blocks; perform miscellaneous relatively-expensive optimizations. */ extern int flag_expensive_optimizations; -/* Nonzero for -fwritable-strings: - store string constants in data segment and don't uniquize them. */ - -extern int flag_writable_strings; - /* Nonzero means don't put addresses of constant functions in registers. Used for compiling the Unix kernel, where strange substitutions are done on the assembly output. */ @@ -283,37 +337,40 @@ extern int flag_omit_frame_pointer; extern int flag_no_peephole; -/* Nonzero means all references through pointers are volatile. */ +/* Nonzero allows GCC to optimize sibling and tail recursive calls. */ -extern int flag_volatile; +extern int flag_optimize_sibling_calls; -/* Nonzero means treat all global and extern variables as volatile. */ +/* Nonzero means the front end generally wants `errno' maintained by math + operations, like built-in SQRT. */ -extern int flag_volatile_global; +extern int flag_errno_math; -/* Nonzero means treat all static variables as volatile. */ +/* Nonzero means that unsafe floating-point math optimizations are allowed + for the sake of speed. IEEE compliance is not guaranteed, and operations + are allowed to assume that their arguments and results are "normal" + (e.g., nonnegative for SQRT). */ -extern int flag_volatile_static; +extern int flag_unsafe_math_optimizations; -/* Nonzero allows GCC to violate some IEEE or ANSI rules regarding math - operations in the interest of optimization. For example it allows - GCC to assume arguments to sqrt are nonnegative numbers, allowing - faster code for sqrt to be generated. */ +/* Nonzero means that no NaNs or +-Infs are expected. */ -extern int flag_fast_math; +extern int flag_finite_math_only; -/* Nonzero allows GCC to optimize sibling and tail recursive calls. */ +/* Zero means that floating-point math operations cannot generate a + (user-visible) trap. This is the case, for example, in nonstop + IEEE 754 arithmetic. */ -extern int flag_optimize_sibling_calls; +extern int flag_trapping_math; -/* Nonzero means the front end generally wants `errno' maintained by math - operations, like built-in SQRT, unless overridden by flag_fast_math. */ +/* Nonzero means disable transformations that assume default floating + point rounding behavior. */ -extern int flag_errno_math; +extern int flag_rounding_math; /* 0 means straightforward implementation of complex divide acceptable. 1 means wide ranges of inputs must work for complex divide. - 2 means C9X-like requirements for complex divide (not yet implemented). */ + 2 means C99-like requirements for complex divide (not yet implemented). */ extern int flag_complex_divide_method; @@ -340,9 +397,15 @@ extern int flag_keep_inline_functions; extern int flag_no_inline; +/* Nonzero means that we don't want inlining by virtue of -fno-inline, + not just because the tree inliner turned us off. */ + +extern int flag_really_no_inline; + /* Nonzero if we are only using compiler to check syntax errors. */ extern int flag_syntax_only; +extern int rtl_dump_and_exit; /* Nonzero means we should save auxiliary info into a .X file. */ @@ -359,11 +422,13 @@ extern int flag_shared_data; extern int flag_schedule_insns; extern int flag_schedule_insns_after_reload; +extern int flag_sched2_use_superblocks; +extern int flag_sched2_use_traces; /* The following flags have effect only for scheduling before register allocation: - flag_schedule_interblock means schedule insns accross basic blocks. + flag_schedule_interblock means schedule insns across basic blocks. flag_schedule_speculative means allow speculative motion of non-load insns. flag_schedule_speculative_load means allow speculative motion of some load insns. @@ -375,17 +440,31 @@ extern int flag_schedule_speculative; extern int flag_schedule_speculative_load; extern int flag_schedule_speculative_load_dangerous; +/* The following flags have an effect during scheduling after register + allocation: + + sched_stalled_insns means that insns can be moved prematurely from the queue + of stalled insns into the ready list. + + sched_stalled_insns_dep controls how many recently scheduled cycles will + be examined for a dependency on a stalled insn that is candidate for + premature removal from the queue of stalled insns into the ready list (has + an effect only if the flag 'sched_stalled_insns' is set). */ + +extern int flag_sched_stalled_insns; +extern int flag_sched_stalled_insns_dep; + /* flag_branch_on_count_reg means try to replace add-1,compare,branch tupple - by a cheaper branch, on a count register. */ + by a cheaper branch, on a count register. */ extern int flag_branch_on_count_reg; /* This option is set to 1 on -fsingle-precision-constant option which is used to convert the floating point constants to single precision - constants. */ + constants. */ extern int flag_single_precision_constant; -/* Nonzero means put things in delayed-branch slots if supported. */ +/* Nonzero means put things in delayed-branch slots if supported. */ extern int flag_delayed_branch; @@ -394,35 +473,38 @@ extern int flag_delayed_branch; extern int flag_dump_unnumbered; -/* Nonzero means pretend it is OK to examine bits of target floats, - even if that isn't true. The resulting code will have incorrect constants, - but the same series of instructions that the native compiler would make. */ - -extern int flag_pretend_float; - /* Nonzero means change certain warnings into errors. Usually these are warnings about failure to conform to some standard. */ extern int flag_pedantic_errors; -/* Nonzero means generate position-independent code. - This is not fully implemented yet. */ +/* Nonzero means generate position-independent code. 1 vs 2 for a + target-dependent "small" or "large" mode. */ extern int flag_pic; +/* Nonzero if we are compiling position independent code for executable. + 1 vs 2 for a target-dependent "small" or "large" mode. */ + +extern int flag_pie; + +/* Nonzero if we are compiling code for a shared library, zero for + executable. */ + +extern int flag_shlib; + /* Nonzero means generate extra code for exception handling and enable exception handling. */ extern int flag_exceptions; -/* Nonzero means use the new model for exception handling. Replaces - -DNEW_EH_MODEL as a compile option. */ +/* Nonzero means generate frame unwind info table when supported. */ -extern int flag_new_exceptions; +extern int flag_unwind_tables; -/* Nonzero means generate frame unwind info table when supported */ +/* Nonzero means generate frame unwind info table exact at each insn boundary. */ -extern int flag_unwind_tables; +extern int flag_asynchronous_unwind_tables; /* Nonzero means don't place uninitialized global data in common storage by default. */ @@ -462,9 +544,11 @@ extern int flag_verbose_asm; extern int flag_debug_asm; -/* -fgnu-linker specifies use of the GNU linker for initializations. - -fno-gnu-linker says that collect will be used. */ -extern int flag_gnu_linker; +extern int flag_dump_rtl_in_asm; + +/* Greater than zero if user symbols are prepended by a leading underscore + in generated assembly code. */ +extern int flag_leading_underscore; /* Tag all structures with __attribute__(packed) */ extern int flag_pack_struct; @@ -494,24 +578,23 @@ extern int flag_regmove; /* Instrument functions with calls at entry and exit, for profiling. */ extern int flag_instrument_function_entry_exit; -/* Perform a peephole pass before sched2. */ +/* Perform a peephole pass before sched2. */ extern int flag_peephole2; -/* -fbounded-pointers causes gcc to compile pointers as composite - objects occupying three words: the pointer value, the base address - of the referent object, and the address immediately beyond the end - of the referent object. The base and extent allow us to perform - runtime bounds checking. -fbounded-pointers implies -fcheck-bounds. */ -extern int flag_bounded_pointers; +/* Try to guess branch probabilities. */ +extern int flag_guess_branch_prob; /* -fcheck-bounds causes gcc to generate array bounds checks. - For C, C++: defaults to value of flag_bounded_pointers. - For ObjC: defaults to off. + For C, C++ and ObjC: defaults off. For Java: defaults to on. - For Fortran: defaults to off. - For CHILL: defaults to off. */ + For Fortran: defaults to off. */ extern int flag_bounds_check; +/* This will attempt to merge constant section constants, if 1 only + string constants and constants from constant pool, if 2 also constant + variables. */ +extern int flag_merge_constants; + /* If one, renumber instruction UIDs to reduce the number of unused UIDs if there are a lot of instructions. If greater than one, unconditionally renumber instruction UIDs. */ @@ -525,27 +608,19 @@ extern int flag_renumber_insns; extern int frame_pointer_needed; -/* Set nonzero if jump_optimize finds that control falls through - at the end of the function. */ - -extern int can_reach_end; +/* Nonzero if the generated code should trap on signed overflow + for PLUS / SUB / MULT. */ +extern int flag_trapv; -/* Nonzero if GCC must add code to check memory access (used by Checker). */ +/* Nonzero if the signed arithmetic overflow should wrap around. */ +extern int flag_wrapv; -extern int flag_check_memory_usage; - -/* Nonzero if GCC must prefix function names (used with - flag_check_memory_usage). */ - -extern int flag_prefix_function_name; +/* Nonzero if subexpressions must be evaluated from left-to-right. */ +extern int flag_evaluation_order; /* Value of the -G xx switch, and whether it was passed or not. */ -extern int g_switch_value; -extern int g_switch_set; - -/* Value of the -finline-limit flag. */ - -extern int inline_max_insns; +extern unsigned HOST_WIDE_INT g_switch_value; +extern bool g_switch_set; /* Values of the -falign-* flags: how much to align labels in code. 0 means `use default', 1 means `don't align'. @@ -554,13 +629,20 @@ extern int inline_max_insns; extern int align_loops; extern int align_loops_log; +extern int align_loops_max_skip; extern int align_jumps; extern int align_jumps_log; +extern int align_jumps_max_skip; extern int align_labels; extern int align_labels_log; +extern int align_labels_max_skip; extern int align_functions; extern int align_functions_log; +/* Like align_functions_log above, but used by front-ends to force the + minimum function alignment. Zero means no alignment is forced. */ +extern int force_align_functions_log; + /* Nonzero if we dump in VCG format, not plain text. */ extern int dump_for_graph; @@ -577,3 +659,129 @@ extern enum graph_dump_types graph_dump_format; string identifying the compiler. */ extern int flag_no_ident; + +/* Nonzero means perform global CSE. */ + +extern int flag_gcse; + +/* Nonzero if we want to perform enhanced load motion during gcse. */ + +extern int flag_gcse_lm; + +/* Nonzero if we want to perform store motion after gcse. */ + +extern int flag_gcse_sm; + +/* Nonzero if we want to perform redundant load-after-store elimination + in gcse. */ + +extern int flag_gcse_las; + +/* Nonzero if we want to perform global redundancy elimination after + register allocation. */ + +extern int flag_gcse_after_reload; + +/* Nonzero if value histograms should be used to optimize code. */ +extern int flag_value_profile_transformations; + +/* Perform branch target register optimization before prologue / epilogue + threading. */ + +extern int flag_branch_target_load_optimize; + +/* Perform branch target register optimization after prologue / epilogue + threading and jump2. */ + +extern int flag_branch_target_load_optimize2; + +/* For the bt-load pass, nonzero means don't re-use branch target registers + in any basic block. */ +extern int flag_btr_bb_exclusive; + + +/* Nonzero means we should do dwarf2 duplicate elimination. */ + +extern int flag_eliminate_dwarf2_dups; + +/* Nonzero means we should do unused type elimination. */ + +extern int flag_eliminate_unused_debug_types; + +/* Nonzero means to collect statistics which might be expensive + and to print them when we are done. */ +extern int flag_detailed_statistics; + +/* Nonzero means enable synchronous exceptions for non-call instructions. */ +extern int flag_non_call_exceptions; + +/* Nonzero means put zero initialized data in the bss section. */ +extern int flag_zero_initialized_in_bss; + +/* Nonzero means disable transformations observable by signaling NaNs. */ +extern int flag_signaling_nans; + +extern int flag_unit_at_a_time; + +extern int flag_web; + +/* Nonzero means that we defer emitting functions until they are actually + used. */ +extern int flag_remove_unreachable_functions; + +/* Nonzero if we should track variables. */ +extern int flag_var_tracking; + +/* A string that's used when a random name is required. NULL means + to make it really random. */ + +extern const char *flag_random_seed; + +/* The version of the C++ ABI in use. The following values are + allowed: + + 0: The version of the ABI believed most conformant with the + C++ ABI specification. This ABI may change as bugs are + discovered and fixed. Therefore, 0 will not necessarily + indicate the same ABI in different versions of G++. + + 1: The version of the ABI first used in G++ 3.2. + + Additional positive integers will be assigned as new versions of + the ABI become the default version of the ABI. */ + +extern int flag_abi_version; + +/* Returns TRUE if generated code should match ABI version N or + greater is in use. */ + +#define abi_version_at_least(N) \ + (flag_abi_version == 0 || flag_abi_version >= (N)) + +/* True if the given mode has a NaN representation and the treatment of + NaN operands is important. Certain optimizations, such as folding + x * 0 into x, are not correct for NaN operands, and are normally + disabled for modes with NaNs. The user can ask for them to be + done anyway using the -funsafe-math-optimizations switch. */ +#define HONOR_NANS(MODE) \ + (MODE_HAS_NANS (MODE) && !flag_finite_math_only) + +/* Like HONOR_NANs, but true if we honor signaling NaNs (or sNaNs). */ +#define HONOR_SNANS(MODE) (flag_signaling_nans && HONOR_NANS (MODE)) + +/* As for HONOR_NANS, but true if the mode can represent infinity and + the treatment of infinite values is important. */ +#define HONOR_INFINITIES(MODE) \ + (MODE_HAS_INFINITIES (MODE) && !flag_finite_math_only) + +/* Like HONOR_NANS, but true if the given mode distinguishes between + positive and negative zero, and the sign of zero is important. */ +#define HONOR_SIGNED_ZEROS(MODE) \ + (MODE_HAS_SIGNED_ZEROS (MODE) && !flag_unsafe_math_optimizations) + +/* Like HONOR_NANS, but true if given mode supports sign-dependent rounding, + and the rounding mode is important. */ +#define HONOR_SIGN_DEPENDENT_ROUNDING(MODE) \ + (MODE_HAS_SIGN_DEPENDENT_ROUNDING (MODE) && flag_rounding_math) + +#endif /* ! GCC_FLAGS_H */