aboutsummaryrefslogtreecommitdiff
path: root/gcc/toplev.c
AgeCommit message (Collapse)AuthorFilesLines
2007-04-24re PR middle-end/25923 ([gfortran] garbled diagnostics with -O -Wuninitialized)Simon Martin1-1/+2
2007-04-24 Simon Martin <simartin@users.sourceforge.net> PR diagnostic/25923 * tree-pass.h (TDF_DIAGNOSTIC): New dump control to specify that a diagnostic message is being built. * tree-pretty-print.c (dump_generic_node): Only write the formatted text into BUFFER's stream if we are not building a diagnostic message. * toplev.c (default_tree_printer): Pass TDF_DIAGNOSTIC to dump_generic_node. * Makefile.in (toplev.o): Depend on tree-pass.h. From-SVN: r124121
2007-03-14flags.h (flag_random_seed): Remove declaration, in favor of...Alexandre Oliva1-17/+47
gcc/ChangeLog: * flags.h (flag_random_seed): Remove declaration, in favor of... * toplev.h (get_random_seed, set_random_seed): ... these. * tree.c (get_file_function_name): Use the former. * opts.c (common_handle_option): Use the latter. * toplev.c gcc/cp/ChangeLog: * cp/repo.c (init_repo): Initialize random_seed saved options. (finish_repo): Adjust. From-SVN: r122901
2007-02-10Makefile.in (libgcc-support, [...]): Add emutls.c.Richard Henderson1-1/+4
gcc/ChangeLog: * Makefile.in (libgcc-support, libgcc.mvars): Add emutls.c. * builtin-types.def (BT_WORD): Make unsigned. (BT_FN_VOID_PTR_WORD_WORD_PTR): New. * builtins.def (BUILT_IN_EMUTLS_GET_ADDRESS): New. (BUILT_IN_EMUTLS_REGISTER_COMMON): New. * c-decl.c (grokdeclarator): Don't error if !have_tls. * c-parser.c (c_parser_omp_threadprivate): Likewise. * dwarf2out.c (loc_descriptor_from_tree_1): Don't do anything for emulated tls. * expr.c (emutls_var_address): New. (expand_expr_real_1): Expand emulated tls. (expand_expr_addr_expr_1): Likewise. * libgcc-std.ver: Add __emutls_get_address, __emutls_register_common. * output.h (emutls_finish): Declare. * toplev.c (compile_file): Call it. * tree-ssa-address.c (gen_addr_rtx): Check for const-ness of the address before wrapping in CONST. * varasm.c (emutls_htab, emutls_object_type): New. (EMUTLS_VAR_PREFIX, EMUTLS_TMPL_PREFIX): New. (get_emutls_object_name, get_emutls_object_type): New. (get_emutls_init_templ_addr, emutls_decl): New. (emutls_common_1, emutls_finish): New. (assemble_variable): When emulating tls, swap decls; generate constructor for the emutls objects. (do_assemble_alias): When emulating tls, swap decl and target name. (default_encode_section_info): Don't add SYMBOL_FLAG_TLS_SHIFT for emulated tls. * varpool.c (decide_is_variable_needed): Look at force_output. Recurse for emulated tls. (cgraph_varpool_remove_unreferenced_decls): Remove checks redundant with decide_is_variable_needed. * emutls.c: New file. * config/sparc/sol2.h (ASM_DECLARE_OBJECT_NAME): Only emit tls_object for real tls. gcc/cp/ChangeLog: * decl.c (grokvardecl): Don't error if !have_tls. (grokdeclarator): Likewise. * parser.c (cp_parser_omp_threadprivate): Likewise. gcc/fortran/ChangeLog: * f95-lang.c (gfc_init_builtin_functions): Add __emutls_get_address and __emutls_register_common. * openmp.c (gfc_match_omp_threadprivate): Don't error if !have_tls. * trans-common.c (build_common_decl): Don't check have_tls. * trans-decl.c (gfc_finish_var_decl): Likewise. * types.def (BT_WORD, BT_FN_PTR_PTR): New. (BT_FN_VOID_PTR_WORD_WORD_PTR): New. gcc/testsuite/ChangeLog: * lib/target-supports.exp (check_effective_target_tls): Redefine to mean non-emulated tls. * gcc.dg/tls/alias-1.c: Remove tls requirement. * gcc.dg/tls/asm-1.c, gcc.dg/tls/debug-1.c, gcc.dg/tls/diag-1.c, gcc.dg/tls/diag-2.c, gcc.dg/tls/diag-3.c, gcc.dg/tls/diag-4.c, gcc.dg/tls/diag-5.c, gcc.dg/tls/init-1.c, gcc.dg/tls/nonpic-1.c, gcc.dg/tls/opt-10.c, gcc.dg/tls/opt-5.c, gcc.dg/tls/opt-6.c, gcc.dg/tls/opt-8.c, gcc.dg/tls/opt-9.c, gcc.dg/tls/pic-1.c, gcc.dg/tls/struct-1.c, gcc.dg/tls/trivial.c: Likewise. From-SVN: r121800
2007-02-02emit-rtl.c (renumber_insns): Remove.Kazu Hirata1-5/+0
* emit-rtl.c (renumber_insns): Remove. * flags.h: Remove the extern for flag_renumber_insns. * rtl.h: Remove the prototype for renumber_insns. * toplev.c (flag_renumber_insns): Remove. From-SVN: r121517
2007-02-01toplev.c (lang_dependent_init): Call init_set_costs.Zdenek Dvorak1-0/+5
* toplev.c (lang_dependent_init): Call init_set_costs. * loop-init.c (loop_optimizer_init): Do not call init_set_costs. From-SVN: r121464
2007-01-28tree-ssa-loop-unswitch.c: Include tree-inline.h.Zdenek Dvorak1-0/+1
* tree-ssa-loop-unswitch.c: Include tree-inline.h. (tree_unswitch_single_loop): Pass eni_size_weights to tree_num_loop_insns. * tree-ssa-loop-manip.c: Include tree-inline.h. (can_unroll_loop_p): Pass eni_size_weights to tree_num_loop_insns. * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): Pass eni_size_weights to estimate_num_insns. * tree.h (init_inline_once): Export. * toplev.c (backend_init): Call init_inline_once. * cgraphunit.c (cgraph_process_new_functions, cgraph_analyze_function): Pass eni_inlining_weights to estimate_num_insns. * ipa-inline.c (compute_inline_parameters): Ditto. * tree-ssa-loop-ivcanon.c (tree_num_loop_insns): Pass weights to estimate_num_insns. (try_unroll_loop_completely): Pass eni_size_weights to tree_num_loop_insns. * tree-eh.c (decide_copy_try_finally): Pass eni_size_weights ot estimate_num_insns. * tree-ssa-loop-prefetch.c: Include tree-inline.h. (loop_prefetch_arrays): Pass eni_time_weights to tree_num_loop_insns. * tree-inline.c (eni_inlining_weights, eni_size_weights, eni_time_weights): New variables. (init_inline_once): Initialize them. (struct eni_data): Mew. (estimate_num_insns_1, estimate_num_insns): Use weights. * tree-inline.h (struct eni_weights_d): New. (eni_inlining_weights, eni_size_weights, eni_time_weights): Declare. (estimate_num_insns): Declaration changed. * cfgloop.h (tree_num_loop_insns): Declaration changed. * Makefile.in (tree-ssa-loop-unswitch.o, tree-ssa-loop-prefetch.o, tree-ssa-loop-manip.o): Add TREE_INLINE_H dependency. * gcc.dg/tree-ssa/loop-23.c: New test. From-SVN: r121260
2007-01-19re PR c++/17947 (bad warning with implicit conversion and ↵Manuel López-Ibáñez1-3/+2
__attribute__((deprecated))) 2007-01-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org> PR c++/17947 * toplev.c (warn_deprecated_use): Use %qD instead of %qs to print the name of the declared identifier. testsuite/ * g++.dg/warn/deprecated.C: Update warning output. * g++.dg/warn/deprecated-2.C: Likewise. * g++.dg/warn/deprecated-3.C: New. From-SVN: r120969
2006-12-23toplev.c (dump_memory_report): Break out from...Jan Hubicka1-10/+14
* toplev.c (dump_memory_report): Break out from... (finalize): Here. * toplev.h (dump_memory_report): Declare. (cmp_statistic): Rename to ... (final_cmp_statistic): ... this one (cmp_statistic): New. (dump_ggc_loc_staitsitcs): New FINAL parpameter. * common.opt (-fpre-ipa-mem-report, -fpost-ipa-mem-report): Declare. * varray.c (dump_varray_staitiscs): Do not segfault when no varray was allocated so far. From-SVN: r120168
2006-12-22cgraphunit.c, [...]: Fix comment typos.Kazu Hirata1-1/+1
* cgraphunit.c, config/i386/i386.c, config/ia64/ia64.c, cse.c, output.h, toplev.c, tree-affine.h, tree-flow.h, tree-ssa-alias.c, tree-ssa-coalesce.c, tree-ssa-live.c, tree-ssa-live.h, tree-ssa-operands.c, tree-ssa-ter.c, tree-vrp.c, varpool.c: Fix comment typos. From-SVN: r120137
2006-12-11re PR middle-end/17982 (stop calling assemble_external before final assembly ↵H.J. Lu1-3/+1
output time) 2006-12-11 H.J. Lu <hongjiu.lu@intel.com> PR middle-end/17982 PR middle-end/20218 * cgraphunit.c (cgraph_optimize): Remove call to process_pending_assemble_externals. * config/elfos.h (ASM_OUTPUT_EXTERNAL): New. * config/ia64/hpux.h (TARGET_ASM_FILE_END): Removed. * config/ia64/ia64.c (ia64_asm_output_external): Rewritten. (ia64_hpux_add_extern_decl): Removed. (ia64_hpux_file_end): Likewise. (extern_func_list): Likewise. (extern_func_head): Likewise. * output.h (assemble_external): Update comments. (default_elf_asm_output_external): New. (maybe_assemble_visibility): New. * toplev.c (compile_file): Update comment. * varasm.c (assemble_external): Always put it on pending_assemble_externals. (maybe_assemble_visibility): Make it extern and return int. (default_elf_asm_output_external): New. From-SVN: r119764
2006-12-11Move all varpool routines out of cgraph/cgraphunit to varpool.cJan Hubicka1-3/+3
Move all varpool routines out of cgraph/cgraphunit to varpool.c * cgraph.c: Update comments. (cgraph_varpool_hash, cgraph_varpool_nodes, cgraph_varpool_last_needed_node cgraph_varpool_node_name, cgraph_varpool_node, cgraph_varpol_mode_for_asm, cgraph_varpool_mark_needed_node, cgraph_variable_initializer_availability): Move to varpool.c and drop cgraph_ prefixes. (cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_finalize_decl): move to varpool.c; drop cgraph_ prefix; make static. (dump_cgraph_varpool_node): Move to varpool.c under name dump_varpool_node. (dump_varpool, hash_varpool_node, eq_varpool_node, decide_is_variable_needed): Move to varpool.c (decl_assembler_name_equal): Move to tree.c. (availability_names): Rename to ... (cgraph_availability_names): ... this one. (dump_cgraph_node): Update. * cgraph.h: Reorder declarations now in varpool.c (cgraph_vailablity_names): Declare. (struct cgraph_varpool_node): Rename to ... (struct varpool_node): ... this one. (cgraph_varpool_first_unanalyzed_node, cgraph_varpool_nodes_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_node, cgraph_varpool_node_for_asm, cgraph_varpool_mark_needed_node, cgraph_varpool_finalize_decl, cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_assemble_pending_decls, cgraph_variable_initializer_availability): Rename to ... (varpool_first_unanalyzed_node, varpool_nodes_queue, varpool_first_unanalyzed_node, varpool_node, varpool_node_for_asm, varpool_mark_needed_node, varpool_finalize_decl, varpool_enqueue_needed_node, varpool_assemble_pending_decls, variable_initializer_availability): Rename to ... * tree.c (decl_assembler_name_equal): Move here from cgraph.c. * tree.h (decl_assembler_name_equal): Declare. * omp-low.c (lower_omp_critical): Update. * ipa-reference (analyze_variable, static_execute): Likewise. * toplev.c (wrapup_global_declaration_2, compile_file): Update. * cgraphunit.c: Update comments. (cgraph_varpool_assembled_nodes_queue): Move to varpool.c under name varpool_assembled_nodes_queue. (cgraph_varpool_analyze_pending_decls): Move to varpool.c under name varpool_analyze_pending_decls. (cgraph_varpool_remove_unreferenced_decls): Move to varpool.c under name varpool_remove_unreferenced_decls. (record_reference): Update. (cgraph_create_edges): Update. (record_referneces_in_initializer): New function. (cgraph_varpool_assemble_decl): Move to varpool.c under name varpool_assemble_decl; make global. (cgraph_varpool_assemble_pending_decls): Move to varpool.c under name varpool_assemble_pending_decls. (process_function_and_variable_attributes, cgraph_finalize_compilation_unit, struct cgraph_order_sort, cgraph_output_in_order, cgraph_function_and_variable_invisibility, cgraph_optimize, cgraph_increase_alignment): Update. * dwarf2out.c (decls_for_scope): Likewise. * ipa-type-escape.c (analyze_variable, type_escape_execute): Likewise. * except.c (output_ttype): Likewise. * varasm.c (mark_decl_referenced): Likewise. (find_decl_and_mark_referenced, assemble_alias): update. * Makefile.in: Add varpool.c, gt-varpool.c and remove gt-cgraphunit.c * passes.c (rest_of_decl_compilation): Update. * cp/decl2.c (var_finalized_p): Update for renamed varpool functions. * fortran/f59-lang.c (gfc_expand_function): Update for renamed varpool functions. From-SVN: r119731
2006-12-07common.opt (record-gcc-switches): New command line switch.Nick Clifton1-58/+136
* common.opt (record-gcc-switches): New command line switch. * target.h (print_switch_type): New enum. (print_switch_fn_type): New typedef for a function pointer. (struct gcc_target): Add record_gcc_switches and record_gcc_switches_section fields. * target-def.h (TARGET_ASM_RECORD_GCC_SWITCHES): Provide a default definition. (TARGET_ASM_RECORD_GCC_SWITCHES_SECTION): Provide a default definition. * toplev.c (print_single_switch): Simplify by providing a pointer to function that will format and output the switch appropriately. (print_switch_values): Likewise. (print_to_asm_out_file): New function. (print_to_stderr): New function. (init_asm_output): If flag_record_gcc_switches is set then if the target supports recording the switches then emit them into the assembler output file, otherwise tell the user that the switch is not supported. * varasm.c (eld_record_gcc_switches): New function. Example handler for the record_gcc_switches target hook. * doc/tm.texi (TARGET_ASM_RECORD_GCC_SWITCHES): Document the new target hook. (TARGET_ASM_RECORD_GCC_SWITCHES_SECTION): Likewise. * doc/invoke.texi (-frecord-gcc-switches): Document. From-SVN: r119615
2006-12-06statistics.h (ALONE_PASS_MEM_STAT, [...]): New macros.Jan Hubicka1-0/+1
* statistics.h (ALONE_PASS_MEM_STAT, ALONE_MEM_STAT_INFO, ALONE_MEM_STAT_DECL): New macros. * bitmap.h: Include statistics.h (struct bitmap_head_def): Add variant with pointer to bitmap descriptor. (bitmap_initialize_stat): Rename from bitmap_initialize; add statistics. (bitmap_obstack_alloc_stat, bitmap_gc_alloc_stat): Declare. * bitmap.c: Include hashtab.h (bitmap_descriptor): New. (bitmap_hash): New static variable (hash_descriptor, eq_descriptor, bitmap_descriptor, register_overhead): New static functions. (bitmap_register): New. (bitmap_element_free, bitmap_element_allocate, bitmap_elt_clear_from, bitmap_obstack_release): Do accounting. (bitmap_obstack_alloc_stat): Rename from bitmap_obstack_alloc ; do accounting. (bitmap_gc_alloc_stat): Likewise. (bitmap_obstack_free, bitmap_find_bit): Do statictics. (print_statistics, dump_bitmap_statistics): New functions. * toplev.c (finalize): Dump bitmap statistics. From-SVN: r119573
2006-11-12params.c (set_param_value): Initialize the "set" field.Zdenek Dvorak1-2/+2
* params.c (set_param_value): Initialize the "set" field. * params.h (struct param_info): Add "set" field. (PARAM_SET_P): New macro. (PREFETCH_LATENCY, SIMULTANEOUS_PREFETCHES, L1_CACHE_SIZE, L1_CACHE_LINE_SIZE): New macros. * toplev.c (DEFPARAM): Initialize the "set" field. * tree-ssa-loop-prefetch.c (PREFETCH_LATENCY, SIMULTANEOUS_PREFETCHES): Removed. (PREFETCH_BLOCK): Use L1_CACHE_LINE_SIZE. (tree_ssa_prefetch_arrays): Dump the values of the parameters. * config/sparc/sparc.c: Include params.h. (sparc_override_options): Set SIMULTANEOUS_PREFETCHES and L1_CACHE_LINE_SIZE parameters. * config/sparc/sparc.h (PREFETCH_BLOCK, SIMULTANEOUS_PREFETCHES): Removed. * config/i386/i386.h (PREFETCH_BLOCK, SIMULTANEOUS_PREFETCHES): Removed. * config/i386/i386.c: Include params.h. (k8_cost): Change default value for SIMULTANEOUS_PREFETCHES. (override_options): Set SIMULTANEOUS_PREFETCHES and L1_CACHE_LINE_SIZE parameters. * config/sh/sh.h (SIMULTANEOUS_PREFETCHES): Removed. (OPTIMIZATION_OPTIONS): Set SIMULTANEOUS_PREFETCHES and L1_CACHE_LINE_SIZE parameters. * config/ia64/ia64.c (ia64_optimization_options): Set SIMULTANEOUS_PREFETCHES and L1_CACHE_LINE_SIZE parameters. * config/ia64/ia64.h (SIMULTANEOUS_PREFETCHES, PREFETCH_BLOCK): Removed. * params.def (PARAM_PREFETCH_LATENCY, PARAM_SIMULTANEOUS_PREFETCHES, PARAM_L1_CACHE_SIZE, PARAM_L1_CACHE_LINE_SIZE): New params. * doc/invoke.texi: Document new params. From-SVN: r118728
2006-11-01In gcc/:Geoffrey Keating1-1/+5
* toplev.c (compile_file): Call final_write_globals even if there have been errors. In gcc/cp/: * decl2.c (cp_write_global_declarations): Rename from cp_finish_file. * cp-lang.c (finish_file): Don't call cp_finish_file. * cp-tree.h (cp_write_global_declarations): Rename from cp_finish_file. * cp-objcp-common.h (LANG_HOOKS_WRITE_GLOBALS): Define to cp_write_global_declarations. From-SVN: r118362
2006-10-09Revert emutls patch.Richard Henderson1-4/+1
From-SVN: r117578
2006-10-04Makefile.in (libgcc.mk, [...]): Add emutls.c.Richard Henderson1-1/+4
gcc/ * Makefile.in (libgcc.mk, LIBGCC_DEPS): Add emutls.c. * builtin-types.def (BT_WORD): Make unsigned. (BT_FN_VOID_PTR_WORD_WORD_PTR): New. * builtins.def (BUILT_IN_EMUTLS_GET_ADDRESS): New. (BUILT_IN_EMUTLS_REGISTER_COMMON): New. * c-decl.c (grokdeclarator): Don't error if !have_tls. * c-parser.c (c_parser_omp_threadprivate): Likewise. * cgraph.c (decide_is_variable_needed): Look at force_output. Recurse for emulated tls. * cgraphunit.c (cgraph_varpool_remove_unreferenced_decls): Remove checks redundant with decide_is_variable_needed. (cgraph_build_static_cdtor): Do cgraph_varpool_assemble_pending_decls. * dwarf2out.c (loc_descriptor_from_tree_1): Don't do anything for emulated tls. * expr.c (emutls_var_address): New. (expand_expr_real_1): Expand emulated tls. (expand_expr_addr_expr_1): Likewise. * libgcc-std.ver: Add __emutls_get_address, __emutls_register_common. * output.h (emutls_finish): Declare. * toplev.c (compile_file): Call it. * tree-ssa-address.c (gen_addr_rtx): Check for const-ness of the address before wrapping in CONST. * varasm.c (emutls_htab, emutls_object_type): New. (EMUTLS_VAR_PREFIX, EMUTLS_TMPL_PREFIX): New. (get_emutls_object_name, get_emutls_object_type): New. (get_emutls_init_templ_addr, emutls_decl): New. (emutls_common_1, emutls_finish): New. (assemble_variable): When emulating tls, swap decls; generate constructor for the emutls objects. (do_assemble_alias): When emulating tls, swap decl and target name. (default_encode_section_info): Don't add SYMBOL_FLAG_TLS_SHIFT for emulated tls. * emutls.c: New file. * config/sparc/sol2.h (ASM_DECLARE_OBJECT_NAME): Only emit tls_object for real tls. gcc/cp/ * decl.c (grokvardecl): Don't error if !have_tls. (grokdeclarator): Likewise. * parser.c (cp_parser_omp_threadprivate): Likewise. gcc/fortran/ * f95-lang.c (gfc_init_builtin_functions): Add __emutls_get_address and __emutls_register_common. * openmp.c (gfc_match_omp_threadprivate): Don't error if !have_tls. * trans-common.c (build_common_decl): Don't check have_tls. * trans-decl.c (gfc_finish_var_decl): Likewise. * types.def (BT_WORD, BT_FN_PTR_PTR): New. (BT_FN_VOID_PTR_WORD_WORD_PTR): New. gcc/testsuite/ * lib/target-supports.exp (check_effective_target_tls): Redefine to mean non-emulated tls. * gcc.dg/tls/alias-1.c: Remove tls requirement. * gcc.dg/tls/asm-1.c, gcc.dg/tls/debug-1.c, gcc.dg/tls/diag-1.c, gcc.dg/tls/diag-2.c, gcc.dg/tls/diag-3.c, gcc.dg/tls/diag-4.c, gcc.dg/tls/diag-5.c, gcc.dg/tls/init-1.c, gcc.dg/tls/nonpic-1.c, gcc.dg/tls/opt-10.c, gcc.dg/tls/opt-5.c, gcc.dg/tls/opt-6.c, gcc.dg/tls/opt-8.c, gcc.dg/tls/opt-9.c, gcc.dg/tls/pic-1.c, gcc.dg/tls/struct-1.c, gcc.dg/tls/trivial.c: Likewise. From-SVN: r117440
2006-08-26re PR c++/24009 (C++ fails to print #include stack)Joseph Myers1-1/+35
PR c++/24009 * input.h (restore_input_file_stack): Declare. (INPUT_FILE_STACK_BITS): Define. * toplev.c (fs_p, input_file_stack_history, input_file_stack_restored, restore_input_file_stack): New. (push_srcloc, pop_srcloc): Check for input_file_stack_tick overflowing INPUT_FILE_STACK_BITS bits. Save new state of stack. (pop_srcloc): Don't free old state of stack. cp: * parser.c (struct cp_token): Add input_file_stack_index. (eof_token): Update. (cp_lexer_get_preprocessor_token): Save input_file_stack_tick. (cp_lexer_set_source_position_from_token): Restore input file stack. From-SVN: r116479
2006-08-01re PR c++/28250 (ICE with invalid catch)Volker Reichelt1-1/+1
PR c++/28250 PR c++/28257 PR c++/28259 PR c++/28267 * toplev.c (compile_file): Return early on errorcount or sorrycount. * cgraphunit.c (cgraph_finalize_compilation_unit): Likewise. (cgraph_optimize): Likewise. PR c++/28250 * g++.dg/eh/catch4.C: New test. PR c++/28257 * g++.dg/other/qual1.C: New test. PR c++/28259 * g++.dg/inherit/error2.C: New test. PR c++/28267 * g++.dg/other/new1.C: New test. * g++.dg/warn/pr23075.C: Remove obsolete test. * g++.old-deja/g++.brendan/crash52.C: Remove dg-warning marker. * g++.old-deja/g++.jason/report.C: Remove dg-warning marker. From-SVN: r115866
2006-07-08toplev.c (process_options): Don't give -ffunction-sections may affect ↵Mike Stump1-0/+2
debugging warning for Mach-O. * toplev.c (process_options): Don't give -ffunction-sections may affect debugging warning for Mach-O. From-SVN: r115276
2006-03-07hooks.c (hook_bool_mode_rtx_true): New function.Richard Sandiford1-0/+1
* hooks.c (hook_bool_mode_rtx_true): New function. * hooks.h (hook_bool_mode_rtx_true): Declare. * toplev.c (compile_file): Call output_shared_constant_pool. * varasm.c (shared_constant_pool): New variable. (assemble_start_function, assemble_end_function): Remove arguments from call to output_constant_pool. (create_constant_pool): New function, split out from... (init_varasm_status): ...here. (force_const_mem): Choose between the shared and per-function constant pools. Set current_function_uses_const_pool when reusing old entries as well as when creating new ones. (mark_constant): Ignore data argument. (mark_constants): Remove pool argument. (mark_constant_pool): Likewise. Use current_function_uses_const_pool to decide whether the function uses a constant pool. (output_constant_pool_contents): New function, split out from... (output_constant_pool): ...here. (output_shared_constant_pool): New function. (init_varasm_once): Initialize shared_constant_pool. * output.h (output_constant_pool): Delete. (output_shared_constant_pool): Declare. * config/s390/s390-protos.h (s390_output_constant_pool): Delete. * config/i386/i386.c (TARGET_USE_BLOCKS_FOR_CONSTANT_P): Override. From-SVN: r111804
2006-02-26common.opt (-floop-optimize, [...]): Remove.Steven Bosscher1-1/+0
gcc/ * common.opt (-floop-optimize, -frerun-loop-opt): Remove. * tree-pass.h (pass_loop_optimize): Remove. * passes.c (pass_loop_optimize): Never run it. * toplev.c (backend_init): Don't call init_loop. * opts.c (flag_loop_optimize_set): Remove. (decode_options): Never set flag_loop_optimize or flag_rerun_loop_opt. (common_handle_option) <OPT_floop_optimize>: Remove. Don't disable the old RTL loop optimizer when profiling enabled. * predict.c (tree_estimate_probability): Always strip builtin_expect. * cfgcleanup.c (try_forward_edges): Don't avoid killing loop pre-headers for the sake of the old RTL loop optimizer. * Makefile.in: Remove all references to loop.o. * doc/invoke.texi: Remove all references to -floop-optimize and -frerun-loop-opt. testsuite/ * gcc.dg/20031201-1.c: Don't use -frerun-loop-opt. * g++.old-deja/g++.robertl/eb132.C: Likewise. From-SVN: r111459
2006-02-18re PR target/9703 ([arm] Accessing data through constant pool more times ↵Richard Sandiford1-0/+26
could be solved in less instructions) * cselib.c (cselib_init): Change RTX_SIZE to RTX_CODE_SIZE. * emit-rtl.c (copy_rtx_if_shared_1): Use shallow_copy_rtx. (copy_insn_1): Likewise. Don't copy each field individually. Reindent. * read-rtl.c (apply_macro_to_rtx): Use RTX_CODE_SIZE instead of RTX_SIZE. * reload1.c (eliminate_regs): Use shallow_copy_rtx. * rtl.c (rtx_size): Rename variable to... (rtx_code_size): ...this. (rtx_size): New function. (rtx_alloc_stat): Use RTX_CODE_SIZE instead of RTX_SIZE. (copy_rtx): Use shallow_copy_rtx. Don't copy each field individually. Reindent. (shallow_copy_rtx_stat): Use rtx_size instead of RTX_SIZE. * rtl.h (rtx_code_size): New variable. (rtx_size): Change from a variable to a function. (RTX_SIZE): Rename to... (RTX_CODE_SIZE): ...this. PR target/9703 PR tree-optimization/17106 * doc/tm.texi (TARGET_USE_BLOCKS_FOR_CONSTANT_P): Document. (Anchored Addresses): New section. * doc/invoke.texi (-fsection-anchors): Document. * doc/rtl.texi (SYMBOL_REF_IN_BLOCK_P, SYMBOL_FLAG_IN_BLOCK): Likewise. (SYMBOL_REF_ANCHOR_P, SYMBOL_FLAG_ANCHOR): Likewise. (SYMBOL_REF_BLOCK, SYMBOL_REF_BLOCK_OFFSET): Likewise. * hooks.c (hook_bool_mode_rtx_false): New function. * hooks.h (hook_bool_mode_rtx_false): Declare. * gengtype.c (create_optional_field): New function. (adjust_field_rtx_def): Add the "block_sym" field for SYMBOL_REFs when SYMBOL_REF_IN_BLOCK_P is true. * target.h (output_anchor, use_blocks_for_constant_p): New hooks. (min_anchor_offset, max_anchor_offset): Likewise. (use_anchors_for_symbol_p): New hook. * toplev.c (compile_file): Call output_object_blocks. (target_supports_section_anchors_p): New function. (process_options): Check that -fsection-anchors is only used on targets that support it and when -funit-at-a-time is in effect. * tree-ssa-loop-ivopts.c (prepare_decl_rtl): Only create DECL_RTL if the decl doesn't have one. * dwarf2out.c: Remove instantiations of VEC(rtx,gc). * expr.c (emit_move_multi_word, emit_move_insn): Pass the result of force_const_mem through use_anchored_address. (expand_expr_constant): New function. (expand_expr_addr_expr_1): Call it. Use the same modifier when calling expand_expr for INDIRECT_REF. (expand_expr_real_1): Pass DECL_RTL through use_anchored_address for all modifiers except EXPAND_INITIALIZER. Use expand_expr_constant. * expr.h (use_anchored_address): Declare. * loop-unroll.c: Don't declare rtx vectors here. * explow.c: Include output.h. (validize_mem): Call use_anchored_address. (use_anchored_address): New function. * common.opt (-fsection-anchors): New switch. * varasm.c (object_block_htab, anchor_labelno): New variables. (hash_section, object_block_entry_eq, object_block_entry_hash) (use_object_blocks_p, get_block_for_section, create_block_symbol) (use_blocks_for_decl_p, change_symbol_section): New functions. (get_variable_section): New function, split out from assemble_variable. (make_decl_rtl): Create a block symbol if use_object_blocks_p and use_blocks_for_decl_p say so. Use change_symbol_section if the symbol has already been created. (assemble_variable_contents): New function, split out from... (assemble_variable): ...here. Don't output any code for block symbols; just pass them to place_block_symbol. Use get_variable_section and assemble_variable_contents. (get_constant_alignment, get_constant_section, get_constant_size): New functions, split from output_constant_def_contents. (build_constant_desc): Create a block symbol if use_object_blocks_p says so. Or into SYMBOL_REF_FLAGS. (assemble_constant_contents): New function, split from... (output_constant_def_contents): ...here. Don't output any code for block symbols; just pass them to place_section_symbol. Use get_constant_section and get_constant_alignment. (force_const_mem): Create a block symbol if use_object_blocks_p and use_blocks_for_constant_p say so. Or into SYMBOL_REF_FLAGS. (output_constant_pool_1): Add an explicit alignment argument. Don't switch sections here. (output_constant_pool): Adjust call to output_constant_pool_1. Switch sections here instead. Don't output anything for block symbols; just pass them to place_block_symbol. (init_varasm_once): Initialize object_block_htab. (default_encode_section_info): Keep the old SYMBOL_FLAG_IN_BLOCK. (default_asm_output_anchor, default_use_aenchors_for_symbol_p) (place_block_symbol, get_section_anchor, output_object_block) (output_object_block_htab, output_object_blocks): New functions. * target-def.h (TARGET_ASM_OUTPUT_ANCHOR): New macro. (TARGET_ASM_OUT): Include it. (TARGET_USE_BLOCKS_FOR_CONSTANT_P): New macro. (TARGET_MIN_ANCHOR_OFFSET, TARGET_MAX_ANCHOR_OFFSET): New macros. (TARGET_USE_ANCHORS_FOR_SYMBOL_P): New macro. (TARGET_INITIALIZER): Include them. * rtl.c (rtl_check_failed_block_symbol): New function. * rtl.h: Include vec.h. Declare heap and gc rtx vectors. (block_symbol, object_block): New structures. (rtx_def): Add a block_symbol field to the union. (BLOCK_SYMBOL_CHECK): New macro. (rtl_check_failed_block_symbol): Declare. (SYMBOL_FLAG_IN_BLOCK, SYMBOL_FLAG_ANCHOR): New SYMBOL_REF flags. (SYMBOL_REF_IN_BLOCK_P, SYMBOL_REF_ANCHOR_P): New predicates. (SYMBOL_FLAG_MACH_DEP_SHIFT): Bump by 2. (SYMBOL_REF_BLOCK, SYMBOL_REF_BLOCK_OFFSET): New accessors. * output.h (output_section_symbols): Declare. (object_block): Name structure. (place_section_symbol, get_section_anchor, default_asm_output_anchor) (default_use_anchors_for_symbol_p): Declare. * Makefile.in (RTL_BASE_H): Add vec.h. (explow.o): Depend on output.h. * config/rs6000/rs6000.c (TARGET_MIN_ANCHOR_OFFSET): Override default. (TARGET_MAX_ANCHOR_OFFSET): Likewise. (TARGET_USE_BLOCKS_FOR_CONSTANT_P): Likewise. (rs6000_use_blocks_for_constant_p): New function. From-SVN: r111254
2006-02-10invoke.texi (-floop-optimize2): Removed.Zdenek Dvorak1-13/+0
* doc/invoke.texi (-floop-optimize2): Removed. * toplev.c (process_options): Remove handling of flag_loop_optimize2. * loop-init.c (gate_handle_loop2): Do not test flag_loop_optimize2. Test flag_branch_on_count_reg only if HAVE_doloop_end. * common.opt (floop-optimize2): Removed. (fmove-loop-invariants): Enabled by default. * gcc.dg/20050105-1.c: Do not use -floop-optimize2. From-SVN: r110852
2006-02-04Add 2006 to copyright lineAlexandre Oliva1-1/+2
From-SVN: r110595
2006-02-04re PR debug/24444 (invalid register in debug info)Alexandre Oliva1-2/+2
PR debug/24444 * config/ia64/ia64.c: Include debug.h. (MAX_ARTIFICIAL_LABEL_BYTES): New. (ia64_label_after_insn, ia64_dwarf2out_def_steady_cfa): New. (IA64_CHANGE_CFA_IN_EPILOGUE): Define to 0. (process_epilogue, process_set, process_for_unwind_directive): Output unwind info only if requested. Add CFA info if requested. Add new arguments as needed. Adjust callers. * config/ia64/ia64.h (ARG_POINTER_CFA_OFFSET): Override incorrect default. (DWARF2_FRAME_INFO): Define to zero. * config/ia64/unwind-ia64.c: Remove code that compensated for the CFA offset error fixed above. * config/ia64/t-ia64 (ia64.o): Depend on debug.h. * dwarf2out.c (DWARF2_FRAME_INFO): Define default. (dwarf2out_do_frame): Require nonzero DWARF2_UNWIND_INFO for -funwind-tables and -fexceptions to enable frame info. (dwarf2out_frame_init): Define initial CFA even if DWARF2_UNWIND_INFO is disabled. Call initial_return_save if DWARF2_UNWIND_INFO is nonzero, not just defined. (dwarf2out_frame_finish): Output non-EH call frame info only if DWARF2_FRAME_INFO is nonzero. (convert_cfa_to_loc_list, compute_frame_pointer_to_cfa_displacement): Define even if unwind info is not supported. (gen_subprogram_die): Use the above unconditionally. Remove legacy alternate code. * toplev.c (compile_file): Compile in call to dwarf2out_frame_finish if DWARF2_DEBUGGING_INFO is defined. (lang_dependent_init): Ditto for dwarf2out_frame_init. From-SVN: r110594
2006-01-29* toplev.c: Fix thinko.Gabriel Dos Reis1-2/+2
From-SVN: r110374
2006-01-29toplev.c (floor_log2, exact_log2): Don't define if __cplusplus.Gabriel Dos Reis1-3/+11
* toplev.c (floor_log2, exact_log2): Don't define if __cplusplus. (push_srcloc): Use XNEW. (init_asm_output, default_get_pch_validity): Use XNEWVEC. Co-Authored-By: Marcin Dalecki <martin@dalecki.de> From-SVN: r110372
2005-11-09re PR c/24101 (Segfault with preprocessed source)Uros Bizjak1-1/+4
libcpp/ PR c/24101 * init.c (read_original_filename): Temporarily set state.in_directive before calling _cpp_lex_direct for CPP_HASH tokens. gcc/ PR c/24101 * toplev.c (process_options): Initialize debug_hooks early in case lang_hooks.post_options ends up calling a debug_hook. gcc/testsuite/ PR c/24101 * gcc.dg/pr24101-1.i, gcc.dg/pr24101-2.i: New tests. * gcc.dg/dg.exp: Run main loop also for *.i files. From-SVN: r106677
2005-10-11re PR c++/24302 (anonymous global union segfault with g++ 3.4.x)Mark Mitchell1-1/+1
PR c++/24302 * toplev.c (check_global_declaration_1): Robustify. PR c++/24302 * g++.dg/warn/Wunused-12.C: New test. From-SVN: r105222
2005-10-05re PR target/23602 (1081 test failures in libjava, when configured for ↵Richard Henderson1-0/+12
i486-linux) PR target/23602 * toplev.c (process_options): Warn about unsupported combinations of unwind tables and omit-frame-pointer. * config/i386/i386.c (override_options): Similarly. Enable accumulate-outgoing-args if not explicitly disabled. testsuite/ * g++.dg/eh/omit-frame-pointer.C: Remove i?86 specific options. * g++.dg/eh/omit-frame-pointer2.C: Likewise. libjava/ * configure.host (i?86-*): Set -fomit-frame-pointer in libgcj_flags, but not BACKTRACESPEC. (x86_64-*): Similarly. Don't set -ffloat-store in 64-bit mode. From-SVN: r105009
2005-09-08re PR debug/23190 (debug info omitted for uninitialized variables (stabs))Richard Henderson1-138/+157
PR debug/23190 * toplev.c (wrapup_global_declaration_1): Split out ... (wrapup_global_declaration_2): ... from ... (wrapup_global_declarations): ... here. Return bool. (check_global_declaration_1): Split out ... (check_global_declarations): from here. (emit_debug_global_declarations): New. * toplev.h (wrapup_global_declaration_1, wrapup_global_declaration_2, check_global_declaration_1, emit_debug_global_declarations): Declare. * c-decl.c (c_write_global_declarations_1): Don't create a vector of decls. Call wrapup_global_declaration_1, wrapup_global_declaration_2, check_global_declaration_1 directly. (c_write_global_declarations_2): New. (ext_block): New. (c_write_global_declarations): Call c_write_global_declarations_2. * langhooks.c (write_global_declarations): Call emit_debug_global_declarations. * cgraphunit.c (cgraph_varpool_remove_unreferenced_decls): Don't remove decls that have DECL_RTL_SET_P. * passes.c (rest_of_decl_compilation): Invoke cgraph_varpool_finalize_decl for all but functions. cp/ * decl.c (wrapup_globals_for_namespace): Call emit_debug_global_declarations. * decl2.c (cp_finish_file): Likewise. From-SVN: r104065
2005-07-28Makefile.in (rtl-profile.o): Kill all traces of it.Jan Hubicka1-23/+0
* Makefile.in (rtl-profile.o): Kill all traces of it. * common.opt (fspeculative-prefetching, ftree-based-profiling): Kill. * coverage.h (rtl_coverage_counter_ref): Kill. * opts.c (flag_speculative_prefetching_set): Kill. (flag_loop_optimize_set): New. (common_handle_option): Disable loop optimizer when profiling; do not handle speculative prefetching. * passes.c (init_optimization_passes): Replace pass_profiling combo by branch_prob pass. * profile.c (compute_value_histograms): Update for simplified value profiles. (rtl_register_profile_hooks): Kill. (pass_profiling): Kill. (rest_of_handle_branch_prob): Do not profile. * toplev.c (process_options): Remove speculative prefetching. * toplev.h (flag_tree_based_profiling): Kill. * tree-profile.c (prepare_instrumented_value, tree_gen_interval_profiler, tree_gen_pow2_profiler, tree_gen_one_value_profiler, do_tree_profiling): Update for simplified datastructures. * value-prof.c: Add comment that speculative prefetching was dropped; update rest of file for simplified datastructures. (NOPREFETCH_RANGE_MIN, NOPREFETCH_RANGE_MAX, rtl_divmod_values_to_profile, insn_prefetch_values_to_profile, find_mem_reference_1, find_mem_reference_2, find_mem_reference, rtl_values_to_profile, rtl_divmod_fixed_value, rtl_mod_pow2, rtl_mod_subtract, gen_speculative_prefetch, rtl_divmod_fixed_value_transform, rtl_mod_pow2_value_transform, rtl_mod_subtract_transform, speculative_prefetching_transform): Kill. (gate_handle_value_profile_transformations, rest_of_handle_value_profile_transformations, pass_value_profile_transformations): Kill. * value-prof.h (histogram_value_t): Remove IL based unions. (rtl_register_value_prof_hooks, rtl_register_profile_hooks, rtl_profile_hooks): Remove hooks. * invoke.texi (-ftree-based-profiling, -fspeculative-prefetching): Kill. * inliner-1.c: Do not dump everything. * tree-prof.exp: Do not pass -ftree-based-profiling. * bprob.exp: Likewise. From-SVN: r102522
2005-07-22re PR debug/21828 (debug info omitted for uninitialized variables)Mark Mitchell1-7/+0
PR debug/21828 * toplev.c (check_global_declarations): Do not mark undefined variables as DECL_IGNORED_P. * varasm.c (first_global_object_name): GTY it. (weak_global_object_name): Likewise. (notice_global_symbol): Use ggc_strdup, not xstrdup, when creating a string to go into {weak,first}_global_object_name. PR debug/21828 * gcc.dg/debug/dwarf2/dwarf-uninit.c: New test. From-SVN: r102287
2005-07-21toplev.c (warn_deprecated_use): Add warning control to warning call.DJ Delorie1-6/+9
* toplev.c (warn_deprecated_use): Add warning control to warning call. From-SVN: r102264
2005-07-18common.opt (frename-registers): Initialize to 2.Steve Ellcey1-13/+13
* common.opt (frename-registers): Initialize to 2. (fweb): Ditto. (fgcse-after-reload): Ditto. * toplev.c (AUTODETECT_FLAG_VAR_TRACKING): Rename to AUTODETECT_VALUE. (process_options): Only change flag_web, flag_rename_registers, and flag_rerun_cse_after_loop if not explicitly set by user. From-SVN: r102141
2005-07-13re PR rtl-optimization/20376 (The missed-optimization of general induction ↵Zdenek Dvorak1-2/+8
variables in the new rtl-level loop optimizer cause performance degradation.) PR rtl-optimization/20376 * toplev.c (process_options): Enable -fweb and -frename-registers when unrolling. * doc/invoke.texi: Update the information about when -fweb and -frename-registers are enabled. From-SVN: r101961
2005-07-08Makefile.in (TREE_H): Add treestruct.def.Daniel Berlin1-1/+2
2005-07-08 Daniel Berlin <dberlin@dberlin.org> * Makefile.in (TREE_H): Add treestruct.def. (c-decl.o): Add pointer-set.h * c-decl.c (diagnose_mismatched_decls): Don't attempt to look at visibility on regular DECL's. (merge_decls): Fix the copying of decl nodes of various types for the new structures. Don't update RTL, section name, weak status, etc, on DECL's without RTL. (grokdeclarator): DECL_ARG_TYPE_AS_WRITTEN is gone. Don't check volatile on non-variable types. (store_parm_decls_oldstyle): Use pointer_set instead of DECL_WEAK to check whether we have seen arguments. * c-objc-common.c (c_tree_printer): Reverse order of tests so that flag is checked before field (flag is common, field is not). * dwarf2out.c (decl_ultimate_origin): Only DECL's with TS_DECL_COMMON could have an origin. (add_location_or_const_value_attribute): Don't check section name on non-var/function decls. (dwarf2out_var_location): Reverse order of tests. * emit-rtl.c (set_reg_attrs_for_parm): DECL_CHECK is dead, replace with DECL_WRTL_CHECK. * expmed.c (make_tree): rtl is now in decl_with_rtl. * fold-const.c (fold_binary): Don't check weakness on non-var/function decls. (tree_expr_nonzero_p): Ditto. (fold_checksum_tree): Use tree_decl_extra as sizeof buffer. * ggc-page.c (extra_order_size_table): Add sizes for tree_decl_non_common, tree_parm_decl, tree_var_decl, and tree_field_decl. * gimplify.c (gimplify_bind_expr): Only set DECL_SEEN_IN_BIND_EXPR_P on VAR_DECL. * integrate.c (copy_decl_for_inlining): Don't set RTL on decl's without RTL. * langhooks-def.h (LANG_HOOK_INIT_TS): New. * langhooks.h (init_ts). New langhook. * passes.c (rest_of_decl_compilation): Reverse order of tests. * print-tree.c (print_node): Update to only print fields that exist in the structures the passed decl has. * toplev.c (wrapup_global_declarations): Don't reset DECL_DEFER_OUTPUT on DECL's that don't contain it. * tree-browser.c (browse_tree): DECL_ARG_TYPE_AS_WRITTEN removed. * tree-inline.c (remap_decl): Ditto. * tree-outof-ssa.c (create_temp): Reverse order of tests. * tree-pretty-print.c (print_declaration): Don't print DECL_REGISTER on things that don't contain it. * tree-vrp.c (expr_computes_nonzero): Don't check weakness on non-var/function decls. * tree.c (tree_contains_struct): New structure. (init_priority_for_decl): New hashtable. (tree_int_map): New structure. (tree_int_map_eq): New function. (tree_int_map_marked_p): Ditto. (tree_int_map_hash): Ditto. (tree_map): Move to tree.h. (tree_map_eq): Externalize. (tree_map_hash): Ditto. (tree_map_marked_p): Ditto. (init_ttree): Set up tree_contains_struct and call langhook. (decl_assembler_name): Use DECL_NON_COMMON_CHECK.. (tree_code_size): Update for new structures. (tree_node_structure): Update for new structures. (make_node_stat): Don't try to set DECL_IN_SYSTEM_HEADER on decls without the field. (copy_node_stat): Copy init priority. (build_decl_stat): Ditto for visibility. (ts_enum_names): New. (tree_contains_struct_check_failed): New function. (decl_init_priority_lookup): Ditto. (decl_init_priority_insert): Ditto. * treestruct.def: New file. * tree.h (CODE_CONTAINS_STRUCT): New macro. (CONTAINS_STRUCT_CHECK): Ditto. (tree_contains_struct_check_failed): New prototype. (DECL_CHECK): Removed. (DECL_MINIMAL_CHECK): New. (DECL_COMMON_CHECK): Ditto. (DECL_WRTL_CHECK): Ditto. (DECL_NON_COMMON_CHECK): Ditto. (DECL_WITH_VIS_CHECK): Ditto. (VAR_OR_FUNCTION_DECL_P): Ditto (struct tree_decl_minimal): New structure. (struct tree_decl_common): Ditto. (struct tree_decl_with_rtl): Ditto. (struct tree_decl_with_vis): Ditto. (struct tree_decl_non_common): Ditto. (struct tree_field_decl): Ditto. (struct tree_parm_decl): Ditto. (struct tree_var_decl): Ditto. (struct tree_function_decl): Ditto. (struct tree_const_decl): Ditto. (struct tree_result_decl): Ditto. (union tree_node): Add new structures. * var-tracking.c (track_expr_p): Reverse order of tests. * doc/c-tree.texi: Add documentation on DECL node internal structure. 2005-07-08 Daniel Berlin <dberlin@dberlin.org> * utils.c (create_param_decl): DECL_ARG_TYPE_AS_WRITTEN is removed. 2005-07-08 Daniel Berlin <dberlin@dberlin.org> * Make-lang.in: Add gt-cp-lang.h. (cp-lang.o): Ditto. * class.c (create_vtable_ptr): Stop setting DECL_ASSEMBLER_NAME on the field. * config-lang.in: Add cp-lang.c to gtfiles. * cp-lang.c: Include hashtab.h. (cp_init_ts): New function. (LANG_HOOK_INIT_TS): Use macro. (decl_shadowed_for_var_lookup): New function. (decl_shadowed_for_var_insert): Ditto. * cp-tree.h (THUNK_FUNCTION_CHECK): Use decl_common. (NON_THUNK_FUNCTION_CHECK): Ditto. (DECL_NAMESPACE_ASSOCIATIONS): Use decl_non_common. (DECL_INIT_PRIORITY): Ditto. (DECL_HAS_SHADOWED_FOR_VAR_P): Ditto. (DECL_SHADOWED_FOR_VAR): Use hashtable. (SET_DECL_SHADOWED_FOR_VAR): Ditto. * decl.c (duplicate_decls): Update for new/updated structures. (poplevel): Use SET_DECL_SHADOWED_FOR_VAR. * decl2.c (start_static_initialization_or_destruction): Deal with priority. * pt.c (tsubst_decl): Check TS_DECL_WRTL before doing SET_DECL_RTL. * tree.c (handle_init_priority_attribute): Handle priority. 2005-07-08 Daniel Berlin <dberlin@dberlin.org> * objc-act.c (objc_push_parm): DECL_ARG_TYPE_AS_WRITTEN is removed. * objc-act.h (KEYWORD_ARG_NAME): Use decl_non_common. (KEYWORD_KEY_NAME): Use decl_minimal. (METHOD_SEL_NAME): Ditto.. (METHOD_SEL_ARGS): Use decl_non_common. (METHOD_ADD_ARGS): Ditto. (METHOD_ADD_ARGS_ELLIPSIS_P): Use decl_common. (METHOD_DEFINITION): Ditto. (METHOD_ENCODING): Ditto. * objc-lang.c: (objc_init_ts): New function. 2005-07-08 Daniel Berlin <dberlin@dberlin.org> * trans-decl.c (create_function_arglist): DECL_ARG_TYPE_AS_WRITTEN is removed. From-SVN: r101799
2005-07-05Makefile.in: Adjust dependencies.Paolo Bonzini1-1/+1
2005-07-05 Paolo Bonzini <bonzini@gnu.org> * Makefile.in: Adjust dependencies. * tree-pass.h: Add new passes and passes formerly in tree-optimize.c. * basic-block.h (duplicate_computed_gotos): Remove, it is now static. * alias.c (rest_of_handle_cfg, pass_cfg): New. * bb-reorder.c (duplicate_computed_gotos): Make it static. * cfgexpand.c (tree_expand_cfg): Add code formerly at the beginning of rest_of_compilation. * bb-reorder.c (gate_duplicate_computed_gotos, pass_duplicate_computed_gotos, gate_handle_reorder_blocks, rest_of_handle_reorder_blocks, pass_reorder_blocks, gate_handle_partition_blocks, rest_of_handle_partition_blocks, pass_partition_blocks): New. * bt-load.c (gate_handle_branch_target_load_optimize, rest_of_handle_branch_target_load_optimize, pass_branch_target_load_optimize): New. * cfgcleanup.c (rest_of_handle_jump, pass_jump, rest_of_handle_jump2, pass_jump2): New. * cfglayout.c (pass_insn_locators_initialize): New. * cfgrtl.c (pass_free_cfg): New. * combine.c (gate_handle_combine, rest_of_handle_combine, pass_combine): New. * cse.c (gate_handle_cse, rest_of_handle_cse, pass_cse, gate_handle_cse2, rest_of_handle_cse2, pass_cse2): New. * emit-rtl.c (pass_unshare_all_rtl, pass_remove_unnecessary_notes): New. * except.c (pass_set_nothrow_function_flags, pass_convert_to_eh_region_ranges, gate_handle_eh, rest_of_handle_eh, pass_rtl_eh): New. * final.c (pass_compute_alignments, rest_of_handle_final, pass_final, rest_of_handle_shorten_branches, pass_shorten_branches, rest_of_clean_state, pass_clean_state): New. * flow.c (pass_recompute_reg_usage, gate_remove_death_notes, rest_of_handle_remove_death_notes, pass_remove_death_notes, rest_of_handle_life, pass_life, rest_of_handle_flow2, pass_flow2): New. * function.c (pass_instantiate_virtual_regs, pass_init_function, rest_of_handle_check_leaf_regs, pass_leaf_regs): New. * gcse.c (gate_handle_jump_bypass, rest_of_handle_jump_bypass, pass_jump_bypass, gate_handle_gcse, rest_of_handle_gcse, pass_gcse): New. * global.c (rest_of_handle_global_alloc, pass_global_alloc): New. * ifcvt.c (gate_handle_if_conversion, rest_of_handle_if_conversion, pass_rtl_ifcvt, gate_handle_if_after_combine, rest_of_handle_if_after_combine, pass_if_after_combine, gate_handle_if_after_reload, rest_of_handle_if_after_reload, pass_if_after_reload): New. * integrate.c (pass_initial_value_sets): New. * jump.c (pass_cleanup_barriers, purge_line_number_notes, pass_purge_lineno_notes): New. * mode-switching.c (rest_of_handle_mode_switching, pass_mode_switching): New. * local-alloc.c (rest_of_handle_local_alloc, pass_local_alloc): New. * loop-init.c (gate_handle_loop2, rest_of_handle_loop2, pass_loop2): New. * loop.c (gate_handle_loop_optimize, rest_of_handle_loop_optimize, pass_loop_optimize): New. * modulo-sched.c (gate_handle_sms, rest_of_handle_sms, pass_sms): New. * postreload-gcse.c (gate_handle_gcse2, rest_of_handle_gcse2, pass_gcse2): New. * postreload.c (gate_handle_postreload, rest_of_handle_postreload, pass_postreload_cse): New. * profile.c (gate_handle_profiling, pass_profiling, rest_of_handle_branch_prob, pass_branch_prob): New. * recog.c (pass pass_split_for_shorten_branches, gate_do_final_split, pass_split_before_regstack, gate_handle_split_before_regstack, gate_handle_peephole2, rest_of_handle_peephole2, pass_peephole2, rest_of_handle_split_all_insns, pass_split_all_insns): New. * reg-stack.c (gate_handle_stack_regs, rest_of_handle_stack_regs, pass_stack_regs): New. * regmove.c (gate_handle_regmove, rest_of_handle_regmove, pass_regmove, gate_handle_stack_adjustments, rest_of_handle_stack_adjustments, pass_stack_adjustments): New. * regrename.c (gate_handle_regrename, rest_of_handle_regrename, pass_regrename): New. * reorg.c (gate_handle_delay_slots, rest_of_handle_delay_slots, pass_delay_slots, gate_handle_machine_reorg, rest_of_handle_machine_reorg, pass_machine_reorg): New. * rtl.h (extern void purge_line_number_notes): New. * sched-rgn.c (gate_handle_sched, rest_of_handle_sched, gate_handle_sched2, rest_of_handle_sched2, pass_sched, pass_sched2): New. * tracer.c (gate_handle_tracer, rest_of_handle_tracer, pass_tracer): New. * value-prof.c (gate_handle_value_profile_transformations, rest_of_handle_value_profile_transformations, pass_value_profile_transformations): New. * var-tracking.c (gate_handle_var_tracking, pass_variable_tracking): New. * web.c (gate_handle_web, rest_of_handle_web, pass_web): New. * passes.c (open_dump_file, close_dump_file, rest_of_handle_final, rest_of_handle_delay_slots, rest_of_handle_stack_regs, rest_of_handle_variable_tracking, rest_of_handle_machine_reorg, rest_of_handle_old_regalloc, rest_of_handle_regrename, rest_of_handle_reorder_blocks, rest_of_handle_partition_blocks, rest_of_handle_sms, rest_of_handle_sched, rest_of_handle_sched2, rest_of_handle_gcse2, rest_of_handle_regmove, rest_of_handle_tracer, rest_of_handle_if_conversion, rest_of_handle_if_after_combine, rest_of_handle_if_after_reload, rest_of_handle_web, rest_of_handle_branch_prob, rest_of_handle_value_profile_transformations, rest_of_handle_cfg, rest_of_handle_jump_bypass, rest_of_handle_combine, rest_of_handle_life, rest_of_handle_cse, rest_of_handle_cse2, rest_of_handle_gcse, rest_of_handle_loop_optimize, rest_of_handle_loop2, rest_of_handle_branch_target_load_optimize, rest_of_handle_mode_switching, rest_of_handle_jump, rest_of_handle_eh, rest_of_handle_stack_adjustments, rest_of_handle_flow2, rest_of_handle_jump2, rest_of_handle_peephole2, rest_of_handle_postreload, rest_of_handle_shorten_branches, rest_of_clean_state, rest_of_compilation): Remove. * cgraphunit.c (ipa_passes): Moved from tree-optimize.c. * passes.c (dump_flags, in_gimple_form, all_passes, all_ipa_passes, all_lowering_passes, register_one_dump_file, register_dump_files, next_pass_1, last_verified, execute_todo, execute_one_pass, execute_pass_list, execute_ipa_pass_list): Moved from tree-optimize.c. (init_optimization_passes): Moved from tree-optimize.c, adding the RTL optimizations. * tree-dump.h (dump_info_p, dump_flag): Moved from tree.h. * tree-optimize.c (dump_flags, in_gimple_form, all_passes, all_ipa_passes, all_lowering_passes, register_one_dump_file, register_dump_files, next_pass_1, last_verified, execute_todo, execute_one_pass, execute_pass_list, execute_ipa_pass_list, init_tree_optimization_passes, ipa_passes): Delete. * tree-pass.h (enum tree_dump_index): Moved from tree.h, removing the RTL dumps. (TDF_*, get_dump_file_name, dump_enabled_p, dump_initialized_p, dump_begin, dump_end, dump_node, dump_switch_p, dump_flag_name): Moved from tree.h. (ipa_passes): Remove. (all_passes, all_ipa_passes, all_lowering_passes): Now extern. * tree.h (enum tree_dump_index, TDF_*, get_dump_file_name, dump_enabled_p, dump_initialized_p, dump_begin, dump_end, dump_node, dump_switch_p, dump_flag_name): Moved to tree-pass.h. (dump_info_p, dump_flag): Moved to tree-dump.h. * Makefile.in: Adjust dependencies for tree-pretty-print.c, cgraph.c, opts.c. * passes.c (finish_optimization_passes): Use dump_begin and dump_end, TDI_end. (gate_rest_of_compilation): New. (pass_rest_of_compilation): Use it. (gate_postreload, pass_postreload): New. * toplev.c (general_init): Rename init_tree_optimization_passes. * toplev.h (init_tree_optimization_passes): Rename to init_optimizations_passes. * tree-dump.c (dump_flag): Make static. (dump_files): Remove RTL dumps. * tree-optimize.c (pass_all_optimizations, pass_early_local_passes, pass_cleanup_cfg, pass_free_cfg_annotations, pass_cleanup_cfg_post_optimizing, pass_free_datastructures, pass_init_datastructures, pass_fixup_cfg): Make non-static. * tree-pretty-print.c: Include tree-pass.h. * cgraph.c: Include tree-dump.h. cp: 2005-07-05 Paolo Bonzini <bonzini@gnu.org> * Makefile.in (class.o, decl2.o): Adjust dependencies. * class.c: Include tree-dump.h. * decl2.c: Include tree-dump.h. java: 2005-07-05 Paolo Bonzini <bonzini@gnu.org> * Makefile.in (parse.o): Adjust dependencies. * parse.y: Include tree-dump.h. From-SVN: r101627
2005-07-03bb-reorder.c, [...]: Avoid "." or "\n" at end of diagnostics and capital ↵Joseph Myers1-8/+14
letters at start of diagnostics. * bb-reorder.c, c-pch.c, c-pragma.c, c.opt, cfghooks.c, cfgloop.c, cfgrtl.c, cgraphunit.c, config/c4x/c4x.c, config/cris/cris.c, config/frv/frv.c, config/host-darwin.c, config/iq2000/iq2000.c, config/lynx.h, config/m68k/m68k.c, config/pa/pa.c, config/sh/sh.h, config/stormy16/stormy16.c, config/v850/v850.c, config/vax/netbsd-elf.h, coverage.c, dwarf2out.c, emit-rtl.c, except.c, gcc.c, tree-cfg.c, tree-eh.c, tree-ssa.c, xcoffout.c: Avoid "." or "\n" at end of diagnostics and capital letters at start of diagnostics. * combine.c, cse.c: Don't translate dump file output. * toplev.c (print_version): Only translate output if going to stderr. From-SVN: r101561
2005-07-02toplev.c (default_tree_printer): Handle setting location with '+' flag.Joseph Myers1-6/+9
2005-07-02 Zack Weinberg <zack@codesourcery.com> Joseph S. Myers <joseph@codesourcery.com> * toplev.c (default_tree_printer): Handle setting location with '+' flag. * c-objc.common.c (c_tree_printer): Likewise. * c-format.c (gcc_diag_flag_specs): Add '+'. (gcc_cdiag_char_table): Allow '+' flag for tree formats. (format_types_orig): Allow '+' flag for gcc_diag and gcc_cdiag formats. * c-common.c, c-decl.c, c-objc-common.c, c-pragma.c, config/arm/pe.c, config/i386/winnt.c, config/ia64/ia64.c, config/mcore/mcore.c, config/sh/symbian.c, config/sol2.c, config/v850/v850.c, function.c, stor-layout.c, toplev.c, tree-inline.c, tree-optimize.c, tree.c, varasm.c: Use '+' flag instead of %J or %H. Use 'q' flag for quoting. Avoid '.' at end of diagnostics. Use %q+D not %s for a decl. Do not pass excess format arguments where %J is used without %D. cp: * error.c (location_of): Add comment. (locate_error, cp_error_at, cp_warning_at, cp_pedwarn_at): Remove. * cp-tree.h (cp_error_at, cp_warning_at, cp_pedwarn_at): Remove. * call.c, class.c, decl.c, decl2.c, friend.c, init.c, name-lookup.c, parser.c, pt.c, search.c, semantics.c, typeck.c, typeck2.c: Use '+' flag instead of %J, cp_error_at, cp_warning_at or cp_pedwarn_at. Mark up some diagnostic strings with N_. java: * class.c, decl.c, expr.c: Use '+' flag instead of %J. Use 'q' flag for quoting. objc: * objc-act.c: Use '+' flag instead of %J. Use 'q' flag for quoting. testsuite: * gcc.dg/format/gcc_diag-1.c: Update. From-SVN: r101532
2005-06-30pretty-print.h (PP_NL_ARGMAX): New.Zack Weinberg1-4/+9
gcc: * pretty-print.h (PP_NL_ARGMAX): New. (text_info): Add locus. (struct chunk_info): New. (output_buffer): Add formatted_obstack, chunk_obstack, and cur_chunk_array. Change obstack to a pointer. (pp_wrapping_mode_t, pp_wrapping_mode, pp_set_verbatim_wrapping): New. (struct pretty_print_info): Replace ideal_maximum_length and prefixing_rule with wrapping. (pp_line_cutoff, pp_prefixing_rule): Update to match. Update prototypes and wrapper macros throughout. * pretty-print.c (pp_formatted_text_data, pp_append_r) (pp_base_clear_output_area, pp_construct, pp_base_formatted_text) (pp_base_last_position_in_text, pp_base_newline, pp_base_character): Update for changes to pp structure. (pp_base_prepare_to_format, pp_base_format_text): Delete. (pp_base_format, pp_base_output_formatted_text): New functions. (pp_base_format_verbatim): Use pp_set_verbatim_wrapping. (pp_verbatim): Clear text.locus. (pp_printf): Likewise. Use pp_format and pp_output_formatted_text. * c-objc-common.c (c_tree_printer): Update function signature. * diagnostic.c (diagnostic_initialize): Update for changes to pp structure. (diagnostic_report_diagnostic): Call pp_format and then pp_output_formatted_text. (verbatim): Clear text.locus. * diagnostic.h (diagnostic_prefixing_rule, diagnostic_line_cutoff): Update for changes to pp structure. * c-lang.c: No need to include c-pretty-print.h. * Makefile.in: Remove bogus line containing only a tab. (c-lang.o): Update dependencies. * toplev.c (announce_function): Don't use verbatim. (default_tree_printer): Update signature. * objc/objc-lang.c: No need to include c-pretty-print.h. * objc/Make-lang.in: Update dependencies. gcc/cp: * cp-lang.c: No need to include cxx-pretty-print.h. * error.c (cp_printer): Update signature. No need to process flags. (print_instantiation_partial_context): Output last newline with pp_base_newline. * Make-lang.in: Update dependencies. gcc/objcp: * objcp-lang.c: No need to include cxx-pretty-print.h. * Make-lang.in: Update dependencies. Co-Authored-By: Jakub Jelinek <jakub@redhat.com> From-SVN: r101481
2005-06-29c-common.c (flag_next_runtime): Move...Ziemowit Laski1-0/+8
[gcc/ChangeLog] 2006-06-28 Ziemowit Laski <zlaski@apple.com> * c-common.c (flag_next_runtime): Move... * toplev.c (flag_next_runtime): ... here. * c-common.h (flag_next_runtime): Move... * flags.h (flag_next_runtime): ... here. * config/darwin-c.c: Include flags.h. * config/t-darwin (darwin-c.o): Depend on flags.h. From-SVN: r101415
2005-06-27toplev.c (process_options): Use if (FRAME_GROWS_DOWNWARD) instead of ↵Jakub Jelinek1-3/+1
preprocessor conditionals. * toplev.c (process_options): Use if (FRAME_GROWS_DOWNWARD) instead of preprocessor conditionals. From-SVN: r101350
2005-06-27c-cppbuiltin.c (c_cpp_builtins): Add __SSP_ALL__ and __SSP__.Richard Henderson1-0/+12
* c-cppbuiltin.c (c_cpp_builtins): Add __SSP_ALL__ and __SSP__. * cfgexpand.c: Include params.h. (has_protected_decls, has_short_buffer): New. (expand_stack_vars): Take a predicate to determine what to expand. (defer_stack_allocation): True when flag_stack_protect on. (SPCT_HAS_LARGE_CHAR_ARRAY, SPCT_HAS_SMALL_CHAR_ARRAY): New. (SPCT_HAS_ARRAY, SPCT_HAS_AGGREGATE): New. (stack_protect_classify_type, stack_protect_decl_phase): New. (stack_protect_decl_phase_1, stack_protect_decl_phase_2): New. (add_stack_protection_conflicts, create_stack_guard): New. (expand_used_vars): Add stack protection logic. (tree_expand_cfg): Likewise. * common.opt (Wstack-protector): New. (fstack-protector, fstack-protector-all): New. * function.c: Include predict.h. (assign_parm_adjust_stack_rtl): Zap stack_parm when stack protect wants to copy the parameter into the stack frame. (stack_protect_prologue, stack_protect_epilogue): New. (expand_function_end): Call stack_protect_epilogue. Do sjlj_emit_function_exit_after after naked_return_label. * function.h (struct function): Add stack_protect_guard. * params.def (PARAM_SSP_BUFFER_SIZE): New. * toplev.c (process_options): Disable flag_stack_protect and/or warn_stack_protect based on FRAME_GROWS_DOWNWARD. * tree.h (stack_protect_prologue): Declare. * target-def.h (TARGET_STACK_PROTECT_GUARD): New. (TARGET_STACK_PROTECT_FAIL): New. (TARGET_INITIALIZER): Add them. * target.h (struct gcc_target): Add stack_protect_guard and stack_protect_fail. * targhooks.c: Include ggc.h, gty header. (stack_chk_guard_decl, default_stack_protect_guard): New. (stack_chk_fail_decl, default_external_stack_protect_fail): New. (default_hidden_stack_protect_fail): New. * targhooks.h (default_stack_protect_guard): Declare. (default_external_stack_protect_fail): Declare. (default_hidden_stack_protect_fail): Declare. * config/i386/i386.c (TARGET_STACK_PROTECT_FAIL): New. * config/i386/i386.md (UNSPEC_SP_SET, UNSPEC_SP_TEST): New. (trap): Use ud2. (conditional_trap, conditional_trap_1): Remove. (stack_protect_set, stack_protect_set_si, stack_protect_set_di): New. (stack_protect_test, stack_protect_test_si, stack_protect_test_di): New. * doc/md.texi (stack_protect_set, stack_protect_test): New. * doc/tm.texi (TARGET_STACK_PROTECT_GUARD): New. (TARGET_STACK_PROTECT_FAIL): New. * libgcc-std.ver (GCC_4.1.0): New. * libgcc.h (__stack_chk_guard): Declare. (__stack_chk_fail, __stack_chk_fail_local): Declare. * libgcc2.c (L_stack_chk, L_stack_chk_local): New. * mklibgcc.in (lib2funcs): Add them. From-SVN: r101348
2005-06-25Update FSF address.Kelley Cook1-2/+2
From-SVN: r101317
2005-06-04function.c (prologue, [...]): Change their types to VEC(int,heap)*.Kazu Hirata1-1/+0
* function.c (prologue, epilogue, sibcall_epilogue): Change their types to VEC(int,heap)*. (free_after_compilation): Free the three vectors above. (init_function_for_compilation, record_insns, contains, prologue_epilogue_contains, sibcall_epilogue_contains, reposition_prologue_and_epilogue_notes): Use VEC instead of VARRAY. (init_function_once): Remove. * function.h: Remove the prototype for init_function_once. * toplev.c (backend_init): Don't call init_function_once. From-SVN: r100588
2005-06-01system.h (TARGET_OPTIONS, [...]): Poison.Richard Sandiford1-278/+29
* system.h (TARGET_OPTIONS, TARGET_SWITCHES): Poison. * opts.h (print_filtered_help): Delete. * opts.c (handle_option, decode_options): Remove calls to set_target_switch. (print_target_help): New function. (common_option, print_help): Call print_target_help instead of display_target_options. (print_filtered_help): Make static. * toplev.h (display_target_options, set_target_switch): Delete. * toplev.c (target_switches, target_options, display_target_options) (set_target_switch): Delete. (print_switch_values): Remove handling of TARGET_SWITCHES and TARGET_OPTIONS. (default_get_pch_validity): Likewise. Only treat target_flags specially if targetm.check_pch_target_flags is nonnull. (pch_option_mismatch): New function. (default_pch_valid_p): Use it. Remove handling of TARGET_SWITCHES and TARGET_OPTIONS. Only treat target_flags specially if targetm.check_pch_target_flags is nonnull. * config/ia64/ia64.c (ia64_override_options): Don't mention TARGET_OPTIONS in comment. * config/m68k/m68k-none.h (CC1_SPEC): Likewise. * doc/invoke.texi: Remove a reference to TARGET_SWITCHES. * doc/tm.texi (TARGET_DEFAULT_TARGET_FLAGS): Don't mention the interaction with TARGET_SWITCHES. (TARGET_@var{featurename}, TARGET_SWITCHES, TARGET_OPTIONS): Delete. From-SVN: r100432
2005-06-01opts.h (cl_option_state): New structure.Richard Sandiford1-11/+40
* opts.h (cl_option_state): New structure. (get_option_state): Declare. * opts.c (get_option_state): New function. * toplev.c (option_affects_pch_p): New function. (default_get_pch_validity): Store the state of all options for which option_affects_pch_p returns true. (default_pch_valid_p): Check the state of those options here. Only check target_flags separately if targetm.check_pch_target_Flags is nonnull or if TARGET_SWITCHES is defined. From-SVN: r100430
2005-06-01c-objc-common.c (c_tree_printer): Check flag before hashtable.Daniel Berlin1-1/+1
2005-05-30 Daniel Berlin <dberlin@dberlin.org> * c-objc-common.c (c_tree_printer): Check flag before hashtable. Use DECL_DEBUG_EXPR and SET_DECL_DEBUG_EXPR. * dwarf2out.c (dwarf2out_var_location): Ditto. * toplev.c (default_tree_printer): Ditto. * tree-outof-ssa.c (create_temp): Ditto. * tree-sra.c (instantiate_element): Ditto. * var-tracking.c (track_expr_p): Ditto. * tree.c (struct tree_map): New structure. (debug_expr_for_decl): New. (tree_map_eq): New function. (tree_map_hash): Ditto. (tree_map_marked_p): Ditto. (print_debug_expr_statistics): Ditto. (decl_debug_expr_lookup): Ditto. (decl_debug_expr_insert): Ditto. (dump_tree_statistics): Dump debug_expr hashtable stats. * tree.h (DECL_DEBUG_EXPR): Change (SET_DECL_DEBUG_EXPR): Add. From-SVN: r100417