Commit Graph

104937 Commits

Author SHA1 Message Date
Richard Guenther
e99f078847 re PR bootstrap/46528 (profiledbootstrap failure)
2010-11-26  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/46528
	PR debug/46338
	* profile.c (branch_prob): Do not split blocks based on locations
	from debug statements.

From-SVN: r167171
2010-11-26 09:49:47 +00:00
Jakub Jelinek
f1b6918835 re PR middle-end/46647 (Can't inline memset with -1)
PR middle-end/46647
	* builtins.c (fold_builtin_memset): Check c is INTEGER_CST instead
	of host_integerp check.  Use TREE_INT_CST_LOW instead of tree_low_cst.

	* gcc.dg/pr46647.c: New test.

From-SVN: r167170
2010-11-26 10:38:54 +01:00
Jakub Jelinek
fabd13b4a9 re PR bootstrap/45700 (--enable-checking=fold bootstrap failures)
PR bootstrap/45700
	* tree.h (build1_stat_loc, build2_stat_loc, build3_stat_loc,
	build4_stat_loc, build5_stat_loc, build6_stat_loc): New inlines.
	(build1_loc, build2_loc, build3_loc, build4_loc, build5_loc,
	build6_loc): Define.
	* fold-const.c (protected_set_expr_location_unshare): New inline.
	(fold_convert_loc, pedantic_non_lvalue_loc): Use it.
	(negate_expr, associate_trees, non_lvalue_loc, omit_one_operand_loc,
	pedantic_omit_one_operand_loc, omit_two_operands_loc,
	fold_truth_not_expr, invert_truthvalue_loc, make_bit_field_ref,
	optimize_bit_field_compare, make_range, fold_range_test, fold_truthop,
	build_fold_addr_expr_with_type_loc, fold_unary_loc, fold_binary_loc,
	fold_indirect_ref_1, build_fold_indirect_ref_loc): Use builN_loc
	instead of buildN followed by SET_EXPR_LOCATION or
	protected_set_expr_location.
	(fold_build1_stat_loc, fold_build2_stat_loc, fold_build3_stat_loc):
	Use buildN_stat_loc instead of buildN_stat followed by
	SET_EXPR_LOCATION.

	* trans.h (build1_stat_loc, build2_stat_loc, build3_stat_loc,
	build4_stat_loc): Removed.
	(build1_loc, build2_loc, build3_loc, build4_loc): Removed.

From-SVN: r167169
2010-11-26 10:36:29 +01:00
Jakub Jelinek
c9019218a1 re PR bootstrap/45700 (--enable-checking=fold bootstrap failures)
PR bootstrap/45700
	* tree.h (build1_stat_loc, build2_stat_loc, build3_stat_loc,
	build4_stat_loc, build5_stat_loc, build6_stat_loc): New inlines.
	(build1_loc, build2_loc, build3_loc, build4_loc, build5_loc,
	build6_loc): Define.
	* fold-const.c (protected_set_expr_location_unshare): New inline.
	(fold_convert_loc, pedantic_non_lvalue_loc): Use it.
	(negate_expr, associate_trees, non_lvalue_loc, omit_one_operand_loc,
	pedantic_omit_one_operand_loc, omit_two_operands_loc,
	fold_truth_not_expr, invert_truthvalue_loc, make_bit_field_ref,
	optimize_bit_field_compare, make_range, fold_range_test, fold_truthop,
	build_fold_addr_expr_with_type_loc, fold_unary_loc, fold_binary_loc,
	fold_indirect_ref_1, build_fold_indirect_ref_loc): Use builN_loc
	instead of buildN followed by SET_EXPR_LOCATION or
	protected_set_expr_location.
	(fold_build1_stat_loc, fold_build2_stat_loc, fold_build3_stat_loc):
	Use buildN_stat_loc instead of buildN_stat followed by
	SET_EXPR_LOCATION.

	* trans.h (build1_stat_loc, build2_stat_loc, build3_stat_loc,
	build4_stat_loc): Removed.
	(build1_loc, build2_loc, build3_loc, build4_loc): Removed.

From-SVN: r167168
2010-11-26 10:35:35 +01:00
Basile Starynkevitch
93b39277c5 Makefile.in (s-tm-texi): Remove spurous tab.
2010-11-26  Basile Starynkevitch  <basile@starynkevitch.net>

	* Makefile.in (s-tm-texi): Remove spurous tab.

From-SVN: r167167
2010-11-26 07:14:15 +00:00
Alexandre Oliva
4314b5fcf8 re PR debug/46258 (gcc.dg/tree-ssa/pr23820.c: -fcompare-debug failure with -O3 -ffloat-store)
PR debug/46258
* tree-cfg.c (replace_uses_by): Don't mark BBs as altered on
debug stmts.

From-SVN: r167162
2010-11-26 04:27:24 +00:00
Alexandre Oliva
5715dafb8a toplev.c (finalize): Add no_backend parameter.
* toplev.c (finalize): Add no_backend parameter.  Don't finish
passes when preprocessing only.  Adjust...
(do_compile): ... caller.

From-SVN: r167161
2010-11-26 04:27:04 +00:00
Alexandre Oliva
9aff220f24 re PR fortran/46020 (Improve error string for BIND(C) diagnostic for len>1 character return type)
PR other/46020
* configure.ac (CXX_FOR_TARGET): Add -funconfigured-libstdc++-v3.
* Makefile.def (CXX_FOR_TARGET): Removed from flags_to_pass.
* Makefile.tpl (CXX_FOR_TARGET_FLAG_TO_PASS): New.
(BASE_FLAGS_TO_PASS): Use it.
* configure: Rebuilt.
* Makefile.in: Rebuilt.

From-SVN: r167160
2010-11-26 04:25:32 +00:00
John David Anglin
54e07cf808 pa.md (negdf2): Condition on !flag_signed_zeros instead of flag_unsafe_math_optimizations.
* config/pa/pa.md (negdf2): Condition on !flag_signed_zeros instead of
	flag_unsafe_math_optimizations.
	(negsf2): Likewise.
	Move fnegabs related patterns together.  Only use fmpynfadd instruction
	to negate a multiply if !flag_signed_zeros is true.

From-SVN: r167159
2010-11-26 04:09:25 +00:00
GCC Administrator
964db68a6f Daily bump.
From-SVN: r167158
2010-11-26 00:20:18 +00:00
Janus Weil
6312ef4519 re PR fortran/46581 ([OOP] segfault in SELECT TYPE with associate-name)
2010-11-25  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/46581
	* trans.h (gfc_process_block_locals): Removed second argument.
	* trans-decl.c (trans_associate_var): Moved to trans-stmt.c.
	(gfc_trans_deferred_vars): Skip ASSOCIATE variables.
	(gfc_process_block_locals): Don't mark associate names to be
	initialized.
	* trans-stmt.c (trans_associate_var): Moved here from trans-decl.c.
	(gfc_trans_block_construct): Call 'trans_associate_var' from here
	to make sure SELECT TYPE with associate-name is treated correctly.

2010-11-25  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/46581
	* gfortran.dg/select_type_19.f03: New.

From-SVN: r167154
2010-11-25 23:04:59 +01:00
Uros Bizjak
be82759165 gengtype-state.c (read_state_structures): Initialize "previous".
* gengtype-state.c (read_state_structures): Initialize "previous".

From-SVN: r167153
2010-11-25 22:50:53 +01:00
François Dumont
afe96d415d debug.cc: Introduce a mutex pool in get_safe_base_mutex.
2010-11-25  François Dumont  <francois.cppdevs@free.fr>

	* src/debug.cc: Introduce a mutex pool in get_safe_base_mutex.
	Move code used to manipulate sequence safe iterators from safe
	iterator methods to safe sequence ones. Remove usage of safe iterator
	mutex, keep _Safe_iterator_base::_M_get_mutex for library backward
	binary compatibility.
	* src/Makefile.am: Build debug.cc in gnu++0x mode for _Hash_impl usage.
	* src/Makefile.in: Regenerate
	* include/debug/safe_base.h: Add _Safe_iterator_base _M_invalidate
	and _M_reset. Add _Safe_sequence_base _M_attach, _M_attach_single,
	_M_detach and _M_detach_single.
	* include/debug.safe_iterator.h, safe_iterator.tcc: Remove
	_Safe_iterator _M_invalidate and _M_invalidate_single. Implement all
	methods in terms of normal iterators rather than safe ones.
	* include/debug/safe_sequence.h: Replace _Safe_sequence
	_M_transfe_iter with _M_transfer_from_if taking the source sequence
	and a predicate signaling when a safe iterator shall be transfered.
	Add _Equal_to predicate.
	* include/debug/safe_sequence.tcc: New.
	* include/Makefile.am: Adjust.
	* include/Makefile.in: Regenerate.
	* include/debug/forward_list: Swap safe iterators in move constructor.
	Do not invalidate before begin in _M_invalidate_all method.
	Reimplement safe methods using normal iterators rather than safe ones.
	* include/debug/set.h, unordered_map, multiset.h, vector,
	unordered_set, deque, map.h, list, multimap.h: Reimplement safe method
	using normal iterators rather than safe ones.
	* testsuite/23_containers/forward_list/debug/clear.cc, swap.cc,
	move_constructor.cc, splice_after.cc, splice_after1.cc,
	splice_after2.cc, splice_after3.cc, splice_after4.cc: New.
	* testsuite/23_containers/vector/debug/multithreaded_swap.cc: New.

From-SVN: r167152
2010-11-25 20:53:39 +00:00
Nicola Pero
24e1ee3219 In gcc/objc/: 2010-11-25 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/objc/:
2010-11-25  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objc-act.c (objc_build_struct): Install TYPE_OBJC_INTERFACE
	after finish_struct, not before, otherwise it may be wiped out by
	it.  This fixes spurious warnings when a class has more than 15
	instance variables.

In gcc/testsuite/:
2010-11-25  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objc.dg/ivar-problem-1.m: New.
	* obj-c++.dg/ivar-problem-1.mm: New.

From-SVN: r167151
2010-11-25 19:50:13 +00:00
Basile Starynkevitch
92724e1d70 gentype-state.c: Add new file.
2010-11-25  Basile Starynkevitch  <basile@starynkevitch.net>
	    Jeremie Salvucci  <jeremie.salvucci@free.fr>

	* gentype-state.c: Add new file.

	* gengtype.c (type count): New variable.
	(new_structure, find_param_structure, create_pointer)
	(create_array): Use it to set state_number in types.
	(dump_everything): Improve comment.
	(main): Call read_state and write_state. Print type_count.

	* gengtype.h (type_lineloc): New function.
	(read_state, write_state): New declarations.

	* Makefile.in (GENGTYPE_FLAGS): New variable.
	(s-gtype): Run gengtype twice and generate gtype.state.
	(build/gengtype-state.o): New rule.
	(build/gengtype$(build_exeext)): Link gengtype-state.o.
	(mostlyclean): Update comment.  Remove gtype.state.


Co-Authored-By: Jeremie Salvucci <jeremie.salvucci@free.fr>

From-SVN: r167150
2010-11-25 19:03:27 +00:00
Rainer Orth
f759884521 make_sunver.pl: Use elfdump -s to extract symbols if possible, readelf -s otherwise.
* make_sunver.pl: Use elfdump -s to extract symbols if possible,
	readelf -s otherwise.

From-SVN: r167149
2010-11-25 18:16:57 +00:00
Jakub Jelinek
01e512e27c re PR middle-end/46637 (SIGSEGV in if_then_else_cond - too deep recursion)
PR middle-end/46637
	* combine.c (try_combine): When substing i2dest for i2src, pass
	1 as last argument even if
	i0_feeds_i1_n && i1_feeds_i2_n && i0dest_in_i0src.

	* gcc.c-torture/compile/pr46637.c: New test.

From-SVN: r167148
2010-11-25 19:00:47 +01:00
H.J. Lu
27f2c348e9 Add -mtune=generic to gfortran.dg/pr46519-1.f.
2010-11-25  H.J. Lu  <hongjiu.lu@intel.com>

	* gfortran.dg/pr46519-1.f: Add -mtune=generic.

From-SVN: r167147
2010-11-25 05:57:51 -08:00
H.J. Lu
de77ab7591 Properly cast integer constant char.
gcc/

2010-11-25  H.J. Lu  <hongjiu.lu@intel.com>

	PR middle-end/46647
	* builtins.c (target_char_cast): Check INTEGER_CST instead of
	host_integerp.  Replace tree_low_cst with TREE_INT_CST_LOW.

gcc/testsuite/

2010-11-25  H.J. Lu  <hongjiu.lu@intel.com>

	PR middle-end/46647
	* gcc.target/i386/pr46647.c: New.

From-SVN: r167146
2010-11-25 05:47:42 -08:00
Joseph Myers
d5fabb5835 target.def (supports_split_stack, [...]): Take gcc_options parameters.
* 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
2010-11-25 13:16:03 +00:00
Kai Tietz
9d602c5900 cgraphunit.c (process_function_and_variable_attributes): Mark dllexport-ed function/variables as needed.
2010-11-25  Kai Tietz  <kai.tietz@onevision.com>

	* cgraphunit.c (process_function_and_variable_attributes):
	Mark dllexport-ed function/variables as needed.
	* ipa.c (cgraph_externally_visible_p): Make dllexport-ed
	as externally visible.

2010-11-25  Kai Tietz  <kai.tietz@onevision.com>

	* gcc.dg/dll-8.c: New.

From-SVN: r167144
2010-11-25 13:30:07 +01:00
Eric Botcazou
c8230704c4 loop_optimization7.adb: Remove dg-require-effective-target.
* gnat.dg/loop_optimization7.adb: Remove dg-require-effective-target.
	* gnat.dg/sse_nolib.adb: Likewise.

From-SVN: r167143
2010-11-25 11:53:04 +00:00
Alexander Monakov
9ef1bf719b re PR rtl-optimization/46585 (ICE: SIGSEGV in vinsn_create (sel-sched-ir.c:1189) with -fno-dce -fschedule-insns -fselective-scheduling)
PR rtl-optimization/46585
	* sel-sched-ir.c (return_regset_to_pool): Verify that RS is not NULL.
	(vinsn_init): Skip initialization of dependencies for local NOPs.
	(vinsn_delete): Don't try to free regsets for local NOPs.
        (setup_nop_and_exit_insns): Change definition of nop_pattern.

testsuite:
	* gcc.dg/pr46585.c: New.

From-SVN: r167141
2010-11-25 13:05:00 +03:00
Alexander Monakov
d787f788f8 re PR rtl-optimization/46602 (gcc.dg/pr42245-2.c ICE on ia64)
PR rtl-optimization/46602
	* sel-sched-ir.c (maybe_tidy_empty_bb): Move checking ...
	(tidy_control_flow): Here.

From-SVN: r167140
2010-11-25 12:59:03 +03:00
Joern Rennecke
459d4972e8 re PR bootstrap/45888 (tm.texi generation is not portable, rule is broken)
2010-11-25  Joern Rennecke  <amylaar@spamcop.net>
	    Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	PR bootstrap/45888
	* Makefile.in (s-tm-texi): Remove \r occurences from tmp-tm.texi.
	Fix target.def pathname in timestamp comparison.

Co-Authored-By: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>

From-SVN: r167137
2010-11-25 08:02:13 +00:00
Richard Henderson
604e3ff316 predicates.md (pmpyshr_operand): New.
* config/ia64/predicates.md (pmpyshr_operand): New.
        * config/ia64/ia64.c (ia64_expand_unpack): New.
        (ia64_expand_widen_mul_v4hi): New.
        (ia64_expand_widen_sum): Update for pattern renames.
        (ia64_expand_dot_prod_v8qi): Likewise.
        * config/ia64/ia64-protos.h: Update.
        * config/ia64/vect.md (vecwider): New mode attribute.
        (vec_widen_umult_lo_v8qi, vec_widen_umult_hi_v8qi): New.
        (vec_widen_smult_lo_v8qi, vec_widen_smult_hi_v8qi): New.
        (pmpyshr2, pmpyshr2_u): New.
        (vec_widen_smult_lo_v4hi, vec_widen_smult_hi_v4hi): New.
        (vec_widen_umult_lo_v4hi, vec_widen_umult_hi_v4hi): New.
        (mulv2si3): New.
        (vec_pack_ssat_v4hi): Rename from pack2_sss.
        (vec_pack_usat_v4hi): Rename from *pack2_uss.
        (vec_pack_ssat_v2si): Rename from pack4_sss.
        (vec_interleave_lowv8qi): Rename from unpack1_l, use the correct
        vec_select operation.
        (vec_interleave_highv8qi): Similarly.
        (mux1_alt): Rename from *mux1_alt.
        (vec_extract_evenv8qi, vec_extract_oddv8qi): New.
        (vec_interleave_lowv4hi): Rename from unpack2_l.
        (vec_interleave_highv4hi): Rename from unpack2_h.
        (mix2_r): Rename from *mix2_r.
        (mix2_l): Similarly.
        (vec_extract_evenodd_helper): New.
        (vec_extract_evenv4hi, vec_extract_oddv4hi): New.
        (vec_interleave_lowv2si): Rename from *unpack4_l.
        (vec_interleave_highv2si): Rename from *unpack4_h.
        (vec_extract_evenv2si, vec_extract_oddv2si): New.
        (vec_interleave_lowv2sf): Rename from fmix_r.
        (vec_interleave_highv2sf): Rename from *fmix_l.
        (vec_extract_evenv2sf, vec_extract_oddv2sf): New.
        (vec_unpacku_lo_<VECINT12>, vec_unpacku_hi_<VECINT12>): New.
        (vec_unpacks_lo_<VECINT12>, vec_unpacks_hi_<VECINT12>): New.
        (vec_pack_trunc_v4hi, vec_pack_trunc_v2si): New.

testsuite:
        * lib/target-supports.exp (vect_widen_sum_hi_to_si_pattern,
        vect_widen_mult_hi_to_si, vect_sdot_qi, vect_udot_qi, vect_sdot_hi,
        vect_unpack, vect_int_mult, vect_extract_even_odd,
        vect_extract_even_odd_wide, vect_interleave): Enable for ia64.

From-SVN: r167136
2010-11-24 17:16:20 -08:00
GCC Administrator
5eee6908a1 Daily bump.
From-SVN: r167135
2010-11-25 00:18:39 +00:00
Nathan Froyd
19779181c6 targhooks.c (default_except_unwind_info): Remove MUST_USE_SJLJ_EXCEPTIONS case.
* targhooks.c (default_except_unwind_info): Remove
	MUST_USE_SJLJ_EXCEPTIONS case.
	* config/h8300/h8300.h (MUST_USE_SJLJ_EXCEPTIONS): Delete.
	* config/h8300/h8300.c (TARGET_EXCEPT_UNWIND_INFO): Define.
	* doc/tm.texi.in (MUST_USE_SJLJ_EXCEPTIONS): Delete.
	* doc/tm.texi: Regenerate.
	* system.h (MUST_USE_SJLJ_EXCEPTIONS): Poison.

From-SVN: r167131
2010-11-24 23:37:33 +00:00
Nathan Froyd
a3c1f9efdb revert accidentally committed changes
From-SVN: r167130
2010-11-24 23:32:29 +00:00
Nathan Froyd
a3abe41c30 cppbuiltin.c (define_builtin_macros_for_type_sizes): Define __FLOAT_WORD_ORDER__ according to FLOAT_WORDS_BIG_ENDIAN.
gcc/
	* cppbuiltin.c (define_builtin_macros_for_type_sizes): Define
	__FLOAT_WORD_ORDER__ according to FLOAT_WORDS_BIG_ENDIAN.
	* config/dfp-bit.h (LIBGCC2_FLOAT_WORDS_BIG_ENDIAN): Delete.
	* doc/cpp.texi (__FLOAT_WORD_ORDER__): Document.
	* system.h (LIBGCC2_FLOAT_WORDS_BIG_ENDIAN): Poison.

libgcc/
	* config/libbid/bid_conf.h (BID_BIG_ENDIAN): Define in terms of
	__FLOAT_WORD_ORDER__.
	* config/libbid/bid_gcc_intrinsics.h (LIBGCC2_FLOAT_WORDS_BIG_ENDIAN):
	Delete.

libdecnumber/
	* dconfig.h (LIBGCC2_FLOAT_WORDS_BIG_ENDIAN): Delete.
	(WORDS_BIG_ENDIAN): Define based on value of __FLOAT_WORD_ORDER__.

From-SVN: r167129
2010-11-24 23:29:41 +00:00
Iain Sandoe
fb9041eab3 fortran.exp: Add paths for libquadmath.
libgomp:

	* testsuite/libgomp.fortran/fortran.exp: Add paths for libquadmath.

From-SVN: r167127
2010-11-24 19:26:27 +00:00
H.J. Lu
f0145bb816 Don't check TREE_THIS_VOLATILE in ix86_expand_call.
gcc/

2010-11-24  H.J. Lu  <hongjiu.lu@intel.com>

	PR target/46519
	* config/i386/i386.c (ix86_expand_call): Don't check
	TREE_THIS_VOLATILE.

gcc/testsuite/

2010-11-24  H.J. Lu  <hongjiu.lu@intel.com>

	PR target/46519
	* gfortran.dg/pr46519-1.f: New.

From-SVN: r167126
2010-11-24 11:16:40 -08:00
H.J. Lu
617e6634a2 Improve vzeroupper optimization.
gcc/

2010-11-24  H.J. Lu  <hongjiu.lu@intel.com>

	PR target/46519
	* config/i386/i386.c (upper_128bits_state): New.
	(block_info_def): Remove upper_128bits_set and done.  Add state,
	referenced, count, processed and rescanned. 
	(check_avx256_stores): Updated.
	(move_or_delete_vzeroupper_2): Updated. Handle deleted BB_END.
	Call note_stores only if needed.  Set referenced and count.
	(move_or_delete_vzeroupper_1): Updated.  Set rescan_vzeroupper_p.
	(rescan_move_or_delete_vzeroupper): New.
	(move_or_delete_vzeroupper):  Process and rescan all all basic
	blocks instead of predecessor blocks of all exit points.
	(ix86_option_override_internal): Enable vzeroupper optimization
	only for -fexpensive-optimizations and not optimizing for size.
	(use_avx256_p): Removed.
	(init_cumulative_args): Don't set use_avx256_p.
	(ix86_function_arg): Likewise.
	(ix86_expand_move): Likewise.
	(ix86_expand_vector_move_misalign): Likewise.
	(ix86_local_alignment): Likewise.
	(ix86_minimum_alignment): Likewise.
	(ix86_expand_epilogue): Don't check use_avx256_p when generating
	vzeroupper.
	(ix86_expand_call): Likewise.

	* config/i386/i386.h (machine_function): Remove use_vzeroupper_p
	and use_avx256_p.  Add rescan_vzeroupper_p.

gcc/testsuite/

2010-11-24  H.J. Lu  <hongjiu.lu@intel.com>

	PR target/46519
	* gcc.target/i386/avx-vzeroupper-10.c: Expect no avx_vzeroupper.
	* gcc.target/i386/avx-vzeroupper-11.c: Likewise.

	* gcc.target/i386/avx-vzeroupper-14.c: Replace -O0 with -O2.
	* gcc.target/i386/avx-vzeroupper-15.c: Likewise.
	* gcc.target/i386/avx-vzeroupper-16.c: Likewise.
	* gcc.target/i386/avx-vzeroupper-17.c: Likewise.

	* gcc.target/i386/avx-vzeroupper-20.c: New.
	* gcc.target/i386/avx-vzeroupper-21.c: Likewise.
	* gcc.target/i386/avx-vzeroupper-22.c: Likewise.
	* gcc.target/i386/avx-vzeroupper-23.c: Likewise.
	* gcc.target/i386/avx-vzeroupper-24.c: Likewise.
	* gcc.target/i386/avx-vzeroupper-25.c: Likewise.
	* gcc.target/i386/avx-vzeroupper-26.c: Likewise.

From-SVN: r167124
2010-11-24 10:24:39 -08:00
Joseph Myers
a19ff17794 * toplev.c: Include <signal.h>.
From-SVN: r167123
2010-11-24 17:46:21 +00:00
Richard Guenther
ecf9b8aefc re PR lto/43218 ([LTO] Conflicting function types cause ICE)
2010-11-24  Richard Guenther  <rguenther@suse.de>

	PR lto/43218
	* lto-symtab.c (lto_cgraph_replace_node): Mark edges with
	conflicting function signatures as non-inlineable.

	* gcc.dg/lto/20100423-1_0.c: Enable for all LTO modes.

From-SVN: r167122
2010-11-24 17:06:41 +00:00
Jakub Jelinek
0d40d51cf5 re PR rtl-optimization/46614 (gcc.dg/vect/vect-strided-u8-i8-gap4.c FAILs with -fno-rename-registers -fsched2-use-superblocks)
PR rtl-optimization/46614
	* sched-deps.c (NON_FLUSH_JUMP_KIND, NON_FLUSH_JUMP_P): Define.
	 (deps_analyze_insn): Mark JUMP_INSNs in
	last_pending_memory_flush that weren't added through
	flush_pending_lists with NON_FLUSH_JUMP_KIND.
	(sched_analyze_2, sched_analyze_insn): Check NON_FLUSH_JUMP_P
	on INSN_LIST instead of JUMP_P check on its operand.
	* sched-rgn.c (concat_INSN_LIST): Copy over REG_NOTE_KIND.

	* gcc.dg/pr46614.c: New test.

From-SVN: r167121
2010-11-24 17:56:44 +01:00
Tobias Burnus
6a227990f7 re PR fortran/46638 (Wrong result with TRANSFER from string to DT)
2010-11-24  Tobias Burnus  <burnus@net-b.de>

        PR fortran/46638
        * target-memory.c (gfc_interpret_derived): Correctly handle
        component offset.

2010-11-24  Tobias Burnus  <burnus@net-b.de>

        PR fortran/46638
        * gfortran.dg/transfer_simplify_10.f90: New.

From-SVN: r167119
2010-11-24 17:42:06 +01:00
Benjamin Kosnik
094a14eff7 tuple: Mark more constructors constexpr.
2010-11-24  Benjamin Kosnik  <bkoz@redhat.com>

	* include/std/tuple: Mark more constructors constexpr.
	* include/bits/stl_pair.h: Same.
	* testsuite/20_util/tuple/requirements/dr801.cc: New.
	* testsuite/20_util/pair/requirements/dr801.cc: New.
	* testsuite/20_util/tuple/cons/constexpr.cc: Add cases for new
	constexpr constructors.
	* testsuite/20_util/pair/cons/constexpr.cc: Same.
	* testsuite/20_util/pair/comparison_operators/constexpr.cc: New.

	* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Adjust line number.

From-SVN: r167118
2010-11-24 16:33:14 +00:00
Richard Guenther
e0cbb51bee lto-streamer-in.c (input_gimple_stmt): Use types_compatible_p.
2010-11-24  Richard Guenther  <rguenther@suse.de>

	* lto-streamer-in.c (input_gimple_stmt): Use types_compatible_p.

From-SVN: r167116
2010-11-24 15:42:27 +00:00
Richard Guenther
dbe9f23ca7 re PR lto/46606 (ICE in input_gimple_stmt in lto1)
2010-11-24  Richard Guenther  <rguenther@suse.de>

	PR lto/46606
	* lto-streamer-in.c (input_gimple_stmt): When we cannot find
	a FIELD_DECL that is type correct issue a warning and fixup
	with a VIEW_CONVERT_EXPR.

From-SVN: r167115
2010-11-24 14:00:43 +00:00
Basile Starynkevitch
ae758cb2fd invoke.texi (Options for Debugging Your Program or GCC): Explain static numbering of dump files.
2010-11-24  Basile Starynkevitch  <basile@starynkevitch.net>

	* doc/invoke.texi (Options for Debugging Your Program or GCC):
	Explain static numbering of dump files.

From-SVN: r167114
2010-11-24 13:45:10 +00:00
Joseph Myers
7cd2305059 common.opt (user_vect_verbosity_level): New Variable entry.
* common.opt (user_vect_verbosity_level): New Variable entry.
	(ftree-vectorizer-verbose=): Mark as UInteger.
	* flag-types.h (enum vect_verbosity_levels): Move from enum
	verbosity_levels in tree-vectorizer.h.
	* opts.c: Don't include tree.h.
	(vect_set_verbosity_level): Move from tree-vectorizer.c.  Use
	gcc_options parameter; take integer option argument.
	(common_handle_option): Update call to vect_set_verbosity_level.
	* tree-vectorizer.c (user_vect_verbosity_level): Remove.
	(vect_set_verbosity_level): Move to opts.c.
	(vect_verbosity_level, vect_print_dump_info): Update for change of
	enum name.
	* tree-vectorizer.h (enum verbosity_levels): Move to flag-types.h.
	(vect_print_dump_info): Update for change of enum name.
	* tree.h (vect_set_verbosity_level): Remove.
	* Makefile.in (opts.o): Update dependencies.

From-SVN: r167113
2010-11-24 13:28:38 +00:00
H.J. Lu
46cb1e5254 Correct PR #.
From-SVN: r167112
2010-11-24 05:15:55 -08:00
Jakub Jelinek
918a6af066 re PR middle-end/46629 (Failed to build 200.sixtrack in SPEC CPU 2000)
PR middle-end/46629
	* gfortran.dg/lto/pr46629_0.f90: New test.

From-SVN: r167110
2010-11-24 11:18:15 +01:00
Paolo Carlini
3f61a98253 constexpr.cc: Add dg-require* directives.
2010-11-24  Paolo Carlini  <paolo.carlini@oracle.com>

	* testsuite/30_threads/future/cons/constexpr.cc: Add dg-require*
	directives.
	* testsuite/30_threads/shared_future/cons/constexpr.cc: Likewise.

From-SVN: r167109
2010-11-24 10:08:49 +00:00
Jakub Jelinek
8a269cb779 re PR middle-end/46629 (Failed to build 200.sixtrack in SPEC CPU 2000)
PR middle-end/46629
	* cfgexpand.c (maybe_cleanup_end_of_block): Test NEXT_INSN (insn)
	instead of insn with any_condjump_p.

From-SVN: r167108
2010-11-24 09:57:37 +01:00
Mingjie Xing
19804c9217 Add loongson3a integer mul/div patterns
From-SVN: r167107
2010-11-24 01:44:24 +00:00
Joseph Myers
299404a1ec common.opt (initial_max_fld_align, [...]): New Variable entries.
* common.opt (initial_max_fld_align, flag_debug_asm,
	flag_dump_rtl_in_asm, flag_dump_all_passed, rtl_dump_and_exit,
	flag_print_asm_name, graph_dump_format, help_printed,
	help_columns, flag_opts_finished): New Variable entries.
	(fdbg-cnt-list, fdbg-cnt=, fdebug-prefix-map=, frandom-seed,
	frandom-seed=): Mark deferred.
	(fsched-verbose=): Use UInteger and Var.
	* flags.h (set_struct_debug_option, flag_print_asm_name,
	rtl_dump_and_exit, flag_debug_asm, flag_dump_rtl_in_asm,
	graph_dump_format): Don't declare here.
	* haifa-sched.c (sched_verbose_param, fix_sched_param): Remove.
	* opts-global.c: Include dbgcnt.h and debug.h.
	(decode_options): Pass location to finish_options.
	(handle_common_deferred_options): Check flag_dump_all_passed.
	Handle OPT_fdbg_cnt_, OPT_fdbg_cnt_list, OPT_fdebug_prefix_map_,
	OPT_frandom_seed and OPT_frandom_seed_.  Don't assert on
	OPT_fstack_limit.
	* opts.c: Don't include toplev.h, dbgcnt.h or debug.h.
	(set_struct_debug_option): Add location_t parameter.  Update
	recursive call.  Use error_at.
	(default_options_optimization): Use error_at.
	(finish_options): Add location_t parameter.  Use
	opts->x_flag_opts_finished instead of first_time_p.  Use
	opts->x_optimize instead of optimize.  Use error_at.  Pass
	location to inform.
	(print_filtered_help): Use opts->x_help_printed to track what
	options have been printed.
	(print_specific_help): Use opts->x_help_columns to track number of
	columns.
	(common_handle_option): Pass locations and gcc_options pointers to
	more functions.  Use warning_at instead of fnotice and warning.
	Don't handle OPT_fdbg_cnt_, OPT_fdbg_cnt_list or
	OPT_fdebug_prefix_map_.  Use error_at.  Set
	opts->x_initial_max_fld_align; don't set maximum_field_alignment.
	Don't handle OPT_frandom_seed or OPT_frandom_seed_.  Don't handle
	OPT_fsched_verbose_.
	(handle_param): Add location_r parameter.  Use error_at.
	(set_debug_level): Add location_r parameter.  Use error_at and
	warning_at.
	(setup_core_dumping): Add diagnostic_context parameter.
	(decode_d_option): Add gcc_options, location_t and
	diagnostic_context parameters and use them instead of global
	state.  Use warning_at.
	(enable_warning_as_error): Use error_at.
	* opts.h (finish_options): Update prototype.
	(set_struct_debug_option): Declare here.
	* rtl.h (fix_sched_param): Remove.
	* stor-layout.c (initial_max_fld_align): Remove.
	* toplev.c (rtl_dump_and_exit, flag_print_asm_name,
	graph_dump_format, flag_debug_asm, flag_dump_rtl_in_asm): Remove.
	(process_options): Set maximum_field_alignment.
	* tree.h (initial_max_fld_align) Don't declare here.
	* Makefile.in (opts.o, opts-global.o): Update dependencies.

c-family:
	* c-opts.c (c_common_handle_option): Pass location to
	set_struct_debug_option.

testsuite:
	* gcc.dg/opts-5.c: New test.

From-SVN: r167106
2010-11-24 00:54:26 +00:00
Joseph Myers
c98cd5bff6 flag-types.h (struct visibility_flags): Don't declare here.
* flag-types.h (struct visibility_flags): Don't declare here.
	* flags.h (strip_off_ending, fast_math_flags_set_p,
	fast_math_flags_struct_set_p): Declare here.
	(visibility_options): Don't declare here.
	* opts-common.c (option_enabled, get_option_state): Move from
	opts.c.
	* opts-global.c: Include diagnostic.h instead of
	diagnostic-core.h.  Include tree.h, langhooks.h, lto-streamer.h
	and toplev.h.
	(const_char_p, ignored_options, in_fnames, num_in_fnames,
	write_langs, complain_wrong_lang, postpone_unknown_option_warning,
	print_ignored_options, unknown_option_callback,
	post_handling_callback, lang_handle_option, add_input_filename,
	read_cmdline_options, initial_lang_mask, init_options_once,
	decode_cmdline_options_to_array_default_mask,
	set_default_handlers, decode_options): Move from opts.c.
	(print_ignored_options): Use warning_at instead of saving and
	restoring input_location.
	* opts.c: Include <signal.h> and <sys/resource.h>.  Include rtl.h
	instead of expr.h.  Don't include langhooks.h, except.h or
	lto-streamer.h.  Add more comments on includes.
	(strip_off_ending, setup_core_dumping, decode_d_option): Move from
	toplev.c.
	(visibility_options): Move to c-family/c-common.c.
	(const_char_p, ignored_options, in_fnames, num_in_fnames,
	write_langs, complain_wrong_lang, postpone_unknown_option_warning,
	print_ignored_options, unknown_option_callback,
	post_handling_callback, lang_handle_option, add_input_filename,
	read_cmdline_options, initial_lang_mask, init_options_once,
	decode_cmdline_options_to_array_default_mask,
	set_default_handlers, decode_options): Move to opts-global.c.
	(target_handle_option, default_options_optimization,
	finish_options, common_handle_option): Remove static.
	(option_enabled, get_option_state): Move to opts-common.c.
	* opts.h (common_handle_option, target_handle_option,
	finish_options, default_options_optimization): Declare.
	* toplev.c: Don't include <signal.h> or <sys/resource.h>.
	(setup_core_dumping, strip_off_ending, decode_d_option): Move to
	opts.c.
	* toplev.h (strip_off_ending, decode_d_option,
	fast_math_flags_set_p, fast_math_flags_struct_set_p): Don't
	declare here.
	* Makefile.in (opts.o, opts-global.o): Update dependencies.

c-family:
	* c-common.c (visibility_options): Move from ../opts.c.
	* c-common.h (struct visibility_flags, visibility_options):
	Declare here.
	* c-opts.c (finish_options): Rename to c_finish_options.
	(c_common_init): Update call to finish_options.

From-SVN: r167105
2010-11-24 00:51:48 +00:00
Jeffrey Yasskin
3862bc3a55 Propagate the source location from a template function's definition to
any already-instantiated declarations.

	PR c++/46527
	* gcc/cp/pt.c (instantiate_decl): Propagate the template's
	location to its instance.
	* gcc/testsuite/g++.dg/debug/dwarf2/pr46527.C: New test.

From-SVN: r167104
2010-11-24 00:24:54 +00:00