Commit Graph

32329 Commits

Author SHA1 Message Date
Richard Henderson 60e9352519 re PR target/28623 (ICE in extract_insn, at recog.c:2077 (nrecognizable insn) [alpha])
PR target/28623
        * config/alpha/alpha.c (get_unaligned_address): Remove extra_offset
        argument; update all callers.
        (get_unaligned_offset): New.
        * config/alpha/alpha.md (extendqidi2, extendhidi2): Don't use
        get_unaligned_address, just pass on the address directly.
        (unaligned_extendqidi): Use gen_lowpart instead of open-coding
        the subreg in the helper patterns.
        (unaligned_extendqidi_le): Use get_unaligned_offset.
        (unaligned_extendqidi_be, unaligned_extendhidi_le): Likewise.
        (unaligned_extendhidi_be): Likewise.
        (unaligned_extendhidi): Tidy.
        * config/alpha/alpha-protos.h: Update.

From-SVN: r124002
2007-04-20 12:35:55 -07:00
Richard Henderson f326fd7a03 alpha.h (CPP_SPEC, [...]): Remove.
* config/alpha/alpha.h (CPP_SPEC, CPP_SUBTARGET_SPEC): Remove.
        (EXTRA_SPECS, SUBTARGET_EXTRA_SPECS): Remove.
        * config/alpha/linux.h (CPP_SPEC): Undef before redefine.
        * config/alpha/linux-elf.h (EXTRA_SPECS): Rename SUBTARGET_EXTRA_SPECS.
        * config/alpha/freebsd.h (EXTRA_SPECS): Rename SUBTARGET_EXTRA_SPECS.
        (CPP_SPEC): Don't include %(cpp_subtarget).
        * config/alpha/netbsd.h (CPP_SPEC): Rename CPP_SUBTARGET_SPEC.
        (EXTRA_SPECS): Rename SUBTARGET_EXTRA_SPECS.
        * config/alpha/osf.h (CPP_SPEC, EXTRA_SPECS): Similarly.

From-SVN: r123999
2007-04-20 12:05:24 -07:00
Jakub Jelinek a5b9afd1a1 i386.c (bdesc_2arg): Use ORDERED rather than UNORDERED for __builtin_ia32_cmpordss.
* config/i386/i386.c (bdesc_2arg): Use ORDERED rather than UNORDERED
	for __builtin_ia32_cmpordss.

	* gcc.target/i386/ordcmp-1.c: New test.
	* gcc.target/i386/unordcmp-1.c: New test.

From-SVN: r123989
2007-04-20 13:42:21 +02:00
Jakub Jelinek 86122f7282 re PR tree-optimization/31632 (ICE in compare_values)
PR tree-optimization/31632
	* fold-const.c (fold_binary): Use op0 and op1 instead of arg0
	and arg1 for optimizations of comparison against min/max values.
	Fold arg0 to arg1's type for optimizations of comparison against
	min+1 and max-1 values.

	* gcc.c-torture/compile/20070419-1.c: New test.

From-SVN: r123988
2007-04-20 13:40:47 +02:00
Bernd Schmidt c1673e1b5a reload.c (combine_reloads): When trying to use a dying register...
* reload.c (combine_reloads): When trying to use a dying register,
	check whether it's uninitialized and don't use if so.

From-SVN: r123986
2007-04-20 00:08:46 +00:00
Brooks Moses db136335ce fold-const.c: Remove prototypes for native_encode_expr and native_interpret_expr.
* fold-const.c: Remove prototypes for native_encode_expr and
native_interpret_expr.
(native_encode_expr): Make non-static.
(native_interpret_expr): Likewise.
* tree.h: Add prototypes for the above.

From-SVN: r123980
2007-04-19 14:52:58 -07:00
Joseph Myers b6fda43f4e spe.md (*frob_tf_ti, [...]): Add length attributes.
gcc/
	* config/rs6000/spe.md (*frob_tf_ti, *frob_ti_tf, *frob_ti_tf_2,
	*mov_si<mode>_e500_subreg0, *mov_si<mode>_e500_subreg0_2,
	*mov_sitf_e500_subreg8, *mov_sitf_e500_subreg8_2, spe_extenddftf2,
	spe_fix_trunctfsi2_internal, spe_negtf2_internal, cmptfeq_gpr,
	tsttfeq_gpr, cmptfgt_gpr, tsttfgt_gpr, cmptflt_gpr, tsttflt_gpr):
	Add length attributes.

From-SVN: r123979
2007-04-19 22:00:44 +01:00
Janis Johnson 93167356eb float.h: Check that __STDC_WANT_DEC_FP__ is defined, not that it is 1.
* ginclude/float.h: Check that __STDC_WANT_DEC_FP__ is defined,
	not that it is 1.

From-SVN: r123974
2007-04-19 16:58:42 +00:00
Janis Johnson 589dd99500 c-cppbuiltin.c (c_cpp_builtins): Remove definition of __STDC_WANT_DEC_FP__.
* c-cppbuiltin.c (c_cpp_builtins): Remove definition of
	__STDC_WANT_DEC_FP__.

From-SVN: r123973
2007-04-19 16:57:23 +00:00
Joseph Myers f7cc5390ec configure.ac: Allow both powerpc*-*-linux* and powerpc*-*-gnu* for long double compatibility.
gcc:
	* configure.ac: Allow both powerpc*-*-linux* and powerpc*-*-gnu*
	for long double compatibility.
	* configure: Regenerate.

libstdc++-v3:
	* configure.ac: Allow both powerpc*-*-linux* and powerpc*-*-gnu*
	for long double compatibility.
	* configure: Regenerate.
	* src/complex_io.cc, src/istream-inst.cc, src/ostream-inst.cc:
	Condition some _GLIBCXX_LDBL_COMPAT calls on _GLIBCXX_USE_WCHAR_T.

From-SVN: r123972
2007-04-19 13:11:07 +01:00
Eric Botcazou d47a8b8331 re PR rtl-optimization/29841 (ICE with scheduling and __builtin_trap)
PR rtl-optimization/29841
	* cfgbuild.c (control_flow_insn_p): Return TRUE for unconditional
	trap instructions.
	* sched-deps.c (sched_analyze_insn): Prevent all non-jump instructions
	that may cause control flow transfer from being moved.

From-SVN: r123970
2007-04-19 11:19:16 +00:00
Jan Hubicka 8d5d586529 fold-const.c (div_if_zero_remainder): Do signed divide for pointer types.
* fold-const.c (div_if_zero_remainder): Do signed divide for pointer
	types.

From-SVN: r123966
2007-04-19 01:35:25 +00:00
Eric Christopher 316fbf1945 darwin.md (load_macho_picbase): Use link register only.
2007-04-18  Eric Christopher  <echristo@apple.com>

        * config/rs6000/darwin.md (load_macho_picbase): Use link register
        only. Update operands.
        * config/rs6000/rs6000.c (rs6000_emit_prologue): Update caller.
        * config/rs6000/rs6000.md (builtin_setjmp_receiver): Ditto. Move from
        link register to pic register.

From-SVN: r123960
2007-04-18 22:27:51 +00:00
Philippe De Muyter 5083912dfa m68k.c (output_btst): Use `movew to ccr' when useful.
2007-04-18  Philippe De Muyter  <phdm@macqel.be>

	* config/m68k/m68k.c (output_btst): Use `movew to ccr' when useful.

