aboutsummaryrefslogtreecommitdiff
path: root/gcc/Makefile.in
AgeCommit message (Collapse)AuthorFilesLines
2011-07-23dwarf2cfi: Generate and connect traces.Richard Henderson1-1/+1
This kinda-sorta corresponds to Bernd's 007-dw2cfi patch. Certainly the same concepts of splitting the instruction stream into extended basic blocks is the same. This patch does a bit better job with the documentation. Also, I'm a bit more explicit about matching things up with the similar code from the regular CFG routines. What's missing at this point is any attempt to use DW_CFA_remember_state. I've deferred that for the moment because it's easy to test the state change code across epilogues, whereas the shrink-wrapping code is not in this tree and section switching is difficult to force. * dwarf2cfi.c: Include basic-block.h. (dw_label_info): Remove. (trace_work_list, trace_index): New. (remember_row, emit_cfa_remember): Remove. (dw_trace_info_hash, dw_trace_info_eq): New. (get_trace_index, get_trace_info): New. (save_point_p): New. (free_cfi_row): Remove. (add_cfi): Do not emit DW_CFA_remember_state. (cfa_row_equal_p): New. (barrier_args_size): Remove. (compute_barrier_args_size_1, compute_barrier_args_size): Remove. (dwarf2out_notice_stack_adjust): Don't compute_barrier_args_size. (maybe_record_trace_start, create_trace_edges, scan_trace): New. (dwarf2out_cfi_begin_epilogue): Remove. (dwarf2out_frame_debug_restore_state): Remove. (connect_traces, create_pseudo_cfg): New. (create_cfi_notes, execute_dwarf2_frame): Rewrite using traces. * Makefile.in (dwarf2cfi.o): Update. From-SVN: r176705
2011-07-23bb-reorder: Split EH edges crossing partitions.Richard Henderson1-1/+1
From-SVN: r176696
2011-07-22re PR other/32998 (-frecord-gcc-switches issues)Jakub Jelinek1-1/+1
PR other/32998 * common.opt (grecord-gcc-switches, gno-record-gcc-switches): New options. * dwarf2out.c: Include opts.h. (dchar_p): New typedef. Define heap VEC for it. (producer_string): New variable. (gen_producer_string): New function. (gen_compile_unit_die): Use it. (dwarf2out_finish): Fix up comp_unit_die () DW_AT_producer if needed. * Makefile.in (dwarf2out.o): Depend on $(OPTS_H). * doc/invoke.texi: Document -grecord-gcc-switches and -gno-record-gcc-switches, add a -grecord-gcc-switches reference to -frecord-gcc-switches description. From-SVN: r176652
2011-07-19Makefile.in (tree-ssa-forwprop.o): Depend on gimple-pretty-print.h.Richard Biener1-1/+2
2011-07-19 Richard Guenther <rguenther@suse.de> * Makefile.in (tree-ssa-forwprop.o): Depend on gimple-pretty-print.h. * tree-ssa-forwprop.c: Include gimple-pretty-print.h. (forward_propagate_comparison): Simplify, remove obsolete code. From-SVN: r176445
2011-07-19ipa-prop.h: Include alloc-pool.h, all sorts of updates to general comments.Martin Jambor1-1/+1
2011-07-18 Martin Jambor <mjambor@suse.cz> * ipa-prop.h: Include alloc-pool.h, all sorts of updates to general comments. (ipcp_values_pool): Declare. (ipcp_sources_pool): Likewise. (ipcp_lattice): Changed to forward declaration. (ipa_param_descriptor): Removed fields ipcp_lattice, types and cannot_devirtualize. (ipa_node_params): New fields descriptors, lattices, known_vals, clone_for_all_contexts and node dead, removed fields params and count_scale. (ipa_set_param_count): Removed. (ipa_get_param_count): Made to work with descriptors vector. (ipa_get_param): Updated. (ipa_param_cannot_devirtualize_p): Removed. (ipa_param_types_vec_empty): Likewise. (ipa_set_param_used): New function. (ipa_get_param_used): Updated to use descriptors vector. (ipa_func_list): Removed. (ipa_init_func_list): Removed declaration. (ipa_push_func_to_list_1): Likewise. (ipa_pop_func_from_list): Likewise. (ipa_push_func_to_list): Removed. (ipa_lattice_from_jfunc): Remove declaration. (ipa_get_jf_pass_through_result): Declare. (ipa_get_jf_ancestor_result): Likewise. (ipa_value_from_jfunc): Likewise. (ipa_get_lattice): Update. (ipa_lat_is_single_const): New function. * ipa-prop.c (ipa_push_func_to_list_1): Removed. (ipa_init_func_list): Likewise. (ipa_pop_func_from_list): Likewise. (ipa_get_param_decl_index): Fix coding style. (count_formal_params): Removed. (count_formal_params_1): Renamed to count_formal_params. (ipa_populate_param_decls): Update to use descriptors vector. (ipa_initialize_node_params): Likewise. (visit_ref_for_mod_analysis): Use ipa_set_param_used. (ipa_analyze_params_uses): Likewise. (ipa_free_node_params_substructures): Likewise and free also lattices and known values. (duplicate_array): Removed. (ipa_edge_duplication_hook): Add the new edge to the list of edge clones. (ipa_node_duplication_hook): Update to use new lattices. (ipa_free_all_structures_after_ipa_cp): Free alloc pools. (ipa_free_all_structures_after_iinln): Likewise. (ipa_write_node_info): Update to use new lattices. (ipa_read_node_info): Likewise. (ipa_get_jf_pass_through_result): New function. (ipa_get_jf_ancestor_result): Likewise. (ipa_value_from_jfunc): Likewise. (ipa_cst_from_jfunc): Reimplemented using ipa_value_from_jfunc. * ipa-cp.c: Reimplemented. * params.def (PARAM_DEVIRT_TYPE_LIST_SIZE): Removed. (PARAM_IPA_CP_VALUE_LIST_SIZE): New parameter. (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise. * Makefile.in (IPA_PROP_H): Added alloc-pool.h to dependencies. * doc/invoke.texi (devirt-type-list-size): Removed description. (ipa-cp-value-list-size): Added description. * testsuite/gcc.dg/ipa/ipa-1.c: Updated testcase dump scan. * testsuite/gcc.dg/ipa/ipa-2.c: Likewise. * testsuite/gcc.dg/ipa/ipa-3.c: Likewise and made functions static. * testsuite/gcc.dg/ipa/ipa-4.c: Updated testcase dump scan. * testsuite/gcc.dg/ipa/ipa-5.c: Likewise. * testsuite/gcc.dg/ipa/ipa-7.c: Likewise. * testsuite/gcc.dg/ipa/ipa-8.c: Updated testcase dump scan. * testsuite/gcc.dg/ipa/ipacost-1.c: Likewise. * testsuite/gcc.dg/ipa/ipacost-2.c: Likewise and increased sizes of some functions. * testsuite/gcc.dg/ipa/ipcp-1.c: New test. * testsuite/gcc.dg/ipa/ipcp-2.c: Likewise. * testsuite/gcc.dg/tree-ssa/ipa-cp-1.c: Updated testcase. From-SVN: r176424
2011-07-15re PR testsuite/49741 (make -k check-c++0x not multilib aware)Jason Merrill1-2/+2
PR testsuite/49741 gcc/ * Makefile.in ($(lang_checks_parallelized)): Allow --extra_opts rather than --tool_opts. gcc/cp/ * Make-lang.in (check-c++0x): Use --extra_opts instead of--tool_opts. gcc/testsuite/ * lib/g++.exp (${tool}_option_help, ${tool}_option_proc): Restore. Use --extra_opts instead of --additional_options. * Makefile.in (check-c++): Move check-gcc-c++0x after check-target-libstdc++-v3. From-SVN: r176332
2011-07-13haifa-sched.c: Include "hashtab.h"Bernd Schmidt1-1/+2
* haifa-sched.c: Include "hashtab.h" (sched_no_dce): New global variable. (INSN_EXACT_TICK, INSN_TICK_ESTIMATE, FEEDS_BACKTRACK_INSN, SHADOW_P): New macros. (last_clock_var, cycle_issued_insns): Move declarations. (must_backtrack): New static variable. (struct delay_pair): New structure. (delay_htab, delay_htab_i2): New static variables. (delay_hash_i1, delay_hash_i2, delay_i1_eq, delay_i2_eq, record_delay_slot_pair, pair_delay, add_delay_dependencies): New functions. (dep_cost_1): If delay pairs exist, try to look up the insns and use the correct pair delay if we find them. (rank-for_schedule): Tweak priority for insns that must be scheduled soon to avoid backtracking. (queue_insn): Detect conditions which force backtracking. (ready_add): Likewise. (struct sched_block_state): Add member shadows_only_p. (struct haifa_save_data): New structure. (backtrack_queue): New static variable. (mark_backtrack_feeds, copy_insn_list, save_backtrack_point, unschedule_insns_until, restore_last_backtrack_point, free_topmost_backtrack_point, free_backtrack_queue, estimate_insn_tick, estimate_shadow_tick): New functions. (prune_ready_list): New arg shadows_only_p. All callers changed. If true, remove everything that isn't SHADOW_P. Look up delay pairs and estimate ticks to avoid scheduling the first insn too early. (verify_shadows): New function. (schedule_block): Add machinery to enable backtracking. (sched_init): Take sched_no_dce into account when setting DF_LR_RUN_DCE. (free_delay_pairs): New function. (init_h_i_d): Initialize INSN_EXACT_TICK. * Makefile.in (haifa-sched.o): Add $(HASHTAB_H). * sched-deps.c (sd_unresolve_dep): New function. * sched-int.h (struct haifa_sched_info): New fields save_state and restore_state. (struct _haifa_insn_data): New fields exact_tick, tick_estimate, feeds_backtrack_insn and shadow_p. (DO_BACKTRACKING): New value in enum SCHED_FLAGS. (sched_no_dce): Declare variable. (record_delay_slot_pair, free_delay_pairs, add_delay_dependencies, sd_unresolve_dep): Declare functions. * modulo-sched.c (sms_sched_info): Clear the two new fields. * sched-rgn.c (rgn_const_sched_info): Likewise. * sel-sched-ir.c (sched_sel_haifa_sched_info): Likewise. * sched-ebb.c (save_ebb_state, restore_ebb_state): New functions. (ebb_sched_info): Add them for the two new fields. (add_deps_for_risky_insns): Call add_delay_dependencies. From-SVN: r176255
2011-07-13Also test -std=c++0x mode with 'make check-c++' at top levelJason Merrill1-2/+2
Also test -std=c++0x mode with 'make check-c++' at top level * Makefile.in (check-gcc-c++0x): New. (check-c++): Depend on it. gcc/ * Makefile.in ($(lang_checks_parallelized)): Allow --tool_opts. gcc/cp/ * Make-lang.in (check-c++0x): New. gcc/testsuite/ * lib/g++.exp (${tool}_option_help, ${tool}_option_proc): Remove. * lib/lto.exp (lto_prune_warns): Prune warning about -std=c++0x when compiling C files. From-SVN: r176250
2011-07-13Makefile.in (CRT0STUFF_T_CFLAGS): Remove.Rainer Orth1-15/+0
gcc: * Makefile.in (CRT0STUFF_T_CFLAGS): Remove. ($(T)crt0.o, $(T)mcrt0.o, s-crt0): Remove. * config/i386/netware-crt0.c: Move to ../libgcc/config/i386. * config/i386/t-nwld (CRTSTUFF_T_CFLAGS, CRT0STUFF_T_CFLAGS): Remove. (CRT0_S, MCRT0_S): Remove. ($(T)libgcc.def, $(T)libc.def, $(T)libcpre.def, $(T)posixpre.def): Remove. (s-crt0): Remove. * config.gcc (i[3456x]86-*-netware*): Remove extra_parts. libgcc: * config/i386/netware-crt0.c: New file. * config/i386/t-nwld: Rename to ... * config/i386/t-slibgcc-nwld: ... this. * config/i386/t-nwld: New file. * config.host (i[3456x]86-*-netware*): Add i386/t-slibgcc-nwld to tmake_file. Add crt0.o, libgcc.def, libc.def, libcpre.def, posixpre.def to extra_parts. From-SVN: r176225
2011-07-11dfp-bit.c, dfp-bit.h: Move to ../libgcc.Rainer Orth1-32/+0
gcc: * config/dfp-bit.c, config/dfp-bit.h: Move to ../libgcc. * config/t-dfprules: Move to ../libgcc/config. * config.gcc (i[34567]86-*-linux*, i[34567]86-*-kfreebsd*-gnu, i[34567]86-*-knetbsd*-gnu, i[34567]86-*-gnu*, i[34567]86-*-kopensolaris*-gnu): Remove t-dfprules from tmake_file. (x86_64-*-linux*, x86_64-*-kfreebsd*-gnu, x86_64-*-knetbsd*-gnu): Likewise. (i[34567]86-*-cygwin*): Likewise. (i[34567]86-*-mingw*, x86_64-*-mingw*): Likewise. (powerpc-*-linux*, powerpc64-*-linux*): Likewise. * Makefile.in (D32PBIT_FUNCS, D64PBIT_FUNCS, D128PBIT_FUNCS): Remove. (libgcc.mvars): Remove DFP_ENABLE, DFP_CFLAGS, D32PBIT_FUNCS, D64PBIT_FUNCS, D128PBIT_FUNCS. libgcc: * dfp-bit.c, dfp-bit.h: New files. * Makefile.in (D32PBIT_FUNCS, D64PBIT_FUNCS, D128PBIT_FUNCS): New variables. ($(d32pbit-o)): Use $(srcdir) to refer to dfp-bit.c ($(d64pbit-o)): Likewise. ($(d128pbit-o)): Likewise. * config/t-dfprules: New file. * config.host (i[34567]86-*-linux*): Add t-dfprules to tmake_file. (i[34567]86-*-kfreebsd*-gnu, i[34567]86-*-knetbsd*-gnu, i[34567]86-*-gnu*, i[34567]86-*-kopensolaris*-gnu): Likewise. (x86_64-*-linux*): Likewise. (x86_64-*-kfreebsd*-gnu, x86_64-*-knetbsd*-gnu): Likewise. (i[34567]86-*-cygwin*): Likewise. (i[34567]86-*-mingw*, x86_64-*-mingw*): Likewise. (powerpc-*-linux*, powerpc64-*-linux*): Likewise. From-SVN: r176156
2011-07-08Makefile.in (LIBGCOV): Remove.Rainer Orth1-9/+0
gcc: * Makefile.in (LIBGCOV): Remove. (libgcc.mvars): Remove LIBGCOV. * libgov.c: Move to ../libgcc. libgcc: * Makfile.in (LIBGCOV): New variable. ($(libgcov-objects)): Use $(srcdir) to refer to libgcov.c. * libgcov.c: New file. From-SVN: r176037
2011-07-07Dump NOTE_INSN_CFI notes.Richard Henderson1-1/+2
* dwarf2out.c (output_cfi_directive): Export. Add FILE parameter. Handle some opcodes specially for debugging. * print-rtl.c: Include dwarf2out.h (print_rtx): Handle NOTE_INSN_CFI. * Makefile.in (print-rtl.o): Update. From-SVN: r176020
2011-07-07dwarf2out: Split CFI construction routines into a new file.Richard Henderson1-1/+9
Excepting changing some functions from static to extern, this patch contains code motion only. The split is not very clean at this point, but will be refined as CFI construction is turned into its own proper pass. * dwarf2cfi.c: New file. * Makefile.in (OBJS): Add it. (GTFILES): Add dwarf2cfi.c and dwarf2out.h. * gengtype.c (open_base_files): Include dwarf2out.h. * coretypes.h (enum var_init_status): Move from ... * rtl.h: ... here. * dwarf2out.c (saved_do_cfi_asm, dwarf2out_do_frame, dwarf2out_do_cfi_asm, cie_cfi_vec, dwarf2out_cfi_label_num, expand_builtin_dwarf_sp_column, init_return_column_size, expand_builtin_init_dwarf_reg_sizes, new_cfi, add_cfi, dwarf2out_cfi_label, emit_cfa_remember, any_cfis_emitted, add_fde_cfi, lookup_cfa_1, lookup_cfa, cfa, cfa_store, cfa_remember, args_size, old_args_size, cfa_equal_p, def_cfa_1, reg_save, initial_return_save, stack_adjust_offset, barrier_args_size, compute_barrier_args_size_1, compute_barrier_args_size, dwarf2out_args_size, dwarf2out_stack_adjust, dwarf2out_notice_stack_adjust, queued_reg_saves, reg_saved_in_data, regs_saved_in_regs, compare_reg_or_pc, record_reg_saved_in_reg, last_reg_save_label, queue_reg_save, dwarf2out_flush_queued_reg_saves, clobbers_queued_reg_save, reg_saved_in, cfa_temp, dwarf2out_frame_debug_def_cfa, dwarf2out_frame_debug_adjust_cfa, dwarf2out_frame_debug_cfa_offset, dwarf2out_frame_debug_cfa_register, dwarf2out_frame_debug_cfa_expression, dwarf2out_frame_debug_cfa_restore, dwarf2out_frame_debug_cfa_window_save, dwarf2out_frame_debug_expr, dwarf2out_frame_debug, dwarf2out_frame_debug_init, dwarf2out_cfi_begin_epilogue, dwarf2out_frame_debug_restore_state, get_cfa_from_loc_descr): Move to dwarf2cfi.c. (dw_cfi_ref, dw_fde_ref, dw_cfi_oprnd_ref, enum dw_cfi_oprnd_type, dw_cfi_oprnd, dw_cfi_node, cfi_vec, dw_cfa_location, dw_fde_node, dw_val_ref, dw_die_ref, const_dw_die_ref, dw_loc_descr_ref, dw_loc_list_ref, enum dw_val_class, dw_vec_const, dw_val_node, dw_loc_descr_node): Move to dwarf2out.h. (current_fde, output_cfi_directive, build_cfa_loc, get_address_mode, mem_loc_descriptor): Export. (build_cfa_aligned_loc): Export. Take CFA as a parameter. (dwarf2out_frame_init): Extract CIE generation code to dwarf2cfi_frame_init. From-SVN: r176015
2011-07-07hw-doloop.c: New file.Bernd Schmidt1-2/+6
* hw-doloop.c: New file. * hw-doloop.h: New file. * Makefile.in (OBJS): Add hw-doloop.o. (hw-doloop.o): New rule. ($(obj_out_file)): Add hw-doloop.h dependency. * config/bfin/bfin.c: Include "hw-doloop.h". (loop_info, DEF_VEC_P for loop_info, loop_info_d): Remove. (bfin_dump_loops, bfin_bb_in_loop, bfin_scan_loop): Remove. (hwloop_optimize): Renamed from bfin_optimize_loop. Argument type changed to hwloop_info. Return bool, true if the loop was successfully optimized. Remove code that was moved to hw-doloop.c, and adjust other parts. (hwloop_fail): New static function, containing parts that used to be in bfin_optimize_loop. (bfin_discover_loop, bfin_discover_loops, free_loops, bfin_reorder_loops): Remove. (hwloop_pattern_reg): New static function. (bfin_doloop_hooks): New variable. (bfin_reorg_loops): Remove most code, call reorg_loops. * config/bfin/bfin.md (doloop_end splitter): Also enable if loop counter is a memory_operand. From-SVN: r175985
2011-07-05Add --param case-values-thresholdMichael Meissner1-1/+1
From-SVN: r175878
2011-06-28* Makefile.in (LIBGCC2_CFLAGS): Remove -D__GCC_FLOAT_NOT_NEEDED.Joseph Myers1-1/+1
From-SVN: r175607
2011-06-28common.opt (in_lto_p): New Variable entry.Joseph Myers1-3/+2
* common.opt (in_lto_p): New Variable entry. * flags.h (in_lto_p): Move to common.opt. * gcc.c: Include params.h. (set_option_handlers): Also use common_handle_option and target_handle_option. (main): Call global_init_params, finish_params and init_options_struct. * opts.c (debug_type_names): Move from toplev.c. (print_filtered_help): Access quiet_flag through opts pointer. (common_handle_option): Return early in the driver for some options. Access in_lto_p, dwarf_version and warn_maybe_uninitialized through opts pointer. * toplev.c (in_lto_p): Move to common.opt. (debug_type_names): Move to opts.c. * Makefile.in (OBJS): Remove opts.o. (OBJS-libcommon-target): Add opts.o. (gcc.o): Update dependencies. From-SVN: r175591
2011-06-28genattr-common.c: New.Joseph Myers1-7/+11
* genattr-common.c: New. Based on genattr.c. * Makefile.in (INSN_ATTR_H): Include insn-attr-common.h. (MOSTLYCLEANFILES): Add insn-attr-common.h. (opts.o): Update dependencies. (.PRECIOUS): Add insn-attr-common.h. (simple_rtl_generated_h): Add insn-attr-common.h. (build/genattr-common.o): New. (genprogrtl): Add attr-common. * genattr.c (main): Include insn-attr-common.h. Don't generate definitions of DELAY_SLOTS or INSN_SCHEDULING. * opts.c: Include insn-attr-common.h instead of rtl.h and insn-attr.h. From-SVN: r175579
2011-06-23params.c: Include common/common-target.h.Joseph Myers1-6/+5
* params.c: Include common/common-target.h. Don't include tm.h. (lang_independent_params): Move from toplev.c. (global_init_params): New. * params.h (global_init_params): Declare. * target.def (default_params): Move to common-target.def. * toplev.c (lang_independent_options): Remove. (lang_independent_params): Move to params.c. (general_init): Use global_init_params. * common/common-target.def (option_default_params): Move from target.def. * common/config/ia64/ia64-common.c: Include params.h. (ia64_option_default_params, TARGET_OPTION_DEFAULT_PARAMS): Move from ia64.c. * common/config/rs6000/rs6000-common.c: Include params.h. (rs6000_option_default_params, TARGET_OPTION_DEFAULT_PARAMS): Move from rs6000.c. * common/config/sh/sh-common.c: Include params.h. (sh_option_default_params, TARGET_OPTION_DEFAULT_PARAMS): Move from sh.c. * common/config/spu/spu-common.c: Include params.h. (spu_option_default_params, TARGET_OPTION_DEFAULT_PARAMS): Move from spu.c. * config/ia64/ia64.c (ia64_option_default_params, TARGET_OPTION_DEFAULT_PARAMS): Move to ia64-common.c. * config/rs6000/rs6000.c (rs6000_option_default_params, TARGET_OPTION_DEFAULT_PARAMS): Move to rs6000-common.c. * config/sh/sh.c (sh_option_default_params, TARGET_OPTION_DEFAULT_PARAMS): Move to sh-common.c. * config/spu/spu.c (spu_option_default_params, TARGET_OPTION_DEFAULT_PARAMS): Move to spu-common.c. * Makefile.in (OBJS): Remove params.o. (OBJS-libcommon-target): Add params.o. (params.o, $(common_out_object_file)): Update dependencies. * doc/tm.texi: Regenerate. From-SVN: r175330
2011-06-21gcc_update (gcc/config/avr/avr-tables.opt): New dependencies.Joseph Myers1-1/+1
contrib: * gcc_update (gcc/config/avr/avr-tables.opt): New dependencies. gcc: * config/avr/avr-mcus.def, config/avr/genopt.sh: New files. * config/avr/avr-tables.opt: New file (generated). * config.gcc (avr-*-*): Use avr/avr-tables.opt. * config/avr/avr-devices.c (avr_mcu_types): Move contents to avr-mcus.def. * config/avr/avr.c (avr_help, TARGET_HELP): Remove. (avr_option_override): Don't process -mmcu= argument here. Set avr_current_device using avr_mcu_index. (avr_file_start): Use avr_current_device->name instead of avr_mcu_name. * config/avr/avr.opt (mmcu=): Use Enum. * config/avr/t-avr (avr-devices.o): Update dependencies. ($(srcdir)/config/avr/avr-tables.opt): New. * target.def (help): Remove. * doc/tm.texi.in (TARGET_HELP): Remove. * doc/tm.texi: Regenerate. * opts.c: Don't include target.h. (common_handle_option): Don't call targetm.help. * system.h (TARGET_HELP): Poison. * Makefile.in (opts.o): Update dependencies. From-SVN: r175248
2011-06-21Makefile.in (dg_target_exps): Set.Jakub Jelinek1-4/+12
* Makefile.in (dg_target_exps): Set. (check_gcc_parallelize): Parallelize gcc testing into 10 jobs instead of 7, try to divide it more evenly. * Make-lang.in (check_gfortran_parallelize): Parallelize dg.exp into 6 jobs instead of 3. * testsuite/Makefile.am (check_DEJAGNU_normal_targets): Add check-DEJAGNUnormal[4-9]. (check-DEJAGNU): Split into 10 jobs for parallel testing instead of 4. * testsuite/Makefile.in: Regenerated. From-SVN: r175238
2011-06-15target-def.h (TARGET_HAVE_NAMED_SECTIONS): Move to common/common-target-def.h.Joseph Myers1-25/+30
* target-def.h (TARGET_HAVE_NAMED_SECTIONS): Move to common/common-target-def.h. * target.def (default_target_flags, handle_option, supports_split_stack, optimization_table, init_struct, except_unwind_info, unwind_tables_default, have_named_sections): Move to common/common-target.def. * target.h (enum opt_levels, struct default_options): Move to common/common-target.h. * targhooks.c (default_except_unwind_info, dwarf2_except_unwind_info, sjlj_except_unwind_info, default_target_handle_option, empty_optimization_table): Move to common/common-targhooks.c. * targhooks.h (default_except_unwind_info, dwarf2_except_unwind_info, sjlj_except_unwind_info, default_target_handle_option, empty_optimization_table): Move to common/common-targhooks.h. * common/common-target-def.h: Include common/common-targhooks.h. (TARGET_HAVE_NAMED_SECTIONS): Define if TARGET_ASM_NAMED_SECTION defined. * common/common-target.def (handle_option, option_init_struct, option_optimization_table, default_target_flags, except_unwind_info, supports_split_stack, unwind_tables_default, have_named_sections): Move from target.def. (HOOK_PREFIX): Undefine at end of file. * common/common-target.h: Include input.h. (enum opt_levels, struct default_options): Move from target.h. * common/common-targhooks.c, common/common-targhooks.h: New. * config.gcc (target_has_targetm_common): Default to yes. (moxie*): Set target_has_targetm_common=no. (hppa*-*-*): Don't set target_has_targetm_common=yes. * doc/tm.texi: Regenerate. * Makefile.in (COMMON_TARGET_H): Add $(INPUT_H). (C_TARGET_DEF_H): Add common/common-targhooks.h. (GCC_OBJS): Remove vec.o. (OBJS): Remove hooks.o and vec.o. (OBJS-libcommon-target): Add vec.o, hooks.o and common/common-targhooks.o. (c-family/c-common.o, c-family/c-cppbuiltin.o, lto-opts.o, tree.o, tree-tailcall.o, opts.o, toplev.o, varasm.o, function.o, except.o, expr.o, explow.o, dbxout.o, dwarf2out.o, cfgrtl.o, haifa-sched.o, cfglayout.o, $(out_object_file), $(common_out_object_file)): Update dependencies. (common/common-targhooks.o): New. * common/config/default-common.c: Include tm.h. Add FIXME comment. * common/config/pa/pa-common.c: Include more headers. Take copyright dates from pa.c. (pa_option_optimization_table, pa_handle_option, TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION): Move from pa.c. * common/config/alpha/alpha-common.c, common/config/arm/arm-common.c, common/config/avr/avr-common.c, common/config/bfin/bfin-common.c, common/config/cris/cris-common.c, common/config/fr30/fr30-common.c, common/config/frv/frv-common.c, common/config/h8300/h8300-common.c, common/config/i386/i386-common.c, common/config/ia64/ia64-common.c, common/config/iq2000/iq2000-common.c, common/config/lm32/lm32-common.c, common/config/m32c/m32c-common.c, common/config/m32r/m32r-common.c, common/config/m68k/m68k-common.c, common/config/mcore/mcore-common.c, common/config/mep/mep-common.c, common/config/microblaze/microblaze-common.c, common/config/mips/mips-common.c, common/config/mmix/mmix-common.c, common/config/mn10300/mn10300-common.c, common/config/pdp11/pdp11-common.c, common/config/picochip/picochip-common.c, common/config/rs6000/rs6000-common.c, common/config/rx/rx-common.c, common/config/s390/s390-common.c, common/config/score/score-common.c, common/config/sh/sh-common.c, common/config/sparc/sparc-common.c, common/config/spu/spu-common.c, common/config/v850/v850-common.c, common/config/vax/vax-common.c, common/config/xstormy16/xstormy16-common.c, common/config/xtensa/xtensa-common.c: New. * config/alpha/alpha.c: Include common/common-target.h. (alpha_option_optimization_table, alpha_handle_option, TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION, TARGET_OPTION_OPTIMIZATION_TABLE): Move to alpha-common.c. * config/arm/arm-protos.h (arm_except_unwind_info): Declare. * config/arm/arm.c (arm_option_optimization_table, TARGET_DEFAULT_TARGET_FLAGS, TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_EXCEPT_UNWIND_INFO, arm_except_unwind_info): Move to arm-common.c. * config/avr/avr.c (avr_option_optimization_table, TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_EXCEPT_UNWIND_INFO): Move to avr-common.c. * config/bfin/bfin.c (struct bfin_cpu): Move to bfin.h. (bfin_cpus, bfin_handle_option, TARGET_HANDLE_OPTION, TARGET_DEFAULT_TARGET_FLAGS): Move to bfin-common.c. * config/bfin/bfin.h struct bfin_cpu): Move from bfin.c. * config/cris/cris.c (cris_option_optimization_table, TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION, TARGET_OPTION_OPTIMIZATION_TABLE, cris_handle_option): Move to cris-common.c. * config/fr30/fr30.c (fr30_option_optimization_table, TARGET_EXCEPT_UNWIND_INFO, TARGET_OPTION_OPTIMIZATION_TABLE): Move to fr30-common.c. * config/frv/frv.c (frv_option_optimization_table, MASK_DEFAULT_ALLOC_CC, TARGET_DEFAULT_TARGET_FLAGS, TARGET_OPTION_OPTIMIZATION_TABLE): Move to frv-common.c. * config/h8300/h8300.c (h8300_option_optimization_table, TARGET_DEFAULT_TARGET_FLAGS, TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_EXCEPT_UNWIND_INFO): Move to h8300-common.c. * config/i386/i386-protos.h (ix86_handle_option): Declare. * config/i386/i386.c: Include common/common-target.h. (OPTION_MASK_ISA_MMX_SET, OPTION_MASK_ISA_3DNOW_SET, OPTION_MASK_ISA_SSE_SET, OPTION_MASK_ISA_SSE2_SET, OPTION_MASK_ISA_SSE3_SET, OPTION_MASK_ISA_SSSE3_SET, OPTION_MASK_ISA_SSE4_1_SET, OPTION_MASK_ISA_SSE4_2_SET, OPTION_MASK_ISA_AVX_SET, OPTION_MASK_ISA_FMA_SET, OPTION_MASK_ISA_SSE4_SET, OPTION_MASK_ISA_SSE4A_SET, OPTION_MASK_ISA_FMA4_SET, OPTION_MASK_ISA_XOP_SET, OPTION_MASK_ISA_LWP_SET, OPTION_MASK_ISA_AES_SET, OPTION_MASK_ISA_PCLMUL_SET, OPTION_MASK_ISA_ABM_SET, OPTION_MASK_ISA_BMI_SET, OPTION_MASK_ISA_TBM_SET, OPTION_MASK_ISA_POPCNT_SET, OPTION_MASK_ISA_CX16_SET, OPTION_MASK_ISA_SAHF_SET, OPTION_MASK_ISA_MOVBE_SET, OPTION_MASK_ISA_CRC32_SET, OPTION_MASK_ISA_FSGSBASE_SET, OPTION_MASK_ISA_RDRND_SET, OPTION_MASK_ISA_F16C_SET, OPTION_MASK_ISA_MMX_UNSET, OPTION_MASK_ISA_3DNOW_UNSET, OPTION_MASK_ISA_3DNOW_A_UNSET, OPTION_MASK_ISA_SSE_UNSET, OPTION_MASK_ISA_SSE2_UNSET, OPTION_MASK_ISA_SSE3_UNSET, OPTION_MASK_ISA_SSSE3_UNSET, OPTION_MASK_ISA_SSE4_1_UNSET, OPTION_MASK_ISA_SSE4_2_UNSET, OPTION_MASK_ISA_AVX_UNSET, OPTION_MASK_ISA_FMA_UNSET, OPTION_MASK_ISA_SSE4_UNSET, OPTION_MASK_ISA_SSE4A_UNSET, OPTION_MASK_ISA_FMA4_UNSET, OPTION_MASK_ISA_XOP_UNSET, OPTION_MASK_ISA_LWP_UNSET, OPTION_MASK_ISA_AES_UNSET, OPTION_MASK_ISA_PCLMUL_UNSET, OPTION_MASK_ISA_ABM_UNSET, OPTION_MASK_ISA_BMI_UNSET, OPTION_MASK_ISA_TBM_UNSET, OPTION_MASK_ISA_POPCNT_UNSET, OPTION_MASK_ISA_CX16_UNSET, OPTION_MASK_ISA_SAHF_UNSET, OPTION_MASK_ISA_MOVBE_UNSET, OPTION_MASK_ISA_CRC32_UNSET, OPTION_MASK_ISA_FSGSBASE_UNSET, OPTION_MASK_ISA_RDRND_UNSET, OPTION_MASK_ISA_F16C_UNSET, ix86_handle_option, ix86_option_optimization_table, ix86_option_init_struct, ix86_supports_split_stack, TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION, TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_OPTION_INIT_STRUCT, TARGET_SUPPORTS_SPLIT_STACK): Move to i386-common.c. * config/i386/t-i386 (i386.o): Update dependencies. * config/ia64/ia64-protos.h (ia64_except_unwind_info): Declare. * config/ia64/ia64.c (ia64_option_optimization_table, TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_EXCEPT_UNWIND_INFO, TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION, ia64_handle_option): Move to ia64-common.c. * config/iq2000/iq2000.c (iq2000_option_optimization_table, TARGET_OPTION_OPTIMIZATION_TABLE): Move to iq2000-common.c. * config/lm32/lm32.c (lm32_option_optimization_table, TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_EXCEPT_UNWIND_INFO): Move to lm32-common.c. * config/m32c/m32c.c (TARGET_HAVE_NAMED_SECTIONS): Move to m32c-common.c. * config/m32r/m32r.c (m32r_option_optimization_table, TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION, TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_EXCEPT_UNWIND_INFO, m32r_handle_option): Move to m32r-common.c. (m32r_memory_move_cost): Remove comment referring to TARGET_HANDLE_OPTION. * config/m68k/m68k.c (TARGET_HANDLE_OPTION, m68k_handle_option): Move to m68k-common.c. * config/mcore/mcore.c (mcore_option_optimization_table, TARGET_DEFAULT_TARGET_FLAGS, TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_EXCEPT_UNWIND_INFO): Move to mcore-common.c. * config/mep/mep.c (mep_option_optimization_table, mep_handle_option, TARGET_HANDLE_OPTION, TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_DEFAULT_TARGET_FLAGS): Move to mep-common.c. * config/microblaze/microblaze.c (microblaze_option_optimization_table, TARGET_DEFAULT_TARGET_FLAGS, TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_EXCEPT_UNWIND_INFO): Move to microblaze-common.c. * config/mips/mips.c (mips_handle_option, mips_option_optimization_table, TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION): Move to mips-common.c. * config/mmix/mmix.c (mmix_option_optimization_table, TARGET_DEFAULT_TARGET_FLAGS, TARGET_OPTION_OPTIMIZATION_TABLE): Move to mmix-common.c. * config/mn10300/mn10300.c (mn10300_option_optimization_table, mn10300_handle_option, TARGET_EXCEPT_UNWIND_INFO, TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION, TARGET_OPTION_OPTIMIZATION_TABLE): Move to mn10300-common.c. * config/pa/pa.c: Include common/common-target.h. (pa_option_optimization_table, TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION, pa_handle_option): Move to pa-common.c. (pa_option_override): Use targetm_common.except_unwind_info. (pa_asm_output_mi_thunk, pa_function_section): Use targetm_common.have_named_sections. * config/pdp11/pdp11.c (pdp11_option_optimization_table, TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION, TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_OPTION_INIT_STRUCT, pdp11_handle_option, pdp11_option_init_struct): Move to pdp11-common.c. * config/picochip/picochip.c (picochip_option_optimization_table, TARGET_HAVE_NAMED_SECTIONS, TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_EXCEPT_UNWIND_INFO): Move to picochip-common.c. * config/rs6000/rs6000.c: Include common/common-target.h. (rs6000_option_optimization_table, TARGET_HANDLE_OPTION, TARGET_OPTION_INIT_STRUCT, TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_DEFAULT_TARGET_FLAGS, rs6000_option_init_struct, rs6000_handle_option): Move to rs6000-common.c. * config/rs6000/t-rs6000 (rs6000.o): Update dependencies. * config/rx/rx.c (rx_handle_option, rx_option_optimization_table, TARGET_HANDLE_OPTION, TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_EXCEPT_UNWIND_INFO): Move to rx-common.c. * config/s390/s390.c (processor_flags_table, s390_option_optimization_table, s390_option_init_struct, s390_handle_option, TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION, TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_OPTION_INIT_STRUCT): Move to s390-common.c. * config/s390/s390.h (processor_flags_table): Declare. * config/score/score.c (score_option_optimization_table, TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION, TARGET_OPTION_OPTIMIZATION_TABLE, MASK_ALL_CPU_BITS, score_handle_option): Move to score-common.c. * config/sh/sh.c (sh_option_optimization_table, TARGET_OPTION_OPTIMIZATION_TABLE, TARGET_OPTION_INIT_STRUCT, TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION, sh_handle_option, sh_option_init_struct): Move to sh-common.c. * config/sparc/sparc.c: Include common/common-target.h. (sparc_option_optimization_table, TARGET_DEFAULT_TARGET_FLAGS, TARGET_OPTION_OPTIMIZATION_TABLE): Move to sparc-common.c. * config/spu/spu.c (TARGET_DEFAULT_TARGET_FLAGS, TARGET_OPTION_INIT_STRUCT, TARGET_EXCEPT_UNWIND_INFO, spu_option_init_struct): Move to spu-common.c. * config/stormy16/stormy16.c (xstorym16_option_optimization_table, TARGET_OPTION_OPTIMIZATION_TABLE): Move to xstormy16-common.c. * config/v850/v850.c (small_memory_physical_max, v850_handle_memory_optionn v850_handle_option, v850_option_optimization_table, TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION, TARGET_OPTION_OPTIMIZATION_TABLE): Move to v850-common.c. * config/vax/vax.c (TARGET_DEFAULT_TARGET_FLAGS): Move to vax-common.c. * config/xtensa/xtensa.c (xtensa_option_optimization_table, TARGET_DEFAULT_TARGET_FLAGS, TARGET_OPTION_OPTIMIZATION_TABLE): Move to xtensa-common.c. * cfglayout.c: Include common/common-target.h. (fixup_reorder_chain): Use targetm_common.have_named_sections. * cfgrtl.c: Include common/common-target.h. (force_nonfallthru_and_redirect, commit_one_edge_insertion): Use targetm_common.have_named_sections. * dbxout.c: Include common/common-target.h. (dbxout_function_end): Use targetm_common.have_named_sections. * defaults.h (STACK_OLD_CHECK_PROTECT, STACK_CHECK_PROTECT): Use targetm_common.except_unwind_info. * dwarf2out.c: Include common/common-target.h. (dwarf2out_do_frame, dwarf2out_do_cfi_asm, dwarf2out_begin_prologue, dwarf2out_frame_init, dwarf2out_frame_finish, dwarf2out_assembly_start): Use targetm_common.except_unwind_info. * except.c: Include common/common-target.h. (init_eh, finish_eh_generation, output_one_function_exception_table): Use targetm_common.except_unwind_info. (switch_to_exception_section): Use targetm_common.have_named_sections. * explow.c: Include common/common-target.h. * expr.c: Include common/common-target.h. (build_personality_function): Use targetm_common.except_unwind_info. * function.c: Include common/common-target.h. (expand_function_end): Use targetm_common.except_unwind_info. * haifa-sched.c: Include common/common-target.h. (sched_create_recovery_edges): Use targetm_common.have_named_sections. * lto-opts.c: Include common/common-target.h instead of target.h. (lto_reissue_options): Use targetm_common.handle_option. * opts.c: Include common/common-target.h. (target_handle_option): Use targetm_common.handle_option. (init_options_struct): Update comment referring to targetm.target_option.optimization. Use targetm_common.default_target_flags, targetm_common.unwind_tables_default and targetm_common.option_init_struct. (default_options_optimization): Use targetm_common.option_optimization_table. (finish_options): Use targetm_common.except_unwind_info, targetm_common.unwind_tables_default, targetm_common.have_named_sections and targetm_common.supports_split_stack. * toplev.c: Include common/common-target.h. (process_options): Use targetm_common.have_named_sections. * tree-tailcall.c: Include common/common-target.h. (suitable_for_tail_call_opt_p): Use targetm_common.except_unwind_info. * tree.c: Include common/common-target.h. (build_common_builtin_nodes): Use targetm_common.except_unwind_info. * varasm.c: Include common/common-target.h. (resolve_unique_section, hot_function_section, default_function_section): Use targetm_common.have_named_sections. ada: * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o. (ada/utils.o): Update dependencies. * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add ../../../libcpp/libcpp.a. * gcc-interface/utils.c: Include common/common-target.h. (process_attributes): Use targetm_common.have_named_sections. c-family: * c-common.c: Include common/common-target.h. (handle_section_attribute): Use targetm_common.have_named_sections. * c-cppbuiltin.c: Include common/common-target.h. (c_cpp_builtins): Use targetm_common.except_unwind_info. cp: * Make-lang.in (cp/method.o): Update dependencies. * method.c: Include common/common-target.h. (use_thunk): Use targetm_common.have_named_sections. go: * Make-lang.in (go/go-lang.o, go/go-backend.o): Update dependencies. * go-backend.c: Include common/common-target.h. (go_write_export_data): Use targetm_common.have_named_sections. * go-lang.c: Include common/common-target.h. (go_langhook_init_options_struct): Use targetm_common.supports_split_stack. po: * exgettext: Handle common/ directory and subdirectories. From-SVN: r175064
2011-06-14common-target-def.h, [...]: New files.Joseph Myers1-4/+26
* common/common-target-def.h, common/common-target.def, common/common-target.h, common/config/default-common.c, common/config/pa/pa-common.c: New files. * Makefile.in (common_out_file, common_out_object_file, COMMON_TARGET_H, COMMON_TARGET_DEF_H): New. (OBJS-libcommon-target): Include $(common_out_object_file). (prefix.o): Update dependencies. ($(common_out_object_file), common/common-target-hooks-def.h, s-common-target-hooks-def-h): New. (s-tm-texi): Also check timestamp on common-target.def. (build/genhooks.o): Update dependencies. * config.gcc (common_out_file, target_has_targetm_common): Define. * config/pa/som.h (ALWAYS_STRIP_DOTDOT): Replace with TARGET_ALWAYS_STRIP_DOTDOT. * configure.ac (common_out_object_file): Define. (common_out_file, common_out_object_file): Substitute. (common): Create directory. * configure: Regenerate. * doc/tm.texi.in (targetm_common): Document. (TARGET_ALWAYS_STRIP_DOTDOT): Add @hook entry. * doc/tm.texi: Regenerate. * genhooks.c (hook_array): Also include common/common-target.def. * prefix.c (tm.h): Don't include. (common/common-target.h): Include. (ALWAYS_STRIP_DOTDOT): Don't define. (update_path): Use targetm_common.always_strip_dotdot instead of ALWAYS_STRIP_DOTDOT. * system.h (ALWAYS_STRIP_DOTDOT): Poison. From-SVN: r175052
2011-06-12re PR middle-end/48836 (internal compiler error: in execute_todo, at ↵Jan Hubicka1-1/+1
passes.c:1261) PR middle-end/48836 * ipa-inline-transform.c: Include tree-pass.h (inline_transform): Set TODO_update_ssa_only_virtuals. * Makefile.in (ipa-inline-transform.o): Add tree-pass.h. From-SVN: r174970
2011-06-09netbsd.h (ENABLE_EXECUTE_STACK): Remove.Rainer Orth1-1/+1
2011-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> Joseph Myers <joseph@codesourcery.com> gcc: * config/alpha/netbsd.h (ENABLE_EXECUTE_STACK): Remove. (HAVE_ENABLE_EXECUTE_STACK): Define. * config/alpha/osf5.h (ENABLE_EXECUTE_STACK): Remove. (HAVE_ENABLE_EXECUTE_STACK): Define. * config/darwin.h (ENABLE_EXECUTE_STACK): Remove. (HAVE_ENABLE_EXECUTE_STACK): Define. * config/i386/mingw32.h (MINGW_ENABLE_EXECUTE_STACK): Remove. (ENABLE_EXECUTE_STACK): Remove. (HAVE_ENABLE_EXECUTE_STACK): Define. [IN_LIBGCC2]: Don't include <windows.h>. * config/i386/netbsd-elf.h (ENABLE_EXECUTE_STACK): Remove. (HAVE_ENABLE_EXECUTE_STACK): Define. * config/i386/netbsd64.h (ENABLE_EXECUTE_STACK): Remove. (HAVE_ENABLE_EXECUTE_STACK): Define. * config/netbsd.h (NETBSD_ENABLE_EXECUTE_STACK): Remove. * config/openbsd.h (ENABLE_EXECUTE_STACK): Remove. (HAVE_ENABLE_EXECUTE_STACK): Define. * config/sol2.h (ENABLE_EXECUTE_STACK): Remove. (HAVE_ENABLE_EXECUTE_STACK): Define. * config/sparc/freebsd.h (ENABLE_EXECUTE_STACK): Remove. (HAVE_ENABLE_EXECUTE_STACK): Define. * config/sparc/netbsd-elf.h (ENABLE_EXECUTE_STACK): Remove. (HAVE_ENABLE_EXECUTE_STACK): Define. * config/alpha/alpha.c (alpha_trampoline_init): Test HAVE_ENABLE_EXECUTE_STACK. * config/i386/i386.c (ix86_trampoline_init): Likewise. * config/sparc/sparc.c (sparc32_initialize_trampoline): Likewise. (sparc64_initialize_trampoline): Likewise. * libgcc2.c [L_enable_execute_stack]: Remove. * system.h (ENABLE_EXECUTE_STACK): Poison. * doc/tm.texi.in (Trampolines, ENABLE_EXECUTE_STACK): Remove. * doc/tm.texi: Regenerate. * Makefile.in (LIBGCC2_CFLAGS): Add -fbuilding-libgcc. gcc/c-family: * c.opt (fbuilding-libgcc): New option. * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc. libgcc: * enable-execute-stack-empty.c: New file. * enable-execute-stack-mprotect.c: New file. * config/i386/enable-execute-stack-mingw32.c: New file. * config.host (enable_execute_stack): New variable. Select appropriate variants. * configure.ac: Link enable-execute-stack.c to $enable_execute_stack. * configure: Regenerate. * Makefile.in (LIB2ADD): Add enable-execute-stack.c. (lib2funcs): Remove _enable_execute_stack. Co-Authored-By: Joseph Myers <joseph@codesourcery.com> From-SVN: r174843
2011-06-06Makefile.in (lto-compress.o): Add dependency on LTO_STREAMER_H.Diego Novillo1-3/+4
* Makefile.in (lto-compress.o): Add dependency on LTO_STREAMER_H. (cgraph.o): Likewise. (cgraphunit.o): Likewise. * cgraphunit.c: Include lto-streamer.h (cgraph_finalize_compilation_unit): Call lto_streamer_hooks_init if LTO is enabled. * lto-streamer-in.c (unpack_value_fields): Call streamer_hooks.unpack_value_fields if set. (lto_materialize_tree): For unhandled nodes, first try to call lto_streamer_hooks.alloc_tree, if it exists. (lto_input_ts_decl_common_tree_pointers): Move reading of DECL_INITIAL to lto_streamer_read_tree. (lto_read_tree): Call lto_streamer_hooks.read_tree if set. (lto_streamer_read_tree): New. (lto_reader_init): Rename from lto_init_reader. Move initialization code to lto/lto.c. * lto-streamer-out.c (pack_value_fields): Call streamer_hooks.pack_value_fields if set. (lto_output_tree_ref): For tree nodes that are not normally indexable, call streamer_hooks.indexable_with_decls_p before giving up. (lto_output_ts_decl_common_tree_pointers): Move handling for FUNCTION_DECL and TRANSLATION_UNIT_DECL to lto_streamer_write_tree. (lto_output_tree_header): Call streamer_hooks.is_streamable instead of lto_is_streamable. Call lto_streamer_hooks.output_tree_header if set. (lto_write_tree): Call lto_streamer_hooks.write_tree if set. (lto_streamer_write_tree): New. (lto_output): Call lto_streamer_init directly. (lto_writer_init): Remove. * lto-streamer.c (streamer_hooks): New. (lto_streamer_cache_create): Call streamer_hooks.preload_common_nodes instead of lto_preload_common_nodes. (lto_is_streamable): Move from lto-streamer.h (lto_streamer_hooks_init): New. (streamer_hooks): New. (streamer_hooks_init): New. * lto-streamer.h (struct output_block): Forward declare. (struct lto_input_block): Likewise. (struct data_in): Likewise. (struct bitpack_d): Likewise. (struct streamer_hooks): Declare. (streamer_hooks): Declare. (lto_streamer_hooks_init): Declare. (lto_streamer_write_tree): Declare. (lto_streamer_read_tree): Declare. (streamer_hooks_init): Declare. (lto_is_streamable): Move to lto-streamer.c lto/ChangeLog * lto.c (lto_init): New. (lto_main): Call it. From-SVN: r174709
2011-06-03Makefile.in (LIB2ADDEHDEP): Remove.Rainer Orth1-1/+0
gcc: * Makefile.in (LIB2ADDEHDEP): Remove. * config/arm/t-bpabi (LIB2ADDEHDEP): Remove. * config/arm/t-symbian (LIB2ADDEHDEP): Remove. * config/picochip/t-picochip (LIB2ADDEHDEP): Remove. * config/t-darwin (LIB2ADDEHDEP): Remove. * config/t-freebsd (LIB2ADDEHDEP): Remove. * config/t-linux (LIB2ADDEHDEP): Remove. libgcc: * config/s390/t-tpf (LIB2ADDEHDEP): Remove. * config/t-sol2 (LIB2ADDEH): Use gcc_srcdir, add emutls.c. From-SVN: r174606
2011-05-26Makefile.in (srcdirify): Change order so that libgcc_objdir is substituted ↵Bernd Schmidt1-6/+8
first. * Makefile.in (srcdirify): Change order so that libgcc_objdir is substituted first. * libgcc-std.ver: Delete file. From-SVN: r174284
2011-05-25libgcc2.h (__NW, __NDW): Define using a __gnu_ prefix if LIBGCC2_GNU_PREFIX ↵Bernd Schmidt1-1/+4
is defined. gcc/ * libgcc2.h (__NW, __NDW): Define using a __gnu_ prefix if LIBGCC2_GNU_PREFIX is defined. (__N): New macro. (__powisf2, __powidf2, __powitf2, __powixf2, __bswapsi2, __bswapdi2, __mulsc3, __muldc3, __mulxc3, __multc3, __divsc3, __divdc3, __divxc3, __divtc3, __udiv_w_sdiv, __clear_cache, __enable_execute_stack, __clz_tab): Define using __N. (__absvsi2, __negvsi2, __addvsi3, __subvsi3, __mulvsi3): Likewise if COMPAT_SIMODE_TRAPPING_ARITHMETIC. * target.def (libfunc_gnu_prefix): New hook. * doc/tm.texi.in (LIBGCC2_GNU_PREFIX): Document. (TARGET_LIBFUNC_GNU_PREFIX): Add hook. * doc/tm.texi: Regenerate. * system.h (LIBGCC2_GNU_PREFIX): Poison. * optabs.c (gen_libfunc): Take the libfunc_gnu_prefix hook into account. (gen_interclass_conv_libfunc, gen_intraclass_conv_libfunc): Likewise. (init_optabs): Likewise for the bswap libfuncs. * tree.c (build_common_builtin_nodes): Likewise for complex multiply and divide. * config/t-slibgcc-elf-ver (SHLIB_MAPFILES): Use $$(libgcc_objdir). * config/t-slibgcc-sld (SHLIB_MAPFILES): Likewise. * libgcc-std.ver: Remove. * Makefile.in (srcdirify): Handle $$(libgcc_objdir). * config/frv/t-linux (SHLIB_MAPFILES): Use $$(libgcc_objdir) for libgcc-std.ver. * config/i386/t-linux (SHLIB_MAPFILES): Likewise. * config/mips/t-slibgcc-irix (SHLIB_MAPFILES): Likewise. * config/rs6000/t-aix43 (SHLIB_MAPFILES): Likewise. * config/rs6000/t-aix52 (SHLIB_MAPFILES): Likewise. * config/sparc/t-linux (SHLIB_MAPFILES): Likewise. * config/i386/t-linux (SHLIB_MAPFILES): Likewise. * config/i386/t-linux (SHLIB_MAPFILES): Likewise. * config/fixed-bit.h (FIXED_OP): Define differently depending on LIBGCC2_GNU_PREFIX. All uses changed not to pass leading underscores. (FIXED_CONVERT_OP, FIXED_CONVERT_OP2): Likewise. libgcc/ * libgcc-std.ver.in: New file. * Makefile.in (LIBGCC_VER_GNU_PREFIX, LIBGCC_VER_SYMBOLS_PREFIX): New variables. (libgcc-std.ver): New rule. * config/t-gnu-prefix: New file. From-SVN: r174187
2011-05-24Makefile.in (GCC_OBJS): Remove opts-common.o and options.o.Joseph Myers1-12/+21
* Makefile.in (GCC_OBJS): Remove opts-common.o and options.o. (OBJS): Remove options.o, opts-common.o and prefix.o. (OBJS-libcommon-target): New. (ALL_HOST_BACKEND_OBJS): Include $(OBJS-libcommon-target). (BACKEND): Include libcommon-target.a. (MOSTLYCLEANFILES): Include libcommon-target.a. (libcommon-target.a): New. (xgcc$(exeext), cpp$(exeext)): Use libcommon-target.a instead of prefix.o. ada: * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include $(EXTRA_GNAT1_OBJS). (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS). (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove. (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a. * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon-target.a instead of prefix.o. cp: * Make-lang.in (GXX_OBJS): Remove prefix.o. (g++$(exeext)): Use libcommon-target.a. (CXX_C_OBJS): Remove prefix.o. fortran: * Make-lang.in (GFORTRAN_D_OBJS): Remove prefix.o. (gfortran$(exeext)): Use libcommon-target.a. go: * Make-lang.in (GCCGO_OBJS): Remove prefix.o. (gccgo$(exeext)): Use libcommon-target.a. java: * Make-lang.in ($(XGCJ)$(exeext)): Use libcommon-target.a instead of prefix.o. From-SVN: r174109
2011-05-23optc-save-gen.awk: New.Joseph Myers1-7/+12
* optc-save-gen.awk: New. Based on optc-gen.awk. Don't generate parts of output shared with the driver. * optc-gen.awk: Don't generate parts of output not shared with the driver. * opth-gen.awk: Remove GCC_DRIVER conditionals. * doc/options.texi (SourcerInclude): Mention options-save.c. * Makefile.in (GCC_OBJS): Use options.o instead of gcc-options.o. (OBJS): Add options-save.o. (options-save.c, options-save.o): New. (options.o): Update dependencies. (gcc-options.o): Remove. (mostlyclean): Remove options-save.c. From-SVN: r174085
2011-05-23re PR debug/49032 (-gstabs generates reference to deleted static variable)Jakub Jelinek1-1/+2
PR debug/49032 * dbxout.c: Include cgraph.h. (dbxout_expand_expr): If a VAR_DECL is TREE_STATIC, not written and without value expr, return NULL if no varpool node exists for it or if it is not needed. * Makefile.in (dbxout.o): Depend on $(CGRAPH_H). * gcc.dg/debug/pr49032.c: New test. From-SVN: r174083
2011-05-23gthr-gnat.c: Remove.Rainer Orth1-1/+1
gcc: * gthr-gnat.c: Remove. * gthr-gnat.h: Remove. * Makefile.in (LIB2ADDEH): Remove $(srcdir)/gthr-gnat.c. * config/t-freebsd (LIB2ADDEH): Likewise. * config/t-linux (LIB2ADDEH): Likewise. * config/t-sol2 (LIB2ADDEH): Likewise. * config/ia64/t-vms (LIB2ADDEH): Likewise. * configure.ac (target_thread_file): Remove gnat handling. * configure: Regenerate. * doc/install.texi (Configuration, --enable-threads): Remove gnat. gcc/po: * EXCLUDES: Remove gthr-gnat.c, gthr-gnat.h. libgcc: * config/s390/t-tpf (LIB2ADDEH): Remove $(gcc_srcdir)/gthr-gnat.c. From-SVN: r174064
2011-05-21opt-read.awk: New.Joseph Myers1-4/+8
* opt-read.awk: New. Split out of optc-gen.awk and opth-gen.awk. * optc-gen.awk: Move common code to opt-read.awk. * opth-gen.awk: Likewise. * Makefile.in (options.c, s-options-h): Update to use opt-read.awk. From-SVN: r173995
2011-05-20* Makefile.in: Update comment referring to $(OBJS-common).Joseph Myers1-1/+1
From-SVN: r173963
2011-05-20Makefile.in (LIBDEPS): Add libcommon.a.Joseph Myers1-34/+35
* Makefile.in (LIBDEPS): Add libcommon.a. (LIBS): Likewise. (GCC_OBJS): Remove diagnostic.o, pretty-print.o and input.o. (OBJS-common): Remove diagnostic.o, input.o, intl.o, pretty-print.o and version.o. (OBJS-libcommon): New. (ALL_HOST_BACKEND_OBJS): Add $(OBJS-libcommon). (BACKEND): Add libcommon.a. (MOSTLYCLEANFILES): Likewise. (libcommon.a): New. (xgcc$(exeext)): Don't explicitly use version.o and intl.o. (cpp$(exeext)): Likewise. (COLLECT2_OBJS): Remove intl.o, version.o, diagnostic.o, pretty-print.o and input.o. (lto-wrapper$(exeext)): Don't explicitly use intl.o. (lto-wrapper.o): Depend on $(DIAGNOSTIC_H). (errors.o): Remove. (mips-tfile): Don't explicitly use version.o. (mips-tdump): Likewise. (gcov.o): Depend on $(DIAGNOSTIC_H). (gcov-dump.o): Depend on intl.h and $(DIAGNOSTIC_H). (GCOV_OBJS): Remove intl.o, version.o and errors.o. (GCOV_DUMP_OBJS): Remove version.o and errors.o. * gcov-dump.c: Include intl.h and diagnostic.h. (main): Initialize diagnostics. * gcov.c: Include diagnostic.h. (fnotice): Remove. (main): Initialize diagnostics. * lto-wrapper.c: Include diagnostic.h. (main): Initialize diagnostics. ada: * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o. * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a instead of version.o. cp: * Make-lang.in (GXX_OBJS): Remove intl.o and version.o. fortran: * Make-lang.in (GFORTRAN_D_OBJS): Remove version.o and intl.o. go: * Make-lang.in (GCCGO_OBJS): Remove intl.o and version.o. java: * Make-lang.in ($(XGCJ)$(exeext)): Don't explicitly use intl.o and version.o. (JCFDUMP_OBJS): Remove errors.o, version.o and intl.o. (JVGENMAIN_OBJS): Remove errors.o and intl.o. (java/jcf-dump.o, java/jvgenmain.o): Depend in $(DIAGNOSTIC_H). * jcf-dump.c: Include diagnostic.h. (main): Initialize diagnostics. * jvgenmain.c: Include diagnostic.h. (main): Initialize diagnostics. From-SVN: r173958
2011-05-20* Makefile.in (OBJS-common, OBJS-md, OBJS-archive): Merge into OBJS.Michael Matz1-38/+31
From-SVN: r173957
2011-05-19collect2.c: Include diagnostic.h.Joseph Myers1-3/+5
* collect2.c: Include diagnostic.h. (fatal_perror, fatal, error, fancy_abort): Remove. (main): Set progname. Call xmalloc_set_program_name and diagnostic_initialize. (maybe_run_lto_and_relink, main, collect_execute, scan_prog_file, scan_libraries, resolve_lib_name): Call fatal_error instead of fatal and fatal_perror. * collect2.h (error, fatal, fatal_perror): Don't declare. * tlink.c: Include diagnostic-core.h. (recompile_files): Call fatal_error instead of fatal_perror. * Makefile.in (COLLECT2_OBJS): Include diagnostic.o, pretty-print.o and input.o. (collect2.o, tlink.o): Update dependencies. testsuite: * lib/prune.exe (prune_gcc_output): Expect "error:" in collect2 output. From-SVN: r173915
2011-05-10config.gcc (libgcc_tm_file): Define instead of including files from ↵Joseph Myers1-2/+11
../../libgcc/config/ in tm_file. gcc: * config.gcc (libgcc_tm_file): Define instead of including files from ../../libgcc/config/ in tm_file. * configure.ac (libgcc_tm_file_list, libgcc_tm_include_list): Define. * configure: Regenerate. * Makefile.in (libgcc_tm_file_list, libgcc_tm_include_list, libgcc_tm.h, cs-libgcc_tm.h): New. (TM_H): Include libgcc_tm.h and $(libgcc_tm_file_list). (clean): Remove libgcc_tm.h. * config/arm/symbian.h (RENAME_LIBRARY): Remove. * mkconfig.sh: Include libgcc_tm.h in tm.h if USED_FOR_TARGET. * system.h (DECLARE_LIBRARY_RENAMES): Poison. libgcc: * config/arm/symbian-lib.h: New. From-SVN: r173619
2011-05-04* config/alpha/alpha.h (CODE_MASK, MIPS_IS_STAB, MIPS_MARK_STAB)Rainer Orth1-4/+4
(MIPS_UNMARK_STAB, SHASH_SIZE, THASH_SIZE, ALIGN_SYMTABLE_OFFSET): Move ... * mips-tfile.c: ... here. Don't include coretypes.h, tm.h, filenames.h. (saber_stop): Remove definition and all calls. [__SABER__]: Remove. (__LINE__): Remove default. (Size_t, Ptrdiff_t): Remove definitions. Replace by size_t, ptrdiff_t. [!MIPS_DEBUGGING_INFO]: Remove. (SHASH_SIZE, THASH_SIZE): Remove defaults. (progname): Add const. (STATIC): Remove. Replace all uses by static. (ALIGN_SYMTABLE_OFFSET): Remove default. * mips-tdump.c: Don't include coretypes.h, tm.h. Remove !MIPS_IS_STAB guard. * Makefile.in (mips-tfile.o): Remove $(RTL_H), coretypes.h, $(TM_H), filenames.h dependencies. (mips-tdump.o): Remove $(RTL_H), coretypes.h, $(TM_H) dependencies. From-SVN: r173367
2011-04-30cgraph.h (cgraph_postorder): Remove declaration.Martin Jambor1-4/+5
2011-04-29 Martin Jambor <mjambor@suse.cz> * cgraph.h (cgraph_postorder): Remove declaration. * ipa-utils.h (ipa_free_postorder_info): Declare. (ipa_reverse_postorder): Likewise. * cgraphunit.c: Include ipa-utils.h. (cgraph_expand_all_functions): Update call to ipa_reverse_postorder. * ipa-inline.c: Include ipa-utils.h. (ipa_inline): Update call to ipa_reverse_postorder. * ipa-pure-const.c (propagate_pure_const): Update call to ipa_reduced_postorder and ipa_print_order. Call ipa_free_postorder_info to clean up. (propagate_nothrow): Likewise. * ipa-reference.c (propagate): Removed a useless call to ipa_utils_reduced_inorder, updated a call to ipa_reduced_postorder and ipa_print_order. Call ipa_free_postorder_info to clean up. * ipa.c: Include ipa-utils.h. (ipa_profile): Update call to ipa_reverse_postorder. (cgraph_postorder): Moved to... * ipa-utils.c (ipa_reverse_postorder): ...here and renamed. (ipa_utils_print_order): Renamed to ipa_print_order. (ipa_utils_reduced_inorder): Renamed to ipa_reduced_postorder. Updated comments. (ipa_free_postorder_info): New function. * passes.c: Include ipa-utils.h. (do_per_function_toporder): Update call to ipa_reverse_postorder. (ipa_write_summaries): Likewise. * Makefile.in (passes.o): Add IPA_UTILS_H to dependencies. (cgraphunit.o): Likewise. (ipa.o): Likewise. (ipa-inline.o): Likewise. lto/ * lto.c: Include ipa-utils.h. (lto_balanced_map): Update call to ipa_reverse_postorder. * Make-lang.in (lto/lto.o): Add IPA_UTILS_H to dependencies. From-SVN: r173197
2011-04-29In gcc/: 2011-04-29 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero1-0/+11
In gcc/: 2011-04-29 Nicola Pero <nicola.pero@meta-innovation.com> * Makefile.in (ENABLE_MAINTAINER_RULES): New. In gcc/cp/: 2011-04-29 Nicola Pero <nicola.pero@meta-innovation.com>, Mike Stump <mikestump@comcast.net> * Make-lang.in ($(srcdir)/cp/cfns.h): Enable the dependency only in maintainer mode. Use the --output-file option of gperf instead of > to prevent creating an empty cp/cfns.h when gperf is not available. From-SVN: r173178
2011-04-27Makefile.in (tree-ssa-structalias.o): Remove gt-tree-ssa-structalias.h ↵Richard Guenther1-2/+1
dependency. 2011-04-27 Richard Guenther <rguenther@suse.de> * Makefile.in (tree-ssa-structalias.o): Remove gt-tree-ssa-structalias.h dependency. (GTFILES): Remove tree-ssa-structalias.c. * tree.c (allocate_decl_uid): New function. (make_node_stat): Use it. (copy_node_stat): Likewise. * tree.h (allocate_decl_uid): Declare. * tree-ssa-alias.h (delete_alias_heapvars): Remove. * tree-ssa.c (delete_tree_ssa): Do not call delete_alias_heapvars. * tree-flow.h (struct var_ann_d): Remove is_heapvar flag. * tree-ssa-live.c (remove_unused_locals): Do not check is_heapvar flag. * tree-ssa-structalias.c (heapvar_for_stmt): Remove. (struct heapvar_map): Likewise. (heapvar_map_eq, heapvar_map_hash, heapvar_lookup, heapvar_insert): Likewise. (make_heapvar_for): Rename to ... (make_heapvar): ... this. Simplify. (fake_var_decl_obstack): New global var. (build_fake_var_decl): New function. (make_constraint_from_heapvar): Adjust. (handle_lhs_call): Likewise. (create_function_info_for): Likewise. (intra_create_variable_infos): Likewise. (init_alias_vars): Allocate fake_var_decl_obstack. (init_alias_heapvars, delete_alias_heapvars): Remove. (compute_points_to_sets): Do not call init_alias_heapvars. (ipa_pta_execute): Likewise. (delete_points_to_sets): Free fake_var_decl_obstack. * gcc.dg/tree-ssa/pr23382.c: Remove. From-SVN: r173030
2011-04-22gengtype.c (open_base_files): Add ipa-inline.h include.Jan Hubicka1-1/+2
* gengtype.c (open_base_files): Add ipa-inline.h include. * ipa-cp.c (ipcp_get_lattice, ipcp_lattice_from_jfunc): Move to ipa-prop.c update all uses. * ipa-prop.c: (ipa_get_lattice, ipa_lattice_from_jfunc): ... here. * ipa-inline-transform.c (inline_call): Use inline_merge_summary to merge summary of inlined function into former caller. * ipa-inline.c (max_benefit): Remove. (edge_badness): Compensate for removal of benefits. (update_caller_keys): Use reset_node_growth_cache/reset_edge_growth_cache. (update_callee_keys): Likewise. (update_all_callee_keys): Likewise. (inline_small_functions): Do not collect max_benefit; do not reset stimated_growth; call free_growth_caches and initialize_growth_caches. * ipa-inline.h (struct condition, type clause_t, struct predicate, struct size_time_entry): New structures. (INLINE_SIZE_SCALE, INLINE_TIME_SCALE, MAX_CLAUSES): New constants. (inline_summary): Remove size_inlining_benefit, time_inlining_benefit and estimated_growth. (edge_growth_cache_entry): New structure. (node_growth_cache, edge_growth_cache): New global vars. (estimate_growth): Turn into inline. (inline_merge_summary, do_estimate_edge_growth, do_estimate_edge_time, initialize_growth_caches, free_growth_caches): Declare. (estimate_edge_growth): Rewrite. (estimate_edge_time): Implement as inline cache lookup. (reset_node_growth_cache, reset_edge_growth_cache): New inline functions. (MAX_TIME): Reduce to allow multiplicatoin by INLINE_SIZE_SCALE. (NUM_CONDITIONS): New constant. (predicate_conditions): New enum. (IS_NOT_CONSTANT): New constant. (edge_removal_hook_holder): New var. (node_growth_cache, edge_growth_cache): New global vars. (true_predicate, single_cond_predicate, false_predicate, not_inlined_predicate, add_condition, add_clause, and_predicates, or_predicates, predicates_equal_p, evaulate_predicate, dump_condition, dump_clause, dump_predicate, account_size_time, evaulate_conditions_for_edge): New functions. (inline_summary_alloc): Move to heap. (inline_node_removal_hook): Clear condition and entry vectors. (inline_edge_removal_hook): New function. (initialize_growth_caches, free_growth_caches): New function. (dump_inline_summary): Update. (edge_execution_predicate): New function. (will_be_nonconstant_predicate): New function. (estimate_function_body_sizes): Compute BB and constantness predicates. (compute_inline_parameters): Do not clear estimated_growth. (estimate_edge_size_and_time): New function. (estimate_calls_size_and_time): New function. (estimate_callee_size_and_time): New function. (remap_predicate): New function. (inline_merge_summary): New function. (do_estimate_edge_time): New function based on... (estimate_edge_time): ... this one. (do_estimate_edge_growth): New function. (do_estimate_growth): New function based on.... (estimate_growth): ... this one. (inline_analyze_function): Analyze after deciding on jump functions. (inline_read_section): New function. (inline_read_summary): Use it. (inline_write_summary): Write all the new data. * ipa-prop.c (ipa_get_param_decl_index): Export. (ipa_lattice_from_jfunc): Move here from ipa-cp.c * ipa-prop.h (ipa_get_param_decl_index, ipa_lattice_from_jfunc): Declare. (ipa_get_lattice): Move hre from ipa-cp.c * Makefile.in (GTFILES): Add ipa-inline.h and ipa-inline-analysis.c * params.def (PARAM_EARLY_INLINING_INSNS): Set to 11. * cgraph.h (cgraph_clone_inlined_nodes, compute_inline_parameters, cgraph_edge_inlinable_p): Remove. * cgraphunit.c: Include ipainline.h (cgraph_process_new_functions): Update call of compute_inline_parameters. * gcc.dg/tree-ssa/pr38699.c: Fix testcase. From-SVN: r172873
2011-04-21Makefile.in (site.exp): Do not use tmp0 but site.tmp as temporary file name.Richard Guenther1-37/+37
2011-04-21 Richard Guenther <rguenther@suse.de> * Makefile.in (site.exp): Do not use tmp0 but site.tmp as temporary file name. From-SVN: r172826
2011-04-20Makefile.in (INTERNAL_FN_DEF, [...]): Define.Richard Sandiford1-2/+7
gcc/ * Makefile.in (INTERNAL_FN_DEF, INTERNAL_FN_H): Define. (GIMPLE_H): Include $(INTERNAL_FN_H). (OBJS-common): Add internal-fn.o. (internal-fn.o): New rule. * internal-fn.def: New file. * internal-fn.h: Likewise. * internal-fn.c: Likewise. * gimple.h: Include internal-fn.h. (GF_CALL_INTERNAL): New gf_mask. (gimple_statement_call): Put fntype into a union with a new internal_fn field. (gimple_build_call_internal): Declare. (gimple_build_call_internal_vec): Likewise. (gimple_call_same_target_p): Likewise. (gimple_call_internal_p): New function. (gimple_call_internal_fn): Likewise. (gimple_call_fntype): Return null for internal calls. (gimple_call_set_fntype): Assert that the function is not internal. (gimple_call_set_fn): Likewise. (gimple_call_set_fndecl): Likewise. (gimple_call_set_internal_fn): New function. (gimple_call_addr_fndecl): Handle null functions. (gimple_call_return_type): Likewise null types. * gimple.c (gimple_build_call_internal_1): New function. (gimple_build_call_internal): Likewise. (gimple_build_call_internal_vec): Likewise. (gimple_call_same_target_p): Likewise. (gimple_call_flags): Handle calls to internal functions. (gimple_call_fnspec): New function. (gimple_call_arg_flags, gimple_call_return_flags): Use it. (gimple_has_side_effects): Handle null functions. (gimple_rhs_has_side_effects): Likewise. (gimple_call_copy_skip_args): Handle calls to internal functions. * cfgexpand.c (expand_call_stmt): Likewise. * expr.c (expand_expr_real_1): Assert that the call isn't internal. * gimple-fold.c (gimple_fold_call): Handle null functions. (gimple_fold_stmt_to_constant_1): Don't fold calls to internal functions. * gimple-low.c (gimple_check_call_args): Handle calls to internal functions. * gimple-pretty-print.c (dump_gimple_call): Likewise. * ipa-prop.c (ipa_analyze_call_uses): Handle null functions. * tree-cfg.c (verify_gimple_call): Handle calls to internal functions. (do_warn_unused_result): Likewise. * tree-eh.c (same_handler_p): Use gimple_call_same_target_p. * tree-ssa-ccp.c (ccp_fold_stmt): Handle calls to internal functions. * tree-ssa-dom.c (hashable_expr): Use the gimple statement to record the target of a call. (initialize_hash_element): Update accordingly. (hashable_expr_equal_p): Use gimple_call_same_target_p. (iterative_hash_hashable_expr): Handle calls to internal functions. (print_expr_hash_elt): Likewise. * tree-ssa-pre.c (can_value_number_call): Likewise. (eliminate): Handle null functions. * tree-ssa-sccvn.c (visit_use): Handle calls to internal functions. * tree-ssa-structalias.c (get_fi_for_callee): Likewise. (find_func_aliases): Likewise. * value-prof.c (gimple_ic_transform): Likewise. (gimple_indirect_call_to_profile): Likewise. * lto-streamer-in.c (input_gimple_stmt): Likewise. * lto-streamer-out.c (output_gimple_stmt): Likewise. From-SVN: r172758
2011-04-19cgraph.h (save_inline_function_body): Remove.Jan Hubicka1-0/+6
* cgraph.h (save_inline_function_body): Remove. * ipa-inline-transform.c: New file, broke out of... * ipa-inline.c: ... this one; Update toplevel comment. (ncalls_inlined, nfunctions_inlined): Move to ipa-inline-transform.c; make global. (update_noncloned_frequencies): Move to ipa-inline-transform.c (cgraph_mark_inline_edge): Rename to inline_call; move to ipa-inline-transform.c. (cgraph_clone_inlined_nodes): Rename to clone_inlined_nodes; move to ipa-inline-transform.c (recursive_inlining, inline_small_functions, flatten_function, ipa_inline, inline_always_inline_functions, early_inline_small_functions): Update. (inline_transform): Move to ipa-inline-transform.c. * ipa-inline.h (inline_call, inline_transform, clone_inlined_nodes): Declare. * Makefile.in (ipa-inline-transform.o): New file. * cgraphunit.c (save_inline_function_body): Move to ipa-inline-transform.c From-SVN: r172739
2011-04-18ipa-inline.c: Fix comment typos; do not inline gt-ipa-inline.hJan Hubicka1-2/+2
* ipa-inline.c: Fix comment typos; do not inline gt-ipa-inline.h (want_inline_function_called_once_p): Break out the logic from ipa_inline. (edge_badness): Ensure that profile is not misupdated. (lookup_recursive_calls): Prioritize by call frequencies. (inline_small_functions): Move program size estimates here; actually process whole queue even when unit growth has been met. (to properly compute inline_failed reasons and for the case unit size decrease.) Revisit comments on recursive inlining. (ipa_inline): Remove unit summary code; first inline hot calls of functions called once, cold calls next. (order, nnodes): Remove unused variables. * Makefile.in (ipa-inline.o): No longer depent on ggc files. (GTFILES): Remove ipa-inline.c * sel-sched.c (fill_insns): Silence uninitialized var warning. From-SVN: r172663
2011-04-17lto-symtab.c (lto_cgraph_replace_node): When call statement is present, also ↵Jan Hubicka1-2/+2
set gimple_call_set_cannot_inline. * lto-symtab.c (lto_cgraph_replace_node): When call statement is present, also set gimple_call_set_cannot_inline. * ipa-inline.c: Update toplevel comment. (MAX_TIME): Remove. (cgraph_clone_inlined_nodes): Fix linebreaks. (cgraph_check_inline_limits): Restructure to ... (caller_growth_limits): ... this one; be more tolerant on growth in nested inline chains; add explanatory comment; fix stack accounting thinko introduced by previous patch. (cgraph_default_inline_p): Remove. (report_inline_failed_reason): New function. (can_inline_edge_p): New function. (can_early_inline_edge_p): New function. (leaf_node_p): Move upwards in file. (want_early_inline_function_p): New function. (want_inline_small_function_p): New function. (want_inline_self_recursive_call_p): New function. (cgraph_edge_badness): Rename to ... (edge_badness) ... this one; fix linebreaks. (update_edge_key): Update call of edge_baddness; add detailed dump about queue updates. (update_caller_keys): Use can_inline_edge_p and want_inline_small_function_p. (cgraph_decide_recursive_inlining): Rename to... (recursive_inlining): Use can_inline_edge_p and want_inline_self_recursive_call_p; simplify and remove no longer valid FIXME. (cgraph_set_inline_failed): Remove. (add_new_edges_to_heap): Use can_inline_edge_p and want_inline_small_function_p. (cgraph_decide_inlining_of_small_functions): Rename to ... (inline_small_functions): ... this one; cleanup; use can/want predicates; cleanup debug ouput; work edges till fibheap is exhausted and do not stop once unit growth is reached; remove later loop processing remaining edges. (cgraph_flatten): Rename to ... (flatten_function): ... this one; use can_inline_edge_p and can_early_inline_edge_p predicates. (cgraph_decide_inlining): Rename to ... (ipa_inline): ... this one; remove unreachable nodes before inlining functions called once; simplify the pass. (cgraph_perform_always_inlining): Rename to ... (inline_always_inline_functions): ... this one; use DECL_DISREGARD_INLINE_LIMITS; use can_inline_edge_p predicate (cgraph_decide_inlining_incrementally): Rename to ... (early_inline_small_functions): ... this one; simplify using new predicates; cleanup; make dumps prettier. (cgraph_early_inlining): Rename to ... (early_inliner): newer inline regular functions into always-inlines; fix updating of call stmt summaries. (pass_early_inline): Update for new names. (inline_transform): Fix formating. (gate_cgraph_decide_inlining): Rename to ... (pass_ipa_inline): ... this one. * ipa-inline.h (inline_summary): Remove disregard_inline_limits. * ipa-inline-analysis.c (dump_inline_summary): Update. (compute_inline_parameters): Do not compute disregard_inline_limits; look for mismatching arguments. (estimate_growth): Fix handlig of non-trivial self recursion. (inline_read_summary): Do not read info->disregard_inline_limits. (inline_write_summary): Do not write info->disregard_inline_limits. * tree-inline.c (inline_forbidden_into_p, tree_can_inline_p): Remove and move all checks into can_inline_edge_p predicate; re-enable code comparing optimization levels. (expand_call_inline): Do not test inline_forbidden_into_p. * Makefile.in (ipa-inline.o): Update arguments. * gcc.dg/winline-5.c: Update testcase. From-SVN: r172609
2011-04-16cgraphbuild.c: Include ipa-inline.h.Jan Hubicka1-2/+4
* cgraphbuild.c: Include ipa-inline.h. (reset_inline_failed): Use initialize_inline_failed. * cgraph.c: Include ipa-inline.h. (cgraph_create_node_1): Do not initialize estimated_growth. (initialize_inline_failed): More to ipa-inline-analysis.c (dump_cgraph_node): Do not dump inline flags. * cgraph.h (cgraph_local_info): Remove inlineable, versionable and disregard_inline_limits flags. (cgrpah_global_info): Remove estimated_stack_size, stack_frame_offset, time, size, estimated_growth. * ipa-cp.c (ipcp_versionable_function_p, ipcp_generate_summary): Update. * cgraphunit.c (cgraph_decide_is_function_needed): Use DECL_DISREGARD_INLINE_LIMITS. (cgraph_analyze_function): Do not initialize node->local.disregard_inline_limits. * lto-cgraph.c (lto_output_node, input_overwrite_node): Do not stream inlinable, versionable and disregard_inline_limits. * ipa-inline.c (cgraph_clone_inlined_nodes, cgraph_mark_inline_edge, cgraph_check_inline_limits, cgraph_default_inline_p, cgraph_edge_badness, update_caller_keys, update_callee_keys, add_new_edges_to_heap): Update. (cgraph_decide_inlining_of_small_function): Update; set CIF_FUNCTION_NOT_INLINABLE for uninlinable functions. (cgraph_decide_inlining, cgraph_edge_early_inlinable_p, cgraph_decide_inlining_incrementally): Update. * ipa-inline.h (inline_summary): Add inlinable, versionable, disregard_inline_limits, estimated_stack_size, stack_frame_offset, time, size and estimated_growth parameters. (estimate_edge_growth): Update. (initialize_inline_failed): Declare. * ipa-split.c: Include ipa-inline.h (execute_split_functions): Update. * ipa.c (cgraph_postorder): Use DECL_DISREGARD_INLINE_LIMITS. (cgraph_remove_unreachable_nodes): Do not clear inlinable flag. (record_cdtor_fn): Use DECL_DISREGARD_INLINE_LIMITS. * ipa-inline-analysis.c (inline_node_removal_hook): Update; set estimated_growth to INT_MIN. (inline_node_duplication_hook): Likewise. (dump_inline_summary): Dump new fields. (compute_inline_parameters): Update. (estimate_edge_time, estimate_time_after_inlining, estimate_size_after_inlining, estimate_growth, inline_read_summary, inline_write_summary): (initialize_inline_failed): Move here from cgraph.c. * tree-sra.c: Include ipa-inline.h. (ipa_sra_preliminary_function_checks): Update. * lto/lto.c (lto_balanced_map): Update. Update. * Makefile.in: (cgraph.o, cgraphbuild.o): Add dependency on ipa-inline.h From-SVN: r172581