Commit Graph

32892 Commits

Author SHA1 Message Date
Kenneth Zadeck 201bfd1441 forgot to save back the change log
From-SVN: r126043
2007-06-26 20:09:24 +00:00
Steve Ellcey 4319e38c0b * builtins.c (expand_builtin_next_arg): Change Pmode to ptr_mode.
From-SVN: r126031
2007-06-26 15:47:59 +00:00
Jan Hubicka 12c7b51e3e ipa-inline.c (cgraph_mark_inline): Assert that we never inline uninlinable call.
* ipa-inline.c (cgraph_mark_inline): Assert that we never inline
	uninlinable call.
	(cgraph_decide_inlining_of_small_function, cgraph_decide_inlining,
	cgraph_decide_inlining_incrementally): Move uninlinability checks to
	places other call site specific checks are performed.

From-SVN: r126015
2007-06-26 10:31:55 +00:00
Andrew Pinski 2caf766b63 re PR tree-optimization/32421 (-ftree-vectorize -msse2 ICEs in build2_stat when vectorizing POINTER_PLUS_EXPR)
2007-06-25  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        PR tree-opt/32421
        * tree-vect-transform.c (vectorizable_operation): Convert
        POINTER_PLUS_EXPR over to PLUS_EXPR.


2007-06-25  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        PR tree-opt/32421
        * gcc.dg/vect/pr32421.c: New test.

From-SVN: r126012
2007-06-25 17:19:44 -07:00
Chao-ying Fu 1699ec0b95 rtl.texi (Machine Modes): Document QQ...
* doc/rtl.texi (Machine Modes): Document QQ, HQ, SQ, DQ, TQ,
	UQQ, UHQ, USQ, UDQ, UTQ, HA, SA, DA, TA, UHA, USA, UDA, and UTAmodes.
	Document MODE_FRACT, MODE_UFRACT, MODE_ACCUM, MODE_UACCUM.
	Document GET_MODE_IBIT, and GET_MODE_FBIT.

	* machmode.h (VECTOR_MODE_P): Test MODE_VECTOR_FRACT,
	MODE_VECTOR_UFRACT, MODE_VECTOR_ACCUM, MODE_VECTOR_UACCUM.
	(SCALAR_FRACT_MODE_P, SCALAR_UFRACT_MODE_P, ALL_SCALAR_FRACT_MODE_P,
	SCALAR_ACCUM_MODE_P, SCALAR_UACCUM_MODE_P, ALL_SCALAR_ACCUM_MODE_P,
	SIGNED_SCALAR_FIXED_POINT_MODE_P, UNSIGNED_SCALAR_FIXED_POINT_MODE_P,
	ALL_SCALAR_FIXED_POINT_MODE_P, FRACT_MODE_P, UFRACT_MODE_P,
	ALL_FRACT_MODE_P, ACCUM_MODE_P, UACCUM_MODE_P, ALL_ACCUM_MODE_P,
	SIGNED_FIXED_POINT_MODE_P, UNSIGNED_FIXED_POINT_MODE_P,
	ALL_FIXED_POINT_MODE_P): New define.
	(CLASS_HAS_WIDER_MODES_P): Test MODE_FRACT, MODE_UFRACT, MODE_ACCUM,
	MODE_UACCUM.
	(GET_MODE_IBIT, GET_MODE_FBIT): New define.

	* mode-classes.def (MODE_FRACT, MODE_UFRACT, MODE_ACCUM, MODE_UACCUM,
	MODE_VECTOR_FRACT, MODE_VECTOR_UFRACT, MODE_VECTOR_ACCUM,
	MODE_VECTOR_UACCUM): New mode classes.

	* machmode.def: Document FRACT_MODE, UFRACT_MODE, ACCUM_MODE,
	UACCUM_MODE, ADJUST_IBIT, and ADJUST_FBIT.
	Add QQ, HQ, SQ, DQ, TQ, UQQ, UHQ, USQ, UDQ, UTQ, HA, SA, DA, TA, UHA,
	USA, UDA, and UTA.

	* genmodes.c (struct mode_data): Add ibit and fbit fields.
	(blank_mode): Initialize ibit and fbit.
	(adj_ibit, adj_fbit): New to adjust ibit and fbit.
	(vector_class): Handle MODE_FRACT, MODE_UFRACT, MODE_ACCUM, MODE_UACCUM.
	(new_adjust): Change required_class to required_class_from and
	required_class_to for testing within a range.
	(complete_mode): Handle MODE_FRACT, MODE_UFRACT, MODE_ACCUM,
	MODE_UACCUM, MODE_VECTOR_FRACT, MODE_VECTOR_UFRACT, MODE_VECTOR_ACCUM,
	MODE_VECTOR_UACCUM.
	(FRACT_MODE, UFRACT_MODE, ACCUM_MODE, UACCUM_MODE): New define.
	(make_fixed_point_mode): New.
	(_ADD_ADJUST): Change C to C1 and C2.
	(ADJUST_BYTESIZE, ADJUST_ALIGNMENT, ADJUST_FLOAT_FORMAT): Change to
	use a range for machine classes.
	(ADJUST_IBIT, ADJUST_FBIT): New.
	(emit_insn_modes_h): Output defines of CONST_MODE_IBIT and
	CONST_MODE_FBIT.
	(emit_mode_adjustments): Handle MODE_VECTOR_FRACT, MODE_VECTOR_UFRACT,
	MODE_VECTOR_ACCUM, MODE_VECTOR_UACCUM.
	Emit adjustment for ibit and fbit.
	(emit_mode_ibit, emit_mode_fbit): New.
	(emit_insn_modes_c): Add emit_mode_ibit and emit_mode_fbit.

From-SVN: r126007
2007-06-25 22:51:27 +00:00
Nathan Froyd a3f8aaa52e spe.md (*frob_ti_tf_2): Specify an input_operand as the source of the set.
* config/rs6000/spe.md (*frob_ti_tf_2): Specify an input_operand
	as the source of the set.

From-SVN: r126002
2007-06-25 19:15:08 +00:00
Roman Zippel bf32249ec2 m68k.h (DATA_REGNO_P, [...]): Use IN_RANGE.
* config/m68k/m68k.h (DATA_REGNO_P, ADDRESS_REGNO_P, INT_REGNO_P,
	FP_REGNO_P): Use IN_RANGE.
	(REGNO_OK_FOR_DATA_P, REGNO_OK_FOR_FP_P): Remove.
	(REGNO_OK_FOR_INDEX_NONSTRICT_P, REGNO_OK_FOR_BASE_NONSTRICT_P): New.
	(DATA_REG_P): Use DATA_REGNO_P.
	(FP_REG_P): Use FP_REGNO_P.
	(ADDRESS_REG_P): Use ADDRESS_REGNO_P.
	* config/m68k/m68k.c (m68k_legitimate_base_reg_p): Use
	REGNO_OK_FOR_INDEX_NONSTRICT_P, REGNO_OK_FOR_BASE_NONSTRICT_P.

From-SVN: r126001
2007-06-25 18:43:50 +00:00
Jan Hubicka 6a84c0988c re PR tree-optimization/30563 (ice for legal code with flags -O2 -fno-unit-at-a-time)
PR middle-end/30563
	* cgraphunit.c (cgraph_analyze_function): Fix ordering problem.

From-SVN: r125991
2007-06-24 23:24:10 +00:00
Sebastian Pop a49c5793d5 re PR tree-optimization/32461 (Segmentation fault in build_classic_dist_vector_1() at tree-data-ref.c:2700)
PR middle-end/32461
	* fold-const.c (fold_binary): Strip nops of operand 0
	of BIT_NOT_EXPR before calling operand_equal_p.
	* testsuite/gcc.dg/tree-ssa/pr32461-1.c: New.
	* testsuite/gcc.dg/tree-ssa/pr32461-2.c: New.

From-SVN: r125988
2007-06-24 20:59:02 +00:00
Mark Mitchell 3a687f8bbb extend.texi: Document that dllimport and dllexport imply default visibility.
2007-06-23  Mark Mitchell  <mark@codesourcery.com>

	* doc/extend.texi: Document that dllimport and dllexport imply
	default visibility.
	* tree.c (handle_dll_attribute): Set DECL_VISIBILITY on the
	imported or exported declaration, including type declarations.
	* c-common.c (handle_visibility_attribute): Check for conflicts
	with dllimport/dllexport.
	(c_determine_visibility): Handle dllimport/dllexport as an
	explicit visibility atttribute.

2007-06-23  Mark Mitchell  <mark@codesourcery.com>

	* decl2.c (determine_visibility): Don't look for dllexport here.
	(determine_visibility_from_class): Tidy.

2007-06-23  Mark Mitchell  <mark@codesourcery.com>

	* gcc.dg/visibility-12.c: New test.
	* gcc.dg/visibility-13.c: Likewise.
	* g++.dg/ext/visibility-9.C: Likewise.
	* g++.dg/ext/visibility-10.C: Likewise.