From-SVN: r123959
2007-04-18 20:51:42 +00:00
Dirk Mueller 05fb69e4c9 re PR tree-optimization/31227 (-Warray-bounds doesn't play together with loop optimizations)
2007-04-18  Dirk Mueller  <dmueller@suse.de>

       PR diagnostic/31227
       * tree-vrp.c (search_for_addr_array): New.
       (check_array_bounds): Suppress warning about
       address taken of array refs if its not de-referenced.

       * gcc.dg/Warray-bounds-3.c: New.

From-SVN: r123958
2007-04-18 20:09:21 +00:00
Dorit Nuzman 28e44f4fe6 tree-vectorizer.c (destroy_loop_vec_info): Set loop->aux to NULL.
* tree-vectorizer.c (destroy_loop_vec_info): Set loop->aux to NULL.
        * tree-vect-analyze.c (vect_analyze_loop_form): Set loop->aux.

        * tree-vectorizer.h (NITERS_KNOWN_P): New.
        * tree-vect-analyze.c (vect_analyze_loop_form): Call NITERS_KNOWN_P
        instead of LOOP_VINFO_INT_NITERS to avoid having to geneate loop_info.

        * tree-vect-analyze.c (vect_determine_vectorization_factor): Add
        dump print.
        (vect_analyze_operations): Fix indenetation.  Fix a comment.  Fix a
        print message.
        (vect_analyze_scalar_cycles): Fix indentation.
        (vect_enhance_data_refs_alignment): Fix check in case of peeling.
        (vect_mark_relevant): Include phis in relevance analysis.

        * tree-vect-transform.c (vect_transform_loop): Add an assert.

From-SVN: r123955
2007-04-18 17:43:27 +00:00
Anatoly Sokolov 3639b3fac4 avr.c (ptrreg_to_str): Replace error() with output_operand_lossage().
* config/avr/avr.c (ptrreg_to_str): Replace error() with
	output_operand_lossage().

From-SVN: r123949
2007-04-18 20:21:57 +04:00
Dorit Nuzman f7c1d73d8d tree-vect-transform.c (get_initial_def_for_reduction): Clean away the unused code for reduction without adjust-in-epilog to simplify...
* tree-vect-transform.c (get_initial_def_for_reduction): Clean away
        the unused code for reduction without adjust-in-epilog to simplify the
        function.

From-SVN: r123948
2007-04-18 11:53:37 +00:00
Wolfgang Gellerich 638e37c250 s390.h (S390_TDC_POSITIVE_ZERO): New constant.
2007-04-18  Wolfgang Gellerich  <gellerich@de.ibm.com>

	* config/s390/s390.h (S390_TDC_POSITIVE_ZERO): New constant.
	(S390_TDC_NEGATIVE_ZERO): New constant.
	(S390_TDC_POSITIVE_NORMALIZED_NUMBER): New constant.
	(S390_TDC_NEGATIVE_NORMALIZED_NUMBER): New constant.
	(S390_TDC_POSITIVE_DENORMALIZED_NUMBER): New constant.
	(S390_TDC_NEGATIVE_DENORMALIZED_NUMBER): New constant.
	(S390_TDC_POSITIVE_INFINITY): New constant.
	(S390_TDC_NEGATIVE_INFINITY): New constant.
	(S390_TDC_POSITIVE_QUIET_NAN): New constant.
	(S390_TDC_NEGATIVE_QUIET_NAN): New constant.
	(S390_TDC_POSITIVE_SIGNALING_NAN): New constant.
	(S390_TDC_NEGATIVE_SIGNALING_NAN): New constant.
	(S390_TDC_INFINITY): New constant.
	* config/s390/s390.c (s390_canonicalize_comparison): Renamed
	UNSPEC_CMPINT to UNSPEC_CCU_TO_INT, added a UNSPEC_CCU_TO_INT-like
	optimization for UNSPEC_CCZ_TO_INT.
	* config/s390/s390.md ("*TDC_insn_<mode>"): New insn.
	("*ccz_to_int"): New insn.
	("isinf<mode>2"): New insn.
	(UNSPEC_CMPINT): Renamed to UNSPEC_CCU_TO_INT.
	(UNSPEC_CCU_TO_INT): New constant, replaces UNSPEC_CMPINT.
	(UNSPEC_CCZ_TO_INT): New constant.

From-SVN: r123947
2007-04-18 11:51:06 +00:00
Richard Guenther 3b48ccbc89 re PR tree-optimization/19431 (missed optimization with ifs and deferencing)
2007-04-18  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/19431
	PR tree-optimization/21463
	* tree-pass.h (pass_phiprop): Declare.
	* passes.c (init_optimization_passes): New phiprop pass.
	* tree-ssa-forwprop.c (struct phiprop_d): New structure.
	(phivn_valid_p): New helper function.
	(phiprop_insert_phi): Likewise.
	(propagate_with_phi): Likewise.
	(tree_ssa_phiprop): New propagator propagating loads
	through phi nodes if profitable.

	* gcc.c-torture/execute/20070212-1.c: New testcase.
	* gcc.c-torture/execute/20070212-2.c: Likewise.
	* gcc.c-torture/execute/20070212-3.c: Likewise.
	* gcc.dg/tree-ssa/pr19431.c: Likewise.
	* gcc.dg/tree-ssa/pr21463.c: Likewise.
	* g++.dg/tree-ssa/pr21463.C: Likewise.
	* g++.dg/tree-ssa/pr30738.C: Likewise.

From-SVN: r123946
2007-04-18 11:45:09 +00:00
Dorit Nuzman 8cf81ddffd tree-vect-analyze.c (process_use): New function.
* tree-vect-analyze.c (process_use): New function.
        (vect_mark_stmts_to_be_vectorized): Factor out code to process_use.
        Check phis in all bbs.
        * tree-vectorizer.c (vect_is_simple_use): Remove a no longer relavant
        assert.

From-SVN: r123943
2007-04-18 07:55:34 +00:00
Bernd Schmidt 7c11b28c57 reload1.c (eliminte_regs_in_insn): Use REG_EQUIV notes the same way we use REG_EQUAL.
* reload1.c (eliminte_regs_in_insn): Use REG_EQUIV notes the same way
	we use REG_EQUAL.

From-SVN: r123932
2007-04-17 22:35:47 +00:00
Anatoly Sokolov 5594a6c8c0 re PR target/30483 (Internal compiler error with inline volatile assembly on AVR)
PR target/30483
	* config/avr/avr.c (ptrreg_to_str): Replace gcc_unreachable() with
	error().

From-SVN: r123926
2007-04-18 00:08:46 +04:00
H.J. Lu ce217d7583 sse.md (sse_vmaddv4sf3): Use register_operand on "0".
2007-04-17  H.J. Lu  <hongjiu.lu@intel.com>

	* config/i386/sse.md (sse_vmaddv4sf3): Use register_operand
	on "0".
	(sse_vmmulv4sf3): Likewise.
	(sse2_vmaddv2df3): Likewise.
	(sse2_vmmulv2df3): Likewise.

From-SVN: r123920
2007-04-17 10:30:40 -07:00
Zdenek Dvorak a154b43a81 re PR rtl-optimization/31360 (RTL loop invariant is not aggressive enough)
PR rtl-optimization/31360
	* cfgloopanal.c (target_small_cost, target_pres_cost): Removed.
	(target_reg_cost): New.
	(init_set_costs): Initialize target_reg_cost.  Add comments
	regarding the rationale of the costs.
	(global_cost_for_size): Renamed to...
	(estimate_reg_pressure_cost): ... and simplify.  Decrease importance
	of register pressure.
	* tree-ssa-loop-ivopts.c (ivopts_global_cost_for_size): Use
	estimate_reg_pressure_cost.  Add number of ivs.
	(determine_set_costs): Dump target_reg_cost.
	* loop-invariant.c (gain_for_invariant):  Use
	estimate_reg_pressure_cost.  Removed n_inv_uses argument.
	(best_gain_for_invariant, find_invariants_to_move): Remove
	n_inv_uses.
	* cfgloop.h (target_small_cost, target_pres_cost): Removed.
	(target_reg_cost): Declare.
	(global_cost_for_size): Declaration removed.
	(estimate_reg_pressure_cost): Declare.

	* gcc.dg/loop-7.c: New test.

From-SVN: r123919
2007-04-17 16:42:29 +00:00
Peter Bergner c092b0457f rs6000.c (rs6000_hard_regno_mode_ok): Force TDmode regnos into even/odd register pairs.
* config/rs6000/rs6000.c (rs6000_hard_regno_mode_ok): Force TDmode
	regnos into even/odd register pairs.
	* config/rs6000/rs6000.h [SLOW_UNALIGNED_ACCESS]: Treat DDmode and
	TDmode similar to the other floating point modes.
	[SECONDARY_MEMORY_NEEDED]: Treat DDmode similar to DFmode.
	* config/rs6000/dfp.md (negdd2, absdd2, negtd2, abstd2): New
	define_expand's.
	(negdd2_fpr, absdd2_fpr, nabsdd2_fpr, negtd2_fpr, abstd2_fpr,
	nabstd2_fpr, movdd_hardfloat64_mfpgpr): New define_insn's.
	(movdd_hardfloat64): Use TARGET_MFPGPR.

From-SVN: r123916
2007-04-17 11:07:05 -05:00
Bernd Schmidt f2eb49dcfa re PR rtl-optimization/10692 ([m68k] miscompilation of perl with -O2 -fPIC)
* reload1.c (delete_output_reload): Don't count output in n_inherited.

	Revert
	2005-01-05  Richard Henderson  <rth@redhat.com>
	PR rtl-opt/10692
	* reload1.c (do_input_reload): Restrict the optimization deleteing
	a previous output reload to RELOAD_FOR_INPUT.

From-SVN: r123913
2007-04-17 15:29:34 +00:00
Dorit Nuzman cd38ca7f15 tree-vectorizer.h (stmt_vec_info_type): Add enum value induc_vec_info_type.
* tree-vectorizer.h (stmt_vec_info_type): Add enum value
        induc_vec_info_type.
        (vectorizable_induction): New function declaration.
        * tree-vect-transform.c (get_initial_def_for_induction): No need to
        check if already vectorized.  Find first place in BB where new stmts
        can be inserted.  Takes only one argument.
        (vectorizable_induction): New function.
        (vect_transform_stmt): Add case for induc_vec_info_type to call
        vectorizable_induction.
        (vect_transform_loop): Consider phis for vectorization.
        * tree-vect-analyze.c (vect_determine_vectorization_factor): Simplify
        condition.
        (analyze_operations): Call vectorizable_induction when analyzing phis.
        Fix comment.
        (vect_mark_stmts_to_be_vectorized): Remove redundant checks.
        (vect_mark_relevant): Include phis in relevance analysis.
        (vect_mark_stmts_to_be_vectorize): Likewise.
        * tree-vect-patterns.c (widened_name_p): Remove obsolete asserts.

From-SVN: r123910
2007-04-17 07:31:45 +00:00
Lawrence Crowl 39ef65923c invoke.texi (Debugging Options): Add documentation for the -femit-struct-debug options...
./:	* doc/invoke.texi (Debugging Options): Add documentation for the
	-femit-struct-debug options -femit-struct-debug-baseonly,
	-femit-struct-debug-reduced, and
	-femit-struct-debug-detailed[=...].

	* c-opts.c (c_common_handle_option): Add
	OPT_femit_struct_debug_baseonly, OPT_femit_struct_debug_reduced,
	and OPT_femit_struct_debug_detailed_.
	* c.opt: Add specifications for
	-femit-struct-debug-baseonly, -femit-struct-debug-reduced,
	and -femit-struct-debug-detailed[=...].
	* opts.c (set_struct_debug_option): Parse the
	-femit-struct-debug-... options.
	* opts.c (matches_main_base, main_input_basename,
	main_input_baselength, base_of_path, matches_main_base): Add
	variables and functions to compare header base name to compilation
	unit base name.
	* opts.c (should_emit_struct_debug): Add to determine to emit a
	structure based on the option.
	(dump_struct_debug) Also disabled function to debug this
	function.
	* opts.c (handle_options): Save the base name of the
	compilation unit.

	* langhooks-def.h (LANG_HOOKS_GENERIC_TYPE_P): Define.
        (LANG_HOOKS_FOR_TYPES_INITIALIZER): Add.
	This hook indicates if a type is generic.  Set it by default
	to "never generic".
	* langhooks.h (struct lang_hooks_for_types): Add a new hook
	to determine if a struct type is generic or not.
	* cp/cp-tree.h (class_tmpl_impl_spec_p): Declare a C++ hook.
	* cp/tree.c (class_tmpl_impl_spec_p): Implement the C++ hook.
	* cp/cp-lang.c (LANG_HOOKS_GENERIC_TYPE_P): Override null C hook
	with live C++ hook.

	* flags.h (enum debug_info_usage): Add an enumeration to describe
	a program's use of a structure type.
	* dwarf2out.c (gen_struct_or_union_type_die): Add a new parameter
	to indicate the program's usage of the type.  Filter structs based
	on the -femit-struct-debug-... specification.
	(gen_type_die): Split into two routines, gen_type_die and
	gen_type_die_with_usage.  gen_type_die is now a wrapper
	that assumes direct usage.
	(gen_type_die_with_usage): Replace calls to gen_type_die
	with gen_type_die_with_usage adding the program usage of
	the referenced type.
	(dwarf2out_imported_module_or_decl): Suppress struct debug
	information using should_emit_struct_debug when appropriate.
testsuite/:
	* g++.dg/other/fesd-any.C: Test -femit-struct-debug-detailed=any.
	* g++.dg/other/fesd-any.h: Test -femit-struct-debug-detailed=any.
	* g++.dg/other/fesd-baseonly.C: Test -femit-struct-debug-baseonly.
	* g++.dg/other/fesd-baseonly.h: Test -femit-struct-debug-baseonly.
	* g++.dg/other/fesd-none.C: Test -femit-struct-debug-detailed=none.
	* g++.dg/other/fesd-none.h: Test -femit-struct-debug-detailed=none.
	* g++.dg/other/fesd-reduced.C: Test -femit-struct-debug-reduced.
	* g++.dg/other/fesd-reduced.h: Test -femit-struct-debug-reduced.
	* g++.dg/other/fesd-sys.C: Test -femit-struct-debug-detailed=sys.
	* g++.dg/other/fesd-sys.h: Test -femit-struct-debug-detailed=sys.
	* g++.dg/other/fesd.h: Common to -femit-struct-debug-... tests.

	* gcc.dg/fesd-any.c: Test -femit-struct-debug-detailed=any.
	* gcc.dg/fesd-any.h: Test -femit-struct-debug-detailed=any.
	* gcc.dg/fesd-baseonly.c: Test -femit-struct-debug-baseonly.
	* gcc.dg/fesd-baseonly.h: Test -femit-struct-debug-baseonly.
	* gcc.dg/fesd-none.c: Test -femit-struct-debug-detailed=none.
	* gcc.dg/fesd-none.h: Test -femit-struct-debug-detailed=none.
	* gcc.dg/fesd-reduced.c: Test -femit-struct-debug-reduced.
	* gcc.dg/fesd-reduced.h: Test -femit-struct-debug-reduced.
	* gcc.dg/fesd-sys.c: Test -femit-struct-debug-detailed=sys.
	* gcc.dg/fesd-sys.h: Test -femit-struct-debug-detailed=sys.
	* gcc.dg/fesd.h: Common to -femit-struct-debug-... tests.

From-SVN: r123909
2007-04-17 06:19:36 +00:00
Ian Lance Taylor fc6827fe9f re PR tree-optimization/31522 (False overflow warning with phi nodes)
./:	PR tree-optimization/31522
	* tree-vrp.c (vr_phi_edge_counts): New static variable.
	(vrp_initialize): Allocate vr_phi_edge_counts.
	(vrp_visit_phi_node): Don't push to infinity if we saw a new
	executable edge.  Drop test for all constants.
	(vrp_finalize): Free vrp_phi_edge_counts.
testsuite/:
	PR tree-optimization/31522
	* gcc.dg/Wstrict-overflow-16.c: New test.

From-SVN: r123908
2007-04-17 05:33:38 +00:00
Ian Lance Taylor 4075e23198 cpp.texi (Common Predefined Macros): Clarify description of __GNUC_GNU_INLINE__ and __GNUC_STDC_INLINE__.
* doc/cpp.texi (Common Predefined Macros): Clarify description of
	__GNUC_GNU_INLINE__ and __GNUC_STDC_INLINE__.

From-SVN: r123907
2007-04-17 05:19:22 +00:00
Ian Lance Taylor 5a0ed003f0 tree-ssa-propagate.c (cfg_blocks_add): Insert blocks with fewer predecessors at head rather than tail.
* tree-ssa-propagate.c (cfg_blocks_add): Insert blocks with fewer
	predecessors at head rather than tail.

From-SVN: r123906
2007-04-17 05:16:07 +00:00
Matthias Klose bdede2ace5 linux.h (CPP_SPEC): Define.
2007-04-16  Matthias Klose  <doko@debian.org>

        * gcc/config/alpha/linux.h (CPP_SPEC): Define.
        * gcc/config/arm/linux-gas.h (SUBTARGET_CPP_SPEC): Extend.

From-SVN: r123888
2007-04-16 20:12:05 +00:00
Aldy Hernandez 52d412e76f * function.h: Remove sequence_stack extern declaration.
From-SVN: r123885
2007-04-16 18:55:33 +00:00
Kazu Hirata 7212046395 m68k.h (LONG_DOUBLE_TYPE_SIZE): Change to 64 on TARGET_FIDOA.
* config/m68k/m68k.h (LONG_DOUBLE_TYPE_SIZE): Change to 64 on
	TARGET_FIDOA.
	(LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Change to 64 if __mfido__ is
	defined.

From-SVN: r123884
2007-04-16 18:01:12 +00:00
Anatoly Sokolov 1468317475 avr.c (avr_arch_types): Rearranging array.
* config/avr/avr.c (avr_arch_types): Rearranging  array.
	(enum avr_arch): Add.
	(avr_mcu_types): Use avr_arch enumeration constants instead of 
	numbers.
	* config/avr/avr.h (LINK_SPEC): Simplify.

From-SVN: r123882
2007-04-16 21:50:26 +04:00
Seongbae Park fe24078a22 Correct the misplaced ChangeLog.
From-SVN: r123880
2007-04-16 17:07:04 +00:00
Seongbae Park 8fff206014 re PR c++/29365 (Unnecessary anonymous namespace warnings)
gcc/ChangeLog:

2007-04-16  Seongbae Park <seongbae.park@gmail.com>

	PR c++/29365

	* cp/decl2.c (constrain_class_visibility):
	Do not warn about the use of anonymous namespace in the main input file.

gcc/testsuite/ChangeLog:

2007-04-16  Seongbae Park <seongbae.park@gmail.com>

	PR c++/29365
	Testcase for c++ anonymous namespace warning

	* g++.dg/warn/anonymous-namespace-1.C: New test
	* g++.dg/warn/anonymous-namespace-1.h: New test

From-SVN: r123879
2007-04-16 16:49:02 +00:00
Kazu Hirata de41203b65 m68k.h (FRAME_POINTER_REGNUM): Use A6_REG instead.
* config/m68k/m68k.h (FRAME_POINTER_REGNUM): Use A6_REG
	instead.
	(M68K_REGNAME): Use A6_REG.
	* config/m68k/m68k.md (FP_REG): Rename to A6_REG.

From-SVN: r123878
2007-04-16 16:47:44 +00:00
Kazu Hirata 8d989403d6 m68k.c (m68k_libcall_value, [...]): Use macros for register names more.
* config/m68k/m68k.c (m68k_libcall_value,
	m68k_function_value): Use macros for register names more.

From-SVN: r123877
2007-04-16 16:23:09 +00:00
Maxim Kuvyrkov bdbf40a536 re PR middle-end/28071 (A file that can not be compiled in reasonable time/space)
PR middle-end/28071
* sched-int.h (struct deps): Split field 'pending_lists_length' into
'pending_read_list_length' and 'pending_write_list_length'.  Update
comment.
* sched-deps.c (add_insn_mem_dependence): Change signature.  Update
to handle two length counters instead of one.  Update all uses.
(flush_pending_lists, sched_analyze_1, init_deps): Update to handle
two length counters instead of one.
* sched-rgn.c (propagate_deps): Update to handle two length counters
instead of one.

From-SVN: r123874
2007-04-16 15:04:18 +00:00
H.J. Lu 7bb4a6be35 re PR target/31582 (ix86_expand_vec_set_builtin modifies source)
2007-04-16  H.J. Lu  <hongjiu.lu@intel.com>

	PR target/31582
	* config/i386/i386.c (ix86_expand_vec_set_builtin): Make a
	copy of source, pass it to ix86_expand_vector_set and return
	it as target.

From-SVN: r123866
2007-04-16 06:49:14 -07:00
David Ung 8dd58f012c mips.h (PROCESSOR_74KC, [...]): Define.
2007-04-16  David Ung  <davidu@mips.com>
            Joseph Myers  <joseph@codesourcery.com>

	* config/mips/mips.h (PROCESSOR_74KC, PROCESSOR_74KF,
	PROCESSOR_74KX, TUNE_74K, GENERATE_MADD_MSUB): Define.
	* config/mips/mips.c (mips_cpu_info_table, mips_rtx_cost_data):
	Add 74K processor information.
	* config/mips/mips.md: Include 74k.md.
	(cpu): Add 74kc,74kf,74kx.
	(ISA_HAS_MADD_MSUB): Change to GENERATE_MADD_MSUB throughout.
	* config/mips/74k.md: New.
	* doc/invoke.texi (MIPS Options): Document 74K support.

Co-Authored-By: Joseph Myers <joseph@codesourcery.com>

From-SVN: r123863
2007-04-16 14:45:24 +01:00
Dorit Nuzman 60555ced95 tree-vect-analyze.c (vect_analyze_operations): Reorganize calls to vectorizable_* functions.
* tree-vect-analyze.c (vect_analyze_operations): Reorganize calls to
        vectorizable_* functions.
        * tree-vect-transform.c (vectorizable_call): Add check for
        STMT_VINFO_RELEVANT_P, STMT_VINFO_DEF_TYPE and STMT_VINFO_LIVE_P.
        (vectorizable_store): likewise.
        (vectorizable_conversion): Add check for STMT_VINFO_DEF_TYPE.
        Add comments.
        (vectorizable_operation, vectorizable_type_demotion): Likewise.
        (vectorizable_type_promotion, vectorizable_load): Likewise.
        (vectorizable_live_operation, vectorizable_condition): Likewise.
        (vectorizable_assignment): Add check for STMT_VINFO_DEF_TYPE and
        STMT_VINFO_LIVE_P.
        (vect_transform_stmt): Reorganize calls to vectorizable_* functions.

From-SVN: r123861
2007-04-16 12:54:01 +00:00
Andrew Pinski d0b73842be Fix typo in my last changelog entry.
From-SVN: r123853
2007-04-15 13:58:09 -07:00
Kazu Hirata 3bfe36dce0 linux.h (FUNCTION_VALUE_REGNO_P): Use macros for register numbers more.
* config/m68k/linux.h (FUNCTION_VALUE_REGNO_P): Use macros for
	register numbers more.
	* config/m68k/m68k.h (STACK_POINTER_REGNUM,
	FRAME_POINTER_REGNUM, STATIC_CHAIN_REGNUM,
	M68K_STRUCT_VALUE_REGNUM, FUNCTION_VALUE, LIBCALL_VALUE,
	FUNCTION_VALUE_REGNO_P): Likewise.
	* config/m68k/m68kelf.h (M68K_STRUCT_VALUE_REGNUM,
	STATIC_CHAIN_REGNUM): Likewise.
	* config/m68k/m68kemb.h (FUNCTION_VALUE_REGNO_P): Likewise.
	* config/m68k/netbsd-elf.h (M68K_STRUCT_VALUE_REGNUM,
	STATIC_CHAIN_REGNUM, FUNCTION_VALUE_REGNO_P): Likewise.
	* config/m68k/m68k.md (FP_REG): New.

From-SVN: r123850
2007-04-15 15:54:36 +00:00
Kazu Hirata e3e093ecef m68k.h (PREFERRED_STACK_BOUNDARY): Prefer 32-bit alignment on fido.
* config/m68k/m68k.h (PREFERRED_STACK_BOUNDARY): Prefer 32-bit
	alignment on fido.

From-SVN: r123848
2007-04-15 15:27:06 +00:00
Kazu Hirata 7fa7289d9a i386.c, [...]: Fix comment typos.
* config/i386/i386.c, config/s390/s390.c, config/s390/s390.md,
	tree-ssa-loop-niter.c, tree-ssa-structalias.c, tree-vrp.c: Fix
	comment typos.

From-SVN: r123847
2007-04-15 14:46:34 +00:00
Zdenek Dvorak 2732d76752 tree-ssa-loop-prefetch.c (loop_prefetch_arrays): Ignore cold loops.
* tree-ssa-loop-prefetch.c (loop_prefetch_arrays): Ignore
	cold loops.

From-SVN: r123843
2007-04-15 03:36:25 +00:00
Andrew Pinski aa24028daf re PR c/31520 (Latent bug in finish_decl causing an errorous "array subscript is above array bounds")
2007-04-14  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        PR c/31520
        * c-del.c (finish_decl): Grab the type of the decl after the call
        to store_init_value.
2007-04-14  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        PR C/31520
        * testsuite/gcc.dg/gnu89-init-4.c: New testcase.

From-SVN: r123835
2007-04-14 17:59:15 -07:00
Steven Bosscher 2ca2b6071b * common.opt (fforward-propagate): Fix "Optimization" annotation.
From-SVN: r123830
2007-04-14 22:38:16 +00:00
Jakub Jelinek b1483e87c9 re PR c++/25874 ([gomp] ICE in calc_dfs_tree())
PR c++/25874
	* omp-low.c (expand_omp_parallel): If child_cfun->cfg, free dominators,
	post dominators and cleanup cfg before returning.

	* gcc.dg/gomp/pr25874.c: Add dg-options.
	* g++.dg/gomp/pr25874.C: Add dg-options.

From-SVN: r123822
2007-04-14 20:52:45 +02:00
Bernd Schmidt 4d4f2837c5 bfin.h (MODES_TIEABLE_P): Allow more modes to be tied.
* config/bfin/bfin.h (MODES_TIEABLE_P): Allow more modes to be tied.
	* config/bfin/bfin.md (movsi_insn): Delete two unused alternatives.

From-SVN: r123813
2007-04-14 10:50:45 +00:00
Kazu Hirata 7d33c31d9a config.gcc: Recognize fido.
gcc/
	* config.gcc: Recognize fido.
	* config/m68k/m68k-devices.def (fidoa): New.
	* config/m68k/m68k.h (TARGET_CPU_CPP_BUILTINS): Define
	__mfido__.
	(FL_FIDOA, TARGET_FIDOA): New.
	* config/m68k/m68k.opt (mfidoa): New.

libgcc/
	* config.host: Recognize fido.

From-SVN: r123811
2007-04-14 02:15:45 +00:00
John David Anglin 2a6acff7f9 re PR middle-end/31322 (ld: Invalid symbol type for plabel (.libs/debug_list.o, __gxx_personality_v0).)
PR middle-end/31322
	* dwarf2out.c (output_call_frame_info): Call assemble_external_libcall
	when a personality function is used.

From-SVN: r123806
2007-04-14 00:17:41 +00:00
Bob Wilson ec3643e8c4 * config/xtensa/xtensa.c (xtensa_expand_builtin): Use CALL_EXPR_FN.
From-SVN: r123797
2007-04-13 20:35:50 +00:00
Mike Stump c40ce8f320 darwin-c.c (handle_c_option): Handle -fapple-kext here so we can...
* config/darwin-c.c (handle_c_option): Handle -fapple-kext here so
	we can...
	* config/darwin.opt (fapple-kext): Make C++ only.
	* config/darwin.c (darwin_override_options): Remove code to ensure
	-fapple-kext is given for C++ only.

From-SVN: r123792
2007-04-13 17:29:27 +00:00
Richard Sandiford d1138d8e5e vxworks.h (SUBTARGET_OVERRIDE_OPTIONS): Define.
gcc/
	* config/mips/vxworks.h (SUBTARGET_OVERRIDE_OPTIONS): Define.
	* config/mips/mips.c (override_options): Call
	SUBTARGET_OVERRIDE_OPTIONS, if defined.

From-SVN: r123788
2007-04-13 13:48:08 +00:00
H.J. Lu c33104d6c9 i386.opt (msvr3-shlib): Removed.
2007-04-13  H.J. Lu  <hongjiu.lu@intel.com>

	* config/i386/i386.opt (msvr3-shlib): Removed.

	* doc/invoke.texi: Remove -msvr3-shlib.

From-SVN: r123787
2007-04-13 06:29:45 -07:00
H.J. Lu b194a08cd4 i386.opt (mpopcnt): Replace "popcount" instruction with "popcnt" instruction.
2007-04-13  H.J. Lu  <hongjiu.lu@intel.com>

	* config/i386/i386.opt (mpopcnt): Replace "popcount" instruction
	with "popcnt" instruction.

From-SVN: r123786
2007-04-13 06:28:39 -07:00
Richard Guenther 9bb6aa4304 re PR tree-optimization/21258 (Teach VRP to pick up a constant from case label.)
2007-04-13  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/21258
	* tree-vrp.c (compare_case_labels): New helper.
	(find_switch_asserts): New function.
	(find_assert_locations): Call it for SWITCH_EXPRs.

	* gcc.dg/tree-ssa/vrp34.c: New testcase.

From-SVN: r123778
2007-04-13 09:21:22 +00:00
Uros Bizjak 27ac40e2a0 i386.h (X87_FLOAT_MODE_P): Check for TARGET_80387.
* config/i386/i386.h (X87_FLOAT_MODE_P): Check for TARGET_80387.
        * config/i386/i386.md (*cmpfp0): Remove check for TARGET_80387, this
        check is now implied in X87_FLOAT_MODE_P.
        (*cmpfp_u, *cmpfp_<mode>, *cmpfp_i_i387): Ditto.
        (*cmpfp_iu_387, fix_trunc<mode>_fisttp_i386_1): Ditto.
        (fix_trunc<mode>_i386_fisttp): Ditto.
        (fix_trunc<mode>_i387_fisttp_with_temp): Ditto.
        (*fix_trunc<mode>_i387_1, fix_truncdi_i387): Ditto.
        (fix_truncdi_i387_with_temp, fix_trunc<mode>_i387): Ditto.
        (fix_trunc<mode>_i387_with_temp, *fp_jcc_1_387): Ditto.
        (*fp_jcc_2_387, *fp_jcc_5_387, *fp_jcc_6_387): Ditto.
        (*fp_jcc_7_387, *fp_jcc_8<mode>_387): Ditto.
        (unnamed_splitters): Ditto.
        * config/i386/i386.c (function_value_32): Generate FIRST_FLOAT_REG
        for X87_FLOAT_MODE_P mode.  Override FIRST_FLOAT_REG with
        FIRST_SSE_REG for local functions when SSE math is enabled or
        for functions with sseregparm attribute.
        (standard_80387_constant_p): Return -1 if mode is not
        X87_FLOAT_MODE_P.
        (ix86_cc_mode): Assert that scalar mode is not DECIMAL_FLOAT_MODE_P.
        (ix86_expand_compare): Ditto.
        (ix86_expand_carry_flag_compare): Ditto.
        (ix86_expand_int_movcc): Check for SCALAR_FLOAT_MODE_P instead
        of FLOAT_MODE_P for cmp_mode and assert that cmp_mode is not
        DECIMAL_FLOAT_MODE_P.
        (ix86_preferred_output_reload_class): Use X87_FLOAT_MODE_P instead
        of SCALAR_FLOAT_MODE_P.
        (ix86_rtx_costs) [PLUS] Remove FLOAT_MODE_P and fall through to ...
        [MINUS]: ... here.  Add SSE_FLOAT_MODE_P and X87_FLOAT_MODE_P
        checks before FLOAT_MODE_P.
        [MULT]: Add SSE_FLOAT_MODE_P and X87_FLOAT_MODE_P checks
        before FLOAT_MODE_P.
        [DIV]: Ditto.
        [NEG]: Ditto.
        [ABS]: Ditto.
        [SQRT]: Ditto.
        [FLOAT_EXTEND]: Use SSE_FLOAT_MODE_P.

From-SVN: r123777
2007-04-13 10:14:57 +02:00
Paolo Bonzini be0fe523e7 Makefile.in (stamp-as, [...]): Remove.
2007-04-12  Paolo Bonzini  <bonzini@gnu.org>
            Charles Wilson  <libtool@cwilson.fastmail.fm>

	* Makefile.in (stamp-as, stamp-collect-ld, stamp-nm): Remove.
	(libgcc.mvars): Don't depend on them.
	* configure.ac (as, collect-ld, nm): Create from exec-tool.in.
	* exec-tool.in: New.


Co-Authored-By: Charles Wilson <libtool@cwilson.fastmail.fm>

From-SVN: r123775
2007-04-13 07:04:39 +00:00
Brooks Moses 06a9756916 * doc/invoke.text (--help): Document --help=common.
From-SVN: r123769
2007-04-12 14:13:32 -07:00
Thomas Neumann 4557bf49fa stub-objc.c (objc_build_keyword_decl): Avoid C++ keywords.
2007-04-12  Thomas Neumann  <tneumann@users.sourceforge.net>

	* stub-objc.c (objc_build_keyword_decl): Avoid C++ keywords.

From-SVN: r123764
2007-04-12 19:00:38 +00:00
Richard Sandiford 8cb6400cda Makefile.in (insn-emit.o): Depend on $(INTEGRATE_H).
gcc/
	* Makefile.in (insn-emit.o): Depend on $(INTEGRATE_H).
	* genemit.c (main): Emit #include "integrate.h".
	* config/mips/mips-protos.h (SYMBOL_HALF): New mips_symbol_type.
	(LOADGP_RTP): New mips_loadgp_style.
	* config/mips/mips.h: Include config/vxworks-dummy.h.
	(TARGET_RTP_PIC): New macro.
	(TARGET_USE_GOT): Return true for TARGET_RTP_PIC.
	(TARGET_USE_PIC_FN_ADDR_REG): Return true for TARGET_VXWORKS_RTP.
	(ASM_OUTPUT_ADDR_DIFF_ELT): Emit function-relative case tables
	for TARGET_RTP_PIC.
	* config/mips/vxworks.h (SUBTARGET_ASM_SPEC): Define.  Pass down
	-mvxworks-pic when using -mrtp and a PIC option.
	* config/mips/mips.c (mips_classify_symbol): Return SYMBOL_GOT_DISP
	for RTP PIC.
	(mips_symbolic_constant_p, mips_symbolic_address_p)
	(mips_symbol_insns): Handle SYMBOL_HALF.
	(override_options): Warn about -G and -mrtp being used together.
	Initialize mips_lo_relocs[SYMBOL_HALF].
	(mips_current_loadgp_style): Return LOADGP_RTP for RTP PIC.
	(mips_emit_loadgp): Handle LOADGP_RTP.
	(mips_in_small_data_p): Return false for TARGET_VXWORKS_RTP.
	* config/mips/mips.md (loadgp_rtp): New insn and splitter.
	(tablejump): Handle function-relative case table entries if
	TARGET_RTP_PIC.
	* config/mips/predicates.md (symbol_ref_operand): New predicate.

From-SVN: r123757
2007-04-12 17:59:57 +00:00
Richard Sandiford f28d806256 mips.md (load_call<mode>): Allow any general register.
gcc/
	* config/mips/mips.md (load_call<mode>): Allow any general register.
	destination.
	(sibcall_value_internal, sibcall_value_multiple_internal)
	(call_value_internal, call_value_split, call_value_multiple_internal)
	(call_value_multiple_split): Remove constraints from operand 0.

From-SVN: r123756
2007-04-12 17:44:57 +00:00
Richard Sandiford dc7750b1a9 mips-protos.h: In comments, refer to loadgp_absolute rather than loadgp_noshared.
gcc/
	* config/mips/mips-protos.h: In comments, refer to loadgp_absolute
	rather than loadgp_noshared.
	* config/mips/mips.c (mips_emit_loadgp): Use gen_loadgp_absolute
	instead of gen_loadgp_noshared.  Use gen_loadgp_newabi instead of
	gen_loadgp.
	* config/mips/mips.md (loadgp): Rename to...
	(loadgp_newabi): ...this.
	(loadgp_noshared): Rename to...
	(loadgp_absolute): ...this.

From-SVN: r123755
2007-04-12 17:39:58 +00:00
Richard Sandiford 006257dc5b mips.c (mips_ok_for_lazy_binding_p): Always return false for locally-binding symbols.
gcc/
	* config/mips/mips.c (mips_ok_for_lazy_binding_p): Always return
	false for locally-binding symbols.
	(mips_dangerous_for_la25_p): Check mips_global_symbol_p.

From-SVN: r123754
2007-04-12 17:37:25 +00:00
Richard Sandiford 08e7ceb3d3 mips-protos.h (SYMBOL_GOT_LOCAL): Rename to...
gcc/
	* config/mips/mips-protos.h (SYMBOL_GOT_LOCAL): Rename to...
	(SYMBOL_GOT_PAGE_OFST): ...this.
	(SYMBOL_GOT_GLOBAL): Rename to...
	(SYMBOL_GOT_DISP): ...this.
	(SYMBOL_GOTOFF_GLOBAL): Rename to...
	(SYMBOL_GOTOFF_DISP): ...this.  Update comments accordingly.
	* config/mips/mips.c (mips_global_symbol_p): New function.
	(mips_symbol_binds_local_p): Likewise.
	(mips_classify_symbol): Rename SYMBOL_GOT_GLOBAL to SYMBOL_GOT_DISP
	and SYMBOL_GOT_LOCAL to SYMBOL_GOT_PAGE_OFST.  Use mips_global_symbol_p
	and mips_symbol_binds_local_p.
	(mips_symbolic_constant_p, mips_symbolic_address_p, mips_symbol_insns)
	(override_options): Rename SYMBOL_GOT_GLOBAL to SYMBOL_GOT_DISP,
	SYMBOL_GOT_LOCAL to SYMBOL_GOT_PAGE_OFST and SYMBOL_GOTOFF_GLOBAL to
	SYMBOL_GOTOFF_DISP.
	(mips_ok_for_lazy_binding_p): New function.
	(mips_load_call_address, mips_expand_call): Use it.
	(mips_dangerous_for_la25_p): Likewise.
	* config/mips/mips.md (*xgot_hi<mode>, *xgot_lo<mode>)
	(*got_disp<mode>): Use got_disp_operand instead of
	global_got_operand.  Use SYMBOL_GOTOFF_DISP instead of
	SYMBOL_GOTOFF_GLOBAL.
	(*got_page<mode>): Use got_page_ofst_operand instead of
	local_got_operand.
	* config/mips/predicates.md (const_call_insn_operand): Use
	SYMBOL_GOT_DISP instead of SYMBOL_GOT_GLOBAL.
	(global_got_operand): Rename to...
	(got_disp_operand): ...this and use SYMBOL_GOT_DISP instead of
	SYMBOL_GOT_GLOBAL.
	(local_got_operand): Rename to...
	(got_page_ofst_operand): ...this and use SYMBOL_GOT_PAGE_OFST instead
	of SYMBOL_GOT_LOCAL.

From-SVN: r123752
2007-04-12 17:26:45 +00:00
Richard Sandiford 14976818e7 mips.h (TARGET_SPLIT_CALLS): Check TARGET_CALL_CLOBBERED_GP.
gcc/
	* config/mips/mips.h (TARGET_SPLIT_CALLS): Check
	TARGET_CALL_CLOBBERED_GP.
	(TARGET_SIBCALLS): Check TARGET_USE_GOT instead of TARGET_ABICALLS.
	(TARGET_USE_GOT, TARGET_CALL_CLOBBERED_GP): New macros.
	(TARGET_CALL_SAVED_GP, TARGET_USE_PIC_FN_ADDR_REG): Likewise.
	(STARTING_FRAME_OFFSET): Check TARGET_CALL_CLOBBERED_GP instead
	of TARGET_ABICALLS && !TARGET_NEWABI.
	(MIPS_CALL): Check TARGET_USE_GOT instead of TARGET_ABICALLS.
	* config/mips/mips.c (mips_load_call_address): Check
	TARGET_CALL_SAVED_GP instead of TARGET_NEWABI.
	(mips_global_pointer): Check TARGET_USE_GOT instead of TARGET_ABICALLS.
	Check TARGET_CALL_SAVED_GP instead of TARGET_NEWABI.
	(mips_save_reg_p): Check TARGET_CALL_SAVED_GP instead of
	TARGET_ABICALLS && TARGET_NEWABI.
	(mips_current_loadgp_style): Check TARGET_USE_GOT instead of
	TARGET_ABICALLS.
	(mips_expand_prologue): Check TARGET_OLDABI instead of !TARGET_NEWABI.
	(mips_expand_epilogue): Check TARGET_CALL_SAVED_GP instead of
	TARGET_ABICALLS && TARGET_NEWABI.
	(mips_output_mi_thunk): Check TARGET_USE_GOT instead of
	TARGET_ABICALLS.  Check TARGET_CALL_SAVED_GP instead of
	TARGET_NEWABI.  Use TARGET_USE_PIC_FN_ADDR_REG to decide
	whether indirect calls must use $25.
	(mips_extra_live_on_entry): Check TARGET_GOT instead of
	TARGET_ABICALLS.
	* config/mips/mips.md (jal_macro): Check flag_pic and
	TARGET_CALL_CLOBBERED_GP instead of TARGET_ABICALLS and TARGET_NEWABI.
	(builtin_setjmp_setup, builtin_longjmp): Check TARGET_USE_GOT
	instead of TARGET_ABICALLS.
	(exception_receiver): Check TARGET_CALL_CLOBBERED_GP instead of
	TARGET_ABICALLS && TARGET_OLDABI.
	(load_call<mode>): Check TARGET_USE_GOT instead of TARGET_ABICALLS.
	(sibcall): In the comment above the define_insn, mention
	TARGET_USE_PIC_FN_ADDR_REG instead of TARGET_ABICALLS.
	* config/mips/constraints.md (c): Check TARGET_USE_PIC_FN_ADDR_REG
	instead of TARGET_ABICALLS.

From-SVN: r123751
2007-04-12 17:10:56 +00:00
Bernd Schmidt 2d3649b23f bfin.md (movhi_low2high, [...]): Delete, merge functionality into...
* config/bfin/bfin.md (movhi_low2high, movhi_high2high, movhi_low2low,
	movhi_high2low): Delete, merge functionality into...
	(packv2hi): ... this pattern.

From-SVN: r123749
2007-04-12 15:22:06 +00:00
Bernd Schmidt 3fbee523e2 lib1funcs.asm (___umulsi3_highpart, [...]): Use a more efficient implementation.
* config/bfin/lib1funcs.asm (___umulsi3_highpart, __smulsi3_highpart):
	Use a more efficient implementation.
	* config/bfin/bfin.md (umulsi3_highpart, smulsi3_highpart): Emit
	inline sequences when not optimizing for size.

From-SVN: r123748
2007-04-12 13:39:35 +00:00
Bernd Schmidt 9d3f9aa3a5 bfin.opt (msim): New option.
2007-02-11  Jie Zhang  <jie.zhang@analog.com>
	* config/bfin/bfin.opt (msim): New option.
	(mcpu=): New option.
	* config/bfin/bfin-protos.h (enum bfin_cpu): New.
	(bfin_cpu_t): Typedef of enum bfin_cpu.
	(bfin_cpu_type): New declaration.
	* config/bfin/elf.h (STARTFILE_SPEC): Add support for
	-msim and -mcpu= options.
	(LIB_SPEC): Likewise.
	* config/bfin/bfin.c (bfin_cpu_type): Define.
	(bfin_handle_option): Handle -mcpu= option.
	* config/bfin/bfin.h (DEFAULT_CPU_TYPE): Define as BFIN_CPU_BF532.
	(TARGET_CPU_CPP_BUILTINS): Define __ADSPBF531__, __ADSPBF532__,
	__ADSPBF533__ or __ADSPBF537__ according to the cpu type.

From-SVN: r123747
2007-04-12 13:21:01 +00:00
Bernd Schmidt 3efd5670ca md.texi (Blackfin family constraints): Document PA and PB.
* doc/md.texi (Blackfin family constraints): Document PA and PB.
	* config/bfin/bfin.h (CONST_OK_FOR_P): Handle PA and PB.
	(MACFLAGS_MATCH_P): New macro.
	* config/bfin/bfin.c (print_operand): Handle MACFLAG_IS_M.
	(bfin_secondary_reload): Treat EVEN_AREGS and ODD_AREGS like AREGS.
	* config/bfin/bfin.md (MACFLAG_IS_M): New constant.  Renumber some of
	the other MACFLAG constants.
	(sum_of_accumulators, lshrpdi3, ashrpdi3): New patterns.
	(flag_machi): Tighten constraints.  Renumber some of the operands.
	(flag_machi_acconly): Tighten constraints.  Correct operand numbers in
	output template.
	(flag_machi_parts_acconly): New pattern.
	(flag_macinithi): Tighten constraints.  Allow any accumulator to be
	used.
	(flag_macinit1hi): Tighten constraints.
	(flag_mul_macv2hi_parts_acconly): New pattern.

From-SVN: r123745
2007-04-12 13:03:17 +00:00
Richard Sandiford f4de8ba686 config.gcc (*-*-vxworks*): Don't add to tm_files in this stanza.
gcc/
	* config.gcc (*-*-vxworks*): Don't add to tm_files in this stanza.
	(arm-wrs-vxworks, mips-wrs-vxworks, powerpc-wrs-vxworks)
	(powerpc-wrs-vxworksae): Use ${tm_file}.
	(i[4567]86-wrs-vxworks, i[4567]86-wrs-vxworksae): Add svr4.h
	after elfos.h.  Remove i386/sysv4.h and add i386/vx-common.h.
	* config/i386/vx-common.h: New file.

From-SVN: r123744
2007-04-12 12:47:05 +00:00
Richard Sandiford b83b15dae3 vxworks.h (VXWORKS_STARTFILE_SPEC): Use -l:crt0.o instead of crt0.o%s.
gcc/
	* config/vxworks.h (VXWORKS_STARTFILE_SPEC): Use -l:crt0.o instead
	of crt0.o%s.

From-SVN: r123743
2007-04-12 12:44:31 +00:00
Andreas Krebbel bf259a7704 s390.md ("trunctddd2"): Use TDmode for the target of ldxtr.
2007-04-12  Andreas Krebbel  <krebbel1@de.ibm.com>

	* config/s390/s390.md ("trunctddd2"): Use TDmode for the target of
	ldxtr.

From-SVN: r123741
2007-04-12 12:07:24 +00:00
Douglas Gregor 9576481824 re PR c++/31078 (warning: same canonical type node for different types with const strings)
2007-04-12  Douglas Gregor  <doug.gregor@gmail.com>

	PR c++/31078
	PR c++/31103
	* c-common.c (c_build_qualified_type): Set canonical type
	appropriately.  

2007-04-12  Douglas Gregor  <doug.gregor@gmail.com>

	PR c++/31078
	* g++.dg/other/pr31078.C: New.

From-SVN: r123740
2007-04-12 11:47:56 +00:00
Richard Guenther a670437d92 tree-pretty-print.c (dump_generic_node): Print ARRAY_REF lower bound and element size if...
2007-04-12  Richard Guenther  <rguenther@suse.de>

	* tree-pretty-print.c (dump_generic_node): Print ARRAY_REF
	lower bound and element size if lower bound is not zero
	or either of the ARRAY_REF operands is set.

From-SVN: r123738
2007-04-12 09:25:04 +00:00
Richard Guenther 5852948c5b re PR tree-optimization/24689 (operand_equal_p does not return true for some equivalent ARRAY_REF)
2007-04-12  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/24689
	PR tree-optimization/31307
	* fold-const.c (operand_equal_p): Compare INTEGER_CST array
	indices by value.
	* gimplify.c (canonicalize_addr_expr): To be consistent with
	gimplify_compound_lval only set operands two and three of
	ARRAY_REFs if they are not gimple_min_invariant.  This makes
	it never at this place.
	* tree-ssa-ccp.c (maybe_fold_offset_to_array_ref): Likewise.

	* g++.dg/tree-ssa/pr31307.C: New testcase.
	* gcc.dg/tree-ssa/pr24689.c: Likewise.

From-SVN: r123736
2007-04-12 09:15:53 +00:00
John David Anglin 8c5e065b53 pa.c (pa_som_asm_init_sections): Ensure that cfun->machine is not null before emitting a .nsubspa directive.
* pa.c (pa_som_asm_init_sections): Ensure that cfun->machine is not
	null before emitting a .nsubspa directive.

From-SVN: r123733
2007-04-12 00:46:13 +00:00
Diego Novillo 0de107cf67 tree-ssa-alias.c (dump_mem_ref_stats): Do not call need_to_partition_p if there are no memory statements in the function.
* tree-ssa-alias.c (dump_mem_ref_stats): Do not call
	need_to_partition_p if there are no memory statements in the
	function.

From-SVN: r123732
2007-04-11 19:46:43 -04:00
Zdenek Dvorak 55a700ac1f tree-data-ref.c (chrec_steps_divide_constant_p): Removed.
* tree-data-ref.c (chrec_steps_divide_constant_p): Removed.
	(gcd_of_steps_may_divide_p): New function.
	(analyze_miv_subscript): Use gcd_of_steps_may_divide_p.

From-SVN: r123731
2007-04-11 23:18:58 +00:00
Bernd Schmidt 0f4b25a3e3 reload.c (find_reloads_toplev, [...]): Use rtx_equal_p...
* reload.c (find_reloads_toplev, find_reloads_address,
	find_reloads_address_1, find_reloads_subreg_address): Use rtx_equal_p,
	not a pointer equality test, to decide if we need to call
	push_reg_equiv_alt_mem.

From-SVN: r123724
2007-04-11 19:44:07 +00:00
Sebastian Pop 1baf2906ef tree-data-ref.c (affine_function_zero_p, [...]): New.
* tree-data-ref.c (affine_function_zero_p, constant_access_functions,
	insert_innermost_unit_dist_vector, add_distance_for_zero_overlaps): New.
	(build_classic_dist_vector): Call add_distance_for_zero_overlaps.

From-SVN: r123721
2007-04-11 17:10:23 +00:00
Zdenek Dvorak 0ca2faee4f tree-data-ref.c (add_multivariate_self_dist): Force the distance vector to be positive.
* tree-data-ref.c (add_multivariate_self_dist): Force the distance
	vector to be positive.

From-SVN: r123720
2007-04-11 16:45:47 +00:00
Diego Novillo e9e0aa2c96 re PR tree-optimization/30735 (50% slow down due to mem-ssa merge)
PR 30735
	PR 31090
	* doc/invoke.texi: Document --params max-aliased-vops and
	avg-aliased-vops.
	* tree-ssa-operands.h (get_mpt_for, dump_memory_partitions,
	debug_memory_partitions): Move to tree-flow.h
	* params.h (AVG_ALIASED_VOPS): Define.
	* tree-ssa-alias.c (struct mp_info_def): Remove.  Update all
	users.
	(mp_info_t): Likewise.
	(get_mem_sym_stats_for): New.
	(set_memory_partition): Move from tree-flow-inline.h.
	(mark_non_addressable): Only clear the set of symbols for the
	partition if it exists.
	(dump_memory_partitions): Move from tree-ssa-operands.c
	(debug_memory_partitions): Likewise.
	(need_to_partition_p): New.
	(dump_mem_ref_stats): New.
	(debug_mem_ref_stats): New.
	(dump_mem_sym_stats): New.
	(debug_mem_sym_stats): New.
	(update_mem_sym_stats_from_stmt): New.
	(compare_mp_info_entries): New.
	(mp_info_cmp): Call it.
	(sort_mp_info): Change argument to a list of mem_sym_stats_t
	objects.
	(get_mpt_for): Move from tree-ssa-operands.c.
	(find_partition_for): New.
	(create_partition_for): Remove.
	(estimate_vop_reduction): New.
	(update_reference_counts): New.
	(build_mp_info): New.
	(compute_memory_partitions): Refactor.
	Document new heuristic.
	Call build_mp_info, update_reference_counts,
	find_partition_for and estimate_vop_reduction.
	(compute_may_aliases): Populate virtual operands before
	calling debugging dumps.
	(delete_mem_sym_stats): New.
	(delete_mem_ref_stats): New.
	(init_mem_ref_stats): New.
	(init_alias_info): Call it.
	(maybe_create_global_var): Remove alias_info argument.
	Get number of call sites and number of pure/const call sites
	from gimple_mem_ref_stats().
	(dump_alias_info): Call dump_memory_partitions first.
	(dump_points_to_info_for): Show how many times a pointer has
	been dereferenced.
	* opts.c (decode_options): For -O2 set --param
	max-aliased-vops to 500.
	For -O3 set --param max-aliased-vops to 1000 and --param
	avg-aliased-vops to 3.
	* fortran/options.c (gfc_init_options): Remove assignment to
	MAX_ALIASED_VOPS.
	* tree-flow-inline.h (gimple_mem_ref_stats): New.
	* tree-dfa.c (dump_variable): Dump memory reference
	statistics.
	Dump NO_ALIAS* settings.
	(referenced_var_lookup): Tidy.
	(mem_sym_stats): New.
	* tree-ssa-copy.c (may_propagate_copy): Return true if DEST
	and ORIG are different SSA names for a memory partition.
	* tree-ssa.c (delete_tree_ssa): Call delete_mem_ref_stats.
	* tree-flow.h (struct mem_sym_stats_d): Define.
	(mem_sym_stats_t): Define.
	(struct mem_ref_stats_d): Define.
	(struct gimple_df): Add field mem_ref_stats.
	(enum noalias_state): Define.
	(struct var_ann_d): Add bitfield noalias_state.
	(mem_sym_stats, delete_mem_ref_stats, dump_mem_ref_stats,
	debug_mem_ref_stats, debug_memory_partitions,
	debug_mem_sym_stats): Declare.
	* tree-ssa-structalias.c (update_alias_info): Update call
	sites, pure/const call sites and asm sites in structure
	returned by gimple_mem_ref_stats.
	Remove local variable IS_POTENTIAL_DEREF.
	Increase NUM_DEREFS if the memory expression is a potential
	dereference.
	Call update_mem_sym_stats_from_stmt.
	If the memory references memory, call
	update_mem_sym_stats_from_stmt for all the direct memory
	symbol references found.
	(intra_create_variable_infos): Set noalias_state field for
	pointer arguments according to the value of
	flag_argument_noalias.
	* tree-ssa-structalias.h (struct alias_info): Remove fields
	num_calls_found and num_pure_const_calls_found.
	(update_mem_sym_stats_from_stmt): Declare.
	* params.def (PARAM_MAX_ALIASED_VOPS): Change description.
	Set default value to 100.
	(PARAM_AVG_ALIASED_VOPS): Define.

From-SVN: r123719
2007-04-11 12:14:06 -04:00
Richard Guenther 4bf371ea7e re PR middle-end/31530 (Incorrect folding of multiplication and sign change when followed by an addition)
2007-04-11  Richard Guenther  <rguenther@suse.de>

	PR middle-end/31530
	* simplify-rtx.c (simplify_binary_operation_1): Do not simplify
	a * -b + c as c - a * b if we honor sign dependent rounding.

From-SVN: r123715
2007-04-11 11:13:54 +00:00
Bernd Schmidt 266d11d862 bfin-protos.h (bfin_expand_movmem): Renamed from bfin_expand_strmov.
* config/bfin/bfin-protos.h (bfin_expand_movmem): Renamed from
	bfin_expand_strmov.
	* config/bfin/bfin.c (bfin_expand_prologue, bfin_delegitimize_address,
	bfin_function_ok_for_sibcall, split_load_immediate): Remove unused
	variables.
	(initialize_trampoline): Don't use old-style function definition.
	(bfin_secondary_reload): Mark IN_P argument as unused.

From-SVN: r123714
2007-04-11 11:06:44 +00:00
Sebastian Pop e9793dae58 re PR tree-optimization/31343 (ICE in data-refs dependence testing)
PR tree-optimization/31343
	* tree-chrec.h (chrec_zerop): Moved before build_polynomial_chrec.
	(build_polynomial_chrec): Return a scalar when the evolution is zero.
	* testsuite/gcc.dg/vect/pr31343.c: New.

From-SVN: r123708
2007-04-11 00:09:35 +00:00
Eric Christopher 54a8809004 i386.h (X87_FLOAT_MODE_P): New.
2007-04-10  Eric Christopher  <echristo@apple.com>

	    * config/i386/i386.h (X87_FLOAT_MODE_P): New.
	    * config/i386/i386.md (*cmpfp0): Use.
	    (*cmpfp_u, *cmpfp_<mode>, *cmpfp_i_i387): Ditto.
	    (*cmpfp_iu_387, fix_trunc<mode>_fisttp_i386_1): Ditto.
	    (fix_trunc<mode>_i386_fisttp): Ditto.
	    (fix_trunc<mode>_i387_fisttp_with_temp): Ditto.
	    (*fix_trunc<mode>_i387_1, fix_truncdi_i387): Ditto.
	    (fix_truncdi_i387_with_temp, fix_trunc<mode>_i387): Ditto.
	    (fix_trunc<mode>_i387_with_temp, *fp_jcc_1_387): Ditto.
	    (*fp_jcc_2_387, *fp_jcc_5_387, *fp_jcc_6_387): Ditto.
	    (*fp_jcc_7_387, *fp_jcc_8<mode>_387): Ditto.
	    (unnamed_splitters): Ditto.
	    * config/i386/i386.c (output_fix_trunc): Assert that
	    we're not being passed a TFmode operand.

From-SVN: r123700
2007-04-10 22:41:28 +00:00
Zdenek Dvorak 7c57be853d re PR tree-optimization/31526 (ICE in alloc_aux_for_block())
PR tree-optimization/31526
	* tree-inline.c (copy_cfg_body): Use last_basic_block instead of
	n_basic_blocks to find newly added blocks.

From-SVN: r123699
2007-04-10 21:10:26 +00:00
Uros Bizjak 0218c0120c i386.md (fix_trunc<mode>di_sse): Remove "x" from "xm" alternative.
* config/i386/i386.md (fix_trunc<mode>di_sse): Remove "x" from "xm"
	alternative.
	(fix_trunc<mode>si_sse): Ditto.
	(*floatsisf2_mixed, *floatsisf2_sse): Ditto.
	(*floatsidf2_mixed, *floatsidf2_sse): Ditto.
	(*floatdisf2_mixed, *floatdisf2_sse): Ditto.
	(*floatdidf2_mixed, *floatdidf2_sse): Ditto.
	(floathi<mode>2): Rename from floathisf2 and floathidf2. Macroize
	expander using SSEMODEF mode macro.
	(floatsi<mode>2): Rename from floatsisf2 and floashidf2. Macroize
	expander using SSEMODEF mode macro.
	(*floathi<mode>2_i387): Rename from *floathisf2_i387 and
	*floathidf2_i387. Macroize insn using X87MODEF12 mode macro.
	(*floatsi<mode>2_i387): Rename from *floatsisf2_i387 and
	*floatsidf2_i387. Macroize insn using X87MODEF12 mode macro.
	(*floatdi<mode>2_i387): Rename from *floatdisf2_i387 and
	*floatdidf2_i387. Macroize insn using X87MODEF12 mode macro.
	(float<mode>xf2): Rename from floathixf2, floatsixf2 and floatdixf2.
	Macroize insn using X87MODEF mode macro.

From-SVN: r123693
2007-04-10 13:41:01 +02:00
H.J. Lu 3117d1b509 sse.md (sse2_pinsrw): Removed.
2007-04-09  H.J. Lu  <hongjiu.lu@intel.com>

	* config/i386/sse.md (sse2_pinsrw): Removed.
	(sse2_pextrw): Renamed to ...
	(*sse2_pextrw): This.

From-SVN: r123689
2007-04-09 18:58:03 -07:00
Jan Hubicka c141e4992b re PR target/27869 ("-O -fregmove" handles SSE scalar instructions incorrectly)
PR target/27869
	* config/i386/sse.md
	(sse_vmaddv4sf3, sse_vmmulv4sf3): Remove '%' modifier.
	(sse_vmsmaxv4sf3_finite, sse_vmsminv4sf3_finite): Remove.
	(sse2_vmaddv2df3, sse2_vmmulv2df3): Remove '%' modifier.
	(sse2_vmsmaxv2df3_finite, sse2_vmsminv2df3_finite): Remove.

From-SVN: r123682
2007-04-09 23:06:16 +00:00
Jan Hubicka 6e6e19cbf5 foldaddr-3.c: New file.
* gcc.dg/tree-ssa/foldaddr-3.c: New file.

	* tree-ssa-ccp (maybe_fold_offset_to_component_ref): Recurse into
	multiple fields of union.

From-SVN: r123674
2007-04-09 17:00:10 +00:00
Zdenek Dvorak c7b852c8a6 cfgloopmanip.c (create_preheader): Do not use loop_preheader_edge.
* cfgloopmanip.c (create_preheader): Do not use loop_preheader_edge.
	(create_preheaders): Check that loops are available.
	(fix_loop_structure): Clean up, improve comments.
	* tree-ssa-loop-manip.c (rewrite_into_loop_closed_ssa):
	Check that loops are available.  Set LOOP_CLOSED_SSA to the loops
	state flags.
	* tree-scalar-evolution.c (scev_finalize): Clear scalar_evolution_info.
	* predict.c (tree_estimate_probability): Do not call
	calculate_dominance_info.  Call create_preheaders.
	* tree-cfgcleanup.c (cleanup_tree_cfg_loop): Only call
	rewrite_into_loop_closed_ssa if LOOP_CLOSED_SSA is set in loops state
	flags.
	* cfgloop.c (loop_preheader_edge): Assert that loops have preheaders.
	* cfgloop.h (LOOP_CLOSED_SSA): New constant.
	* tree-cfg.c (tree_split_edge): Make an assert more precise.
	* tree-ssa-threadedge.c (thread_across_edge): Comment the function
	arguments.

From-SVN: r123670
2007-04-09 06:51:43 +00:00
Jan Hubicka c586d32a1e tree.h (maybe_fold_offset_to_component_ref): Declare.
* tree.h (maybe_fold_offset_to_component_ref): Declare.
	* tree-ssa-ccp.c (maybe_fold_offset_to_component_ref): Export.
	* fold-const.c (fold_unary): Use it.

	* gcc.dg/tree-ssa/foldaddr-2.c: New file.

From-SVN: r123664
2007-04-08 22:12:21 +00:00
Andrew Pinski 136cdb2250 varasm.c (assemble_variable): Remove call to lang_hooks.decls.prepare_assemble_variable.
2007-04-08  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        * varasm.c (assemble_variable): Remove call to
        lang_hooks.decls.prepare_assemble_variable.
        * langhooks-def.h (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Kill.
        (LANG_HOOKS_DECLS): Remove LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE.
        * langhooks.h (lang_hooks_for_decls): Remove
        prepare_assemble_variable.

From-SVN: r123663
2007-04-08 12:30:06 -07:00