aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
AgeCommit message (Collapse)AuthorFilesLines
2011-07-20re PR middle-end/18908 (Missed folding opportunities with bools)Richard Biener1-3/+1
2011-07-20 Richard Guenther <rguenther@suse.de> PR middle-end/18908 * tree.c (integer_all_onesp): Use TYPE_PRECISION, not mode precision. * tree-ssa-forwprop.c (simplify_bitwise_binary): Remove bogus ADDR_EXPR folding. Canonicalize X ^ ~0 as ~X. * gcc.dg/tree-ssa/pr18908.c: New testcase. * gcc.dg/tree-ssa/bitwise-sink.c: Adjust. From-SVN: r176510
2011-07-18re PR middle-end/49675 (ICE (segfault) with -finstrument-functions)Jakub Jelinek1-0/+25
PR middle-end/49675 * tree.c (build_common_builtin_nodes): Register __builtin_return_address, __cyg_profile_func_enter and __cyg_profile_func_exit. * gfortran.dg/pr49675.f90: New test. From-SVN: r176417
2011-07-17re PR middle-end/49732 (crash on terminal_interface-curses-menus.adb from ↵Eric Botcazou1-3/+8
ncurses with -gnato) PR middle-end/49732 * tree.c (walk_tree_1) <DECL_EXPR>: Do not walk a pointed-to type. From-SVN: r176371
2011-07-12cse.c (insert_with_costs): Put semi-colon after empty loop body on the next ↵Eric Botcazou1-1/+2
line. * cse.c (insert_with_costs): Put semi-colon after empty loop body on the next line. * emit-rtl.c (push_to_sequence): Likewise. * haifa-sched.c (max_issue): Likewise. * matrix-reorg.c (add_allocation_site): Likewise. * postreload-gcse.c (eliminate_partially_redundant_load): Likewise. * reload.c (alternative_allows_const_pool_ref): Likewise. * sched-rgn.c (rgn_add_block): Likewise. (rgn_fix_recovery_cfg): Likewise. * tree.c (attribute_list_contained): Likewise. c-family/ * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop body on the next line. From-SVN: r176216
2011-07-06tree.c (build_common_tree_nodes_2): Merge with build_common_tree_nodes.Richard Guenther1-9/+4
2011-07-06 Richard Guenther <rguenther@suse.de> * tree.c (build_common_tree_nodes_2): Merge with build_common_tree_nodes. * tree.h (build_common_tree_nodes): Adjust prototype. (build_common_tree_nodes_2): Remove. * doc/tm.texi.in (lang_hooks.builtin_function): Adjust. * doc/tm.texi (lang_hooks.builtin_function): Regenerate. c-family/ * c-common.c (c_common_nodes_and_builtins): Merge calls to build_common_tree_nodes and build_common_tree_nodes_2. fortran/ * f95-lang.c (gfc_init_decl_processing): Merge calls to build_common_tree_nodes and build_common_tree_nodes_2. go/ * go-lang.c (go_langhook_init): Merge calls to build_common_tree_nodes and build_common_tree_nodes_2. java/ * decl.c (java_init_decl_processing): Merge calls to build_common_tree_nodes and build_common_tree_nodes_2. lto/ * lto-lang.c (lto_init): Merge calls to build_common_tree_nodes and build_common_tree_nodes_2. ada/ * gcc-interface/misc.c (gnat_init): Merge calls to build_common_tree_nodes and build_common_tree_nodes_2. Re-initialize boolean_false_node. From-SVN: r175906
2011-06-22re PR debug/47858 (IPA-SRA decreases quality of debug info)Jakub Jelinek1-0/+46
PR debug/47858 * gimple.h (enum gimple_debug_subcode): Add GIMPLE_DEBUG_SOURCE_BIND. (gimple_build_debug_source_bind_stat): New prototype. (gimple_build_debug_source_bind): Define. (gimple_debug_source_bind_p, gimple_debug_source_bind_get_var, gimple_debug_source_bind_get_value, gimple_debug_source_bind_get_value_ptr, gimple_debug_source_bind_set_var, gimple_debug_source_bind_set_value): New inlines. * gimple.c (gimple_build_debug_source_bind_stat): New function. * gimple-pretty-print.c (dump_gimple_debug): Handle GIMPLE_DEBUG_SOURCE_BIND. * sese.c (rename_uses): Handle gimple_debug_source_bind_p. * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise. * tree-parloops.c (eliminate_local_variables, separate_decls_in_region): Likewise. (separate_decls_in_region_debug): Renamed from separate_decls_in_region_debug_bind. Handle gimple_debug_source_bind_p. * tree.h (decl_debug_args_lookup, decl_debug_args_insert): New prototypes. (DECL_HAS_DEBUG_ARGS_P): Define. (struct tree_function_decl): Add has_debug_args_flag field. * tree.c (debug_args_for_decl): New variable. (decl_debug_args_lookup, decl_debug_args_insert): New functions. * tree-into-ssa.c (mark_def_sites): Handle uses in debug stmts. (rewrite_debug_stmt_uses): New function. (rewrite_stmt): Use it to rewrite debug stmt uses. * rtl.def (DEBUG_PARAMETER_REF): New. * rtl.h (DEBUG_PARAMETER_REF_DECL): Define. * cselib.c (rtx_equal_for_cselib_1, cselib_hash_rtx): Handle DEBUG_PARAMETER_REF. * rtl.c (rtx_equal_p_cb, rtx_equal_p, iterative_hash_rtx): Likewise. * print-rtl.c (print_rtx): Likewise. * tree-sra.c (sra_ipa_reset_debug_stmts): Prefer replacing of SSA_NAMEs with DEBUG_EXPR_DECLs initialized in source bind debug stmts in the first bb. * tree-inline.c (remap_ssa_name): If remapping default def of a PARM_DECL fails, map to a DEBUG_EXPR_DECL set in a source bind debug stmt. (remap_gimple_stmt): Handle gimple_debug_source_bind_p. (maybe_move_debug_stmts_to_successors): Likewise. (copy_debug_stmt): Likewise. Avoid shadowing a variable. (tree_function_versioning): If DECL_HAS_DEBUG_ARGS_P, copy debug args vector from old_decl to new_decl. * ipa-prop.c (ipa_modify_call_arguments): For optimized away or modified parameters, add debug bind stmts before call setting DEBUG_EXPR_DECL which is remembered in debug args vector. * cfgexpand.c (expand_call_stmt): Call expand_debug_expr on DECL_DEBUG_EXPRs from debug args vector. (expand_debug_source_expr): New function. (expand_debug_locations): Use it for source bind insns. (expand_gimple_basic_block): Handle gimple_debug_source_bind_p. * var-tracking.c (prepare_call_arguments): Add debug args to call_arguments if any. * dwarf2out.c (dwarf_stack_op_name, size_of_loc_descr, output_loc_operands, output_loc_operands_raw, resolve_addr_in_expr, compare_loc_operands): Handle DW_OP_GNU_parameter_ref. (get_ref_die_offset, parameter_ref_descriptor): New functions. (mem_loc_descriptor): Handle DEBUG_PARAMETER_REF. (gen_subprogram_die): Handle parameters identified by DEBUG_PARAMETER_REF. * dwarf2.h (enum dwarf_location_atom): Add DW_OP_GNU_parameter_ref. From-SVN: r175288
2011-06-22In gcc/: 2011-06-21 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero1-85/+107
In gcc/: 2011-06-21 Nicola Pero <nicola.pero@meta-innovation.com> * attribs.c (register_attribute): Added assert to check that all attribute specs are registered with a name that is not empty and does not start with '_'. (decl_attributes): Avoid the lookup of the "naked" attribute spec if the function has no attributes. * tree.c (is_attribute_with_length_p): Removed. (is_attribute_p): Removed. (private_is_attribute_p): New. (private_lookup_attribute): New. (lookup_attribute): Removed. (lookup_ident_attribute): New. (remove_attribute): Require the first argument to be in the form 'text', not '__text__'. Updated asserts. (merge_attributes): Use lookup_ident_attributes instead of lookup_attribute. (merge_dllimport_decl_attributes): Use remove_attribute. (attribute_list_contained): Likewise. (attribute_list_equal): Immediately return 1 if the arguments are identical pointers. * tree.h (is_attribute_p): Made inline. Return a 'bool', not an 'int'. Require the first argument to be in the form 'text', not '__text__'. Require the second argument to be an identifier. (lookup_attribute): Made inline. Require the first argument to be in the form 'text', not '__text__'. (private_is_attribute_p, private_lookup_attribute): New. Updated comments. From-SVN: r175286
2011-06-15target-def.h (TARGET_HAVE_NAMED_SECTIONS): Move to common/common-target-def.h.Joseph Myers1-1/+2
* 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-07stor-layout.c (initialize_sizetypes): Initialize all sizetypes based on ↵Richard Guenther1-4/+2
target definitions. 2011-06-07 Richard Guenther <rguenther@suse.de> * stor-layout.c (initialize_sizetypes): Initialize all sizetypes based on target definitions. (set_sizetype): Remove. * tree.c (build_common_tree_nodes): Do not call set_sizetype. * tree.h (set_sizetype): Remove. From-SVN: r174748
2011-06-07tree.c (build_common_tree_nodes): Also initialize size_type_node.Richard Guenther1-0/+12
2011-06-07 Richard Guenther <rguenther@suse.de> * tree.c (build_common_tree_nodes): Also initialize size_type_node. Call set_sizetype from here. c-family/ * c-common.c (c_common_nodes_and_builtins): Do not set size_type_node or call set_sizetype. go/ * go-lang.c (go_langhook_init): Do not set size_type_node or call set_sizetype. fortran/ * f95-lang.c (gfc_init_decl_processing): Do not set size_type_node or call set_sizetype. java/ * decl.c (java_init_decl_processing): Properly initialize size_type_node. lto/ * lto-lang.c (lto_init): Do not set size_type_node or call set_sizetype. ada/ * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call set_sizetype. From-SVN: r174743
2011-06-01tree.c (free_lang_data): Do not reset boolean_type_node nor char_type_node.Richard Guenther1-19/+0
2011-06-01 Richard Guenther <rguenther@suse.de> * tree.c (free_lang_data): Do not reset boolean_type_node nor char_type_node. * lto-streamer.c (lto_record_common_node): Take node pointer, do not register types. (lto_preload_common_nodes): Explicitly skip preloading nodes that differ between frontends. lto/ * lto-lang.c (lto_register_canonical_types): New function. (lto_init): Register common nodes with the canonical type machinery. Do not play tricks with char_type_node. From-SVN: r174519
2011-05-30re PR c/4910 (imacat <imacat@mail.imacat.idv.tw>)Nathan Froyd1-1/+1
fix PR bootstrap/4910 gcc/ PR bootstrap/49190 Revert: 2011-05-26 Nathan Froyd <froydnj@codesourcery.com> * tree.h (struct tree_identifier): Inherit from tree_typed, not tree_common. (HT_IDENT_TO_GCC_IDENT): Adjust for said change. * tree.c (initialize_tree_contains_struct): Mark TS_IDENTIFIER as TS_BASE instead of TS_COMMON. * varasm.c (assemble_name): Remove assert. gcc/c-family/ PR bootstrap/49190 Revert: 2011-05-26 Nathan Froyd <froydnj@codesourcery.com> * c-common.h (struct c_common_identifier): Inherit from tree_typed, not tree_common. From-SVN: r174445
2011-05-27move TS_STATEMENT_LIST to be a substructure of TS_TYPEDNathan Froyd1-1/+1
move TS_STATEMENT_LIST to be a substructure of TS_TYPED gcc/ * c-decl.c (c_push_function_context): Copy the current statement list stack. (add_stmt): Check building_stmt_list_p and push_stmt if necessary. (finish_struct): Call building_stmt_list_p instead of checking cur_stmt_list. * c-parser.c (c_parser_postfix_expression): Likewise. * c-typeck.c (c_end_compound_stmt): Likewise. * print-tree.c (print_node) [STATEMENT_LIST]: Don't print TREE_CHAIN. * tree-iterator.c (stmt_list_cache): Change to a VEC. (alloc_stmt_list): Adjust for stmt_list_cache's new type. (free_stmt_list): Likewise. * tree.h (struct tree_statement_list): Include typed_tree instead of tree_common. * tree.c (initialize_tree_contains_struct): Mark TS_STATEMENT_LIST as TS_TYPED instead of TS_COMMON. gcc/c-family/ * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC. (stmt_list_stack): Define. (cur_stmt_list): Adjust for new type of x_cur_stmt_list. * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise. gcc/cp/ * cp-tree.h (building_stmt_tree): Delete. * decl.c (save_function_data): Tweak initializer for x_cur_stmt_list. (build_aggr_init_full_exprs): Call building_stmt_list_p instead of building_stmt_tree. (initialize_local_var): Likewise. (finish_function): Likewise. * decl2.c (finish_anon_union): Likewise. * init.c (begin_init_stmts): Likewise. (finish_init_stmts): Likewise. (expand_aggr_init_1): Likewise. * name-lookup.c (do_local_using_decl): Likewise. (do_namespace_alias): Likewise. (do_using_directive): Likewise. (cp_emit_debug_info_for_using): Likewise. * semantics.c (add_stmt): Assert that stmt_list_stack is non-empty. From-SVN: r174343
2011-05-26make TS_BLOCK a substructure of TS_BASENathan Froyd1-2/+3
make TS_BLOCK a substructure of TS_BASE gcc/ * tree.c (initialize_tree_contains_struct): Mark TS_BLOCK as TS_BASE instead of TS_COMMON. (find_decls_types_r): Check for TS_TYPED structure before looking at TREE_TYPE. * tree.h (struct tree_block): Inherit from tree_base, not tree_common. Add chain field. (BLOCK_CHAIN): Use new chain field. gcc/c-family/ * c-common.c (warning_candidate_p): Check for BLOCKs. gcc/java/ * decl.c (poplevel): Don't access TREE_TYPE of BLOCKs. * expr.c (build_jni_stub): Likewise. From-SVN: r174300
2011-05-26make TS_IDENTIFIER be a substructure of TS_TYPEDNathan Froyd1-1/+1
make TS_IDENTIFIER be a substructure of TS_TYPED gcc/ * tree.h (struct tree_identifier): Inherit from tree_typed, not tree_common. (HT_IDENT_TO_GCC_IDENT): Adjust for said change. * tree.c (initialize_tree_contains_struct): Mark TS_IDENTIFIER as TS_BASE instead of TS_COMMON. * varasm.c (assemble_name): Remove assert. gcc/c-family/ * c-common.h (struct c_common_identifier): Inherit from tree_typed, not tree_common. From-SVN: r174286
2011-05-25move TS_EXP to be a substructure of TS_TYPEDNathan Froyd1-1/+1
move TS_EXP to be a substructure of TS_TYPED gcc/ * tree.h (struct tree_exp): Inherit from struct tree_typed. * tree.c (initialize_tree_contains_struct): Mark TS_EXP as TS_TYPED instead of TS_COMMON. gcc/lto/ * lto.c (lto_ft_typed): New function. (lto_ft_common): Call it. (lto_ft_constructor): Likewise. (lto_ft_expr): Likewise. (lto_fixup_prevailing_decls): Check for TS_COMMON before accessing TREE_CHAIN. From-SVN: r174192
2011-05-25libgcc2.h (__NW, __NDW): Define using a __gnu_ prefix if LIBGCC2_GNU_PREFIX ↵Bernd Schmidt1-4/+12
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-11* tree.c (type_hash_canon): Use struct tree_type_non_common.Jason Merrill1-1/+1
From-SVN: r173692
2011-05-11split tree_typeNathan Froyd1-3/+11
split tree_type gcc/ada/ * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL. (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL. (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL. gcc/cp/ * cp-tree.h (TYPENAME_TYPE_FULLNAME, TYPEOF_TYPE_EXPR): Use TYPE_VALUES_RAW. (UNDERLYING_TYPE_TYPE, DECLTYPE_TYPE_EXPR): Likewise. (DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): Likewise. (TEMPLATE_TYPE_PARM_INDEX): Likewise. gcc/ * ggc-page.c (extra_order_size_table): Use struct tree_type_non_common. * lto-streamer-in.c (unpack_ts_type_value_fields): Rename to... (unpack_ts_type_common_value_fields): ...this. Update comment. (unpack_value_fields): Adjust for renaming. (lto_input_ts_type_tree_pointers): Split into... (lto_input_ts_type_common_tree_pointer): ...this and... (lto_input_ts_type_non_common_tree_pointers): ...this. (lto_input_tree_pointers): Adjust for above split. * lto-streamer-out.c (pack_ts_type_value_fields): Rename to... (pack_ts_type_common_value_fields): ...this. Update comment. (lto_output_ts_type_tree_pointers): Split into... (lto_output_ts_type_common_tree_pointers): ...this and... (lto_output_ts_type_non_common_tree_pointers): ...this. (lto_output_tree_pointers): Adjust for above split. * lto-streamer.c (check_handled_ts_structures): Mark TS_TYPE_COMMON, TS_TYPE_WITH_LANG_SPECIFIC, and TS_TYPE_NON_COMMON as handled. * stor-layout.c (vector_type_mode): Adjust location of mode field. * tree.h (MARK_TS_TYPE_COMMON, MARK_TS_TYPE_WITH_LANG_SPECIFIC): Define. (struct tree_type): Split into... (struct tree_type_common: ...this and... (struct tree_type_with_lang_specific): ...this and... (struct tree_type_non_common): ...this. Adjust accessor macros accordingly. (TYPE_VALUES_RAW): Define. (union tree_node): Update for above changes. * tree.c (tree_node_structure_for_code) [tcc_type]: Return TS_TYPE_NON_COMMON. (initialize_tree_contains_struct) [TS_TYPE]: Use TS_TYPE_COMMON. Add TS_TYPE_WITH_LANG_SPECIFIC and TS_TYPE_NON_COMMON. (tree_code_size) [tcc_type]: Use struct tree_type_non_common. * treestructu.def (TS_TYPE): Remove. (TS_TYPE_COMMON, TS_TYPE_WITH_LANG_SPECIFIC, TS_TYPE_NON_COMMON): Define. gcc/java/ * java-tree.h (TYPE_ARGUMENT_SIGNATURE): Use TYPE_MINVAL. gcc/lto/ * lto.c (lto_ft_type): Use TYPE_MINVAL and TYPE_MAXVAL. Adjust location of binfo field. (lto_fixup_prevailing_decls): Likewise. gcc/objc/ * objc-act.h (CLASS_NAME, CLASS_SUPER_NAME): Use proper accessors. (CLASS_NST_METHODS, CLASS_CLS_METHODS): Likewise. (PROTOCOL_NAME, PROTOCOL_NST_METHODS, PROTOCOL_CLS_METHODS): Likewise. From-SVN: r173658
2011-05-06generalize build_case_label to the rest of the compilerNathan Froyd1-0/+17
generalize build_case_label to the rest of the compiler gcc/ada/ * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label. gcc/ * except.c (sjlj_emit_dispatch_table): Call build_case_label. * gimplify.c (gimplify_switch_expr): Likewise. * omp-low.c (expand_omp_sections): Likewise. * tree-eh.c (lower_try_finally_switch): Likewise. (lower_eh_dispatch): Likewise. * tree.h (build_case_label): Declare. * tree.c (build_case_label): Define. gcc/c-family/ * c-common.c (c_add_case_label): Omit the loc argument to build_case_label. * c-common.h (build_case_label): Remove. * c-semantics.c (build_case_label): Remove. gcc/cp/ * decl.c (finish_case_label): Omit the loc argument to build_case_label. gcc/fortran/ * trans-decl.c (gfc_trans_entry_master_switch): Call build_case_label. * trans-io.c (add_case): Likewise. * trans-stmt.c (gfc_trans_integer_select): Likewise. (gfc_trans_character_select): Likewise. gcc/go/ * go-gcc.cc (Gcc_backend::switch_statement): Call build_case_label. gcc/java/ * expr.c (expand_java_switch): Call build_case_label. (expand_java_add_case): Likewise. From-SVN: r173467
2011-05-04tree.h (build_function_type_array): Declare.Nathan Froyd1-0/+38
gcc/ * tree.h (build_function_type_array): Declare. (build_varargs_function_type_array): Declare. (build_function_type_vec, build_varargs_function_type_vec): Define. * tree.c (build_function_type_array_1): New function. (build_function_type_array): New function. (build_varargs_function_type_array): New function. gcc/fortran/ * trans-decl.c (build_library_function_decl_1): Call build_function_type_vec. Adjust argument list building accordingly. * trans-intrinsic.c (gfc_get_intrinsic_lib_fndecl): Likewise. * trans-types.c (gfc_get_function_type): Likewise. From-SVN: r173375
2011-05-03md.texi (vec_load_lanes, [...]): Document.Richard Sandiford1-0/+9
gcc/ * doc/md.texi (vec_load_lanes, vec_store_lanes): Document. * optabs.h (COI_vec_load_lanes, COI_vec_store_lanes): New convert_optab_index values. (vec_load_lanes_optab, vec_store_lanes_optab): New convert optabs. * genopinit.c (optabs): Initialize the new optabs. * internal-fn.def (LOAD_LANES, STORE_LANES): New internal functions. * internal-fn.c (get_multi_vector_move, expand_LOAD_LANES) (expand_STORE_LANES): New functions. * tree.h (build_array_type_nelts): Declare. * tree.c (build_array_type_nelts): New function. * tree-vectorizer.h (vect_model_store_cost): Add a bool argument. (vect_model_load_cost): Likewise. (vect_store_lanes_supported, vect_load_lanes_supported) (vect_record_strided_load_vectors): Declare. * tree-vect-data-refs.c (vect_lanes_optab_supported_p) (vect_store_lanes_supported, vect_load_lanes_supported): New functions. (vect_transform_strided_load): Split out statement recording into... (vect_record_strided_load_vectors): ...this new function. * tree-vect-stmts.c (create_vector_array, read_vector_array) (write_vector_array, create_array_ref): New functions. (vect_model_store_cost): Add store_lanes_p argument. (vect_model_load_cost): Add load_lanes_p argument. (vectorizable_store): Try to use store-lanes functions for interleaved stores. (vectorizable_load): Likewise load-lanes and loads. * tree-vect-slp.c (vect_get_and_check_slp_defs): Update call to vect_model_store_cost. (vect_build_slp_tree): Likewise vect_model_load_cost. From-SVN: r173291
2011-05-02tree.c (tree_code_counts): New global array.Richard Guenther1-0/+8
2011-05-02 Richard Guenther <rguenther@suse.de> * tree.c (tree_code_counts): New global array. (record_node_allocation_statistics): Count individual tree codes. (dump_tree_statistics): Dump individual code stats. From-SVN: r173244
2011-04-29split checksum into cfg checksum and line checksumXinliang David Li1-6/+18
From-SVN: r173147
2011-04-27Makefile.in (tree-ssa-structalias.o): Remove gt-tree-ssa-structalias.h ↵Richard Guenther1-2/+10
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-22tree.c (build_int_cst): Properly create canonicalized integer constants.Richard Guenther1-10/+3
2011-04-22 Richard Guenther <rguenther@suse.de> * tree.c (build_int_cst): Properly create canonicalized integer constants. (build_int_cst_type): Remove scary comments. From-SVN: r172871
2011-04-21re PR debug/48703 (segfault in canonicalize_for_substitution)Richard Guenther1-4/+0
2011-04-21 Richard Guenther <rguenther@suse.de> PR lto/48703 * tree.c (free_lang_data_in_decl): Do not zero TREE_TYPE of DECL_NAME. * g++.dg/lto/pr48207-2_0.C: New testcase. * g++.dg/lto/pr48207-3_0.C: Likewise. From-SVN: r172830
2011-04-20Revert last patch.Richard Sandiford1-9/+0
From-SVN: r172763
2011-04-20md.texi (vec_load_lanes, [...]): Document.Richard Sandiford1-0/+9
gcc/ * doc/md.texi (vec_load_lanes, vec_store_lanes): Document. * optabs.h (COI_vec_load_lanes, COI_vec_store_lanes): New convert_optab_index values. (vec_load_lanes_optab, vec_store_lanes_optab): New convert optabs. * genopinit.c (optabs): Initialize the new optabs. * internal-fn.def (LOAD_LANES, STORE_LANES): New internal functions. * internal-fn.c (get_multi_vector_move, expand_LOAD_LANES) (expand_STORE_LANES): New functions. * tree.h (build_array_type_nelts): Declare. * tree.c (build_array_type_nelts): New function. * tree-vectorizer.h (vect_model_store_cost): Add a bool argument. (vect_model_load_cost): Likewise. (vect_store_lanes_supported, vect_load_lanes_supported) (vect_record_strided_load_vectors): Declare. * tree-vect-data-refs.c (vect_lanes_optab_supported_p) (vect_store_lanes_supported, vect_load_lanes_supported): New functions. (vect_transform_strided_load): Split out statement recording into... (vect_record_strided_load_vectors): ...this new function. * tree-vect-stmts.c (create_vector_array, read_vector_array) (write_vector_array, create_array_ref): New functions. (vect_model_store_cost): Add store_lanes_p argument. (vect_model_load_cost): Add load_lanes_p argument. (vectorizable_store): Try to use store-lanes functions for interleaved stores. (vectorizable_load): Likewise load-lanes and loads. * tree-vect-slp.c (vect_get_and_check_slp_defs) (vect_build_slp_tree): From-SVN: r172760
2011-04-19re PR debug/48207 (ICE in lhd_set_decl_assembler_name, at langhooks.c:158)Richard Guenther1-1/+6
2011-04-19 Richard Guenther <rguenther@suse.de> PR lto/48207 * tree.c (free_lang_data): Do not reset the decl-assembler-name langhook. * g++.dg/lto/pr48207_0.C: New testcase. From-SVN: r172708
2011-04-18tree.c (upper_bound_in_type): Build properly canonicalized INTEGER_CSTs.Richard Guenther1-13/+13
2011-04-18 Richard Guenther <rguenther@suse.de> * tree.c (upper_bound_in_type): Build properly canonicalized INTEGER_CSTs. (lower_bound_in_type): Likewise. From-SVN: r172645
2011-04-18re PR c/48650 (valgrind: Invalid write of size 8 in build_string (tree.c:1524))Richard Guenther1-1/+1
2011-04-18 Richard Guenther <rguenther@suse.de> PR middle-end/48650 * tree.c (build_string): STRING_CST is now derived from tree_typed. From-SVN: r172642
2011-04-14tree.h (struct tree_constructor): Include tree_typed instead of tree_common.Nathan Froyd1-1/+1
* tree.h (struct tree_constructor): Include tree_typed instead of tree_common. * tree.c (initialize_tree_contains_struct): Mark TS_CONSTRUCTOR as TS_TYPED instead of TS_COMMON. From-SVN: r172409
2011-04-13tree-flow.h (struct gimple_df): Make free_ssanames a VEC.Nathan Froyd1-1/+1
* tree-flow.h (struct gimple_df): Make free_ssanames a VEC. * tree-ssanames.c (fini_ssanames): VEC_free it. (make_ssa_name_fn): Update for VECness of free_ssanames. (release_ssa_name, release_dead_ssa_names): Likewise. * tree.h (struct tree_ssa_name): Include tree_typed instead of tree_common. * tree.c (initialize_tree_contains_struct): Mark TS_SSA_NAME as TS_TYPED instead of TS_COMMON. From-SVN: r172393
2011-04-13tree.h (struct tree_int_cst, [...]): Include tree_typed instead of tree_common.Nathan Froyd1-3/+3
* tree.h (struct tree_int_cst, struct real_value): Include tree_typed instead of tree_common. (struct tree_fixed_cst, struct tree_string, struct tree_complex): Likewise. * tree.c (initialize_tree_contains_struct): Mark such nodes as being TS_TYPED rather than TS_COMMON. * print-tree.c (print_node) [STRING_CST]: Don't print TREE_CHAIN. From-SVN: r172386
2011-04-13ada-tree.h (union lang_tree_node): Check for TS_COMMON before calling ↵Nathan Froyd1-58/+8
TREE_CHAIN. gcc/ada/ * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON before calling TREE_CHAIN. * gcc-interface/misc.c (gnat_init_ts): New function. (LANG_HOOKS_INIT_TS): Define. gcc/ * c-decl.c (union lang_tree_node): Check for TS_COMMON before calling TREE_CHAIN. * print-tree.c (print_node): Likewise. * tree-inline.c (copy_tree_r): Likewise. * c-lang.c (LANG_HOOKS_INIT_TS): Define. * lto-streamer-in.c (lto_input_tree_pointers): Check for TS_TYPED instead of TS_COMMON. * lto-streamer-out.c (lto_output_tree_pointers): Likewise. * tree.c (initialize_tree_contains_struct): Handle TS_TYPED. (copy_node_stat): Zero TREE_CHAIN only if necessary. (MARK_TS_BASE, MARK_TS_TYPED, MARK_TS_COMMON): Move these... (MARK_TS_DECL_COMMON, MARK_TS_DECL_COMMON, MARK_TS_DECL_WRTL): ...and these... (MARK_TS_DECL_WITH_VIS, MARK_TS_DECL_NON_COMMON): ...and these... * tree.h: ...here. (TREE_CHAIN): Check for a TS_COMMON structure. (TREE_TYPE): Check for a TS_TYPED structure. gcc/c-family/ * c-common.h (c_common_init_ts): Declare. * c-common.c (c_common_init_ts): Define. gcc/cp/ * cp-lang.c (cp_init_ts): Call cp_common_init_ts. Move tree_contains_struct initialization to... * cp-objcp-common.c (cp_common_init_ts): ...here. Use MARK_* macros. * cp-objcp-common.h (cp_common_init_ts): Declare. * cp-tree.h (union lang_tree_node): Check for TS_COMMON before calling TREE_CHAIN. gcc/fortran/ * f95-lang.c (union lang_tree_node): Check for TS_COMMON before calling TREE_CHAIN. gcc/go/ * go-lang.c (union lang_tree_node): Check for TS_COMMON before calling TREE_CHAIN. gcc/java/ * java-tree.h (union lang_tree_node): Check for TS_COMMON before calling TREE_CHAIN. gcc/lto/ * lto-tree.h (union lang_tree_node): Check for TS_COMMON before calling TREE_CHAIN. * lto.c (lto_fixup_common): Likewise. gcc/objc/ * objc-lang.c (objc_init_ts): Move code for this function... * objc-act.c (objc_common_init_ts): ...here. Define. * objc-act.h (objc_common_init_ts): Declare. gcc/objcp/ * objcp-lang.c (objcxx_init_ts): Call objc_common_init_ts and cp_common_init_ts. From-SVN: r172359
2011-04-12tree.h (struct typed_tree): New.Nathan Froyd1-1/+7
* tree.h (struct typed_tree): New. (struct tree_common): Include it instead of tree_base. (TREE_TYPE): Update for new location of type field. (TYPE_USER_ALIGN, TYPE_PACKED): Refer to base field directly. (DECL_USER_ALIGN, DECL_PACKED): Likewise. (union tree_node): Add typed field. * treestruct.def (TS_TYPED): New. * lto-streamer.c (check_handled_ts_structures): Handle it. * tree.c (MARK_TS_TYPED): New macro. (MARK_TS_COMMON): Call it instead of MARK_TS_BASE. From-SVN: r172295
2011-04-09Bail out rather than crashing in array_type_nelts if TYPE_MAX_VALUE is null.Duncan Sands1-0/+4
From-SVN: r172227
2011-04-04tree.h (struct tree_const_decl): Inherit from tree_decl_common.Nathan Froyd1-2/+1
* tree.h (struct tree_const_decl): Inherit from tree_decl_common. * tree.c (initialize_tree_contains_struct): Adjust accordingly. From-SVN: r171923
2011-04-03tree.c (free_lang_data_in_decl): Zero DECL_VINDEX if it's not an integer.Michael Matz1-0/+7
* tree.c (free_lang_data_in_decl): Zero DECL_VINDEX if it's not an integer. * tree.h (tree_decl_non_common.vindex): Adjust comment. From-SVN: r171904
2011-04-03tree.c (decl_init_priority_insert): Don't create entry for default priority.Michael Matz1-44/+4
* tree.c (decl_init_priority_insert): Don't create entry for default priority. (decl_fini_priority_insert): Ditto. (fields_compatible_p, find_compatible_field): Remove. * tree.h (fields_compatible_p, find_compatible_field): Remove. * gimple.c (gimple_compare_field_offset): Adjust block comment. From-SVN: r171902
2011-03-25Changelog c-family/Kai Tietz1-6/+2
2011-03-25 Kai Tietz <ktietz@redhat.com> * c-ada-spec.c (compare_comment): Use filename_cmp instead of strcmp for filename. Changelog fortran/ 2011-03-25 Kai Tietz <ktietz@redhat.com> * scanner.c (preprocessor_line): Use filename_cmp instead of strcmp. Changelog gcc/ 2011-03-25 Kai Tietz <ktietz@redhat.com> * collect2.c (write_c_file_stat): Handle backslash as right-hand directory separator. (resolve_lib_name): Use IS_DIR_SEPARATOR instead of checking just for slash. * coverage.c (coverage_init): Use IS_ABSOLUTE_PATH instead of checking for trailing slash. * gcc.c (record_temp_file): Use filename_cmp instead of strcmp. (do_spec_1): Likewise. (replace_outfile_spec_function): Likewise. (is_directory): Use filename_ncmp instead of strncmp. (print_multilib_info): Likewise. * gcov.c (find_source): Use filename_cmp instead instead of strcmp. (make_gcov_file_name): Fix order of slash/backslash checks. * incpath.c (DIRS_EQ): Use filename_cmp instead of strcmp. (add_standard_paths): Likewise. * mips-tfile.c (saber_stop): Handle backslash. * prefix.c (update_path): Use filename_ncmp instead of strncmp. * profile.c (output_location): Use filename_cmp instead of strcmp. * read-md.c (handle_toplevel_file): Handle backslash. * tlink.c (frob_extension): Likewise. * tree-cfg.c (same_line_p): Use filename_cmp instead of strcmp. * tree-dump.c (dequeue_and_dump): Handle backslash. * tree.c (get_file_function_name): Likewise. * gengtype.c (read_input_list): Likewise. (get_file_realbasename): Likewise. (get_output_file_with_visibility): Use filename_cmp instead of strcmp. ChangeLog java/ 2011-03-25 Kai Tietz <ktietz@redhat.com> * jcf-parse.c (java_read_sourcefilenames): Use filename_cmp instead of strcmp. (set_source_filename): Likewise. * win32-host.c (jcf_open_exact_case): Likewise. ChangeLog lto/ 2011-03-25 Kai Tietz <ktietz@redhat.com> * lto.c (lto_resolution_read): Use filename_cmp instead of strcmp. (lto_read_section_data): Likewise. ChangeLog cp/ 2011-03-25 Kai Tietz <ktietz@redhat.com> * lex.c (interface_strcmp): Handle dos-paths. (handle_pragma_implementation): Use filename_cmp instead of strcmp. (in_main_input_context): Likewise. From-SVN: r171522
2011-03-25ChangeLog gcc/Kai Tietz1-31/+75
2011-03-25 Kai Tietz <ktietz@redhat.com> * c-typeck.c (comptypes_internal): Replace target hook call of comp_type_attributes by version in tree.c file. * gimple.c (gimple_types_compatible_p_1): Likewise. * tree-ssa.c (useless_type_conversion_p): Likewise. * tree.c (build_type_attribute_qual_variant): Likewise. (attribute_value_equal): New static helper function. (comp_type_attributes): New function. (merge_attributes): Use attribute_value_equal for comparison. (attribute_list_contained): Likewise. * tree.h (comp_type_attributes): New prototype. ChangeLog cp/ 2011-03-25 Kai Tietz <ktietz@redhat.com> * decl.c (decls_match): Replace target hook call of comp_type_attributes by version in tree.c file. * search.c (check_final_overrider): Likewise. * typeck.c (structural_comptypes): Likewise. From-SVN: r171445
2011-03-24tree.c (record_node_allocation_statistics): New function.Nathan Froyd1-56/+40
* tree.c (record_node_allocation_statistics): New function. (make_node_stat, copy_node_stat, build_string): Call it. (make_tree_binfo_stat, make_tree_vec_stat, tree_cons_stat): Likewise. (build1_stat, build_omp_clause): Likewise. From-SVN: r171399
2011-03-24re PR tree-optimization/46562 (CCP currently needs iteration for &a[i])Richard Guenther1-0/+14
2011-03-24 Richard Guenther <rguenther@suse.de> PR tree-optimization/46562 * tree.c (build_invariant_address): New function. * tree.h (build_invariant_address): Declare. * tree-dfa.c (get_addr_base_and_unit_offset): Wrap around a renamed function moved ... * tree-flow-inline.h (get_addr_base_and_unit_offset_1): ... here. Take valueization callback parameter. * tree-flow.h (gimple_fold_stmt_to_constant): Declare. * gimple-fold.h: New file. * tree-ssa-ccp.c (ccp_fold): Use gimple_fold_stmt_to_constant_1. (ccp_fold, fold_const_aggregate_ref, fold_ctor_reference, fold_nonarray_ctor_reference, fold_array_ctor_reference, fold_string_cst_ctor_reference, get_base_constructor): Move ... * gimple-fold.c: ... here. (gimple_fold_stmt_to_constant_1): New function split out from ccp_fold. Take a valueization callback parameter. Valueize all operands. (gimple_fold_stmt_to_constant): New wrapper function. (fold_const_aggregate_ref_1): New function split out from fold_const_aggregate_ref. Take a valueization callback parameter. (fold_const_aggregate_ref): Wrap fold_const_aggregate_ref_1. * tree-ssa-sccvn.c (simplify_binary_expression): Simplify invariant POINTER_PLUS_EXPRs to invariant form. (vn_valueize): New function. (try_to_simplify): Simplify by using gimple_fold_stmt_to_constant. * tree-vrp.c (vrp_valueize): New function. (vrp_visit_assignment_or_call): Use gimple_fold_stmt_to_constant to fold statements to constants. * tree-ssa-pre.c (eliminate): Properly guard propagation of function declarations. * Makefile.in (tree-ssa-sccvn.o, tree-vrp.o, gimple-fold.o, tree-ssa-ccp.o): Add gimple-fold.h dependencies. * c-c++-common/pr46562-2.c: New testcase. * c-c++-common/pr46562.c: Likewise. From-SVN: r171386
2011-03-22tree.c (build_call_1): New function.Nathan Froyd1-12/+20
* tree.c (build_call_1): New function. (build_call_valist, build_call_array_loc, build_call_vec): Call it. From-SVN: r171288
2011-03-14re PR tree-optimization/48098 (internal compiler error: in ↵Richard Guenther1-2/+8
build_vector_from_val, at tree.c:1380) 2011-03-14 Richard Guenther <rguenther@suse.de> PR middle-end/48098 * tree.c (build_vector_from_val): Adjust assert to requirements and reality. * gcc.dg/torture/pr48098.c: New testcase. From-SVN: r170934
2011-03-11re PR c++/48073 (ICE with -flto in templated C++ code)Richard Guenther1-1/+2
2011-03-11 Richard Guenther <rguenther@suse.de> PR lto/48073 * tree.c (find_decls_types_r): Do not walk types only reachable from IDENTIFIER_NODEs. * g++.dg/lto/20110311-1_0.C: New testcase. From-SVN: r170875
2011-03-11re PR c++/48069 (FAIL: g++.old-deja/g++.pt/spec26.C)Jason Merrill1-2/+1
PR c++/48069 * tree.c (type_hash_eq): Use COMPLETE_TYPE_P, not COMPLETE_OR_UNBOUND_ARRAY_TYPE_P. From-SVN: r170872
2011-03-10re PR c++/48029 (ICE in finish_member_declaration() with --param ↵Jason Merrill1-2/+9
ggc-min-expand=0 --param ggc-min-heapsize=0) PR c++/48029 * stor-layout.c (layout_type): Don't set structural equality on arrays of incomplete type. * tree.c (type_hash_eq): Handle comparing them properly. * cp/pt.c (iterative_hash_template_arg): Remove special case for ARRAY_TYPE. From-SVN: r170853