From-SVN: r125975
2007-06-23 19:17:04 +00:00
Richard Guenther e36711f3cd re PR tree-optimization/16876 (ICE on testcase with -O3 in fold-const)
2007-06-23  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/16876
	PR middle-end/29478
	* tree.h (CALL_CANNOT_INLINE_P): New macro to access static_flag
	for CALL_EXPRs.
	* tree-inline.c (initialize_inlined_parameters): Do not call
	lang_hooks.tree_inlining.convert_parm_for_inlining.
	* cgraphbuild.c (initialize_inline_failed): Set inline failed
	reason for mismatched types.
	* gimplify.c (gimplify_call_expr): Verify the call expression
	arguments match the called function type signature.  Otherwise
	mark the call expression to be not considered for inlining
	using CALL_CANNOT_INLINE_P flag.
	* ipa-inline.c (cgraph_mark_inline): Honor CALL_CANNOT_INLINE_P on the
	edges call expression.
	(cgraph_decide_inlining_of_small_function): Likewise.
	(cgraph_decide_inlining): Likewise.
	* c-objc-common.h (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
	Remove define.
	* c-tree.h (c_convert_parm_for_inlining): Remove declaration.
	* c-typeck.c (c_convert_parm_for_inlining): Remove.
	* langhooks-def.h (lhd_tree_inlining_convert_parm_for_inlining):
	Remove declaration.
	(LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING): Remove define.
	* langhooks.c (lhd_tree_inlining_convert_parm_for_inlining):
	Remove.
	* langhooks.h (struct lang_hooks_for_tree_inlining): Remove
	convert_parm_for_inlining member.

	* gcc.dg/pr29254.c: The warning is bogus.
	* gcc.dg/warn-1.c: Likewise.
	* gcc.dg/assign-warn-3.c: Likewise.
	* gcc.dg/noncompile/pr16876.c: The testcase is bogus, remove.

From-SVN: r125974
2007-06-23 18:17:57 +00:00
Richard Earnshaw 630ef467a8 re PR target/31152 (-(x>y) generates wrong code)
PR target/31152
	* arm.md (negscc): Match the correct operand for optimized LT0 test.
	Remove optimization for GT.
	*gcc.c-torture/execute/20070623-1.c: New.

From-SVN: r125973
2007-06-23 18:07:04 +00:00
Kenneth Zadeck 6cad985925 re PR target/32437 (MIPS: FAIL in gcc.dg/cleanup-[8|9|10|11].c)
2007-06-23  Kenneth Zadeck <zadeck@naturalbridge.com>

	PR middle-end/32437
	*dce.c (deletable_insn_p): Add extra parameter and recurse if insn
	is a PARALLEL.
	(prescan_insns_for_dce): Add extra parameter.

From-SVN: r125972
2007-06-23 16:21:43 +00:00
Jan Hubicka 936d04b695 re PR middle-end/31541 (cannot take address of bit field)
PR middle-end/31541
	* gimplify.c (mark_addressable): New function.
	(gimplify_modify_expr_rhs, gimplify_addr_expr, gimplify_expr): Use it.

	* gcc.c-torture/compile/pr31541.c: New.

From-SVN: r125971
2007-06-23 11:58:18 +00:00
Uros Bizjak 58f7fcc362 re PR middle-end/32374 (internal compiler error: in reload_cse_simplify_operands, at postreload.c:396)
PR middle-end/32374
        * expr.c (store_constructor): Do not clobber non-zeroed memory. 

testsuite/ChangeLog:

        PR middle-end/32374
        * gcc.dg/pr32374.c: New test.

From-SVN: r125955
2007-06-22 20:51:28 +02:00
Uros Bizjak 147bbdd051 re PR target/32413 (internal compiler error: in reload_cse_simplify_operands, at postreload.c:396)
PR target/32413
    * config/i386/i386.c (ix86_register_move_cost): Rise the cost of
    moves between MMX/SSE registers to at least 8 units to prevent
    ICE caused by non-tieable SI/HI/QImodes in SSE registers.

From-SVN: r125951
2007-06-22 19:51:06 +02:00
Uros Bizjak 9064c53336 i386.c (override_options): Correct x86_sahf setting condition.
* config/i386/i386.c (override_options): Correct x86_sahf
	setting condition.

From-SVN: r125948
2007-06-22 14:56:37 +02:00
David Daney 1ad91955bd Fix PR number from last commit 32046->32406.
From-SVN: r125942
2007-06-22 04:50:50 +00:00
David Daney 48a8bb13b3 re PR fortran/32046 (wrong code with -O2 for gfortran.dg/interface_12.f90 & result_in_spec_1.f90)
PR target/32046
	* config/mips/mips.md (define_constants): Rename UNSPEC_EH_RECEIVER
	to UNSPEC_NONLOCAL_GOTO_RECEIVER globally.
	(exception_receiver): Renamed to ...
	(nonlocal_goto_receiver): ... this.

From-SVN: r125941
2007-06-22 04:46:08 +00:00
Roman Zippel 7bb3ae2f52 df-scan.c (df_read_modify_subreg_p): Use REGMODE_NATURAL_SIZE.
* df-scan.c (df_read_modify_subreg_p): Use REGMODE_NATURAL_SIZE.
	(df_def_record_1): Set (DF_REF_READ_WRITE | DF_REF_PARTIAL) for
	partial register accesses.

From-SVN: r125940
2007-06-22 02:55:07 +00:00
Adam Nemet f1b42630a5 fold-const.c (debug_fold_checksum): Move it under ENABLE_FOLD_CHECKING.
* fold-const.c (debug_fold_checksum): Move it under
	ENABLE_FOLD_CHECKING.

From-SVN: r125932
2007-06-21 23:46:59 +00:00
Sebastian Pop 70826cbbef re PR middle-end/20623 (ICE: fold check: original tree changed by fold with --enable-checking=fold)
PR middle-end/20623
	* tree.h (debug_fold_checksum): Declared.
	* fold-const.c (build_fold_addr_expr_with_type_1): New.
	(build_fold_addr_expr_with_type, build_fold_addr_expr): Use 
	build_fold_addr_expr_with_type_1.
	(fold_addr_expr, debug_fold_checksum): New.
	(fold_checksum_tree): Don't fold TREE_CHAIN of an SSA_NAME.
	(fold_unary, fold_comparison, split_address_to_core_and_offset):
	Use fold_addr_expr.

From-SVN: r125929
2007-06-21 21:25:27 +00:00
Sebastian Pop 6f1c9cd02f re PR tree-optimization/19590 (IVs with the same evolution not eliminated)
PR tree-optimization/19590
	* tree-vrp.c (adjust_range_with_scev): Set the range when the result
	of scev is a constant.
	* gcc/testsuite/gcc.dg/tree-ssa/pr19590.c: New.

From-SVN: r125925
2007-06-21 17:06:05 +00:00
Kenneth Zadeck e44e043cb3 df-problems.c (df_note_bb_compute): Made computation of live info consistent with df_lr.
2007-06-21  Kenneth Zadeck <zadeck@naturalbridge.com>

        * df-problems.c (df_note_bb_compute): Made computation of live
	info consistent with df_lr.

From-SVN: r125924
2007-06-21 16:24:59 +00:00
Richard Guenther 4228997795 re PR tree-optimization/32453 (ICE in build2_stat, at tree.c:3074 (extract_range_from_assert))
2007-06-21  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/32453
	* tree-vrp.c (extract_range_from_assert): Build POINTER_PLUS_EXPR
	for pointer anti-range.

	* gcc.c-torture/compile/pr32453.c: New testcase.

From-SVN: r125922
2007-06-21 14:54:47 +00:00
H.J. Lu 461a73b578 i386.c (processor_target_table): Increase maximum skip from 7 byte to 10 byte for Pentium Pro...
2007-06-21  H.J. Lu  <hongjiu.lu@intel.com>

	* config/i386/i386.c (processor_target_table): Increase maximum
	skip from 7 byte to 10 byte for Pentium Pro, Core 2 Duo and
	default 64bit.

	* config/i386/linux.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Ensure 8
	byte alignment if > 8 byte alignment is preferred.
	* config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.

From-SVN: r125920
2007-06-21 05:31:09 -07:00
Jakub Jelinek 3521f3cc39 re PR tree-optimization/31866 (ICE with tree check error: expected ssa_name, have var_decl in create_outofssa_var_map)
PR tree-optimization/31866
	* tree-ssa-coalesce.c (create_outofssa_var_map): Do nothing
	if ASM_EXPR's input is not a SSA_NAME.

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

From-SVN: r125919
2007-06-21 14:20:42 +02:00
Jakub Jelinek 64964499f4 re PR middle-end/32362 (ICE: in lookup_decl_in_outer_ctx, at omp-low.c:1508)
PR middle-end/32362
	* omp-low.c (lookup_decl_in_outer_ctx): Don't ICE if t is NULL,
	but decl is a global var, instead return decl.
	* gimplify.c (gimplify_adjust_omp_clauses_1): Add shared clauses
	even for is_global_var decls, if they are private in some outer
	context.

	* testsuite/libgomp.c/pr32362-1.c: New test.
	* testsuite/libgomp.c/pr32362-2.c: New test.
	* testsuite/libgomp.c/pr32362-3.c: New test.

From-SVN: r125917
2007-06-21 14:11:00 +02:00
Richard Guenther d9eb5318b6 re PR tree-optimization/32451 (ICE in verify_flow_info after DOM2)
2007-06-21  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/32451
	* tree-ssa-threadupdate.c (thread_single_edge): Fixup edge flags.

	* g++.dg/torture/20070621-1.C: New testcase.

From-SVN: r125916
2007-06-21 12:00:47 +00:00
Christian Bruel 5c7cafa8dc svn ci -m "introduce bank[0,1] registers and fix rte delay slot scheduling"
2007-06-21  Christian Bruel  <christian.bruel@st.com>

	* config/sh/sh-protos.h (sh_loads_bankedreg_p): Declare.
	* config/sh/sh.c (sh_loads_bankedreg_p): New function.
	(push_regs): Changed saving order or banked registers.
	(sh_expand_epilogue): Likewise.
	* config/sh/sh.h (BANKED_REGISTER_P): New macro.
	(FIRST_BANKED_REG): Likewise.
	(LAST_BANKED_REG): Likewise.
	* config/sh/sh.md (banked) New attribute.
	(in_delay_slot): Check banked attribute.

2007-06-21  Christian Bruel  <christian.bruel@st.com>

	* gcc.dg/attr-isr.c: Test delay slot content.

From-SVN: r125914
2007-06-21 10:58:53 +02:00
Sebastian Pop c0aafd30f7 re PR tree-optimization/32075 (can't determine dependence between p->a[x+i] and p->a[x+i+1] where x is invariant but defined in the function)
PR tree-optimization/32075
	* tree-data-ref.c (subscript_dependence_tester_1, 
	analyze_miv_subscript, analyze_overlapping_iterations,
	add_distance_for_zero_overlaps, build_classic_dist_vector,
	subscript_dependence_tester_1, analyze_overlapping_iterations,
	subscript_dependence_tester, access_functions_are_affine_or_constant_p,
	compute_affine_dependence, compute_all_dependences): Pass loop_nest 
	to evolution_function_is_affine_multivariate_p.

From-SVN: r125901
2007-06-20 23:44:56 +00:00
Sebastian Pop da9a21f490 re PR tree-optimization/32075 (can't determine dependence between p->a[x+i] and p->a[x+i+1] where x is invariant but defined in the function)
PR tree-optimization/32075
	* tree-data-ref.c (subscript_dependence_tester_1, 
	analyze_miv_subscript, analyze_overlapping_iterations,
	add_distance_for_zero_overlaps, build_classic_dist_vector,
	subscript_dependence_tester_1, analyze_overlapping_iterations,
	subscript_dependence_tester, access_functions_are_affine_or_constant_p,
	compute_affine_dependence, compute_all_dependences): Pass loop_nest 
	to evolution_function_is_affine_multivariate_p.

From-SVN: r125900
2007-06-20 23:42:28 +00:00
Eric Botcazou 7e657ec235 df-scan.c (df_get_call_refs): Be prepared for MEMs inside CLOBBERs.
* df-scan.c (df_get_call_refs): Be prepared for MEMs inside CLOBBERs.

From-SVN: r125894
2007-06-20 20:26:07 +00:00
Rask Ingemann Lambertsen 7a9dcd47e8 re PR target/32335 (libgcc build failure, ICE in cselib_record_set, at cselib.c:1508)
2007-06-20  Rask Ingemann Lambertsen  <rask@sygehus.dk>

	PR target/32335
	* config/m32c/m32c.c (m32c_emit_epilogue): Use new HImode epilogue
	for TARGET_A16.
	* config/m32c/prologue.md (epilogue_exitd_16): New.
	(epilogue_reit_16): New.
	(epilogue_exitd): Rename to epilogue_exitd_24.
	(epilogue_reit): Rename to epilogue_reit_24.

From-SVN: r125893
2007-06-20 19:58:57 +00:00
Seongbae Park b631c5f742 dbgcnt.def (global_alloc_at_func, [...]): New counters.
2007-06-20  Seongbae Park  <seongbae.park@gmail.com>
            Maxim Kuvyrkov  <mkuvyrkov@ispras.ru>

	* dbgcnt.def (global_alloc_at_func, global_alloc_at_reg):
	New counters.
	* haifa-sched.c (queue_to_ready): Don't requeue next insn
	if dbg_cnt (sched_insn) reaches the limit.
	(choose_ready): New parameter INSN_PTR and new return value.
	(schedule_block): Handle dbg_cnt (sched_insn). Handle
	the new return value from choose_ready.
	* global.c (global_aloc): New dbgcnt global_alloc_at_reg.
	(rest_of_handle_global_alloc): New global_alloc_at_func.



Co-Authored-By: Maxim Kuvyrkov <mkuvyrkov@ispras.ru>

From-SVN: r125891
2007-06-20 18:22:28 +00:00
Adam Nemet 3d9b47dc43 re PR tree-optimization/25737 (ACATS c974001 c974013 hang with struct aliasing)
PR tree-optimization/25737
	* tree.h (struct tree_struct_field_tag): Add new field alias_set.
	(SFT_NONADDRESSABLE_P, SFT_ALIAS_SET): New macros.
	* tree-flow.h (struct fieldoff): Add new field alias_set.
	* tree-ssa-structalias.c (push_fields_onto_fieldstack): Add new
	argument addressable_type.  Set alias_set of fieldoff.
	* tree-ssa-alias.c (create_sft): Add new argument alias_set.
	(create_overlap_variables_for): Pass alias_set from fieldoff to
	create_sft.
	* alias.c (get_alias_set): Use alias_set from SFT if set.

From-SVN: r125890
2007-06-20 18:19:10 +00:00
Hui-May Chang 1c5ae9624c darwin.h (ASM_OUTPUT_COMMON): Print the size of a variable as an unsigned HOST_WIDE_INT integer.
* gcc/config/i386/darwin.h (ASM_OUTPUT_COMMON): Print the size
	of a variable as an unsigned HOST_WIDE_INT integer.

 	* gcc.target/i386/large-size-array-3.c: New.

From-SVN: r125888
2007-06-20 16:43:24 +00:00
Nick Clifton 8dba2dedd3 Add (accidentally omited) ChangeLog entry for delta to config/m32r/linux.h
From-SVN: r125883
2007-06-20 08:47:02 +00:00
Zdenek Dvorak 6848da6a81 re PR rtl-optimization/32405 (assertion failure in loop-iv.c; probable dataflow regression)
PR rtl-optimization/32405
	* loop-iv.c (iv_get_reaching_def): Fail for partial defs.

From-SVN: r125881
2007-06-20 06:56:26 +00:00
Jakub Jelinek 6330585d97 * Makefile.in (omega.o): Depend on $(DIAGNOSTIC_H).
From-SVN: r125876
2007-06-20 08:42:00 +02:00
Jakub Jelinek 1d8381f13f re PR middle-end/31959 (ICE in expand_builtin_expect, at builtins.c:5112)
PR middle-end/31959
	* builtins.c: Include diagnostic.h.
	(expand_builtin_expect): Make gcc_assert more permissive.
	* Makefile.in (builtins.o): Depend on $(DIAGNOSTIC_H).

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

From-SVN: r125875
2007-06-20 08:39:53 +02:00
Jakub Jelinek f497c16c26 re PR inline-asm/32109 (ICE with inline-asm and class with destructor)
PR inline-asm/32109
	* gimplify.c (gimplify_asm_expr): Issue error if type is addressable
	and !allows_mem.

	* g++.dg/ext/asm10.C: New test.

From-SVN: r125874
2007-06-20 08:37:17 +02:00
Jakub Jelinek 6a4e56a90e re PR middle-end/32285 (Miscompilation with pure _Complex returning call inside another fn's argument list)
PR middle-end/32285
	* calls.c (precompute_arguments): Also precompute CALL_EXPR arguments
	if ACCUMULATE_OUTGOING_ARGS.

	* gcc.c-torture/execute/20070614-1.c: New test.

From-SVN: r125873
2007-06-20 08:35:55 +02:00
Rask Ingemann Lambertsen c105ee098f m68hc11.c: Include dataflow header file.
2007-06-19  Rask Ingemann Lambertsen  <rask@sygehus.dk>

	* config/m68hc11/m68hc11.c: Include dataflow header file.
	(m68hc11_reorg): Port to dataflow.

From-SVN: r125861
2007-06-19 21:41:43 +00:00
Kenneth Zadeck 4aa0f91154 forgot to save back Changelog
From-SVN: r125860
2007-06-19 21:07:29 +00:00
Uros Bizjak 670a8526bc i386.c (ix86_emit_swsqrtsf): Filter out infinity result of rsqrt insn for zero input argument to avoid NaN.
* config/i386/i386.c (ix86_emit_swsqrtsf): Filter out infinity
        result of rsqrt insn for zero input argument to avoid NaN.

From-SVN: r125858
2007-06-19 21:58:26 +02:00
Kenneth Zadeck 89a9577706 df.h (DF_FIRST_OPTIONAL_PROBLEM): Removed.
2007-06-15  Kenneth Zadeck <zadeck@naturalbridge.com>

	* df.h (DF_FIRST_OPTIONAL_PROBLEM): Removed.
	(struct df_problem.free_blocks_on_set_blocks): New field.
	(struct dataflow.optional_p): New field.
	(df_bb_regno_last_use_find, df_insn_regno_def_p): Removed.
	(df_live_set_all_dirty): New function.
	* df-scan.c (df_scan_alloc): Initialize optional_p.
	(problem_SCAN): Initialize free_blocks_on_set_blocks.
	* df-core.c (df_set_blocks): Removed use of
	DF_FIRST_OPTIONAL_PROBLEM.  Now uses
	df_problem.free_blocks_on_set_blocks to determine which blocks are
	recycled.
	(df_remove_problem): Removed use of DF_FIRST_OPTIONAL_PROBLEM.
	(df_finish_pass): Removed use of DF_FIRST_OPTIONAL_PROBLEM.  Now
	uses dataflow.optional_p to determine if problem should be
	deleted.
	(rest_of_handle_df_initialize): Only start live problem if 
	-02 or above.
	(df_bb_regno_last_use_find, df_insn_regno_def_p): Removed.
	* df-problems.c (df_ru_alloc, df_rd_alloc, df_lr_alloc,
	df_live_alloc, df_urec_alloc, df_note_alloc): set optional_p.
	(problem_RU, problem_RD, problem_LR, problem_UREC, problem_CHAIN,
	problem_NOTE):  Initialize free_blocks_on_set_blocks.
	(df_lr_bb_local_compute): Recompute luids if df_live problem is
	not active.
	(df_live_set_all_dirty, df_note_alloc): New function.
	* regrename.c (merge_overlapping_regs): Change DF_LIVE_* to
	df_get_live_*.
	* sched_ebb.c (compute_jump_reg_dependencies): Ditto.
	* postreload.c (reload_combine): Ditto.
	* cse.c (cse_extended_basic_block): Ditto.
	* regmove.c (mark_flags_life_zones): Ditto.
	* rtlfactoring.c (split_blocks_after_seqs, split_pattern_seq,
	erase_matching_seqs): Ditto.
	* bt-load.c (compute_defs_uses_and_gen): Ditto.
	* integrate (allocate_initial_values): Ditto.
	* combine.c (reg_dead_at_p): Ditto.
	* resource.c (mark_target_live_regs): Ditto.
	* sched-rgn.c (check_live_1, update_live_1): Ditto.
	* config/sh/sh.c (find_r0_life_regions): Ditto.
	* global.c (rest_of_handle_global_alloc): Only add back df_live
	for -O > 1.
	* local-alloc.c (rest_of_handle_local_alloc): Only remove
	df_live for -O > 1.
	* ifcvt.c (dead_or_predicable): Change DF_LIVE_* to
	df_get_live_*.
	(if_convert): Make sure df_live is there at -O == 1.
	(pass_if_after_combine): Cleanup flags.
	* init-regs.c (initialize_uninitialized_regs): Make sure df_live
	is there at -O == 1.

From-SVN: r125857
2007-06-19 19:04:52 +00:00
Seongbae Park a3a531ecfe arm.c (arm_get_frame_offsets): Set offsets->locals_base to avoid negative stack size.
gcc/ChangeLog:

2007-06-19  Seongbae Park  <seongbae.park@gmail.com>

	* config/arm/arm.c (arm_get_frame_offsets): Set
	offsets->locals_base to avoid negative stack size.
	(thumb1_expand_prologue): Assert on negative stack size.

gcc/testsuite/ChangeLog:

2007-06-19  Seongbae Park  <seongbae.park@gmail.com>

	* gcc.target/arm/stack-corruption.c: New test.

From-SVN: r125856
2007-06-19 18:47:09 +00:00
Sebastian Pop 0f7c07751c re PR tree-optimization/32367 (internal compiler error: in build_polynomial_chrec, at tree-chrec.h:113)
PR tree-optimization/32367
	* tree-chrec.h (build_polynomial_chrec): Verify that the left hand side 
	of the chrec has no evolution in that loop.
	* testsuite/gcc.dg/tree-ssa/pr32367.c: New.

From-SVN: r125855
2007-06-19 18:35:39 +00:00
Bob Wilson e70312d499 xtensa.c: Include "df.h".
* config/xtensa/xtensa.c: Include "df.h".
	(xtensa_builtin_saveregs): Use adjust_address instead of change_address.
	(xtensa_va_start): Invoke make_tree with sizetype for
	expand_builtin_saveregs and then convert the result to a pointer.
	Use POINTER_PLUS_EXPR.  Use size_int instead of build_int_cst.
	(xtensa_gimplify_va_arg_expr): Use size_int instead of build_int_cst.
	Subtract argument size from index value as integers and then use
	POINTER_PLUS_EXPR to add the result to the array address.

From-SVN: r125854
2007-06-19 17:58:13 +00:00
Rask Ingemann Lambertsen fa9fd28acf re PR target/32335 (libgcc build failure, ICE in cselib_record_set, at cselib.c:1508)
2007-06-19  Rask Ingemann Lambertsen  <rask@sygehus.dk>

	PR target/32335
	* config/m32c/m32c.c: Include dataflow header file.
	(m32c_emit_prologue): Adjust for prologue insn change.
	* config/m32c/prologue.md (prologue_enter_16): Only modify SP_REGNO
	once inside a PARALLEL. Assume frame size passed in operand 0
	includes space to save the fb register.
	(prologue_enter_24): Likewise.
	(epilogue_exitd): Only modify SP_REGNO once inside a PARALLEL.

From-SVN: r125853
2007-06-19 17:35:16 +00:00
David Daney 21d09454a9 re PR target/32313 (Bootstrap failure running gengtype in stage 2.)
PR target/32313
	* config/mips/mips.md (cprestore): Mark $gp as used.

From-SVN: r125852
2007-06-19 16:36:42 +00:00
Rask Ingemann Lambertsen eedd724358 re PR target/32369 ([frv] macro "DF_LIVE_IN" passed 2 arguments, but takes just 1)
2007-06-19  Rask Ingemann Lambertsen  <rask@sygehus.dk>

	PR target/32369
	* config/frv/frv.c (frv_ifcvt_modify_tests): Dataflow merge fix.
	(frv_ifcvt_modify_insn): Likewise.

From-SVN: r125851
2007-06-19 16:30:03 +00:00
Richard Biener 9bf448b905 tree-ssa-structalias.c (handle_ptr_arith): Make sure to only handle positive offsets that fit in a HOST_WIDE_INT.
2007-06-19  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-structalias.c (handle_ptr_arith): Make sure to
	only handle positive offsets that fit in a HOST_WIDE_INT.

	* g++.dg/torture/pr30252.C: New testcase.

From-SVN: r125849
2007-06-19 12:57:58 +00:00
Uros Bizjak 258d0b9b9e i386.c (ix86_emit_swsqrtsf): Limit the result of rsqrt insn to FLT_MAX to avoid NaN for zero input argument.
* config/i386/i386.c (ix86_emit_swsqrtsf): Limit the result of
	rsqrt insn to FLT_MAX to avoid NaN for zero input argument.

From-SVN: r125847
2007-06-19 13:22:24 +02:00
Richard Guenther 7ffc27a6bc re PR middle-end/31950 (ICE in tree-ssa-alias-warnings.c)
2007-06-19  Richard Guenther  <rguenther@suse.de>

	PR middle-end/31950
	* tree-ssa-alias-warnings.c (ffan_walker): Punt on MTAGs.

From-SVN: r125846
2007-06-19 11:16:43 +00:00
Jakub Jelinek fda2b8e358 re PR tree-optimization/32353 (Miscompilation with RESULT_DECL)
PR tree-optimization/32353
	* tree-ssa-structalias.c (set_uids_in_ptset): Also handle RESULT_DECL.

	* g++.dg/opt/nrv13.C: New test.

From-SVN: r125841
2007-06-19 11:08:39 +02:00
Uros Bizjak 80dcd3aa9b re PR target/32389 (ICE in extract_constrain_insn_cached when using -msse)
PR target/32389
        * config/i386/i386.h (enum ix86_stack_slot): Add SLOT_VIRTUAL.
        * config/i386/i386.c (assign_386_stack_local): Assert that
        SLOT_VIRTUAL is valid only before virtual regs are instantiated.
        (ix86_expand_builtin) [IX86_BUILTIN_LDMXCSR, IX86_BUILTIN_STMXCSR]:
        Use SLOT_VIRTUAL stack slot instead of SLOT_TEMP.
        * config/i386/i386.md (truncdfsf2, truncxf<mode>2): Ditto.

testsuite/ChangeLog:

        PR target/32389
        * gcc.target/i386/pr32389.c New test.

From-SVN: r125830
2007-06-19 00:32:56 +02:00
Steve Ellcey d448952a83 * config/ia64/ia64.h (LIBGCC2_TF_CEXT): New.
From-SVN: r125828
2007-06-18 20:57:09 +00:00
Seongbae Park bfff919069 re PR middle-end/32321 (ICE in df_refs_verify with -fgcse-sm)
2007-06-18  Seongbae Park  <seongbae.park@gmail.com>

	PR rtl-optimization/32321
	* gcse.c (replace_store_insn): Update the note before
	calling emit_insn_after.

From-SVN: r125827
2007-06-18 20:49:23 +00:00
Seongbae Park aacc93b5ca Revert 125825 due to mismatching patch/changelog.
From-SVN: r125826
2007-06-18 20:35:22 +00:00
Seongbae Park af4c82ed94 re PR rtl-optimization/32339 (ICE in insert_save, at caller-save.c:726)
gcc/ChangeLog:

2007-06-18  Seongbae Park  <seongbae.park@gmail.com>

	PR rtl-optimization/32339
	* df-scan.c (df_uses_record): Don't modify flags but just add to
	it for df_ref_record.

gcc/testsuite/ChangeLog:

2007-06-18  Martin Michlmayr <tbm@cyrius.com>

	PR rtl-optimization/32339
	* gcc.c-torture/compile/pr32339.c: New test.

From-SVN: r125825
2007-06-18 20:02:33 +00:00
David Daney 2902c34e51 revert: re PR target/32313 (Bootstrap failure running gengtype in stage 2.)
Revert:

	2007-06-18  David Daney  <ddaney@avtrex.com

	PR target/32313
	* config/mips/mips.c (mips_expand_call): Mark $gp as used by
	local function call.

From-SVN: r125824
2007-06-18 19:35:05 +00:00
David Daney d4977f6ca6 re PR target/32313 (Bootstrap failure running gengtype in stage 2.)
PR target/32313
	* config/mips/mips.c (mips_expand_call): Mark $gp as used by
	local function call.

From-SVN: r125818
2007-06-18 17:36:42 +00:00
Kenneth Zadeck 8b9d606b39 re PR rtl-optimization/32355 (ICE in df_lr_verify_transfer_functions, at df-problems.c:1924)
2007-06-18  Kenneth Zadeck <zadeck@naturalbridge.com>

	PR middle-end/32355
	* gcse (rest_of_handle_gcse): Add call to df_finish_pass after
	cse_main.
	* df-problems.c (df_note_bb_compute): Fix dumping info.
	
2007-06-18  Kenneth Zadeck <zadeck@naturalbridge.com>

	* gcc.c-torture/compile/pr32355.c: New testcase.

From-SVN: r125812
2007-06-18 16:47:05 +00:00
Kazu Hirata 4957072385 m68k.c (m68k_expand_epilogue): Emit a return insn with emit_jump_insn.
* config/m68k/m68k.c (m68k_expand_epilogue): Emit a return
	insn with emit_jump_insn.

From-SVN: r125801
2007-06-18 13:58:33 +00:00
Uros Bizjak ac10986fad re PR tree-optimization/32383 (ICE with reciprocals and -ffast-math)
PR tree-optimization/32383
	* targhooks.c (default_builtin_reciprocal): Add new bool argument.
	* targhooks.h (default_builtin_reciprocal): Update prototype.
	* target.h (struct gcc_target): Update builtin_reciprocal.
	* doc/tm.texi (TARGET_BUILTIN_RECIPROCAL): Update description.
	* tree-ssa-math-opts (execute_cse_reciprocals): Skip statements
	where arg1 is not SSA_NAME.  Pass true to targetm.builtin_reciprocal
	when fndecl is in BUILT_IN_MD class.
	(execute_convert_to_rsqrt): Ditto.

	* config/i386/i386.c (ix86_builtin_reciprocal): Update for new bool
	argument.  Convert IX86_BUILTIN_SQRTPS code only when md_fn is true.
	Convert BUILT_IN_SQRTF code only  when md_fn is false.

testsuite/ChangeLog:

	PR tree-optimization/32383
	* testsuite/g++.dg/opt/pr32383.C: New test.

From-SVN: r125790
2007-06-18 10:30:47 +02:00
Kaz Kojima a8d8890adb bt-load.c (move_btr_def): Fix the order of arguments to validate_replace_rtx.
* bt-load.c (move_btr_def): Fix the order of arguments
	to validate_replace_rtx.

From-SVN: r125789
2007-06-18 05:10:38 +00:00
Nathan Sidwell a761c345f3 * config/m68k/m68k-devices.def: Add 54450..54455.
From-SVN: r125788
2007-06-18 00:57:03 +00:00
Uros Bizjak a0c6429598 re PR rtl-optimization/32366 (Segfault in significand_size with -ftree-vectorize)
PR rtl-optimization/32366
        * simplify-rtx.c (simplify_unary_operation_1) [FLOAT_TRUNCATE,
        FLOAT_EXTEND]: Prevent non-scalar modes from entering
        significand_size.

testsuite/ChangeLog:

        PR rtl-optimization/32366
        * testsuite/gcc.dg/vect/pr32366.c: New test.

From-SVN: r125777
2007-06-17 21:23:30 +02:00
Kenneth Zadeck 5f7055585a re PR middle-end/32349 (ICE in df_refs_verify with -O2 -fmodulo-sched for spec tests)
2007-06-17  Kenneth Zadeck <zadeck@naturalbridge.com>

	PR middle-end/32349
	* modulo-sched (generate_reg_moves): Added rescan parameter and if
	this is true, rescan insn being modified.
	(sms_schedule): Added rescan parameter.
	(rest_of_handle_sms): Moved freeing of dominance info to before
	getting out of cfg_layout.
	
2007-06-17  Kenneth Zadeck <zadeck@naturalbridge.com>

	* gcc.c-torture/compile/pr32349.c: New testcase.

From-SVN: r125776
2007-06-17 17:51:25 +00:00
Nathan Sidwell 4e2b26aaa2 predicates.md (const_call_operand): Adjust comment.
* config/m68k/predicates.md (const_call_operand): Adjust comment.
	(const_sibcall_operand): New.
	(sibcall_operand): Use it.
	* config/m68k/m68k.c (FL_FOR_isa_c): Not ISA_B compatible.
	(m68k_isas): ISAC does not imply FPU or EMAC.
	(override_options): Add ISA_C logic for symbolic jump & call.

From-SVN: r125774
2007-06-17 13:08:43 +00:00
Nathan Sidwell fe116068c2 m68k.c (all_isas): Remove FL_CF_FPU and FL_CF_EMAC from the entry for isac.
* config/m68k/m68k.c (all_isas): Remove FL_CF_FPU and
	FL_CF_EMAC from the entry for isac.

From-SVN: r125773
2007-06-17 13:07:03 +00:00
Nathan Sidwell 59c92f760e m68k.h (ISA_HAS_FF1, [...]): New.
* config/m68k/m68k.h (ISA_HAS_FF1, ISA_HAS_MVS_MVZ): New.
	* config/m68k/m68k.md: Use ISA_HAS_FF1 and ISA_HAS_MVS_MVZ as
	appropriate.

From-SVN: r125772
2007-06-17 13:06:02 +00:00
Eric Botcazou 724d7c5534 sparc.c (sparc_vis_init_builtins): Retrieve the return mode from the builtin itself.
* config/sparc/sparc.c (sparc_vis_init_builtins): Retrieve the
	return mode from the builtin itself.
	(sparc_fold_builtin): Fix cast of zero constant.

From-SVN: r125768
2007-06-17 11:17:10 +00:00
Uros Bizjak cc2137be63 targhooks.c (default_builtin_reciprocal): New default target hook.
* targhooks.c (default_builtin_reciprocal): New default target hook.
        * targhooks.h (default_builtin_reciprocal): Add prototype.
        * hooks.c (hook_tree_tree_bool_null): Remove hook.
        * hooks.h (hook_tree_tree_bool_null): Remove prototype.
        * target-def.h (TARGET_BUILTIN_RECIPROCAL): Define as
        default_builtin_reciprocal.

From-SVN: r125758
2007-06-16 20:52:11 +02:00
Uros Bizjak 6b889d891d re PR middle-end/31723 (Use reciprocal and reciprocal square root with -ffast-math)
PR middle-end/31723
    * hooks.c (hook_tree_tree_bool_null): New hook.
    * hooks.h (hook_tree_tree_bool_null): Add prototype.
    * tree-pass.h (pass_convert_to_rsqrt): Declare.
    * passes.c (init_optimization_passes): Add pass_convert_to_rsqrt.
    * tree-ssa-math-opts.c (execute_cse_reciprocals): Scan for a/func(b)
    and convert it to reciprocal a*rfunc(b).
    (execute_convert_to_rsqrt): New function.
    (gate_convert_to_rsqrt): New function.
    (pass_convert_to_rsqrt): New pass definition.
    * target.h (struct gcc_target): Add builtin_reciprocal.
    * target-def.h (TARGET_BUILTIN_RECIPROCAL): New define.
    (TARGET_INITIALIZER): Initialize builtin_reciprocal with
    TARGET_BUILTIN_RECIPROCAL.
    * doc/tm.texi (TARGET_BUILTIN_RECIPROCAL): Document.

    * config/i386/i386.h (TARGET_RECIP): New define.
    * config/i386/i386.md (divsf3): Expand by calling ix86_emit_swdivsf
    for TARGET_SSE_MATH and TARGET_RECIP when
    flag_unsafe_math_optimizations is set and not optimizing for size.
    (*rcpsf2_sse): New insn pattern.
    (*rsqrtsf2_sse): Ditto.
    (rsqrtsf2): New expander.  Expand by calling ix86_emit_swsqrtsf
    for TARGET_SSE_MATH and TARGET_RECIP when
    flag_unsafe_math_optimizations is set and not optimizing for size.
    (sqrt<mode>2): Expand SFmode operands by calling ix86_emit_swsqrtsf
    for TARGET_SSE_MATH and TARGET_RECIP when
    flag_unsafe_math_optimizations is set and not optimizing for size.
    * config/i386/sse.md (divv4sf): Expand by calling ix86_emit_swdivsf
    for TARGET_SSE_MATH and TARGET_RECIP when
    flag_unsafe_math_optimizations is set and not optimizing for size.
    (*sse_rsqrtv4sf2): Do not export.
    (sqrtv4sf2): Ditto.
    (sse_rsqrtv4sf2): New expander.  Expand by calling ix86_emit_swsqrtsf
    for TARGET_SSE_MATH and TARGET_RECIP when
    flag_unsafe_math_optimizations is set and not optimizing for size.
    (sqrtv4sf2): Ditto.
    * config/i386/i386.opt (mrecip): New option.
    * config/i386/i386-protos.h (ix86_emit_swdivsf): Declare.
    (ix86_emit_swsqrtsf): Ditto.
    * config/i386/i386.c (IX86_BUILTIN_RSQRTF): New constant.
    (ix86_init_mmx_sse_builtins): __builtin_ia32_rsqrtf: New
    builtin definition.
    (ix86_expand_builtin): Expand IX86_BUILTIN_RSQRTF using
    ix86_expand_unop1_builtin.
    (ix86_emit_swdivsf): New function.
    (ix86_emit_swsqrtsf): Ditto.
    (ix86_builtin_reciprocal): New function.
    (TARGET_BUILTIN_RECIPROCAL): Use it.
    (ix86_vectorize_builtin_conversion): Rename from
    ix86_builtin_conversion.
    (TARGET_VECTORIZE_BUILTIN_CONVERSION): Use renamed function.
    * doc/invoke.texi (Machine Dependent Options): Add -mrecip to
    "i386 and x86_64 Options" section.
    (Intel 386 and AMD x86_64 Options): Document -mrecip.

testsuite/ChangeLog:

    PR middle-end/31723
    * gcc.target/i386/recip-divf.c: New test.
    * gcc.target/i386/recip-sqrtf.c: Ditto.
    * gcc.target/i386/recip-vec-divf.c: Ditto.
    * gcc.target/i386/recip-vec-sqrtf.c: Ditto.
    * gcc.target/i386/sse-recip.c: Ditto.

From-SVN: r125756
2007-06-16 11:52:48 +02:00
Andrew Pinski 5be014d5b7 [multiple changes]
2007-06-15  Andrew Pinski <andrew_pinski@playstation.sony.com>
            Zdenek Dvorak <dvorakz@suse.cz>
            Richard Guenther  <rguenther@suse.de>
            Kaz Kojima  <kkojima@gcc.gnu.org>

	* tree-vrp.c (compare_values_warnv): Convert val2 to
	the type of val1.
	(extract_range_from_assert): Create
	POINTER_PLUS_EXPR for pointer types.
	(extract_range_from_binary_expr): Handle
	only POINTER_PLUS_EXPR, MIN_EXPR, and MAX_EXPR
	for pointer types.
	* doc/c-tree.texi (POINTER_PLUS_EXPR): Document.
	* tree-ssa-loop-niter.c (split_to_var_and_offset): Handle
	POINTER_PLUS_EXPR as PLUS_EXPR.
	(number_of_iterations_lt_to_ne):
	For pointer types, use sizetype when
	creating MINUS_EXPR/PLUS_EXPRs.
	(assert_loop_rolls_lt): For pointer types, use sizetype when
	creating MINUS_EXPR/PLUS_EXPRs.
	(number_of_iterations_le): Likewise.
	(expand_simple_operations): POINTER_PLUS_EXPR are simple also.
	(derive_constant_upper_bound): Handle POINTER_PLUS_EXPR just
	like PLUS_EXPR and MINUS_EXPR.
	* tree-pretty-print.c (dump_generic_node): Handle
	POINTER_PLUS_EXPR.
	(op_prio): Likewise.
	(op_symbol_1): Likewise.
	* optabs.c (optab_for_tree_code): Likewise.
	* tree-ssa-loop-manip.c (create_iv): Handle pointer base
	specially.
	* tree-tailcall.c (process_assignment): Mention
	POINTER_PLUS_EXPR in a TODO comment.
	* tree.c (build2_stat): Assert when trying to use PLUS_EXPR or 
	MINUS_EXPR with a pointer. Also assert for POINTER_PLUS_EXPR
	not used with a pointer and an integer type.
	* tree-scalar-evolution.c (add_to_evolution_1): Convert the
	increment using chrec_convert_rhs instead of chrec_convert.
	(follow_ssa_edge_in_rhs): Handle POINTER_PLUS_EXPR like
	PLUS_EXPR except for the right hand side's type will be
	sizetype.
	(interpret_rhs_modify_stmt): Handle POINTER_PLUS_EXPR.
	(fold_used_pointer_cast): Kill.
	(pointer_offset_p): Kill.
	(fold_used_pointer): Kill.
	(pointer_used_p): Kill.
	(analyze_scalar_evolution_1 <case GIMPLE_MODIFY_STMT>): Don't
	call fold_used_pointer.
	(instantiate_parameters_1): Convert the increment
	using chrec_convert_rhs instead of chrec_convert.
	Handle POINTER_PLUS_EXPR as PLUS_EXPR.
	* builtins.c (get_pointer_alignment): Handle POINTER_PLUS_EXPR
	instead of PLUS_EXPR.
	(expand_builtin_strcat): Create a POINTER_PLUS_EXPR instead of
	PLUS_EXPR for pointers.
	(std_gimplify_va_arg_expr): Likewise.
	(fold_builtin_memory_op): Likewise.
	(fold_builtin_strstr): Likewise.
	(fold_builtin_strchr): Likewise.
	(fold_builtin_strrchr): Likewise.
	(fold_builtin_strpbrk): Likewise.
	(expand_builtin_memory_chk): Likewise.
	(fold_builtin_memory_chk): Likewise.
	(std_expand_builtin_va_start): Use
	sizetype for the call to make_tree and then convert
	to the pointer type.
	(fold_builtin_memchr): Use POINTER_PLUS_EXPR
	instead of PLUS_EXPR for adding to a pointer.
	(std_gimplify_va_arg_expr): Use fold_build2 for
	the creating of POINTER_PLUS_EXPR.  For the BIT_AND_EXPR, cast
	the operands to sizetype first and then cast the BIT_AND_EXPR
	back to the pointer type.
	* fold-const.c (build_range_check): Handle pointer types
	specially.
	(extract_array_ref): Look for POINTER_PLUS_EXPR instead
	of PLUS_EXPR's. Make sure the offset is converted to
	sizetype.
	(try_move_mult_to_index): Strip the NOPs from the offset.
	Remove code argument and replace all uses with PLUS_EXPR.
	(fold_to_nonsharp_ineq_using_bound): Handle pointer types
	specially. Don't use a pointer type for MINUS_EXPR.
	(fold_unary): Handle for (T1)(X op Y),
	only p+ as that is the only as that can be handled for
	binary operators now.
	(fold_binary <case POINTER_PLUS_EXPR>): Add folding of
	POINTER_PLUS_EXPR.
	<case PLUS_EXPR>: Add folding of PTR+INT into
	PTR p+ INT.
	Don't call try_move_mult_to_index.
	<case MINUS_EXPR>: Fold (PTR0 p+ A) - (PTR1 p+ B)
	into (PTR0 - PTR1) + (A - B). Fold (PTR0 p+ A) - PTR1 into
	(PTR0 - PTR1) + A iff (PTR0 - PTR1) simplifies.
	Don't call try_move_mult_to_index.
	(tree_expr_nonnegative_warnv_p): Handle POINTER_PLUS_EXPR.
	(tree_expr_nonzero_p): Likewise.
	(fold_indirect_ref_1): Look at POINTER_PLUS_EXPR instead
	of PLUS_EXPR for the complex expression folding.
	* tree-chrec.c (chrec_fold_plus_poly_poly): If the
	first chrec is a pointer type, then the second should
	be sizetype and not the first's type.
	For POINTER_PLUS_EXPR, use a different right hand side type.
	Handle POINTER_PLUS_EXPR like PLUS_EXPR.
	(chrec_fold_plus_1): For POINTER_PLUS_EXPR, use a
	different right hand side type.
	Handle POINTER_PLUS_EXPR like PLUS_EXPR.
	(chrec_fold_plus): For pointer types, use POINTER_PLUS_EXPR
	instead of PLUS_EXPR.
	When either operand is zero, convert the other operand.
	(chrec_apply): Use chrec_convert_rhs
	on the argument x instead of chrec_convert.
	(reset_evolution_in_loop): For pointer types, the new_evol
	should be sizetype.
	(convert_affine_scev): For POINTER_PLUS_EXPR, use a
	different right hand side type.
	Handle POINTER_PLUS_EXPR like PLUS_EXPR.
	(chrec_convert_rhs): New function.
	(chrec_convert_aggressive): For POINTER_PLUS_EXPR, use a
	different right hand side type.
	Handle POINTER_PLUS_EXPR like PLUS_EXPR.
	* tree-chrec.h (chrec_convert_rhs): New prototype.
	(build_polynomial_chrec): For pointer types, the right hand
	* tree-ssa-ccp.c (maybe_fold_stmt_indirect): Look for
	POINTER_PLUS_EXPR instead of PLUS_EXPR's.
	Remove subtraction case as it is always addition now.
	Make sure the offset is converted to sizetype.
	(fold_stmt_r): Don't handle PLUS_EXPR/MINUS_EXPR specially.
	Handle POINTER_PLUS_EXPR like PLUS_EXPR was handled before.
	* tree-ssa-loop-ivopts.c (determine_base_object): Abort for 
	PLUS_EXPR in pointer type.
	Handle POINTER_PLUS_EXPR.
	(tree_to_aff_combination): Likewise.
	(force_expr_to_var_cost): Likewise.
	(force_expr_to_var_cost): Likewise. Create a POINTER_PLUS_EXPR
	instead of PLUS_EXPR for pointers.
	* c-format.c (check_format_arg): Handle POINTER_PLUS_EXPR
	instead of PLUS_EXPR of pointer types.
	* tree-stdarg.c (va_list_counter_bump): Handle POINTER_PLUS_EXPR
	as PLUS_EXPR.
	(check_va_list_escapes): Likewise.
	(check_all_va_list_escapes): Likewise.
	* dwarf2out.c (loc_descriptor_from_tree_1):
	Handle POINT_PLUS_EXPR as a PLUS_EXPR.
	* expr.c (expand_expr_real_1): Handle POINTER_PLUS_EXPR.
	(string_constant): Likewise.
	* tree-ssa-address.c (tree_mem_ref_addr): When adding
	the offset to the base, use POINTER_PLUS_EXPR.
	(add_to_parts): Convert the index to sizetype.
	(create_mem_ref): Create A POINTER_PLUS_EXPR for the one case.
	* matrix-reorg.c (collect_data_for_malloc_call): Stmt
	will now only be either INDIRECT_REF and POINTER_PLUS_EXPR.
	Offset only holds something for PLUS_EXPR.
	(ssa_accessed_in_tree): Handle POINTER_PLUS_EXPR just as
	a PLUS_EXPR.
	(analyze_transpose): POINTER_PLUS_EXPR will only show up now
	and not PLUS_EXPR.
	(analyze_accesses_for_modify_stmt): Likewise.
	Remove comment about the type being integral type as it is
	wrong now.
	(can_calculate_expr_before_stmt): Handle POINTER_PLUS_EXPR as
	PLUS_EXPR.
	(transform_access_sites): POINTER_PLUS_EXPR will only show up now
	and not PLUS_EXPR.
	Correct the type which the artimentic is done in (is now
	sizetype).
	Reindent one loop.
	* tree-data-ref.c (split_constant_offset): Handle
	POINTER_PLUS_EXPR
	* tree-affine.c (tree_to_aff_combination): Likewise.
	* c-typeck.c (build_unary_op): For pointers create the increment
	as a sizetype. Create a POINTER_PLUS_EXPR instead of PLUS_EXPR
	for pointers.
	* gimplify.c (gimplify_self_mod_expr): Create a
	POINTER_PLUS_EXPR instead of PLUS_EXPR for pointers.
	(gimplify_omp_atomic_fetch_op): Handle POINTER_PLUS_EXPR.
	* tree.def (POINTER_PLUS_EXPR): New tree code.
	* tree-predcom.c (ref_at_iteration): If we have a pointer
	type do the multiplication in sizetype.
	* tree-mudflap.c (mf_xform_derefs_1): Create a
	POINTER_PLUS_EXPR instead of PLUS_EXPR for pointers.
	* tree-ssa-forwprop.c 
	(forward_propagate_addr_into_variable_array_index):
	Don't expect there to be a cast for the index as that
	does not exist anymore.
	(forward_propagate_addr_expr_1): Check for POINTER_PLUS_EXPR
	instead of PLUS_EXPR.
	Don't check for the first operand of the POINTER_PLUS_EXPR
	was the index as it cannot be.
	Call forward_propagate_addr_into_variable_array_index with
	the SSA_NAME instead of the statement.
	* varasm.c (const_hash_1): Handle POINTER_PLUS_EXPR.
	(compare_constant): Likewise.
	(copy_constant): Likewise.
	(compute_reloc_for_constant): Likewise.
	(output_addressed_constants): Likewise.
	(initializer_constant_valid_p): Likewise.
	* tree-ssa.c (tree_ssa_useless_type_conversion_1):
	Convert the MIN/MAX of the inner type to the outer
	type before comparing them.
	* tree-ssa-loop-prefetch.c (idx_analyze_ref):  Handle
	POINTER_PLUS_EXPR instead of PLUS_EXPR.
	(issue_prefetch_ref): Create a POINTER_PLUS_EXPR instead
	of PLUS_EXPR for pointers.
	* tree-inline.c (estimate_num_insns_1): Handle
	POINTER_PLUS_EXPR.
	* tree-vect-transform.c (vect_create_addr_base_for_vector_ref): 
	Create a POINTER_PLUS_EXPR instead of PLUS_EXPR for pointers.
	(bump_vector_ptr): Create a POINTER_PLUS_EXPR
	instead of PLUS_EXPR for the pointer increment statement.
	(vect_update_ivs_after_vectorizer): For pointer types, create
	POINTER_PLUS_EXPR instead of PLUS_EXPR and also create
	MULT_EXPR in sizetype.
	(vect_gen_niters_for_prolog_loop): Add a cast when creating
	byte_misalign.
	* tree-object-size.c (plus_expr_object_size): Handle
	POINTER_PLUS_EXPR instead of PLUS_EXPR.  Removing all the extra
	code which is trying to figure out which side is a pointer and 
	is the index.
	(check_for_plus_in_loops_1): Likewise.
	(check_for_plus_in_loops): Likewise.
	* c-common.c (pointer_int_sum): Create a
	POINTER_PLUS_EXPR instead of PLUS_EXPR for pointers.
	* tree-ssa-structalias.c (handle_ptr_arith): Handle
	only POINTER_PLUS_EXPR.  Removing all the extra
	code which is trying to figure out which side is a pointer and 
	is the index.
	* tree-cfg.c (verify_expr): Add extra checking for pointers and
	PLUS_EXPR and MINUS_EXPR.
	Also add checking to make sure the operands of POINTER_PLUS_EXPR
	are correct.
	* config/frv/frv.c (frv_expand_builtin_va_start): Use sizetype
	with make_tree, instead of a pointer type.
	* config/s390/s390.c (s390_va_start): Use POINTER_PLUS_EXPR
	for pointers instead of PLUS_EXPR.
	(s390_gimplify_va_arg): Likewise.
	* config/spu/spu.c (spu_va_start): Create POINTER_PLUS_EXPR
	instead of PLUS_EXPR when doing addition on pointer
	types.  Use sizetype for the second operand.
	(spu_gimplify_va_arg_expr): Likewise.
	* config/sparc/sparc.c (sparc_gimplify_va_arg): Use 
	POINTER_PLUS_EXPR instead of PLUS_EXPR when the operand was
	a pointer.  Don't create a BIT_AND_EXPR for pointer types.
	* config/i386/i386.c (ix86_va_start): Use POINTER_PLUS_EXPR
	for the pointer addition and also use size_int/sizetype
	for the offset.
	(ix86_gimplify_va_arg): Likewise.
	Perform BIT_AND_EXPR on sizetype arguments.
	* config/sh/sh.c (sh_va_start): Call make_tree with sizetype
	and convert its result to a pointer type.  Use POINTER_PLUS_EXPR
	for the pointer additions and also use size_int for the offsets.
	(sh_gimplify_va_arg_expr): Use POINTER_PLUS_EXPR for the pointer
	additions and also use size_int for the offsets.  Perform
	BIT_AND_EXPR on sizetype arguments.
	* config/ia64/ia64.c (ia64_gimplify_va_arg): Use
	POINTER_PLUS_EXPR for pointers and create the
	BIT_AND_EXPR in sizetype.
	* config/rs6000/rs6000.c (rs6000_va_start): Use POINTER_PLUS_EXPR
	instead of PLUS_EXPR for pointer addition.
	(rs6000_va_start): Likewise.
	Also use sizetype for the offset.
	* config/pa/pa.c (reloc_needed): Handle POINTER_PLUS_EXPR
	as PLUS_EXPR/MINUS_EXPR.
	(hppa_gimplify_va_arg_expr): Don't create MINUS_EXPR or
	PLUS_EXPR for pointers, instead use POINTER_PLUS_EXPR.
	Don't use BIT_AND_EXPR on a pointer type, convert the
	expression to sizetype first.
	* config/mips/mips.c (mips_va_start): Use POINTER_PLUS_EXPR
	for pointers.
	(mips_gimplify_va_arg_expr): Likewise.
	Don't create BIT_AND_EXPR in a pointer type.



2007-06-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Use
        POINTER_PLUS_EXPR instead of PLUS_EXPR for pointer addition.
        * trans-expr.c (gfc_trans_string_copy): Create
        POINTER_PLUS_EXPR instead of a PLUS_EXPR
        for pointer types.

2007-06-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>

	* typeck.c (build_binary_op): For templates build the
	expression in pieces to avoid the assert in build2_stat.
	(get_member_function_from_ptrfunc):
	Change over to using POINTER_PLUS_EXPR and convert
	the second operand to sizetype.
	* typeck2.c (build_m_component_ref):  Likewise.
	* init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
	instead of PLUS_EXPR for pointers.
	(build_new_1): Likewise.
	(build_vec_delete_1): Likewise.
	(build_vec_delete): Likewise.
	* class.c (build_base_path): Likewise.
	(build_base_path): Likewise.
	(convert_to_base_statically): Likewise.
	(fixed_type_or_null): Handle POINTER_PLUS_EXPR.
	(get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
	instead of PLUS_EXPR.
	(dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
	instead of PLUS_EXPR for pointers.
	* call.c (build_special_member_call): Likewise.
	* rtti.c (build_headof): Likewise.
	Use sizetype instead of ptrdiff_type_node.
	(tinfo_base_init): Create a POINTER_PLUS_EXPR
	instead of PLUS_EXPR for pointers.
	* except.c (expand_start_catch_block):  Do a
	NEGATIVE and then a POINTER_PLUS_EXPR instead
	of a MINUS_EXPR.
	* cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
	PLUS_EXPR on pointer types over to use
	POINTER_PLUS_EXPR and remove the conversion
	to the pointer types.
	* method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
	adding to a pointer type. Use size_int instead of
	ssize_int. Convert the index to sizetype before
	adding it to the pointer.



2007-06-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        * trans.c (Attribute_to_gnu): When subtracting an
        offset from a pointer, use POINTER_PLUS_EXPR with
        NEGATE_EXPR instead of MINUS_EXPR.
        (gnat_to_gnu): Likewise.
        * utils.c (convert): When converting between
        thin pointers, use POINTER_PLUS_EXPR and sizetype
        for the offset.
        * utils2.c (known_alignment): POINTER_PLUS_EXPR
        have the same semantics as PLUS_EXPR for alignment.
        (build_binary_op): Add support for the semantics of
        POINTER_PLUS_EXPR's operands.
        When adding an offset to a pointer, use POINTER_PLUS_EXPR.



2007-06-15 Andrew Pinski  <andrew_pinski@playstation.sony.com>

        * class.c (make_class_data): Build the index in sizetype.
        Use POINTER_PLUS_EXPR instead of PLUS_EXPR when
        adding to a pointer type.
        (build_symbol_entry): Likewise.
        * expr.c (build_java_arrayaccess): Likewise.
        (build_field_ref): Likewise.
        (build_known_method_ref): Likewise.
        (build_invokevirtual): Likewise.
        * except.c (build_exception_object_ref): Do a
        NEGATIVE and then a POINTER_PLUS_EXPR instead
        of a MINUS_EXPR.


2007-06-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>

	PR tree-opt/32225
	* gcc.c-torture/compile/20070605-1.c: New test.

	* gcc.c-torture/compile/20070603-1.c: New testcase.
	* gcc.c-torture/compile/20070603-2.c: New testcase.

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

	PR tree-opt/32167
	* gcc.c-torture/compile/20070531-2.c: New test.

	PR tree-opt/32144
	* gcc.c-torture/compile/20070529-1.c: New test.

	PR tree-opt/32145
	* gcc.c-torture/compile/20070529-2.c: New test.

	PR tree-opt/32015
	* gcc.c-torture/compile/20070520-1.c: New test.

	* g++.dg/ext/java-1.C: New test.

	* gcc.dg/vect/vect-106.c: We are now able to vectorize two
	loops instead of one. Remove the "can't determine dependence"
	check.
	* gcc.dg/tree-ssa/20030815-1.c: Remove testcase which is no longer
	needed as the cast is gone in the first place.
	* gcc.dg/max-1.c: Change local variable a to be a global one.
	* gcc.dg/tree-ssa/ssa-pre-8.c: Update testcase since we don't
	have a cast which is PREd.

From-SVN: r125755
2007-06-15 22:42:36 -07:00
Eric Christopher 1d2b1d9167 config.gcc (i?86-*-darwin*): Add t-crtfm and t-crtpc.
2007-06-15  Eric Christopher  <echristo@apple.com>

	    * config.gcc (i?86-*-darwin*): Add t-crtfm and t-crtpc.
	    (x86_64-*-darwin*): Ditto.
	    * config/i386/darwin.h (CRTEND_SPEC): New. Add support
	    for above.

From-SVN: r125754
2007-06-16 02:43:57 +00:00
Matthew Wilcox e9f9692b8e extend.texi: Document behavior of __attribute__((aligned)) on typedefs.
* doc/extend.texi: Document behavior of __attribute__((aligned))
	on typedefs.

From-SVN: r125747
2007-06-15 17:33:01 +00:00
Mark Mitchell c3a1ef9da9 * rtlanal.c (note_stores): Improve documentation.
From-SVN: r125746
2007-06-15 17:31:53 +00:00
Bernd Schmidt 2f119dcccd elf.h (ASM_GENERATE_INTERNAL_LABEL, [...]): Delete.
* config/bfin/elf.h (ASM_GENERATE_INTERNAL_LABEL,
	LOCAL_LABEL_PREFIX): Delete.
	* config/bfin/bfin.c (TARGET_ASM_INTERNAL_LABEL): Delete.
	(bfin_internal_label): Delete.

From-SVN: r125740
2007-06-15 11:54:51 +00:00
Uros Bizjak 3353afbec7 libgcc2.c (CEXT): When compiling L_multc3 and L_divtc3...
* libgcc2.c (CEXT): When compiling L_multc3 and L_divtc3,
	define to "l" if LIBGCC_LONG_DOUBLE_SIZE == 128,
	otherwise define to LIBGCC2_TF_CEXT.
	* config/i386/linux64.h (LIBGCC2_HAS_TF_MODE): New define.
	(LIBGCC_TF_CEXT): Ditto.
	(TF_SIZE): Ditto.

From-SVN: r125737
2007-06-15 09:01:31 +02:00
Seongbae Park 203927fc06 re PR rtl-optimization/32339 (ICE in insert_save, at caller-save.c:726)
2007-06-14  Seongbae Park  <seongbae.park@gmail.com>

	PR rtl-optimization/32339
	* df-scan.c (df_uses_record): Don't modify flags but just add to it for
	df_ref_record.

From-SVN: r125736
2007-06-15 06:33:24 +00:00
Andrew Pinski e89993b3f2 tree-mudflap.c: Fix whitespace issues.
2007-06-14  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        * tree-mudflap.c: Fix whitespace issues.

From-SVN: r125733
2007-06-14 20:39:31 -07:00
Kazu Hirata 83f6221b98 * config/m68k/m68k.c (ASM_DOT, ASM_DOTW, ASM_DOTL): Remove.
From-SVN: r125731
2007-06-15 02:43:32 +00:00
Eric Christopher 5eafdd32da sse.md (movdi_to_sse): Rewrite body.
2007-06-14  Eric Christopher  <echristo@apple.com>

        * config/i386/sse.md (movdi_to_sse): Rewrite body.
        (movv4sf): Use gcc_unreachable instead of abort.

From-SVN: r125723
2007-06-14 21:43:45 +00:00
Uros Bizjak 4962b67943 re PR target/32268 (Wrong comparison results for __float128 operands)
PR target/32268
        * config/i386/sfp-machine.c (CMPtype): New define.
        (mach stubs): Use CMPtype instead of int as a return type.

testsuite/ChangeLog:

        PR target/32268
        * gcc.target/i386/pr32268.c: New test.

From-SVN: r125720
2007-06-14 22:15:13 +02:00
Uros Bizjak 97943b3c8b eqdf2.c, [...]: Update from glibc CVS.
* config/soft-fp/eqdf2.c, config/soft-fp/eqsf2.c,
        config/soft-fp/eqtf2.c, config/soft-fp/gedf2.c,
        config/soft-fp/gesf2.c, config/soft-fp/getf2.c,
        config/soft-fp/ledf2.c, config/soft-fp/lesf2.c,
        config/soft-fp/letf2.c, config/soft-fp/unorddf2.c,
        config/soft-fp/unordsf2.c, config/soft-fp/unordtf2.c,
        config/soft-fp/soft-fp.h: Update from glibc CVS.

From-SVN: r125719
2007-06-14 21:45:11 +02:00
Bernd Schmidt 3fcfad7607 configure.ac: Don't add target-libmudflap to noconfigdirs for bfin*-*-uclinux* targets.
* configure.ac: Don't add target-libmudflap to noconfigdirs for
	bfin*-*-uclinux* targets.
	* configure: Regenerate.

	* gcc/config/bfin/uclinux.h (MFWRAP_SPEC): New.

From-SVN: r125717
2007-06-14 17:10:54 +00:00
Rask Ingemann Lambertsen 9074582342 re PR target/32341 (undefined reference to `df_set_regs_ever_live_p')
2007-06-14  Rask Ingemann Lambertsen  <rask@sygehus.dk>

	PR target/32341
	* config/v850/v850.c: Include dataflow header file.
	(substitute_ep_register): Fix typo.

From-SVN: r125715
2007-06-14 14:33:21 +00:00
Paolo Bonzini 04c3028a09 configure.ac: Fix earlier checkin.
2007-06-14  Paolo Bonzini  <bonzini@gnu.org>

	* configure.ac: Fix earlier checkin.
	* configure: Regenerated.

From-SVN: r125711
2007-06-14 06:27:32 -07:00
H.J. Lu 77a1416d57 configure.ac: Fix a typo in --enable-checking=.
2007-06-14  H.J. Lu  <hongjiu.lu@intel.com>

	* configure.ac: Fix a typo in --enable-checking=.
	* configure: Regenerated.

From-SVN: r125705
2007-06-14 05:44:43 -07:00
Paolo Bonzini 3bbd5a19eb acinclude.m4 (gcc_AC_CHECK_PROG_VER): Remove.
gcc:
2007-06-14  Paolo Bonzini  <bonzini@gnu.org>

        * acinclude.m4 (gcc_AC_CHECK_PROG_VER): Remove.
        * aclocal.m4: Regenerate.
        * configure.ac: Use ACX_PROG_CC_WARNING_OPTS,
        ACX_PROG_CC_WARNINGS_ARE_ERRORS,
        ACX_PROG_CC_WARNING_ALMOST_PEDANTIC, ACX_CHECK_PROG_VER.
	* configure: Regenerate.
        * Makefile.in (LOOSE_WARN): Subst loose_warn.

        * Makefile.in (quickstrap): Build libgcc too.

libiberty:
2007-06-14  Paolo Bonzini  <bonzini@gnu.org>

        * aclocal.m4: Include config/warnings.m4.
        * configure.ac: Use ACX_PROG_CC_WARNING_OPTS.
	* configure: Regenerate.

config:
2007-06-14  Paolo Bonzini  <bonzini@gnu.org>

        * acx.m4 (ACX_CHECK_PROG_VER): Remove duplicate lines.

From-SVN: r125700
2007-06-14 08:10:41 +00:00
Paolo Bonzini ab28cc38fd svn missed the changelog for previous rev...
From-SVN: r125699
2007-06-14 07:54:21 +00:00
Bob Wilson 20dca97bbd xtensa.c (xtensa_expand_nonlocal_goto): Use validate_replace_rtx instead of replace_rtx.
* config/xtensa/xtensa.c (xtensa_expand_nonlocal_goto): Use
        validate_replace_rtx instead of replace_rtx.
        (xtensa_expand_prologue): Call df_insn_rescan after replace_rtx.

From-SVN: r125697
2007-06-14 04:49:42 +00:00
Danny Smith 76f5e2005d config.host (*-cygwin* |*-mingw* ): Add crtbegin.o, crtend.o to extra_parts.
ChangeLog/libgcc

2007-06-14  Danny Smith  <dannysmith@users.sourceforge.net>

	* config.host(*-cygwin* |*-mingw* ): Add crtbegin.o, crtend.o to
	extra_parts. Add config/i386/t-cygming to tmake_file. 
	* config/i386/t-cygming: New file with rules for crtbegin.o, crtend.o.


ChangeLog/gcc

2007-06-14  Danny Smith  <dannysmith@users.sourceforge.net>

	* config/i386/cygming.h (DWARF_FRAME_REGNUM): Define.
	(DWARF2_UNWIND_INFO): Override default if configured with
	SJLJ EH disabled.
	* config/i386/cygwin.h (STARTFILE_SPEC): Add crtbegin.o.
	(ENDFILE_SPEC): Add crtend.o.
	* config/i386/mingw32.h (STARTFILE_SEC): Add crtbegin.o.
	(ENDFILE_SPEC): Add crtend.o.
	(TARGET_USE_JCR_SECTION): Define.
	(MD_UNWIND_SUPPORT): Define for 32-bit target.

	* config/i386/cygming-crtbegin.c: New file.
	* config/i386/cygming-crtend.c: New file.

2007-06-14  Pascal Obry Pascal Obry  <obry@adacore.com>

	* config/i386/w32-unwind.h: New file.

From-SVN: r125696
2007-06-14 02:38:37 +00:00
Eric Christopher ab47d43e01 darwin.h (PREFERRED_STACK_BOUNDARY): Don't let the user set a value below STACK_BOUNDARY.
2007-06-13  Eric Christopher  <echristo@apple.com>

	    * config/i386/darwin.h (PREFERRED_STACK_BOUNDARY): Don't let
	    the user set a value below STACK_BOUNDARY.

From-SVN: r125695
2007-06-14 01:53:17 +00:00
Thiemo Seufer b64a6dbdbb linux.h, linux64.h (LIB_SPEC): Always imply -lpthread for -pthread.
* config/mips/linux.h, config/mips/linux64.h (LIB_SPEC): Always
	imply -lpthread for -pthread.

From-SVN: r125688
2007-06-13 23:22:29 +00:00
Kazu Hirata 9c57e1e889 tree-ssa-pre.c (mergephitemp): Remove.
* tree-ssa-pre.c (mergephitemp): Remove.
	(init_pre): Don't use mergephitemp.

From-SVN: r125687
2007-06-13 23:12:46 +00:00
Kazu Hirata efd7122b03 basic-block.h: Remove the prototype for free_basic_block_vars.
* basic-block.h: Remove the prototype for
	free_basic_block_vars.
	* cfglayout.h: Remove the prototype for
	insn_locators_initialize.
	* tree.h: Remove the prototype for emit_line_note.

From-SVN: r125686
2007-06-13 22:57:14 +00:00
Eric Christopher b26f6ed7b9 i386.c (override_options): If we've specified an arch then don't use TARGET_SUBTARGET_ISA_DEFAULTs.
2007-06-13  Eric Christopher  <echristo@apple.com>

        * config/i386/i386.c (override_options): If we've specified
        an arch then don't use TARGET_SUBTARGET_ISA_DEFAULTs.

From-SVN: r125685
2007-06-13 22:06:15 +00:00
Bob Wilson 29dc9e2011 df-scan.c (df_get_entry_block_def_set): Check if STATIC_CHAIN_REGNUM is defined.
* df-scan.c (df_get_entry_block_def_set): Check if STATIC_CHAIN_REGNUM
        is defined.

From-SVN: r125682
2007-06-13 18:27:50 +00:00
Bernd Schmidt 1ca950caf9 bfin.h (EH_RETURN_HANDLER_RTX): Use gen_frame_mem.
* config/bfin/bfin.h (EH_RETURN_HANDLER_RTX): Use gen_frame_mem.
	* config/bfin/bfin.md (UNSPEC_VOLATILE_STORE_EH_HANDLER): New constant.
	(eh_store_handler): New pattern.
	(eh_return): Emit it instead of a plain move.

From-SVN: r125681
2007-06-13 17:41:07 +00:00
Uros Bizjak 8d3641040c i386.c (ix86_init_mmx_sse_builtins): Define usign def_builtin.
* config/i386/i386.c (ix86_init_mmx_sse_builtins)
        [__builtin_infq, __builtin_fabsq]: Define usign def_builtin.
        [__builtin_ia32_rsqrtps, __builtin_ia32_rsqrtss]: Define using
        def_builtin_const.

From-SVN: r125680
2007-06-13 17:48:51 +02:00
Bernd Schmidt 44017a45a0 bfin.c (gen_one_bundle): Delete unused local variables.
* config/bfin/bfin.c (gen_one_bundle): Delete unused local variables.
	(find_next_insn_start, find_load): New functions.
	(bfin_reorg): Use them to deal with the fact that parallel insns are
	no longer represented as a SEQUENCE.

From-SVN: r125677
2007-06-13 14:21:31 +00:00
Eric Botcazou 06063fa227 sparc.c (sparc_override_options): Initialize fpu mask correctly.
* config/sparc/sparc.c (sparc_override_options): Initialize
	fpu mask correctly.

From-SVN: r125674
2007-06-13 13:58:31 +00:00
Dave Korn eaf7f7e727 i386.c (ix86_eax_live_at_start_p): Use df_get_live_out.
2007-06-13  Dave Korn  <dave.korn@artimi.com>

	* config/i386/i386.c (ix86_eax_live_at_start_p): Use
	df_get_live_out.

From-SVN: r125673
2007-06-13 10:21:50 +00:00
Kazu Hirata 0d52bcc19e auto-inc-dec.c, [...]: Fix comment typos.
* auto-inc-dec.c, c-incpath.c, config/c4x/libgcc.S,
	config/sh/divcost-analysis, dbgcnt.def, df-core.c,
	df-problems.c, df-scan.c, df.h, dominance.c, dse.c, regstat.c,
	tree-data-ref.c, tree-ssa-loop-im.c, tree-ssa-loop-prefetch.c,
	tree-vect-transform.c: Fix comment typos.  Follow spelling
	conventions.

From-SVN: r125666
2007-06-13 02:27:04 +00:00
Seongbae Park b718216c5a df-scan.c (df_get_exit-block_use_set): Always add the stack pointer to the exit block use set.
2007-06-12 Seongbae Park <seongbae.park@gmail.com>

       * df-scan.c (df_get_exit-block_use_set): Always add the stack pointer
       to the exit block use set.
       * gcse.c (cpro_jump): Don't emit barrier in cfglayout mode.
       * config/sparc/sparc.c (sparc_check_64): Check df != NULL.

From-SVN: r125658
2007-06-12 21:28:16 +00:00
Seongbae Park 0a090f42f6 opts.c (common_handle_option): Handle new option -fdbg-cnt-list.
2007-06-12  Seongbae Park  <seongbae.park@gmail.com>

	* opts.c (common_handle_option): Handle new option -fdbg-cnt-list.
	* dbgcnt.c (dbg_cnt_set_limit_by_name): Return value
	to indicate an error.
	(dbg_cnt_process_single_pair, dbg_cnt_list_all_counters): New functions
	(dbg_cnt_process_opt): Print an error on a bad argument.
	* dbgcnt.h (dbg_cnt_list_all_counters): New function declaration.
	* common.opt (-fdbg-cnt-list): New.
	* doc/invoke.texi (-fdbg-cnt-list,-fdbg-cnt=): New.

From-SVN: r125657
2007-06-12 20:47:16 +00:00
Eric Botcazou 773a786120 tree-ssa-alias.c (finalize_ref_all_pointers): Clear pt_anything flag on ref-all pointers.
* tree-ssa-alias.c (finalize_ref_all_pointers): Clear pt_anything
	flag on ref-all pointers.

From-SVN: r125656
2007-06-12 20:25:23 +00:00
Andrew Pinski 4543943ad4 re PR middle-end/31579 (ICE when compiling attached code)
2007-06-12  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        PR middle-end/31579
        * expr.c (expand_expr_addr_expr_1): Call expand_expr
        for the offset with the modifier as EXPAND_INITIALIZER
        if the modifier is EXPAND_INITIALIZER.
        (expand_expr_real_1 <case INTEGER_CST>): Don't force to
        a register if we had an overflow.

2007-06-12  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        PR middle-end/31579
         * g++.dg/torture/pr31579.C: New testcase.

From-SVN: r125655
2007-06-12 12:15:50 -07:00
Kaveh R. Ghazi 4c8c70e06a real.c (real_isfinite): New.
* real.c (real_isfinite): New.
	(real_sqrt): Use it.
	* real.h (real_isfinite): New.
	* builtins.c: Use it.

From-SVN: r125654
2007-06-12 18:36:05 +00:00
Ian Lance Taylor 058dcc25b7 re PR libstdc++/29286 (placement new does not change the dynamic type as it should)
./:	PR libstdc++/29286
	* tree.def: Add CHANGE_DYNAMIC_TYPE_EXPR.
	* tree.h (CHANGE_DYNAMIC_TYPE_NEW_TYPE): Define.
	(CHANGE_DYNAMIC_TYPE_LOCATION): Define.
	(DECL_NO_TBAA_P): Define.
	(struct tree_decl_common): Add no_tbaa_flag field.
	* tree-ssa-structalias.c (struct variable_info): Add
	no_tbaa_pruning field.
	(new_var_info): Initialize no_tbaa_pruning field.
	(unify_nodes): Copy no_tbaa_pruning field.
	(find_func_aliases): Handle CHANGE_DYNAMIC_TYPE_EXPR.
	(dump_solution_for_var): Print no_tbaa_pruning flag.
	(set_uids_in_ptset): Add no_tbaa_pruning parameter.  Change all
	callers.
	(compute_tbaa_pruning): New static function.
	(compute_points_to_sets): Remove CHANGE_DYNAMIC_TYPE_EXPR nodes.
	Call compute_tbaa_pruning.
	* tree-ssa-alias.c (may_alias_p): Test no_tbaa_flag for pointers.
	* gimplify.c (gimplify_expr): Handle CHANGE_DYNAMIC_TYPE_EXPR.
	* gimple-low.c (lower_stmt): Likewise.
	* tree-gimple.c (is_gimple_stmt): Likewise.
	* tree-ssa-operands.c (get_expr_operands): Likewise.
	* tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
	* tree-inline.c (estimate_num_insns_1): Likewise.
	(copy_result_decl_to_var): Likewise.
	* expr.c (expand_expr_real_1): Likewise.
	* tree-pretty-print.c (dump_generic_node): Likewise.
	* tree-inline.c (copy_decl_to_var): Copy DECL_NO_TBAA_P flag.
	* omp-low.c (omp_copy_decl_2): Likewise.
	* print-tree.c (print_node): Print DECL_NO_TBAA_P flag.
	* doc/c-tree.texi (Expression trees): Document
	CHANGE_DYNAMIC_TYPE_EXPR.
cp/:
	PR libstdc++/29286
	* init.c (avoid_placement_new_aliasing): New static function.
	(build_new_1): Call it.
testsuite/:
	PR libstdc++/29286
	* g++.dg/init/new16.C: New test.
	* g++.dg/init/new17.C: New test.
	* g++.dg/init/new18.C: New test.
	* g++.dg/init/new19.C: New test.

Co-Authored-By: Daniel Berlin <dberlin@dberlin.org>

From-SVN: r125653
2007-06-12 17:47:37 +00:00
Kaveh R. Ghazi 52a39a4c5d fold-const.c (fold_binary): Guard (X-X) -> 0 transformation with !HONOR_NANS and !HONOR_INFINITIES.
* fold-const.c (fold_binary): Guard (X-X) -> 0 transformation
	with !HONOR_NANS and !HONOR_INFINITIES.
	* simplify-rtx.c (simplify_binary_operation_1): Likewise.

From-SVN: r125652
2007-06-12 16:28:01 +00:00
Dirk Mueller fc78ca2b3e reorder changelog entries
From-SVN: r125650
2007-06-12 15:44:55 +00:00
Tristan Gingold 1a9075e289 gcov.c: Comments updated.
* gcov.c: Comments updated.
	(source_info): Add file_time field.
	(source_index): New variable.
	(mutiple_files): New variable.
	(generate_results): New function extracted from process_file.
	(process_file): Save and restore chain of functions, generate
	results and free structures only if not merging results.
	(release_structures): File names are now freed in create_file_names
	(create_file_names): Free previous file names.
	(find_source): File date is now read here and modifications in
	source files is checked here.
	(read_graph_file): Only reverse order of functions for the current
	object file.
	(make_gcov_file_name): Do not generate long names if input_name is
	NULL.
	(output_lines): If merging results do not display graph, data and 
	runs informations.
	Checking source file modification is done in find_source.

	* doc/gcov.texi: Append an s to sourcefile.

From-SVN: r125649
2007-06-12 15:39:15 +00:00
Bernd Schmidt b18e284e3c bfin.md (UNSPEC_NOP): New constant.
* config/bfin/bfin.md (UNSPEC_NOP): New constant.
	(forced_nop): New pattern.
	* config/bfin/bfin.c: Include "df.h".
	(add_to_reg): Use df_regs_ever_live_p instead of regs_ever_live.
	(bfin_discover_loop): Use df_get_live_in instead of
	global_live_at_start.
	(bfin_reorder_loops): Pass 0 to cfg_layout_initialize.  Call
	df_analyze when done.
	(gen_one_bundle): Don't generate SEQUENCE insns, just put modes on
	the insns.  Use QImode for the final insn in a bundle.  Call
	df_insn_rescan on generated NOPs; use gen_forced_nop instead of
	gen_nop.
	(reorder_var_tracking_notes): New function.
	(bfin_reorg): Pass no argument to split_all_insns.  Don't call
	update_life_info.  Call df_analyze after scheduling and bundle
	generation.  Call reorder_var_tracking_notes if generating these notes.
	Call df_finish_pass at the end.

From-SVN: r125648
2007-06-12 14:35:13 +00:00
Dirk Mueller 8c8fa92702 trans-stmt.c (gfc_trans_call): fix gcc_assert to a comparison, not an assignment.
2007-06-07  Dirk Mueller  <dmueller@suse.de>

        * trans-stmt.c (gfc_trans_call): fix gcc_assert to
        a comparison, not an assignment.

        * optabls.c (debug_optab_libfuncs): fix gcc_assert to
        a comparison, not an assignment.

From-SVN: r125647
2007-06-12 14:28:34 +00:00
Olivier Hainque 0e1a6f292f tree-nested.c (convert_local_reference): Handle VIEW_CONVERT_EXPR.
* tree-nested.c (convert_local_reference): Handle VIEW_CONVERT_EXPR.
	Request walking the subtrees only, leaving the current is_lhs/val_only
	untouched.
	(convert_non_local_reference): Likewise.

	testsuite/
	* gnat.dg/lhs_view_convert.adb: New test.

From-SVN: r125646
2007-06-12 13:32:27 +00:00
Nathan Sidwell beff418056 * config/m68k/m68k-devices.def (52221, 52223, 5253): New.
From-SVN: r125645
2007-06-12 12:28:45 +00:00
Richard Guenther 18d0801470 re PR tree-optimization/15353 ([tree-ssa] Merge two "if"s if one subsumes the other.)
2007-06-12  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/15353
	PR tree-optimization/31657
	* passes.c (init_optimization_passes): Add pass_tree_ifcombine.
	* timevar.def: Add TV_TREE_IFCOMBINE.
	* tree-pass.h (pass_tree_ifcombine): Declare.
	* tree-ssa-ifcombine.c: New file.
	* tree-ssa-phiopt.c (blocks_in_phiopt_order): Export.
	* tree-flow.h (blocks_in_phiopt_order): Declare.
	* Makefile.in (OBJS-common): Add tree-ssa-ifcombine.o.
	(tree-ssa-ifcombine.o): New dependencies.

	* gcc.c-torture/execute/20070424-1.c: New testcase.
	* gcc.dg/tree-ssa/ssa-ifcombine-1.c: Likewise.
	* gcc.dg/tree-ssa/ssa-ifcombine-2.c: Likewise.
	* gcc.dg/tree-ssa/ssa-ifcombine-3.c: Likewise.
	* gcc.dg/tree-ssa/ssa-ifcombine-4.c: Likewise.
	* gcc.dg/tree-ssa/ssa-ifcombine-5.c: Likewise.

From-SVN: r125644
2007-06-12 12:06:19 +00:00
Uros Bizjak 7f482dfebf re PR rtl-optimization/32293 (internal compiler error: in do_SUBST, at combine.c:502)
PR rtl-optimization/32293
	* combine.c (simplify_if_then_else): Truncate return from
	nonzero_bits() to correct mode.

testsuite/ChangeLog:
	
	PR rtl-optimization/32293
	* gcc.dg/pr32293.c: New test.

From-SVN: r125643
2007-06-12 12:31:04 +02:00
Uros Bizjak 9883e373fc fold-const (fold_binary): Also optimize a/cbrt(b/c) into a*cbrt(c/b) if flag_unsafe_math_optimizations is set.
* fold-const (fold_binary) [RDIV_EXPR]: Also optimize a/cbrt(b/c)
	into a*cbrt(c/b) if flag_unsafe_math_optimizations is set.

testuite/ChangeLog:

	* gcc.dg/builtins-11.c: Also check folding of a/cbrt(b/c).

From-SVN: r125641
2007-06-12 09:19:36 +02:00
Diego Novillo 16b4cb481c Makefile.in (reload1.o-warn): Remove.
* Makefile.in (reload1.o-warn): Remove.

From-SVN: r125636
2007-06-11 22:30:36 -04:00
Seongbae Park 46cc214143 combine.c (subst): Use reg_overlap_mentioned_p instead of comparing register numbers directly.
2007-06-11  Seongbae Park <seongbae.park@gmail.com>

	* combine.c (subst): Use reg_overlap_mentioned_p
	instead of comparing register numbers directly.

From-SVN: r125634
2007-06-12 01:11:03 +00:00
Kenneth Zadeck b0384c544e reload1.c (mark_home_live_1): Use the mode parameter.
2007-06-11  Kenneth Zadeck <zadeck@naturalbridge.com>

	* reload1.c (mark_home_live_1): Use the mode parameter.

From-SVN: r125627
2007-06-11 22:03:01 +00:00
Kenneth Zadeck 0a41f3b2c8 df-scan.c (df_insn_delete, [...]): Fixed spelling of word "deferred".
2007-06-11  Kenneth Zadeck <zadeck@naturalbridge.com>

	* df-scan.c (df_insn_delete, df_insn_rescan, df_insn_rescan_all,
	df_process_deferred_rescans, df_notes_rescan): Fixed spelling of
	word "deferred".
	* df-core.c: Ditto.

From-SVN: r125625
2007-06-11 18:22:49 +00:00
Daniel Berlin 6fb5fa3cbc Merge dataflow branch into mainline
From-SVN: r125624
2007-06-11 18:02:15 +00:00
Uros Bizjak a91d32a4a6 i386.md ("*movtf_internal): Penalize moves to and from integer registers.
* config/i386/i386.md ("*movtf_internal): Penalize moves to and
        from integer registers.
        (FP mode splitters): Handle TFmode.

From-SVN: r125623
2007-06-11 18:06:19 +02:00
Eric Botcazou 73fd4ad6cd tree-ssa-structalias.c (find_what_p_points_to): Return false for ref-all pointers that point-to anything.
* tree-ssa-structalias.c (find_what_p_points_to): Return false
	for ref-all pointers that point-to anything.

From-SVN: r125620
2007-06-11 15:40:52 +00:00
Joseph Myers afcc986d03 arm.c (arm_output_dwarf_dtprel, [...]): New.
* config/arm/arm.c (arm_output_dwarf_dtprel,
	TARGET_ASM_OUTPUT_DWARF_DTPREL): New.

From-SVN: r125619
2007-06-11 15:55:06 +01:00
Bernd Schmidt 0ea80eb62c bfin.md (movdi_insn, [...]): Don't allow constant to memory moves.
* config/bfin/bfin.md (movdi_insn, movsi_insn, movv2hi_insn,
	movhi_insn, movqi_insn, movsf_insn, movdf_insn): Don't allow constant
	to memory moves.

From-SVN: r125617
2007-06-11 11:29:00 +00:00
Rafael Espindola b0464c8897 remove signed(_or_unsigned)?_type langhooks
From-SVN: r125616
2007-06-11 10:23:11 +00:00
Uros Bizjak 69c553ef2a re PR target/32280 (_mm_srli_si128, heinous code for some shifts)
PR target/32280
	* config/i386/sse.md ("sse2_ashlti", "sse2_lshrti3"): Move ...
	* config/i386/i386.md ("sse2_ashlti", "sse2_lshrti3"): ... to here.

testsuite/ChangeLog:
	
	PR target/32280
	* gcc.target/i386/pr32280.c: New test.

From-SVN: r125615
2007-06-11 12:13:00 +02:00
Uros Bizjak f1da2df1e9 re PR middle-end/32279 (Fold 1.0/sqrt(x/y) to sqrt(y/x))
PR middle-end/32279
	* fold-const (fold_binary) [RDIV_EXPR]: Optimize a/sqrt(b/c)
	into a*sqrt(c/b) if flag_unsafe_math_optimizations is set.

testsuite/ChangeLog:

	PR middle-end/32279
	* gcc.dg/builtins-11.c: Also check folding of a/sqrt(b/c).

From-SVN: r125614
2007-06-11 11:09:24 +02:00
Jan Sjodin 51c0074eed lambda-code.c (remove_iv): New.
* lambda-code.c (remove_iv): New.
	(lambda_loopnest_to_gcc_loopnest): Use remove_iv.


Co-Authored-By: Sebastian Pop <sebpop@gmail.com>

From-SVN: r125605
2007-06-10 21:00:59 +00:00
Zdenek Dvorak 79f5e44262 tree-data-ref.c (dr_analyze_alias): Handle case smt is NULL.
* tree-data-ref.c (dr_analyze_alias): Handle case smt is NULL.
	* tree-predcom.c (mark_virtual_ops_for_renaming): Exported.
	* tree-ssa-loop-prefetch.c: Include optabs.h.
	(FENCE_FOLLOWING_MOVNT): New macro.
	(struct mem_ref): Add independent_p and storent_p fields.
	(record_ref): Initalize the new fields.
	(gather_memory_references_ref): Return true if the reference
	could be analysed.
	(gather_memory_references): Check whether all memory accesses
	in loop were recorded.
	(should_issue_prefetch_p): Return false for nontemporal stores.
	(nontemporal_store_p, mark_nontemporal_store, emit_mfence_after_loop,
	may_use_storent_in_loop_p, mark_nontemporal_stores): New functions.
	(determine_loop_nest_reuse): Detect independent memory references.
	(loop_prefetch_arrays): Call mark_nontemporal_stores.
	* tree-flow.h (mark_virtual_ops_for_renaming): Declare.
	* Makefile.in (tree-ssa-loop-prefetch.o): Add OPTABS_H dependency.
	* config/i386/i386.h (x86_mfence): Declare.
	(FENCE_FOLLOWING_MOVNT): Return x86_mfence.
	* config/i386/i386.c (x86_mfence): New variable.
	(ix86_init_mmx_sse_builtins): Initialize x86_mfence.

	* tree-pretty-print.c (dump_generic_node): Mark nontemporal stores.
	* optabs.c (init_optabs): Initialize storent_optab.
	* optabs.h (enum optab_index): Add OTI_storent.
	(storent_optab): Declare.
	* genopinit.c (optabs): Add initialization for storent_optab.
	* tree.h (MOVE_NONTEMPORAL): New macro.
	* expr.c (expand_assignment, store_expr, store_constructor_field,
	store_constructor, store_field, expand_expr_real_1): Propagate
	nontemporality of the expanded store.
	(emit_storent_insn): New function.
	* expr.h (expand_assignment, store_expr): Declaration changed.
	* function.c (assign_parm_setup_reg): Pass false as nontemporality
	to expand_assignment.
	* stmt.c (expand_asm_expr): Ditto.
	* calls.c (initialize_argument_information): Pass false as
	nontemporality to store_expr.
	* config/i386/sse.md (storentv4sf, storentv2df, storentv2di,
	storentsi): New.

	* gcc.dg/tree-ssa/prefetch-7.c: New test.

From-SVN: r125604
2007-06-10 20:39:22 +00:00
Daniel Berlin 6bdff197e6 tree-ssa-structalias.c (set_uids_in_ptset): Add is_deref'd parameter, use it.
2007-06-09  Daniel Berlin  <dberlin@dberlin.org>

	* tree-ssa-structalias.c (set_uids_in_ptset): Add is_deref'd
	parameter, use it.
	(find_what_p_points_to): Pass new parameter to set_uids_in_ptset.

From-SVN: r125603
2007-06-10 20:21:48 +00:00
Daniel Berlin 55edccf416 tree-data-ref.c (dr_may_alias_p): Check that decl_a != decl_b, and allow DECL_P here.
2007-06-09  Daniel Berlin  <dberlin@dberlin.org>

	* tree-data-ref.c (dr_may_alias_p): Check that decl_a != decl_b,
	and allow DECL_P here.

From-SVN: r125601
2007-06-10 14:13:18 +00:00
Zdenek Dvorak 9e824336e5 tree-scalar-evolution.c (follow_ssa_edge_in_rhs, [...]): Keep more precise track of the size of the expression.
* tree-scalar-evolution.c (follow_ssa_edge_in_rhs,
	follow_ssa_edge_in_condition_phi, follow_ssa_edge): Keep more precise
	track of the size of the expression.
	* cfghooks.c (merge_blocks): Remove block from loops structure only
	after call of the merge_blocks hook.

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

From-SVN: r125595
2007-06-09 21:34:08 +00:00
Tom Tromey 0da300cde3 c-decl.c (grokdeclarator): Added 'deprecated_state' argument.
* c-decl.c (grokdeclarator): Added 'deprecated_state' argument.
	(deprecated_state): Removed.
	(start_decl): Update.
	(enum deprecated_states): Moved earlier.
	(groktypename): Update.
	(push_parm_decl): Likewise.
	(grokfield): Likewise.
	(start_function): Likewise.

From-SVN: r125593
2007-06-09 16:48:47 +00:00
Ian Lance Taylor 9c4ed267d6 re PR tree-optimization/32169 (Ice in set_value_range, at tree-vrp.c:326)
./:	PR tree-optimization/32169
	* tree-vrp.c (extract_range_from_unary_expr): For NOP_EXPR and
	CONVERT_EXPR, check whether min and max both converted to an
	overflow infinity representation.
testsuite/:
	PR tree-optimization/32169
	* gcc.c-torture/compile/pr32169.c: New test.

From-SVN: r125591
2007-06-09 16:28:31 +00:00
Eric Botcazou 36808d08a5 reload1.c (fixup_abnormal_edges): Clear bb field for insns not inserted on the edge.
* reload1.c (fixup_abnormal_edges): Clear bb field for insns
	not inserted on the edge.

From-SVN: r125582
2007-06-08 23:22:46 +00:00
Uros Bizjak 9510f6eb7d * ChangeLog fix * ChangeLog fix.
From-SVN: r125578
2007-06-08 22:55:46 +02:00
Bob Wilson 582711fee4 lib1funcs.asm (__udivsi3): Use hardware divide instructions if they are supported.
* config/xtensa/lib1funcs.asm (__udivsi3): Use hardware divide
	instructions if they are supported.
	(__divsi3, __umodsi3, __modsi3): Likewise.
	(__ashldi3, __ashrdi3, __lshrdi3): New.
	* config/xtensa/t-xtensa (LIB1ASMFUNCS): Add DImode shift functions.

From-SVN: r125577
2007-06-08 16:49:23 +00:00
Harsha Jagasia 792ed98bb7 extend.texi: Add fvect-cost-model flag.
gcc/ChangeLog:
2007-06-08  Harsha Jagasia <harsha.jagasia@amd.com>
            Tony Linthicum <tony.linthicum@amd.com>

	* doc/extend.texi: Add fvect-cost-model flag.
	* common.opt (fvect-cost-model): New flag.
	* tree-vectorizer.c (new_stmt_vec_info): Initialize inside and outside
	cost fields in stmt_vec_info struct for STMT.
	* tree-vectorizer.h (stmt_vec_info): Define inside and outside cost
	fields in stmt_vec_info struct and access functions for the same.
	(TARG_COND_BRANCH_COST): Define cost of conditional branch.
	(TARG_VEC_STMT_COST): Define cost of any vector operation, excluding
	load, store and vector to scalar operation.
	(TARG_VEC_TO_SCALAR_COST): Define cost of vector to scalar operation.
	(TARG_VEC_LOAD_COST): Define cost of aligned vector load.
	(TARG_VEC_UNALIGNED_LOAD_COST): Define cost of misasligned vector load.
	(TARG_VEC_STORE_COST): Define cost of vector store.
	(vect_estimate_min_profitable_iters): Define new function.
	* tree-vect-analyze.c (vect_analyze_operations): Add a compile-time
	check to evaluate if loop iterations are less than minimum profitable
	iterations determined by cost model or minimum vect loop bound defined
	by user, whichever is more conservative.
	* tree-vect-transform.c (vect_do_peeling_for_loop_bound): Add a
	run-time check to evaluate if loop iterations are less than minimum
	profitable iterations determined by cost model or minimum vect loop
	bound defined by user, whichever is more conservative.
	(vect_estimate_min_profitable_iterations): New function to estimate
	mimimimum iterartions required for vector version of loop to be
	profitable over scalar version.
        (vect_model_reduction_cost): New function.
	(vect_model_induction_cost): New function.
	(vect_model_simple_cost): New function.
	(vect_cost_strided_group_size): New function.
	(vect_model_store_cost): New function.
	(vect_model_load_cost): New function.
	(vectorizable_reduction): Call vect_model_reduction_cost during
	analysis phase.
	(vectorizable_induction): Call vect_model_induction_cost during
	analysis phase.
	(vectorizable_load): Call vect_model_load_cost during analysis phase.
	(vectorizable_store): Call vect_model_store_cost during analysis phase.
	(vectorizable_call, vectorizable_assignment, vectorizable_operation,
	vectorizable_promotion, vectorizable_demotion): Call 
	vect_model_simple_cost during analysis phase.

gcc/testsuite/ChangeLog:
2007-06-08  Harsha Jagasia <harsha.jagasia@amd.com>

	* gcc.dg/vect/costmodel: New directory.
	* gcc.dg/vect/costmodel/i386: New directory.
	* gcc.dg/vect/costmodel/i386/i386-costmodel-vect.exp: New testsuite.
	* gcc.dg/vect/costmodel/i386/costmodel-fast-math-vect-pr29925.c:
	New test.
	* gcc.dg/vect/costmodel/i386/costmodel-vect-31.c: New test.
	* gcc.dg/vect/costmodel/i386/costmodel-vect-33.c: New test.
	* gcc.dg/vect/costmodel/i386/costmodel-vect-68.c: New test.
	* gcc.dg/vect/costmodel/i386/costmodel-vect-reduc-1char.c: New test.
	* gcc.dg/vect/costmodel/x86_64: New directory.
	* gcc.dg/vect/costmodel/x86_64/x86_64-costmodel-vect.exp:
	New testsuite.	
	* gcc.dg/vect/costmodel/x86_64/costmodel-fast-math-vect-pr29925.c:
	New test.
	* gcc.dg/vect/costmodel/x86_64/costmodel-vect-31.c: New test.
	* gcc.dg/vect/costmodel/x86_64/costmodel-vect-33.c: New test.
	* gcc.dg/vect/costmodel/x86_64/costmodel-vect-68.c: New test.
	* gcc.dg/vect/costmodel/x86_64/costmodel-vect-reduc-1char.c: New test.
	* gcc.dg/vect/costmodel/x86_64/costmodel-pr30843.c: New test.

Co-Authored-By: Tony Linthicum <tony.linthicum@amd.com>

From-SVN: r125575
2007-06-08 16:30:49 +00:00
Simon Baldwin c8e2516ccf reg-stack.c (get_true_reg): Readability change.
* reg-stack.c (get_true_reg): Readability change.  Moved default case
label into direct switch statement scope.

From-SVN: r125574
2007-06-08 16:17:01 +00:00
Simon Baldwin 2c5cfd1fc6 tree-flow-inline.h (var_ann): Replaced erroneous '=' assignment in gcc_assert() with '==' comparison.
* tree-flow-inline.h (var_ann): Replaced erroneous '=' assignment
in gcc_assert() with '==' comparison.

From-SVN: r125573
2007-06-08 16:15:41 +00:00