1. 15 Dec, 2010 1 commit
  2. 02 Dec, 2010 1 commit
  3. 01 Dec, 2010 2 commits
    • tree.c (build_common_builtin_nodes): Do not initialize… · b01890ff
      tree.c (build_common_builtin_nodes): Do not initialize BUILT_IN_PROFILE_FUNC_ENTER and BUILT_IN_PROFILE_FUNC_EXIT.
      
      
      	* tree.c (build_common_builtin_nodes): Do not initialize
      	BUILT_IN_PROFILE_FUNC_ENTER and BUILT_IN_PROFILE_FUNC_EXIT.
      	* builtins.c (expand_builtin_profile_func): Remove.
      	(expand_builtin): Do not handle BUILT_IN_PROFILE_FUNC_ENTER and
      	BUILT_IN_PROFILE_FUNC_EXIT.
      	* builtins.def (profile_func_enter, profile_func_exit): Remove stubs.
      	(__cyg_profile_func_enter, __cyg_profile_func_exit): New.
      	* gimplify.c (gimplify_function_tree): Reorganize code calling
      	profiling functions.
      
      From-SVN: r167342
      Jan Hubicka committed
    • common.opt (main_input_filename, [...]): New Variable entries. · a803773f
      	* common.opt (main_input_filename, main_input_basename,
      	main_input_baselength): New Variable entries.  From toplev.c.
      	* final.c (output_quoted_string): Move from toplev.c.
      	* output.h (output_quoted_string): Move from toplev.h.
      	* opts-global.c (read_cmdline_options): Use gcc_options pointer to
      	access main_input_filename, main_input_baselength and
      	main_input_basename.
      	* targhooks.c: Include intl.h and opts.h.
      	(option_affects_pch_p, default_get_pch_validity): Move from
      	toplev.c.
      	* targhooks.h (option_affects_pch_p, default_get_pch_validity):
      	Move from toplev.h.
      	* toplev.c (main_input_filename, main_input_basename,
      	main_input_baselength): Move to common.opt.
      	(output_quoted_string): Move to final.c.
      	(warn_deprecated_use): Move to tree.c.
      	(option_affects_pch_p, default_get_pch_validity,
      	pch_option_mismatch, default_pch_valid_p): Move to targhooks.c.
      	* toplev.h (skip_leading_substring): Move to tree-dump.c.
      	(warn_deprecated_use): Move to tree.h.
      	(output_quoted_string): Move to output.h.
      	(main_input_filename, main_input_basename, main_input_baselength):
      	Move to common.opt.
      	(default_get_pch_validity, default_pch_valid_p): Move to
      	targhooks.c.
      	* tree-dump.c (skip_leading_substring): Move from toplev.h.
      	* tree.c (warn_deprecated_use): Move from toplev.c.
      	* tree.h (warn_deprecated_use): Move from toplev.h.
      	* c-typeck.c, config/alpha/alpha.c, config/arc/arc.c,
      	config/arm/arm.c, config/avr/avr.c, config/bfin/bfin.c,
      	config/cris/cris.c, config/crx/crx.c, config/fr30/fr30.c,
      	config/frv/frv.c, config/h8300/h8300.c, config/ia64/ia64.c,
      	config/iq2000/iq2000.c, config/lm32/lm32.c, config/m32c/m32c.c,
      	config/m32r/m32r.c, config/m68hc11/m68hc11.c, config/m68k/m68k.c,
      	config/mcore/mcore.c, config/mep/mep.c,
      	config/microblaze/microblaze.c, config/mips/mips.c,
      	config/mmix/mmix.c, config/mn10300/mn10300.c,
      	config/moxie/moxie.c, config/pa/pa.c, config/pdp11/pdp11.c,
      	config/picochip/picochip.c, config/s390/s390.c,
      	config/score/score.c, config/sh/sh.c, config/sparc/sparc.c,
      	config/spu/spu.c, config/stormy16/stormy16.c, config/v850/v850.c,
      	config/vax/vax.c, config/xtensa/xtensa.c, gimple-low.c,
      	graphite-sese-to-poly.c, plugin.c, tree-cfg.c, tree-inline.c,
      	varasm.c, xcoffout.c: Don't include toplev.h.
      	* Makefile.in (c-typeck.o, tree-inline.o, tree-cfg.o,
      	gimple-low.o, graphite-sese-to-poly.o, targhooks.o, plugin.o,
      	varasm.o, xcoffout.o): Update dependencies.
      	* config/arm/t-arm (arm.o): Update dependencies.
      	* config/spu/t-spu-elf (spu.o): Update dependencies.
      
      cp:
      	* cp-objcp-common.c, lex.c, typeck.c: Don't include toplev.h.
      	* Make-lang.in (cp/lex.o, cp/cp-objcp-common.o, cp/typeck2.o):
      	Update dependencies.
      
      java:
      	* jcf-parse.c: Don't include toplev.h.
      	* Make-lang.in (java/jcf-parse.o): Don't depend on toplev.h.
      
      From-SVN: r167329
      Joseph Myers committed
  4. 30 Nov, 2010 2 commits
  5. 25 Nov, 2010 1 commit
    • target.def (supports_split_stack, [...]): Take gcc_options parameters. · d5fabb58
      	* target.def (supports_split_stack, except_unwind_info): Take
      	gcc_options parameters.
      	* targhooks.c (default_except_unwind_info,
      	dwarf2_except_unwind_info, sjlj_except_unwind_info): Take
      	gcc_options parameters.
      	* targhooks.h (default_except_unwind_info,
      	dwarf2_except_unwind_info, sjlj_except_unwind_info): Update
      	prototypes.
      	* doc/tm.texi.in (TARGET_IRA_COVER_CLASSES,
      	TARGET_HAVE_NAMED_SECTIONS, TARGET_UNWIND_TABLES_DEFAULT):
      	Document that hooks must not be modified.
      	(TARGET_EXCEPT_UNWIND_INFO): Refer to opts argument.
      	* doc/tm.texi: Regenerate.
      	* defaults.h (STACK_OLD_CHECK_PROTECT, STACK_CHECK_PROTECT): Pass
      	&global_options to targetm.except_unwind_info.
      	* dwarf2out.c (dwarf2out_do_frame, dwarf2out_do_cfi_asm,
      	dwarf2out_begin_prologue, dwarf2out_frame_init,
      	dwarf2out_frame_finish, dwarf2out_assembly_start): Pass
      	&global_options to targetm.except_unwind_info.
      	* except.c (init_eh, finish_eh_generation,
      	gate_convert_to_eh_region_ranges,
      	output_one_function_exception_table): Pass &global_options to
      	targetm.except_unwind_info.
      	* expr.c (build_personality_function): Pass &global_options to
      	targetm.except_unwind_info.
      	* function.c (expand_function_end): Pass &global_options to
      	targetm.except_unwind_info.
      	* hooks.c (hook_bool_bool_gcc_optionsp_false): New.
      	* hooks.h (hook_bool_bool_gcc_optionsp_false): Declare.
      	* opts.c (finish_options): Pass opts to targetm.except_unwind_info
      	and targetm.supports_split_stack.  Remove assertions about opts
      	and opts_set.
      	(common_handle_option): Remove assertions about opts, opts_set and
      	dc.
      	* tree-tailcall.c (suitable_for_tail_call_opt_p): Pass
      	&global_options to targetm.except_unwind_info.
      	* tree.c (build_common_builtin_nodes: Pass &global_options to
      	targetm.except_unwind_info.
      	* config/arm/arm.c (arm_except_unwind_info): Add gcc_options
      	parameter.
      	(arm_compute_func_type, arm_expand_prologue, thumb_pushpop,
      	thumb1_expand_prologue, thumb1_output_function_prologue,
      	arm_unwind_emit, arm_output_fn_unwind): Update calls to
      	arm_except_unwind_info.
      	* config/i386/i386.c (ix86_supports_split_stack): Add gcc_options
      	parameter.
      	* config/ia64/ia64.c (ia64_except_unwind_info): Add gcc_options
      	parameter.
      	(ia64_output_function_prologue, ia64_add_bundle_selector_before,
      	ia64_reorg, ia64_asm_unwind_emit): Update calls to
      	ia64_except_unwind_info.
      	* config/pa/pa.c (pa_option_override): Pass &global_options to
      	targetm.except_unwind_info.
      	* config/picochip/picochip-protos.h (picochip_except_unwind_info):
      	Remove prototype.
      
      c-family:
      	* c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
      	targetm.except_unwind_info.
      
      From-SVN: r167145
      Joseph Myers committed
  6. 11 Nov, 2010 1 commit
  7. 09 Nov, 2010 1 commit
    • tree.h (contains_placeholder_p): Fix comment. · 98cd3025
      	* tree.h (contains_placeholder_p): Fix comment.
      	(type_contains_placeholder_p): Adjust comment.
      	* tree.c (contains_placeholder_p): Fix comment.
      	(type_contains_placeholder_1): Do not recurse on pointed-to types and
      	adjust comment.
      	(type_contains_placeholder_p): Add comment.
      ada/
      	* gcc-interface/decl.c (finish_fat_pointer_type): New function.
      	(gnat_to_gnu_entity) <E_Array_Type>: Use it to build the fat pointer
      	type.
      	<E_Access_Type>: Likewise.
      
      From-SVN: r166484
      Eric Botcazou committed
  8. 03 Nov, 2010 1 commit
    • builtins.c (fold_builtin_signbit): Use build_zero_cst instead of fold_convert. · e8160c9a
      gcc/
      	* builtins.c (fold_builtin_signbit): Use build_zero_cst instead of
      	fold_convert.
      	* c-typeck.c (build_function_call_vec): Likewise.
      	* cfgexpand.c (expand_debug_expr): Likewise.
      	* cgraphunit.c (assemble_thunk): Likewise.
      	* config/sparc/sparc.c (sparc_fold_builtin): Likewise.
      	* fold-const.c (fold_unary_loc, fold_mult_zconjz): Likewise.
      	(fold_binary_loc, fold_ternary_loc): Likewise.
      	* gimple-fold.c (get_symbol_constant_value): Likewise.
      	* gimple-low.c (lower_builtin_setjmp): Likewise.
      	* gimple.c (gimple_cond_get_ops_from_tree): Likewise.
      	* gimplify.c (gimplify_init_constructor): Likewise.
      	* lambda.h (build_linear_expr): Likewise.
      	* omp-low.c (omp_reduction_init): Likewise.
      	* tree-inline.c (remap_ssa_name): Likewise.
      	* tree-object-size.c (compute_object_sizes): Likewise.
      	* tree-sra.c (init_subtree_with_zero): Likewise.
      	(sra_ipa_modify_assign): Likewise.
      	* tree-ssa-copy.c (propagate_tree_value_into_stmt): Likewise.
      	* tree-ssa-reassoc.c (eliminate_duplicate_pair): Likewise.
      	(eliminate_plus_minus_pair, eliminate_not_pairs): Likewise.
      	(undistribute_ops_list): Likewise.
      	* tree-ssa-sccvn.c (vn_reference_lookup_3): Likewise.
      	* tree-vect-stmts.c (vectorizable_call): Likewise.
      	* tree.c (build_vector_from_ctor, build_one_cst): Likewise.
      	(build_zero_cst): Handle more cases directly.  Update comment.
      
      gcc/cp/
      	* class.c (build_base_path, add_vcall_offset): Use build_zero_cst
      	instead of fold_convert.
      	* init.c (build_zero_init): Likewise.
      	* typeck.c (cp_build_binary_op): Likewise.
      
      gcc/fortran/
      	* trans-decl.c (add_argument_checking): Use build_zero_cst instead of
      	fold_convert.
      	* trans-expr.c (gfc_conv_missing_dummy, fill_with_spaces): Likewise.
      	* trans-stmt.c (gfc_trans_do): Likewise.
      
      From-SVN: r166227
      Nathan Froyd committed
  9. 02 Nov, 2010 1 commit
  10. 01 Nov, 2010 1 commit
  11. 31 Oct, 2010 1 commit
    • fold-const.c (build_zero_vector): Use build_vector_from_val. · b9acc9f1
      	* fold-const.c (build_zero_vector): Use build_vector_from_val.
      	* tree-vect-loop.c (get_initial_def_for_induction): Likewise.
      	(get_initial_def_for_reduction): Likewise.
      	* tree-vect-slp.c (vect_get_constant_vectors): Likewise.
      	* tree-vect-stmts.c (vect_get_vec_def_for_operand): Likewise.
      	* tree.c (build_one_cst): Likewise.
      	(build_vector_from_val): Use types_compatible_p for assert.
      
      From-SVN: r166102
      Nathan Froyd committed
  12. 29 Oct, 2010 1 commit
    • tree.h (build_vector_from_val): Declare. · f87bd04b
      2010-10-29  Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
      	Andrew Pinski <pinskia@gmail.com>
      
      	* tree.h (build_vector_from_val): Declare.
      	* tree.c (build_vector_from_val): New function.
      	* c-typeck.c (build_binary_op): Handle vector shifting.
      	* doc/extend.texi: Description of the vector shifting operation.
      
      	testsuite/
      	* gcc.c-torture/execute/vector-shift.c: New testcase.
      	* gcc.c-torture/execute/vector-shift1.c: Likewise.
      	* gcc.c-torture/execute/vector-shift2.c: Likewise.
      	* gcc.dg/vector-shift.c: Likewise.
      	* gcc.dg/vector-shift1.c: Likewise.
      	* gcc.dg/torture/vector-shift2.c: Likewise.
      	* gcc.dg/vector-shift3.c: Likewise.
      	* gcc.dg/simd-1b.c: Adjust.
      
      Co-Authored-By: Andrew Pinski <pinskia@gmail.com>
      
      From-SVN: r166061
      Artjoms Sinkarovs committed
  13. 21 Oct, 2010 1 commit
  14. 18 Oct, 2010 1 commit
  15. 15 Oct, 2010 2 commits
  16. 14 Oct, 2010 2 commits
    • sched-deps.c (sched_insn_is_legitimate_for_speculation): Invoke… · a61c3633
      sched-deps.c (sched_insn_is_legitimate_for_speculation): Invoke may_trap_or_fault_p instead of may_trap_p predicate.
      
      	* sched-deps.c (sched_insn_is_legitimate_for_speculation): Invoke
      	may_trap_or_fault_p instead of may_trap_p predicate.
      	* tree.c (substitute_in_expr): Propagate the TREE_THIS_NOTRAP flag.
      	(substitute_placeholder_in_expr): Likewise.
      	* tree-inline.c (remap_gimple_op_r): Propagate the TREE_THIS_NOTRAP
      	flag on MEM_REF nodes.
      	(copy_tree_body_r): Propagate the TREE_READONLY and TREE_THIS_NOTRAP
      	flags on INDIRECT_REF nodes.
      ada/
      	* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Set
      	TREE_THIS_NOTRAP on the INDIRECT_REF node built for the template.
      	* gcc-interface/trans.c (Identifier_to_gnu): Set TREE_THIS_NOTRAP on
      	the INDIRECT_REF node built for objects used by reference.
      	* gcc-interface/utils2.c (build_binary_op): Add short-circuit for
      	constant result. Set TREE_THIS_NOTRAP on ARRAY_REF and ARRAY_RANGE_REF.
      	(gnat_stabilize_reference_1): Propagate the TREE_THIS_NOTRAP flag.
      
      From-SVN: r165468
      Eric Botcazou committed
    • re PR c++/44561 (using nullptr_t with -flto/-fwhopr causes ICE: tree code… · 1e85e720
      re PR c++/44561 (using nullptr_t with -flto/-fwhopr causes ICE: tree code 'lang_type' is not supported in gimple streams)
      
      2010-10-14  Richard Guenther  <rguenther@suse.de>
      
      	PR lto/44561
      	* tree.def (NULLPTR_TYPE): New tree code.
      	* dbxout.c (dbxout_type): Handle NULLPTR_TYPE.
      	* dwarf2out.c (is_base_type): Likewise.
      	(gen_type_die_with_usage): Likewise.
      	* sdbout.c (plain_type_1): Likewise.
      	* tree.c (build_int_cst_wide): Likewise.
      	* gimple.c (gimple_types_compatible_p_1): NULLPTR_TYPE types
      	are equal.
      
      	cp/
      	* cp-tree.h (NULLPTR_TYPE_P): Adjust.
      	* decl.c (cxx_init_decl_processing): Build a NULLPTR_TYPE node,
      	use build_int_cst.
      	* error.c (dump_type): Handle NULLPTR_TYPE.
      	(dump_type_prefix): Likewise.
      	(dump_type_suffix): Likewise.
      	* mangle.c (write_type): Likewise.
      	* name-lookup.c (arg_assoc_type): Likewise.
      	* rtti.c (typeinfo_in_lib_p): Likewise.
      	* pt.c (tsubst): Likewise.
      
      	* g++.dg/lto/20101010-3_0.C: New testcase.
      	* g++.dg/lto/20101010-4_0.C: Likewise.
      
      From-SVN: r165462
      Richard Guenther committed
  17. 13 Oct, 2010 1 commit
  18. 09 Oct, 2010 1 commit
  19. 08 Oct, 2010 1 commit
    • lto-streamer-in.c (lto_input_ts_decl_minimal_tree_pointers): Re-construct BLOCK_VARS. · bd39cb52
      2010-10-08  Richard Guenther  <rguenther@suse.de>
      
      	* lto-streamer-in.c (lto_input_ts_decl_minimal_tree_pointers):
      	Re-construct BLOCK_VARS.
      	(lto_input_ts_block_tree_pointers): Do not stream BLOCK_VARS.
      	* lto-streamer-out.c (lto_output_ts_block_tree_pointers): Likewise.
      	* tree.c (free_lang_data_in_block): Remove.
      	(free_lang_data_in_decl): Do not touch DECL_CONTEXT of non-PARM_DECLs.
      	Do not touch the BLOCK tree.
      	* expr.c (expand_expr_real_1): Allow externals.
      
      From-SVN: r165191
      Richard Guenther committed
  20. 30 Sep, 2010 1 commit
    • opt-functions.awk (static_var): Update comment. · 46625112
      	* opt-functions.awk (static_var): Update comment.
      	(var_ref): Return offsetof expression or -1, not variable address.
      	* optc-gen.awk: Generate structure field initializers instead of
      	static variables.  Expect -1 for missing variables instead of null
      	pointer.  Add gcc_options parameters to generated functions.
      	* opth-gen.awk: Generate structure fields for static variables.
      	Add gcc_options parameters to generated functions.
      	* common.opt (optimize, optimize_size): Add variables.
      	* config/i386/i386-c.c (ix86_pragma_target_parse): Pass
      	&global_options to cl_target_option_restore.
      	* config/i386/i386.c (ix86_valid_target_attribute_p): Pass
      	&global_options to cl_optimization_restore, cl_target_option_save
      	and cl_target_option_restore.
      	(ix86_set_current_function): Pass &global_options to
      	cl_target_option_restore.
      	* config/pdp11/pdp11.h (optimize): Remove.
      	* config/rs6000/rs6000.h (optimize): Remove.
      	* config/sh/sh.h (optimize): Remove.
      	* config/xtensa/xtensa.h (optimize): Remove.
      	* coretypes.h (struct gcc_options): Declare.
      	* diagnostic.c (diagnostic_initialize): Initialize
      	context->option_state.
      	(diagnostic_report_diagnostic): Pass option_state to
      	option_enabled hook.
      	* diagnostic.h (diagnostic_context.option_enabled): Add void *
      	parameter.
      	(diagnostic_context.option_state): New field.
      	* final.c (final_start_function, final, final_scan_insn): Rename
      	optimize parameter to optimize_p.
      	* flags.h (optimize, optimize_size): Remove.
      	* function.c (invoke_set_current_function_hook): Pass
      	&global_options to cl_optimization_restore.
      	* gcc.c (driver_handle_option): Take gcc_options parameter.
      	Assert that it is &global_options.
      	(process_command): Pass &global_options to read_cmdline_option.
      	* ipa-pure-const.c (suggest_attribute): Pass &global_options to
      	option_enabled.
      	* lto-opts.c (lto_reissue_options): Use option_flag_var.  Pass
      	&global_options to set_option.
      	* opts-common.c (handle_option, handle_generated_option,
      	read_cmdline_option, set_option): Take explicit gcc_options
      	parameters.  Use option_flag_var.
      	(option_flag_var): New.
      	* opts.c (common_handle_option, lang_handle_option,
      	target_handle_option): Take gcc_options parameter.  Assert that it
      	is &global_options.
      	(read_cmdline_options): Pass &global_options to
      	read_cmdline_option.
      	(print_filtered_help): Use option_flag_var.  Pass &global_options
      	to option_enabled.
      	(common_handle_option): Use option_flag_var.
      	(option_enabled): Take opts parameter.  Use option_flag_var.
      	(get_option_state): Take gcc_options parameter.  Use
      	option_flag_var.  Pass gcc_options parameter to option_enabled.
      	(enable_warning_as_error): Pass &global_options to
      	handle_generated_option.
      	* opts.h (struct cl_option): Change flag_var to flag_var_offset.
      	(cl_option_handler_func.handler): Take gcc_options parameter.
      	(option_enabled, get_option_state, set_option, handle_option,
      	handle_generated_option, read_cmdline_option): Take gcc_options
      	parameters.
      	* toplev.c (optimize, optimize_size): Remove.
      	(print_switch_values): Pass &global_options to option_enabled.
      	(option_affects_pch_p): Use option_flag_var.  Pass &global_options
      	to get_option_state.
      	(general_init): Initialize global_dc->option_state.
      	* tree.c (build_optimization_node): Pass &global_options to
      	cl_optimization_save.
      	(build_target_option_node): Pass &global_options to
      	cl_target_option_save.
      
      c-family:
      	* c-common.c (handle_optimize_attribute): Pass &global_options to
      	cl_optimization_save and cl_optimization_restore.
      	* c-opts.c (c_common_handle_option): Pass &global_options to
      	handle_generated_option.
      	* c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
      	(handle_pragma_pop_options, handle_pragma_reset_options): Pass
      	&global_options to cl_optimization_restore.
      
      From-SVN: r164751
      Joseph Myers committed
  21. 28 Sep, 2010 1 commit
  22. 24 Sep, 2010 1 commit
    • extend.texi: (attribute leaf): Document. · 46a4da10
      	* doc/extend.texi: (attribute leaf): Document.
      	* tree.c (local_define_builtin): Handle ECF_LEAF.
      	(build_common_builtin_nodes): Set ECF_LEAF where needed.
      	* tree.h (ECF_LEAF): New.
      	* ipa-reference.c (propagate_bits): For leaf calls propagate ever overwrittable
      	and unavailable functions.
      	(ipa_init): Put all_module_statics into optimization_summary_obstack.
      	(copy_global_bitmap): Do not copy all_module_statics.
      	(read_write_all_from_decl): Use cgraph_node argument; handle ECF_LEAF.
      	(propagate): Handle overwritable and unavailable leaf functions;
      	initialize global info for overwritable and unavailable leaf functions;
      	do not free all module statics.
      	(ipa_reference_get_not_read_global, ipa_reference_get_not_written_global):
      	leaf calls don't clobber local statics.
      	* calls.c (flags_from_decl_or_type): Handle leaf.
      	* tree-cfg.c (stmt_can_make_abnormal_goto): Leaf functions can't do
      	abnormal gotos.
      
      	* c-common.c (handle_leaf_attribute): New function.
      	(struct attribute_spec c_common_att): Add leaf.
      
      	* gcc.dg/tree-ssa/leaf.c: New testcase.
      
      From-SVN: r164606
      Jan Hubicka committed
  23. 20 Sep, 2010 1 commit
    • langhooks.h (struct lang_hooks_for_types): Remove hash_types field. · 523e82a7
      	* langhooks.h (struct lang_hooks_for_types): Remove hash_types field.
      	* langhooks-def.h (LANG_HOOKS_HASH_TYPES): Delete.
      	(LANG_HOOKS_FOR_TYPES_INITIALIZER): Remove LANG_HOOKS_HASH_TYPES.
      	* system.h (LANG_HOOKS_HASH_TYPES): Poison.
      	* tree.c (type_hash_canon): Do not test lang_hooks.types.hash_types.
      	(build_nonstandard_integer_type): Likewise.
      	(build_range_type_1): New function, built from...
      	(build_range_type): ...this.  Call build_range_type_1.
      	(build_nonshared_range_type): New function.
      	(build_array_type_1): New function, built from...
      	(build_array_type: ...this.  Call build_array_type_1.
      	(build_nonshared_array_type): New function.
      	* tree.h (build_nonshared_range_type): Declare.
      	(build_nonshared_array_type): Likewise.
      ada/
      	* gcc-interface/decl.c (gnat_to_gnu_entity): Replace calls to
      	build_array_type with calls to build_nonshared_array_type.
      	(substitute_in_type): Likewise.
      	* gcc-interface/misc.c (LANG_HOOKS_HASH_TYPES): Delete.
      	(LANG_HOOKS_TYPE_HASH_EQ): Define.
      	(gnat_post_options): Add 'static' keyword.
      	(gnat_type_hash_eq): New static function.
      	* gcc-interface/utils.c (fntype_same_flags_p): New function.
      	(create_subprog_type): Call it.
      	(create_index_type): Call build_nonshared_range_type and tidy up.
      	(create_range_type): Likewise.
      	* gcc-interface/gigi.h (fntype_same_flags_p): Declare.
      
      From-SVN: r164452
      Eric Botcazou committed
  24. 16 Sep, 2010 1 commit
    • tree.c (tree_node_structure_for_code): TRANSLATION_UNIT_DECL is TS_TRANSLATION_UNIT_DECL. · 6be14c0e
      2010-09-16  Richard Guenther  <rguenther@suse.de>
      
      	* tree.c (tree_node_structure_for_code): TRANSLATION_UNIT_DECL
      	is TS_TRANSLATION_UNIT_DECL.
      	(initialize_tree_contains_struct): Adjust.
      	(all_translation_units): New global vector.
      	(build_translation_unit_decl): New function.
      	* tree.h (TRANSLATION_UNIT_LANGUAGE): New macro.
      	(struct tree_translation_unit_decl): New.
      	(all_translation_units): Declare.
      	(union tree_node): Add translation_unit_decl member.
      	(build_translation_unit_decl): Declare.
      	* treestruct.def (TS_TRANSLATION_UNIT_DECL): New.
      	* lto-streamer-out.c (pack_ts_translation_unit_decl_value_fields):
      	New function.
      	(pack_value_fields): Call it.
      	(lto_output_tree_ref): Handle references to TRANSLATION_UNIT_DECL.
      	(lto_output_ts_translation_unit_decl_tree_pointers): New function.
      	(lto_output_tree_pointers): Call it.
      	* lto-streamer-in.c (lto_input_tree_ref): Handle references
      	to TRANSLATION_UNIT_DECL.
      	(unpack_ts_translation_unit_decl_value_fields): New function.
      	(unpack_value_fields): Call it.
      	(lto_input_ts_translation_unit_decl_tree_pointers): New function.
      	(lto_input_tree_pointers): Call it.
      	* lto-streamer.c (check_handled_ts_structures): Adjust.
      	* lto-streamer.h (enum LTO_tags): Add LTO_translation_unit_decl_ref.
      	* c-decl.c (all_translation_units): Remove.
      	(pop_scope): Use build_translation_unit_decl.
      	(collect_all_refs): Adjust.
      	(for_each_global_decl): Likewise.
      	(c_write_global_declarations): Likewise.
      
      	java/
      	* jcf-parse.c (current_file_list): Remove.
      	(java_parse_file): Use build_translation_unit_decl.  Adjust.
      
      From-SVN: r164331
      Richard Guenther committed
  25. 13 Sep, 2010 1 commit
    • tree.c (build_zero_cst): New. · e196b221
      	* tree.c (build_zero_cst): New.
      	* tree.h (build_zero_cst): Declare.
      	* tree-ssa-ccp.c (get_constant_value): Accept general operands.
      	(get_base_constructor): Break out from ...
      	(fold_const_aggregate_ref): Here; handle empty constructors.
      
      	* gcc.dg/torture/pr23821.c: Drop static keyword.
      	* gcc.dg/tree-ssa/loop-19.c: Likewise.
      	* gcc.dg/tree-ssa/foldconst-4.c: New.
      
      From-SVN: r164250
      Jan Hubicka committed
  26. 10 Sep, 2010 4 commits
    • tree.c (make_vector_type): Do not set TYPE_DEBUG_REPRESENTATION_TYPE. · bedbdfcf
      2010-09-10  Richard Guenther  <rguenther@suse.de>
      
      	* tree.c (make_vector_type): Do not set TYPE_DEBUG_REPRESENTATION_TYPE.
      	* tree.h (TYPE_DEBUG_REPRESENTATION_TYPE): Remove.
      	* lto-streamer-out.c (lto_output_ts_type_tree_pointers): Do
      	not stream TYPE_DEBUG_REPRESENTATION_TYPE.
      	* lto-streamer-in.c (lto_input_ts_type_tree_pointers): Likewise.
      
      From-SVN: r164193
      Richard Guenther committed
    • re PR debug/44115 (gcc.dg/guality/sra-1.c failure) · e836611d
      2010-09-10  Richard Guenther  <rguenther@suse.de>
      
      	PR debug/44115
      	* tree.c (free_lang_data_in_decl): Do not clear DECL_DEBUG_EXPR.
      	* lto-streamer-out.c (lto_output_ts_decl_common_tree_pointers):
      	Output DECL_DEBUG_EXPR.
      	* lto-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
      	Input DECL_DEBUG_EXPR.
      
      From-SVN: r164179
      Richard Guenther committed
    • tree.c (type_hash_eq): For ARRAY_TYPEs also compare TYPE_SIZE. · 8c4353b7
      2010-09-10  Richard Guenther  <rguenther@suse.de>
      
      	* tree.c (type_hash_eq): For ARRAY_TYPEs also compare
      	TYPE_SIZE.
      	(build_index_type): Implement in terms of build_range_type.
      	(build_range_type): Do not allow NULL_TREE type, improve
      	hashing to cover more cases.  Set TYPE_STRUCTURAL_EQUALITY_P
      	if we didn't hash.
      	* c-decl.c (grokdeclarator): When modifying TYPE_SIZE manually
      	create a distinct copy of the type.
      
      From-SVN: r164174
      Richard Guenther committed
    • tree.h (build_index_2_type): Remove. · 88df93ce
      2010-09-10  Richard Guenther  <rguenther@suse.de>
      
      	* tree.h (build_index_2_type): Remove.
      	* tree.c (build_index_2_type): Remove.
      
      	ada/gcc-interface/
      	* utils.c (create_index_type): Use build_range_type.
      
      From-SVN: r164164
      Richard Guenther committed
  27. 08 Sep, 2010 1 commit
    • re PR debug/45419 (-fcompare-debug failure at -O3) · 359bea1d
      PR debug/45419
      PR debug/45408
      * tree-pretty-print.c (dump_generic_node): Disregard top-level
      qualifiers in otherwise equal MEM_REF pointer types.
      * fold-const.c (operand_equal_p): Compare pointer type of MEM_REFs.
      * tree.c (iterative_hash_expr): Hash the pointer type of MEM_REFs.
      
      From-SVN: r164031
      Alexandre Oliva committed
  28. 06 Sep, 2010 1 commit
    • tree.def (MISALIGNED_INDIRECT_REF): Remove. · be1ac4ec
      2010-09-06  Richard Guenther  <rguenther@suse.de>
      
      	* tree.def (MISALIGNED_INDIRECT_REF): Remove.
      	* tree.h (INDIRECT_REF_P): Only check for INDIRECT_REF.
      	(build_aligned_type): Declare.
      	* tree.c (check_qualified_type): Also compare TYPE_ALIGN.
      	(check_aligned_type): New function.
      	(build_aligned_type): Likewise.
      	* expr.c (expand_assignment): Handle misaligned stores via
      	TARGET_MEM_REF and MEM_REF using movmisalign_optab.
      	(expand_expr_real_1): Likewise.
      	(safe_from_p): Remove MISALIGNED_INDIRECT_REF handling.
      	* tree-vect-stmts.c (vectorizable_store): Do not build
      	MISALIGNED_INDIRECT_REF but initialize alignment information.
      	(vectorizable_load): Likewise.
      	* builtins.c (get_object_alignment): Remove MISALIGNED_INDIRECT_REF
      	handling.
      	* cfgexpand.c (expand_debug_expr): Likewise.
      	* dwarf2out.c (loc_list_from_tree): Likewise.
      	* fold-const.c (maybe_lvalue_p): Likewise.
      	(operand_equal_p): Likewise.
      	(build_fold_addr_expr_with_type_loc): Likewise.
      	* gimplify.c (gimplify_addr_expr): Likewise.
      	(gimplify_expr): Likewise.
      	* tree-cfg.c (verify_types_in_gimple_min_lval): Likewise.
      	(verify_gimple_assign_single): Likewise.
      	* tree-dump.c (dequeue_and_dump): Likewise.
      	(tree_could_trap_p): Likewise.
      	* tree-predcom.c (ref_at_iteration): Likewise.
      	* tree-pretty-print.c (dump_generic_node): Likewise.
      	(op_code_prio): Likewise.
      	(op_symbol_code): Likewise.
      	* tree-ssa-ccp.c (get_value_from_alignment): Likewise.
      	* tree-ssa-loop-im.c (for_each_index): Likewise.
      	(gen_lsm_tmp_name): Likewise.
      	* tree-ssa-loop-ivopts.c (idx_find_step): Likewise.
      	(find_interesting_uses_address): Likewise.
      	* tree-ssa-loop-prefetch.c (idx_analyze_ref): Likewise.
      	* tree-ssa-operands.c (get_expr_operands): Likewise.
      	* tree-ssa-pre.c (create_component_ref_by_pieces_1): Likewise.
      	* tree-ssa-sccvn.c (copy_reference_ops_from_ref): Likewise.
      	(ao_ref_init_from_vn_reference): Likewise.
      	* tree.c (staticp): Likewise.
      	(build1_stat): Likewise.
      	(reference_alias_ptr_type): Likewise.
      	* emit-rtl.c (set_mem_attributes_minus_bitpos): Likewise.
      	* config/rs6000/rs6000.c (rs6000_check_sdmode): Remove
      	MISALIGNED_INDIRECT_REF handling.
      
      From-SVN: r163915
      Richard Guenther committed
  29. 03 Sep, 2010 1 commit
    • tree.def (TARGET_MEM_REF): Merge TMR_SYMBOL and TMR_BASE. · 4d948885
      2010-09-03  Richard Guenther  <rguenther@suse.de>
      
      	* tree.def (TARGET_MEM_REF): Merge TMR_SYMBOL and TMR_BASE.
      	Move TMR_OFFSET to second operand.  Add TMR_INDEX2.
      	* tree.h (TMR_SYMBOL): Remove.
      	(TMR_BASE, TMR_OFFSET): Adjust.
      	(TMR_INDEX2): New.
      	* alias.c (ao_ref_from_mem): Use TMR_BASE.
      	* builtins.c (get_object_alignment): Merge TMR_BASE and
      	TMR_SYMBOL handling.
      	* cfgexpand.c (expand_debug_expr): Use TMR_BASE.
      	* gimple.c (get_base_address): Merge MEM_REF and TARGET_MEM_REF
      	handling.  Also allow TARGET_MEM_REF as base address.
      	(walk_stmt_load_store_addr_ops): TMR_BASE is always non-NULL.
      	* gimplify.c (gimplify_expr): Gimplify TMR_BASE like MEM_REF
      	base.  Gimplify TMR_INDEX2.
      	* tree-cfg.c (verify_types_in_gimple_reference): Adjust.
      	* tree-dfa.c (get_ref_base_and_extent): Likewise.
      	(get_addr_base_and_unit_offset): Likewise.
      	* tree-eh.c (tree_could_trap_p): Likewise.
      	* tree-pretty-print.c (dump_generic_node): Likewise.
      	* tree-ssa-address.c (tree_mem_ref_addr): Simplify.  Handle
      	TMR_INDEX2.
      	(create_mem_ref_raw): Merge symbol and base.  Move 2ndary
      	base to index2.
      	(get_address_description): Reconstruct addres description
      	from merged TMR_BASE and TMR_INDEX2.
      	(maybe_fold_tmr): Fold propagated addresses.
      	* tree-ssa-alias.c (indirect_ref_may_alias_decl_p): Merge
      	MEM_REF and TARGET_MEM_REF paths.
      	(indirect_refs_may_alias_p): Likewise.
      	* tree-ssa-live.c (mark_all_vars_used_1): Handle TMR_INDEX2
      	instead of TMR_SYMBOL.
      	* tree-ssa-operands.c (get_tmr_operands): Simplify.
      	* tree-ssa-pre.c (create_component_ref_by_pieces_1): Adjust
      	according to changes ...
      	* tree-ssa-sccvn.c (copy_reference_ops_from_ref): ... here.
      	Split TARGET_MEM_REF into two fields plus the base.
      	* tree.c (mem_ref_offset): Simplify.
      	* tree-ssa-loop-im.c (for_each_index): Handle TMR_INDEX2.
      	* tree-ssa-loop-ivopts.c (find_interesting_uses_address): Likewise.
      	Strip NOPs when folding MEM_REF addresses.
      	* tree-ssa-sink.c (is_hidden_global_store): Handle TARGET_MEM_REF.
      	* gimple-fold.c (maybe_fold_reference): Fold TARGET_MEM_REF here ...
      	(fold_gimple_assign): ... not here.
      
      From-SVN: r163802
      Richard Guenther committed
  30. 01 Sep, 2010 1 commit
  31. 26 Aug, 2010 1 commit
  32. 20 Aug, 2010 1 commit
    • vec.h (FOR_EACH_VEC_ELT): Define. · ac47786e
      gcc/
      	* vec.h (FOR_EACH_VEC_ELT): Define.
      	* c-decl.c: Use it.
      	* cfgloop.c: Likewise.
      	* cfgloopmanip.c: Likewise.
      	* cgraph.c: Likewise.
      	* cgraphunit.c: Likewise.
      	* combine.c: Likewise.
      	* config/bfin/bfin.c: Likewise.
      	* config/mips/mips.c: Likewise.
      	* config/rs6000/rs6000.c: Likewise.
      	* dbxout.c: Likewise.
      	* df-scan.c: Likewise.
      	* dominance.c: Likewise.
      	* dse.c: Likewise.
      	* dwarf2out.c: Likewise.
      	* except.c: Likewise.
      	* expr.c: Likewise.
      	* function.c: Likewise.
      	* gcse.c: Likewise.
      	* genattr.c: Likewise.
      	* ggc-common.c: Likewise.
      	* gimplify.c: Likewise.
      	* graphite-blocking.c: Likewise.
      	* graphite-clast-to-gimple.c: Likewise.
      	* graphite-dependences.c: Likewise.
      	* graphite-interchange.c: Likewise.
      	* graphite-poly.c: Likewise.
      	* graphite-scop-detection.c: Likewise.
      	* graphite-sese-to-poly.c: Likewise.
      	* graphite.c: Likewise.
      	* haifa-sched.c: Likewise.
      	* ifcvt.c: Likewise.
      	* implicit-zee.c: Likewise.
      	* ipa-prop.c: Likewise.
      	* ipa-struct-reorg.c: Likewise.
      	* ipa.c: Likewise.
      	* ira-build.c: Likewise.
      	* ira-color.c: Likewise.
      	* ira-emit.c: Likewise.
      	* lambda-code.c: Likewise.
      	* loop-invariant.c: Likewise.
      	* loop-unroll.c: Likewise.
      	* lower-subreg.c: Likewise.
      	* lto-cgraph.c: Likewise.
      	* lto-opts.c: Likewise.
      	* lto-streamer-in.c: Likewise.
      	* lto-streamer-out.c: Likewise.
      	* lto-streamer.c: Likewise.
      	* lto-symtab.c: Likewise.
      	* matrix-reorg.c: Likewise.
      	* opts.c: Likewise.
      	* predict.c: Likewise.
      	* print-tree.c: Likewise.
      	* sdbout.c: Likewise.
      	* sel-sched-dump.c: Likewise.
      	* sel-sched-ir.c: Likewise.
      	* sel-sched.c: Likewise.
      	* sese.c: Likewise.
      	* stor-layout.c: Likewise.
      	* tree-cfg.c: Likewise.
      	* tree-cfgcleanup.c: Likewise.
      	* tree-chrec.c: Likewise.
      	* tree-data-ref.c: Likewise.
      	* tree-emutls.c: Likewise.
      	* tree-inline.c: Likewise.
      	* tree-into-ssa.c: Likewise.
      	* tree-loop-distribution.c: Likewise.
      	* tree-loop-linear.c: Likewise.
      	* tree-mudflap.c: Likewise.
      	* tree-outof-ssa.c: Likewise.
      	* tree-parloops.c: Likewise.
      	* tree-predcom.c: Likewise.
      	* tree-pretty-print.c: Likewise.
      	* tree-scalar-evolution.c: Likewise.
      	* tree-ssa-live.c: Likewise.
      	* tree-ssa-loop-im.c: Likewise.
      	* tree-ssa-loop-ivcanon.c: Likewise.
      	* tree-ssa-loop-ivopts.c: Likewise.
      	* tree-ssa-loop-manip.c: Likewise.
      	* tree-ssa-loop-niter.c: Likewise.
      	* tree-ssa-loop-prefetch.c: Likewise.
      	* tree-ssa-phiprop.c: Likewise.
      	* tree-ssa-pre.c: Likewise.
      	* tree-ssa-reassoc.c: Likewise.
      	* tree-ssa-sccvn.c: Likewise.
      	* tree-ssa-structalias.c: Likewise.
      	* tree-ssa.c: Likewise.
      	* tree-vect-data-refs.c: Likewise.
      	* tree-vect-loop-manip.c: Likewise.
      	* tree-vect-loop.c: Likewise.
      	* tree-vect-patterns.c: Likewise.
      	* tree-vect-slp.c: Likewise.
      	* tree-vect-stmts.c: Likewise.
      	* tree-vrp.c: Likewise.
      	* tree.c: Likewise.
      	* value-prof.c: Likewise.
      	* var-tracking.c: Likewise.
      	* varasm.c: Likewise.
      	* vmsdbgout.c: Likewise.
      
      gcc/ada/
      	* gcc-interface/decl.c: Use FOR_EACH_VEC_ELT.
      	* gcc-interface/trans.c: Likewise.
      	* gcc-interface/utils.c: Likewise.
      
      gcc/c-family/
      	* c-common.c: Use FOR_EACH_VEC_ELT.
      	* c-gimplify.c: Likewise.
      	* c-pragma.c: Likewise.
      
      gcc/cp/
      	* call.c: Use FOR_EACH_VEC_ELT.
      	* class.c: Likewise.
      	* decl.c: Likewise.
      	* decl2.c: Likewise.
      	* error.c: Likewise.
      	* except.c: Likewise.
      	* mangle.c: Likewise.
      	* method.c: Likewise.
      	* name-lookup.c: Likewise.
      	* parser.c: Likewise.
      	* pt.c: Likewise.
      	* repo.c: Likewise.
      	* semantics.c: Likewise.
      	* typeck2.c: Likewise.
      
      gcc/fortran/
      	* trans-openmp.c: Use FOR_EACH_VEC_ELT.
      
      gcc/java/
      	* class.c: Use FOR_EACH_VEC_ELT.
      	* expr.c: Likewise.
      	* jcf-parse.c: Likewise.
      	* resource.c: Likewise.
      
      gcc/lto/
      	* lto.c: Use FOR_EACH_VEC_ELT.
      
      From-SVN: r163401
      Nathan Froyd committed
  33. 16 Aug, 2010 1 commit
    • tree-cfg.c (verify_types_in_gimple_reference): Verify TARGET_MEM_REF a bit. · 4b228e61
      2010-08-16  Richard Guenther  <rguenther@suse.de>
      
      	* tree-cfg.c (verify_types_in_gimple_reference): Verify
      	TARGET_MEM_REF a bit.
      	* tree-ssa-address.c (addr_for_mem_ref): Adjust.
      	(create_mem_ref_raw): Always create TMR_OFFSET, store the
      	alias pointer type via it.
      	(copy_mem_ref_info): Adjust.
      	(maybe_fold_tmr): Likewise.
      	* tree.c (mem_ref_offset): Also handle TARGET_MEM_REF.
      	(reference_alias_ptr_type): Likewise.
      	* tree.def (TARGET_MEM_REF): Remove TMR_ORIGINAL operand,
      	adjust documentation of TMR_OFFSET operand.
      	* alias.c (get_alias_set): Do not look at TMR_ORIGINAL but
      	use the alias pointer type.
      	* expr.c (expand_expr_real_1): Do not use TMR_ORIGINAL to
      	initialize mem attrs but the TMR itself.
      	* tree-eh.c (tree_could_trap_p): Handle TARGET_MEM_REF
      	similar to MEM_REF.
      	* tree-pretty-print.c (dump_generic_node): Do not dump TMR_ORIGINAL.
      	* tree-ssa-loop-ivopts.c (idx_remove_ssa_names): Remove.
      	(unshare_and_remove_ssa_names): Likewise.
      	(copy_ref_info): Adjust.
      	* tree-ssa-pre.c (create_component_ref_by_pieces_1): Simplify
      	TARGET_MEM_REF case.
      	* tree-ssa-sccvn.c (copy_reference_ops_from_ref): Do not look
      	at TMR_ORIGINAL.
      	* tree.h (TMR_ORIGINAL): Remove.
      	* gimple.c (get_base_address): For TARGET_MEM_REF with a
      	symbol return that.
      	* tree-dfa.c (get_ref_base_and_extent): Handle TARGET_MEM_REF
      	with a symbol.
      	(get_addr_base_and_unit_offset): Likewise.
      	* tree-ssa-alias.c (indirect_ref_may_alias_decl_p): Handle
      	TARGET_MEM_REFs.
      	(indirect_ref_may_alias_decl_p): Likewise.
      	(refs_may_alias_p_1): Do not bail out for TARGET_MEM_REFs.
      
      From-SVN: r163278
      Richard Guenther committed