Commit Graph

32931 Commits

Author SHA1 Message Date
Sebastian Pop 71d5b5e165 tree-data-ref.h (data_dependence_relation): New flag reversed_p.
* tree-data-ref.h (data_dependence_relation): New flag reversed_p.
	(DDR_REVERSED_P): New.
	* tree-data-ref.c (initialize_data_dependence_relation,
	build_classic_dist_vector): Set DDR_REVERSED_P.

From-SVN: r126306
2007-07-04 07:19:01 +00:00
Sebastian Pop fd727b3451 re PR target/32457 (Complete program optimized away (i686, -ftree-vectorize))
PR middle-end/32457
	* tree-data-ref.c (analyze_siv_subscript_cst_affine,
	compute_overlap_steps_for_affine_1_2, analyze_subscript_affine_affine,
	init_omega_for_ddr_1): Use non conservative number of iterations
	estimations.
	(analyze_subscript_affine_affine): Use HOST_WIDE_INT instead of int.
	(analyze_siv_subscript): Remove FIXME and reinitialization of 
	last_conflicts to chrec_dont_know.
	* testsuite/gfortran.dg/vect/pr32457.f90: New.

From-SVN: r126305
2007-07-04 07:04:31 +00:00
Douglas Gregor c92b85159f tree.c (maybe_canonicalize_argtypes): Improve description.
2007-07-04  Douglas Gregor  <doug.gregor@gmail.com>

	* tree.c (maybe_canonicalize_argtypes): Improve description.

From-SVN: r126304
2007-07-04 06:35:25 +00:00
Douglas Gregor 8de08f4c86 tree.c (maybe_canonicalize_argtypes): New.
2007-07-04  Douglas Gregor  <doug.gregor@gmail.com>

	* tree.c (maybe_canonicalize_argtypes): New.
	(build_function_type): Set canonical type.
	(build_method_type_directly): Ditto.
	(reconstruct_complex_type): Rebuild the METHOD_TYPE node
	properly.
	
2007-07-04  Douglas Gregor  <doug.gregor@gmail.com>

	* decl.c (build_ptrmemfunc_type): Always use structural equality
	tests when comparing pointer-to-member-function types, because the
	handling of TYPE_GET_PTRMEMFUNC_TYPE currently defeats canonical
	types.

From-SVN: r126303
2007-07-04 06:32:30 +00:00
Andrew Pinski 2d1a1007a0 tree-ssa-loop-ivopts.c (strip_offset_1): Treat POINTER_PLUS_EXPR like PLUS_EXPR.
2007-07-03  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        * tree-ssa-loop-ivopts.c (strip_offset_1): Treat POINTER_PLUS_EXPR
        like PLUS_EXPR.
        (rewrite_use_nonlinear_expr): Likewise.

From-SVN: r126298
2007-07-03 21:39:26 -07:00
Ben Elliston f01d40db56 dwarf2out.c: Move DWARF2 abbreviation glossary closer to the top of this file.
* dwarf2out.c: Move DWARF2 abbreviation glossary closer to the top
	of this file.

From-SVN: r126294
2007-07-04 10:56:44 +10:00
Seongbae Park e3ceb300c5 rtl.def (UNSPEC, [...]): More comments.
2007-07-03  Seongbae Park  <seongbae.park@gmail.com>

	* rtl.def (UNSPEC, USE, CLOBBER): More comments.

From-SVN: r126286
2007-07-03 22:44:26 +00:00
Ben Elliston d9ad786245 * c-objc-common.c (c_types_compatible_p): Fix indentation.
From-SVN: r126285
2007-07-04 08:32:33 +10:00
Ben Elliston 4408237565 tm.texi (Run-time Target): Capitalise "CPU".
* doc/tm.texi (Run-time Target): Capitalise "CPU".
	(Exception Handling): Likewise.

From-SVN: r126284
2007-07-04 08:28:28 +10:00
Jan Hubicka f9faf95474 * ifcvt.c (find_cond_trap): Avoid invalid RTL sharing.
From-SVN: r126281
2007-07-03 22:14:27 +00:00
Eric Christopher 717c4e47fb cppopts.texi: Add conflicting option note to -dM.
2007-07-03  Eric Christopher  <echristo@apple.com>

	    * doc/cppopts.texi: Add conflicting option note to -dM.
	    * doc/invoke.texi: Add note about possible conflicts with
	    -E for -dCHARS and note that -dM will not produce
	    any results if there is no machine dependent reorg.

From-SVN: r126278
2007-07-03 21:39:17 +00:00
Geoffrey Keating e7005ecbe1 * tree.h (DECL_ALIGN): Back out previous change.
From-SVN: r126276
2007-07-03 21:00:01 +00:00
Joseph Myers a44380d2e9 configure.ac: Test for .dtprelword support on MIPS.
* configure.ac: Test for .dtprelword support on MIPS.
	* configure, config.in: Regenerate.
	* config/mips/mips.c (mips_output_dwarf_dtprel): New.
	(TARGET_ASM_OUTPUT_DWARF_DTPREL): Define.

From-SVN: r126273
2007-07-03 21:28:02 +01:00
Julian Brown f1adb0a9f4 config.gcc (with_fpu): Allow --with-fpu=vfp3.
gcc/
	* config.gcc (with_fpu): Allow --with-fpu=vfp3.
	* config/arm/aout.h (REGISTER_NAMES): Add D16-D31.
	* config/arm/aof.h (REGISTER_NAMES): Add D16-D31.
	* config/arm/arm.c (FL_VFPV3): New flag for VFPv3 processor
	capability.
	(all_fpus): Add FPUTYPE_VFP3.
	(fp_model_for_fpu): Add VFPv3 field.
	(arm_rtx_costs_1): Give cost to VFPv3 constants.
	(vfp3_const_double_index): New function. Return integer index of
	VFPv3 constant suitable for fconst[sd] insns, or -1 if constant
	isn't suitable.
	(vfp3_const_double_rtx): New function. True if VFPv3 is enabled
	and argument represents a valid RTX for a VFPv3 constant.
	(vfp_output_fldmd): Split fldmd with > 16 registers in the list into
	two instructions.
	(vfp_emit_fstmd): Similar, for fstmd.
	(arm_print_operand): Implement new code 'G' for VFPv3 floating-point
	constants, represented as integer indices.
	(arm_hard_regno_mode_ok): Use VFP_REGNO_OK_FOR_SINGLE,
	VFP_REGNO_OK_FOR_DOUBLE macros.
	(arm_regno_class): Handle VFPv3 d0-d7, low, high register split.
	(arm_file_start): Set float-abi attribute for VFPv3, and output
	correct ".fpu" assembler directive.
	(arm_dbx_register_numbering): Add FIXME.
	* config/arm/arm.h (TARGET_VFP3): New macro. Target supports VFPv3.
	(fputype): Add FPUTYPE_VFP3.
	(FIXED_REGISTERS): Add 32 registers for D16-D31.
	(CALL_USED_REGISTERS): Likewise.
	(CONDITIONAL_REGISTER_USAGE): Add note about conditional definition
	of LAST_VFP_REGNUM. Make D16-D31 caller-saved, if present.
	(LAST_VFP_REGNUM): Extend available VFP registers for VFPv3.
	(D7_VFP_REGNUM): New.
	(LAST_LO_VFP_REGNUM, FIRST_HI_VFP_REGNUM, LAST_HI_VFP_REGNUM)
	(VFP_REGNO_OK_FOR_SINGLE, VFP_REGNO_OK_FOR_SINGLE)
	(VFP_REGNO_OK_FOR_DOUBLE): Define new macros.
	(FIRST_PSEUDO_REGISTER): Shift up to 128 to accommodate VFPv3.
	(REG_ALLOC_ORDER): Adjust for VFPv3.
	(reg_class): Add VFP_D0_D7_REGS, VFP_LO_REGS, VFP_HI_REGS.
	(REG_CLASS_NAMES): Add entries corresponding to VFP_D0_D7_REGS,
	VFP_LO_REGS, VFP_HI_REGS.
	(REG_CLASS_CONTENTS): Likewise. Extend contents for VFP_REGS.
	(IS_VFP_CLASS): Define macro.
	(SECONDARY_OUTPUT_RELOAD_CLASS, SECONDARY_INPUT_RELOAD_CLASS): Use
	IS_VFP_CLASS.
	(REGISTER_MOVE_COST): Likewise.
	* config/arm/arm-protos.h (vfp3_const_double_rtx): Add prototype.
	* config/arm/vfp.md (VFPCC_REGNUM): Redefine as 127.
	(*arm_movsi_vfp, *thumb2_movsi_vfp, *movsfcc_vfp)
	(*thumb2_movsfcc_vfp, *abssf2_vfp, *negsf2_vfp, *addsf3_vfp)
	(*subsf3_vfp, *divsf_vfp, *mulsf_vfp, *mulsf3negsf_vfp)
	(*mulsf3addsf_vfp, *mulsf3subsf_vfp, *mulsf3negsfaddsf_vfp)
	(*extendsfdf2_vfp, *truncdfsf2_vfp, *truncsisf2_vfp)
	(*truncsidf2_vfp, fixuns_truncsfsi2, fixuns_truncdfsi2)
	(*floatsisf2_vfp, *floatsidf2_vfp, floatunssisf2)
	(floatunssidf2, *sqrtsf2_vfp, *cmpsf_split_vfp)
	(*cmpsf_trap_split_vfp, *cmpsf_vfp, *cmpsf_trap_vfp): Use 't'
	where appropriate for single-word registers.
	(*movsf_vfp, *thumb2_movsf_vfp, *movdf_vfp, *thumb2_movdf_vfp):
	As above. Fix type attributes.
	* config/arm/constraints.md (register_contraint "t"): Define.
	(register_constraint "w"): Change to D0-D15, or D0-D31 for
	VFPv3/NEON.
	(register_constraint "x"): Define.
	(constraint "Dv"): Define.

From-SVN: r126272
2007-07-03 19:42:36 +00:00
Geoffrey Keating f972b2cb9d * tree.h (DECL_ALIGN): Prevent use on a FUNCTION_DECL.
From-SVN: r126270
2007-07-03 19:13:00 +00:00
Tom Tromey 0bacb8c748 c-parser.c (objc_pq_context): Removed.
* c-parser.c (objc_pq_context): Removed.
	(objc_need_raw_identifier): Likewise.
	(c_parser) <objc_pq_context>: New field.
	<objc_need_raw_identifier>: Likewise.
	(OBJC_NEED_RAW_IDENTIFIER): Removed.
	(c_lex_one_token): Update.
	(c_parser_objc_protocol_definition): Update.
	(c_parser_objc_method_definition): Update.
	(c_parser_objc_methodproto): Update.
	(c_parser_declspecs): Update.

From-SVN: r126269
2007-07-03 18:09:15 +00:00
David Ung c849ec734c mips.c (mips_issue_rate): Return 4 for 74K processors.
gcc/
2007-07-03  David Ung  <davidu@mips.com>

	* config/mips/mips.c (mips_issue_rate): Return 4 for 74K processors.

From-SVN: r126268
2007-07-03 18:07:08 +00:00
David Ung 74d4d0244c invoke.texi: Document -march=74kf3_2.
gcc/
2007-07-03  David Ung  <davidu@mips.com>
	    Richard Sandiford  <richard@codesourcery.com>

	* doc/invoke.texi: Document -march=74kf3_2.
	* config/mips/mips.h (PROCESSOR_74KF3_2): New processor_type.
	(TUNE_74K): Check for it.
	* config/mips/mips.c (mips_cpu_info): Add 74kf3_2.
	(mips_rtx_cost_data): Add an entry for PROCESSOR_74KF3_2.
	* config/mips/mips.md (cpu): Add 74kf3_2.
	* config/mips/74k.md (r74k_int_logical, r74k_int_arith, r74k_int_nop)
	(r74k_int_cmove, r74k_int_mult, r74k_int_mul3, r74k_int_mfhilo)
	(r74k_int_mthilo, r74k_int_div, r74k_int_call, r74k_int_jump)
	(r74k_int_load, r74k_int_store, r74k_unknown, r74k_multi): Add
	74kf3_2 to the CPU list.
	(r74kf3_2_fadd, r74kf3_2_fmove, r74kf3_2_fload, r74kf3_2_fstore)
	(r74kf3_2_fmul_sf, r74kf3_2_fmul_df, r74kf3_2_fdiv_sf)
	(r74kf3_2_fdiv_df, r74kf3_2_frsqrt_sf, r74kf3_2_frsqrt_df)
	(r74kf3_2_fcmp, r74kf3_2_fcvt, r74kf3_2_fxfer_to_c1)
	(r74kf3_2_fxfer_from_c1): New insn reservations.

Co-Authored-By: Richard Sandiford <richard@codesourcery.com>

From-SVN: r126267
2007-07-03 18:00:06 +00:00
Richard Sandiford bdd77024de invoke.texi: Replace -march=24kf with -march=24kf2_1 and -march=24kx with -march=24kf1_1.
gcc/
2007-07-03  Richard Sandiford  <richard@codesourcery.com>
	    David Ung  <davidu@mips.com>

	* doc/invoke.texi: Replace -march=24kf with -march=24kf2_1 and
	-march=24kx with -march=24kf1_1.  Likewise 24ke[fx], 34k[fx]
	and 74k[fx].  Document aliases for the new options.
	* config/mips/mips.h (PROCESSOR_24KF): Rename to...
	(PROCESSOR_24KF2_1): ...this.
	(PROCESSOR_24KX): Rename to...
	(PROCESSOR_24KF1_1): ...this.
	(PROCESSOR_74KF): Rename to...
	(PROCESSOR_74KF2_1): ...this.
	(PROCESSOR_74KX): Rename to...
	(PROCESSOR_74KF1_1): ...this.
	(TUNE_74K): Update PROCESSOR_* names.
	* config/mips/mips.c (mips_cpu_info): Add 24kf2_1 as a synonym
	for 24kf.  Add 24kf1_1 and 24kfx as synonyms for 24kx.  Likewise
	the 24ke*, 34k* and 74k* processors.  Update PROCESSOR_* names.
	(mips_rtx_cost_data): Update processor names in comments.
	(mips_issue_rate): Update PROCESSOR_* names.
	* config/mips/mips.md (cpu): Rename 24kf to 24kf2_1, 24kx to
	24kf1_1, 74kf to 74kf2_1 and 74kx to 74kf1_1.
	* config/mips/24k.md: Rename FPU-related r24k_* insn reservations
	to r24kf2_1_*.  Rename r24kx_* insn reservations to r24kf1_1_*.
	Update cpu attribute names.
	(r24k_fpu_iss): Rename this reservation to...
	(r24kf2_1_fpu_iss): ...this and update all uses.
	(r24kx_fpu_iss): Rename this reservation to...
	(r24kf1_1_fpu_iss): ...this and update all uses.
	* config/mips/74k.md: Rename FPU-related r74kf_* insn reservations
	to r74kf2_1_*.  Rename r74kx_* insn reservations to r74kf1_1_*.
	Update cpu attribute names.

Co-Authored-By: David Ung <davidu@mips.com>

From-SVN: r126266
2007-07-03 17:34:59 +00:00
Kaz Kojima fbaeb717be constraints.md: New file.
* config/m32r/constraints.md: New file.
* config/m32r/m32r.c: Include tm-constrs.h.
  (small_data_operand): Use satisfies_constraint_* instead of macro.
  (addr24_operand, gen_compare): Likewise.
* config/m32r/m32r.h (REG_CLASS_FROM_LETTER): Remove.
  (INT8_P, UPPER16_P, UINT32_P, UINT5_P, INVERTED_SIGNED_8BIT,
  CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT): Likewise.
* config/m32r/m32r.md: Include constraints.md.
  (movsi_insn): Use satisfies_constraint_* instead of macro.
  (andsi3, iorsi3, xorsi3, seq_insn+1, sne): Likewise.
* config/m32r/predicates.md (conditional_move_operand): Likewise.
  (two_insn_const_operand, int8_operand, uint16_operand,
   reg_or_int16_operand, reg_or_uint16_operand,
   reg_or_cmp_int16_operand, cmp_int16_operand,
   seth_add3_operand): Likewise.

From-SVN: r126265
2007-07-03 16:56:20 +00:00
Eric Christopher 66965e9094 libgcc2.h: Conditionally declare __bswapsi2 and __bswapdi2.
2007-07-03  Eric Christopher  <echristo@gmail.com>

        * libgcc2.h: Conditionally declare __bswapsi2 and
        __bswapdi2.

From-SVN: r126263
2007-07-03 16:35:20 +00:00
H.J. Lu 72b31363fb ddg.c (check_sccs): Define only if ENABLE_CHECKING is defined.
2007-07-03  H.J. Lu  <hongjiu.lu@intel.com>

	* ddg.c (check_sccs): Define only if ENABLE_CHECKING is
	defined.

From-SVN: r126258
2007-07-03 07:19:33 -07:00
Rainer Orth b36e79e550 re PR target/28307 (pthread functions in libgcc not weak any more on Tru64 UNIX)
PR target/28307
	* gthr-posix.h [SUPPORTS_WEAK && GTHREAD_USE_WEAK]
	(__gthrw_pragma): Provide default definition.
	(__gthrw2): Use it.
	* gthr-posix.c (__gthrw_pragma): Define.

From-SVN: r126253
2007-07-03 13:41:00 +00:00
Daniel Berlin 78d3c323b9 tree-ssa-sccvn.c (set_ssa_val_to): Check for operand_equal_p before declaring inequality.
2007-07-03  Daniel Berlin  <dberlin@dberlin.org>

	* tree-ssa-sccvn.c (set_ssa_val_to): Check for operand_equal_p
	before declaring inequality.

From-SVN: r126252
2007-07-03 12:55:13 +00:00
Rask Ingemann Lambertsen b6bcd67696 combine.c (recog_for_combine): Log the success or failure of matching new insn patterns against the machine...
* combine.c (recog_for_combine): Log the success or failure of
	  matching new insn patterns against the machine description in
	  detailed dumps.

From-SVN: r126251
2007-07-03 12:45:31 +00:00
Revital Eres 8cec1624c5 modulo-sched: print sccs and check it
From-SVN: r126249
2007-07-03 10:27:19 +00:00
Uros Bizjak c77cd3d140 cpplib.h (CPP_N_WIDTH_MD, [...]): Add new constants.
libcpp/ChangeLog:

	* include/cpplib.h (CPP_N_WIDTH_MD, CPP_N_MD_W, CPP_N_MD_Q):
	Add new constants.
	* expr.c (interpret_float_suffix): Process 'w', 'W', 'q' and 'Q'
	suffixes.  Return CPP_N_MD_W for 'w' or 'W' suffixes and CPP_N_MD_Q
	for 'q' or 'Q' suffixes.

gcc/ChangeLog:

	* targhooks.h (default_mode_for_suffix): New function declaration.
	* targhooks.c (default_mode_for_suffix): New default target hook.
	* target.h (struct c): New structure in the targetm struct.
	(mode_for_suffix): New target hook as part of struct c.
	target-def.h (TARGET_C_MODE_FOR_SUFFIX): Define as
	default_mode_for_suffix.
	(TARGET_C): New define.
	* c-lex.c: Include "target.h".
	(interpret_float): Use targetm.c.mode_for_suffix to determine
	the mode for a given non-standard suffix.
	Makefile.in (c-lex.o): Depend on $(TARGET_H).

	* config/i386/i386.c (ix86_c_mode_for_suffix): New static function.
	(TARGET_C_MODE_FOR_SUFFIX): Define to ix86_c_mode_for_suffix.

	* doc/extend.texi (Floating Types): New node.  Document __float80 and
	__float128 types.  Document 'w', 'W', 'q' and 'Q' suffixes.

testsuite/ChangeLog:

	* gcc.dg/const-float80.c : New test.
	* gcc.dg/const-float128.c : New test.
	* gcc.dg/const-float80-ped.c : New test.
	* gcc.dg/const-float128-ped.c : New test.

From-SVN: r126244
2007-07-03 07:53:58 +02:00
Kaz Kojima 1ed50f7194 re PR target/32506 (cross compile sh64-superh-linux-gnu internal compiler error: in change_address_1, at emit-rtl.c:1800)
PR target/32506
	* config/sh/sh.md (udivsi3_i1_media): Use target_reg_operand
	predicate instead of target_operand.
	(divsi3_i1_media, divsi3_media_2): Likewise.

From-SVN: r126243
2007-07-03 04:01:35 +00:00
Eric Botcazou 836f779495 tree.h (alias_sets_might_conflict_p): Rename into alias_sets_must_conflict_p.
* tree.h (alias_sets_might_conflict_p): Rename into
	alias_sets_must_conflict_p.
	* alias.c (alias_sets_might_conflict_p): Likewise.
	(alias_sets_conflict_p): Use it.
	(objects_must_conflict_p): Likewise.
	* c-common.c (strict_aliasing_warning): Adjust.

From-SVN: r126233
2007-07-02 20:01:32 +00:00
Andrew Pinski e4950e42af rtlhooks.c (gen_lowpart_if_possible): Check for invalid subreg before calling gen_lowpart_SUBREG.
2007-07-02  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        * rtlhooks.c (gen_lowpart_if_possible): Check for
        invalid subreg before calling gen_lowpart_SUBREG.

From-SVN: r126230
2007-07-02 12:40:30 -07:00
Geoffrey Keating 22f70bffdd darwin9.h: Add copyright notice.
* config/darwin9.h: Add copyright notice.
	(LINK_COMMAND_SPEC): Add comment.
	(DARWIN_LIBSYSTEM_HAS_UNWIND): Define.
	* config/rs6000/darwin.h (MD_UNWIND_SUPPORT): Conditionalise on
	DARWIN_LIBSYSTEM_HAS_UNWIND.

From-SVN: r126229
2007-07-02 19:36:14 +00:00
Jakub Jelinek 69f1837b81 re PR libgomp/32468 (number of threads in a parallel region depends on number of SECTIONs and MAX_THREADS)
PR libgomp/32468
	* omp-low.c (check_combined_parallel): New function.
	(lower_omp_parallel): Call it via walk_stmts, set
	OMP_PARALLEL_COMBINED if appropriate.
	(determine_parallel_type): If OMP_FOR resp. OMP_SECTIONS
	isn't the only statement in WS_ENTRY_BB or OMP_RETURN
	the only one in PAR_EXIT_BB and not OMP_PARALLEL_COMBINED,
	don't consider it as combined parallel.

	* gcc.dg/gomp/pr32468-1.c: New test.

From-SVN: r126226
2007-07-02 21:22:47 +02:00
Richard Sandiford 15c723f39f configure.ac (gcc_gxx_include_dir): Use $(libsubdir_to_prefix).
gcc/
	* configure.ac (gcc_gxx_include_dir): Use $(libsubdir_to_prefix).
	(gcc_tooldir): Likewise.
	* configure: Regenerate.
	* Makefile.in (libsubdir_to_prefix): New variable, based on the
	old configure.ac gcc_tooldir setting.
	(prefix_to_exec_prefix): New variable.
	(DRIVER_DEFINES): Use $(libsubdir_to_prefix)$(prefix_to_exec_prefix)
	rather than $(unlibsubdir)/../ to derive TOOLDIR_BASE_PREFIX.

From-SVN: r126225
2007-07-02 19:20:33 +00:00
Daniel Berlin f8b041959a Fix PR tree-optimization/32583 Fix PR tree-optimization/32584
2007-07-02  Daniel Berlin  <dberlin@dberlin.org>

	Fix PR tree-optimization/32583
	Fix PR tree-optimization/32584
	* tree-ssa-pre.c (phi_translate): Always pass seen bitmap.
	(phi_translate_set): Use phi_translate directly now.
	(make_values_for_stmt): Don't value number RHS if we already know
	it is constant.

From-SVN: r126222
2007-07-02 18:27:46 +00:00
Steve Ellcey 0574253001 re PR target/31684 (ICE in get_attr_first_insn, at config/ia64/itanium2.md:1839 at -O2)
PR target/31684
	* haifa-sched.c (add_to_speculative_block): Change copy_rtx to
	copy_insn.

Co-Authored-By: James E Wilson <wilson@specifixinc.com>

From-SVN: r126216
2007-07-02 17:15:35 +00:00
Uros Bizjak 312360e86e ChangeLog: Add following to my previous description:
* ChangeLog: Add following to my previous description:

        (if_convertible_loop_p): Clear aux field of incoming edges if bb
        contains phi node.

From-SVN: r126214
2007-07-02 17:15:39 +02:00
Richard Sandiford e12605764d mips-protos.h (mips16e_save_restore_info): New struct.
gcc/
2007-07-02  Sandra Loosemore  <sandra@codesourcery.com>
	    Richard Sandiford  <richard@codesourcery.com>
	    Nigel Stephens  <nigel@mips.com>

	* config/mips/mips-protos.h (mips16e_save_restore_info): New struct.
	(mips16e_output_save_restore): Declare.
	(mips16e_save_restore_pattern_p): Likewise.
	* config/mips/mips.h (GENERATE_MIPS16E_SAVE_RESTORE): New macro.
	* config/mips/mips.c (MIPS_MAX_FIRST_STACK_STEP): Return 0x7f8
	for GENERATE_MIPS16E_SAVE_RESTORE.  Return 0x400 for TARGET_MIPS16
	&& !GENERATE_MIPS16E_SAVE_RESTORE && !TARGET_64BIT.
	(BITSET_P): New global macro, extracted from...
	(mips_for_each_saved_reg): ...here.
	(mips16e_save_restore_info): New struct.
	(mips16e_s2_s8_regs, mips16e_a0_a3_regs): New variables.
	(mips16e_save_restore_regs): New variable.
	(mips_split_plus, mips16e_find_first_register): New functions.
	(mips16e_mask_registers): New function.
	(compute_frame_size): Expand the commentary before the function.
	Enforce the MIPS16e save and restore register range restrictions.
	Pad the general register save area at the low end.
	(mips16e_save_restore_reg, mips16e_build_save_restore)
	(mips16e_save_restore_pattern_p, mips16e_add_register_range)
	(mips16e_output_save_restore, mips16e_collect_propagate_value)
	(mips16e_collect_argument_save, mips16e_collect_argument_saves):
	New functions.
	(mips_expand_prologue, mips_expand_epilogue): Handle
	GENERATE_MIPS16E_SAVE_RESTORE.
	* config/mips/mips.md (*mips16e_save_restore): New pattern.

gcc/testsuite/
	* gcc.target/mips/save-restore-1.c: New test.
	* gcc.target/mips/save-restore-2.c: Likewise.
	* gcc.target/mips/save-restore-3.c: Likewise.
	* gcc.target/mips/save-restore-4.c: Likewise.

From-SVN: r126207
2007-07-02 14:37:15 +00:00
Uros Bizjak 8ad0217501 re PR tree-optimization/31966 (Miscompiles valid code with -ftree-vectorize)
PR tree-optimization/31966
	PR tree-optimization/32533
	* tree-if-conv.c (add_to_dst_predicate_list): Use "edge", not
	"basic_block" description as its third argument.  Update function
	calls to get destination bb from "edge" argument.  Save "cond" into
	aux field of the edge.  Update prototype for changed arguments.
	(find_phi_replacement_condition): Operate on incoming edges, not
	on predecessor blocks.  If there is a condition saved in the
	incoming edge aux field, AND it with incoming bb predicate.
	Return source bb of the first edge.
	(clean_predicate_lists): Clean aux field of outgoing node edges.
	(tree_if_conversion): Do not initialize cond variable. Move
	variable declaration into the loop.
	(replace_phi_with_cond_gimple_modify_stmt): Remove unneded
	initializations of new_stmt, arg0 and arg1 variables.

testsuite/ChangeLog:

	PR tree-optimization/31966
	PR tree-optimization/32533
	* gcc.dg/tree-ssa/pr31966.c: New runtime test.
	* gfortran.dg/pr32533.f90: Ditto.

From-SVN: r126206
2007-07-02 16:26:11 +02:00
Kenneth Zadeck bc90eb85d9 Fixed Changelog entry on unreverted patch.
From-SVN: r126205
2007-07-02 14:01:31 +00:00
Jakub Jelinek a2daf82cc2 tree-nrv.c (dest_safe_for_nrv_p): Grok any handled_component_p, SSA_NAMEs, RESULT_DECLs and PARM_DECLs.
* tree-nrv.c (dest_safe_for_nrv_p): Grok any handled_component_p,
	SSA_NAMEs, RESULT_DECLs and PARM_DECLs.

	* g++.dg/opt/nrv12.C: New test.
	* gcc.target/i386/nrv1.c: New test.

From-SVN: r126200
2007-07-02 14:57:22 +02:00
Richard Guenther 85b19f61bc tree-ssa.c (useless_type_conversion_p): Document future intent as defining the middle-end type system.
2007-07-02  Richard Guenther  <rguenther@suse.de>

	* tree-ssa.c (useless_type_conversion_p): Document
	future intent as defining the middle-end type system.
	Re-structure to call langhook last, group by type class,
	mark questionable parts.

From-SVN: r126199
2007-07-02 12:13:39 +00:00
Richard Guenther f4088621a5 re PR middle-end/15988 (ICE in fold_convert with pointer-to-member-function)
2007-07-02  Richard Guenther  <rguenther@suse.de>

	* tree-flow.h (types_compatible_p): Declare.
	* tree-ssa.c (types_compatible_p): New function.
	* ipa-type-escape.c (discover_unique_type): Use
	types_compatible_p instead of lang_hooks.types_compatible_p.
	* tree-ssa-copyrename.c (copy_rename_partition_coalesce): Likewise.
	* tree-vn.c (expressions_equal_p): Likewise.
	* tree.c (fields_compatible_p): Likewise.
	* tree-ssa-dom.c (avail_expr_eq): Likewise.
	(cprop_operand): Use useless_type_conversion_p instead of
	lang_hooks.types_compatible_p.
	* tree-inline.c (setup_one_parameter): Likewise.
	(declare_return_variable): Likewise.
	* tree-nrv.c (tree_nrv): Likewise.
	* tree-ssa-ccp.c (maybe_fold_offset_to_array_ref): Likewise.
	(maybe_fold_offset_to_component_ref): Likewise.
	(maybe_fold_offset_to_reference): Likewise.
	* tree-ssa-copy.c (may_propagate_copy): Likewise.
	(merge_alias_info): Likewise.
	* tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Likewise.
	* tree-ssa-phiopt.c (conditional_replacement): Likewise.
	* tree-ssa-reassoc.c (optimize_ops_list): Likewise.
	* tree-tailcall.c (find_tail_calls): Likewise.
	* tree-vect-generic.c (expand_vector_operations_1): Likewise.
	* gimplify.c (canonicalize_addr_expr): Likewise.
	(fold_indirect_ref_rhs): Likewise.
	(gimplify_addr_expr): Likewise.  Swap parameters to cpt_same_type.
	(cpt_same_type): Likewise.
	(check_pointer_types_r): Swap parameters to cpt_same_type
	where appropriate.
	* fold-const.c (fold_convert): Revert fix for PR15988.
	* tree-inline.c (setup_one_parameter): Instead fix it here by
	using fold_build1 instead of fold_convert and checking for
	error_mark_node.  Convert only if the conversion is necessary.

From-SVN: r126198
2007-07-02 11:53:08 +00:00
Joseph Myers e51917ae36 configure.ac: Check for .gnu_attribute on Power.
* configure.ac: Check for .gnu_attribute on Power.
	* configure: Regenerate.
	* config/rs6000/rs6000.c (rs6000_file_start): If supported, output
	attribute for floating-point ABI.

From-SVN: r126197
2007-07-02 11:46:35 +01:00
Ira Rosen 3053ce4409 re PR tree-optimization/32230 (Segfault in set_bb_for_stmt with -O -ftree-vectorize)
PR tree-optimization/32230
	PR tree-optimization/32477
	* tree-vect-analyze.c (vect_analyze_data_refs): Fail if base
	address is a constant.

From-SVN: r126196
2007-07-02 10:27:27 +00:00
Richard Sandiford e2c14f5d51 gcc/
* config.gcc (mipsisa32-*-elf*, mipsisa32el-*-elf*)
	(mipsisa32r2-*-elf*, mipsisa32r2el-*-elf*)
	(mipsisa64-*-elf*, mipsisa64el-*-elf*): Combine top-level
	stanzas.  Use the first part of the triplet to set MIPS_ISA_DEFAULT.
	Remove redundant setting of MASK_FLOAT64 and MASK_64BIT for the
	64-bit targets.  Add support for *-elfoabi*.
	* config/mips/t-isa3264 (MULTILIB_OPTIONS, MULTILIB_DIRNAMES): Use
	different settings if $(tm_defines) does not select the EABI.
	(MULTILIB_EXCLUSIONS): Define in those circumstances.
	* config/mips/mips.h (MIPS_ISA_LEVEL_OPTION_SPEC): New macro.
	(MIPS_ARCH_OPTION_SPEC): Likewise.
	(MIPS_ISA_LEVEL_SPEC): Likewise.
	(OPTION_DEFAULT_SPECS): Use MIPS_ARCH_OPTION_SPEC.
	* config/mips/elfoabi.h: New file.

From-SVN: r126195
2007-07-02 10:11:56 +00:00
Richard Guenther 36618b93d0 tree-flow.h (tree_ssa_useless_type_conversion_1): Rename to ...
2007-07-02  Richard Guenther  <rguenther@suse.de>

	* tree-flow.h (tree_ssa_useless_type_conversion_1): Rename to ...
	(useless_type_conversion_p): ... this.
	* tree-ssa.c (tree_ssa_useless_type_conversion_1): Rename to ...
	(useless_type_conversion_p): ... this.
	* builtins.c (fold_builtin_memory_op): Rename
	tree_ssa_useless_type_conversion_1 to useless_type_conversion_p.
	* tree-cfg.c (verify_expr): Likewise.
	* tree-ssa-address.c (tree_ssa_useless_type_conversion_1): Likewise.
	* tree-ssa-ccp.c (ccp_fold): Likewise.
	* tree-ssa-copy.c (may_propagate_copy): Likewise.
	* tree-ssa-dom.c (eliminate_redundant_computations): Likewise.
	* tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Likewise.
	* tree-ssa-loop-niter.c (refine_bounds_using_guard): Likewise.
	* tree-ssa-pre.c (eliminate): Likewise.
	* tree-ssa.c (delete_tree_ssa): Likewise.
	(tree_ssa_useless_type_conversion): Likewise.
	* tree.c (build2_stat): Likewise.

From-SVN: r126194
2007-07-02 09:18:14 +00:00
Daniel Berlin 8b0a512570 re PR tree-optimization/32571 (ICE in set_ssa_val_to, at tree-ssa-sccvn.c:1011)
2007-07-01  Daniel Berlin  <dberlin@dberlin.org>

	Fix PR tree-optimization/32571
	* tree-ssa-sccvn.c (visit_use): Shortcut copies to avoid
	simplifying them.

From-SVN: r126186
2007-07-02 04:35:37 +00:00
Daniel Berlin 4794afa5e0 tree-ssa-sccvn.c (copy_reference_ops_from_ref): Handle constants and ohter expected operations explicitly...
2007-07-01  Daniel Berlin  <dberlin@dberlin.org>

	* tree-ssa-sccvn.c (copy_reference_ops_from_ref): Handle constants
	and ohter expected operations explicitly, change default to
	gcc_unreachable.

From-SVN: r126179
2007-07-01 23:41:38 +00:00
Daniel Jacobowitz 10ae7c7b78 arm.c (arm_cannot_copy_insn_p): Do not expect a PARALLEL.
* config/arm/arm.c (arm_cannot_copy_insn_p): Do not expect a
	PARALLEL.
	* config/arm/arm.md (pic_add_dot_plus_four, pic_add_dot_plus_eight)
	(tls_load_dot_plus_eight): Move the label number into the unspec.
	* config/arm/thumb2.md (pic_load_dot_plus_four): Likewise.

	* gcc.dg/tls/opt-14.c: New.

From-SVN: r126178
2007-07-01 21:15:14 +00:00
Andreas Schwab 36bd43039b * dwarf2out.c (initial_return_save): Define only if used.
From-SVN: r126170
2007-07-01 15:28:34 +00:00
Richard Sandiford d4d7f1d1bb [multiple changes]
2007-07-01  Richard Sandiford  <richard@codesourcery.com>

	Unreverting Richard's Revert of:

	2007-06-27  Richard Sandiford  <richard@codesourcery.com>

	* dce.c (deletable_insn_p_1): New function, split out from...
	(deletable_insn_p): ...here.  Only treat bare USEs and CLOBBERs
	specially, not those inside PARALLELs.  Remove BODY argument
	and adjust recursive call accordingly.
	(prescan_insns_for_dce): Update call to delete_insn_p.

From-SVN: r126168
2007-07-01 14:43:47 +00:00
Vladimir Yanovsky 7ee1ad8483 Fix missed initialization of scc_nodes.
Co-Authored-By: Revital Eres <eres@il.ibm.com>

From-SVN: r126167
2007-07-01 14:03:51 +00:00
Uros Bizjak c22f6d33be re PR middle-end/32559 (ICE with vector arithmetic)
PR middle-end/32559
        * fold-const.c (fold-binary) [PLUS_EXPR]: Convert ~X + X to 1 or
        X + ~X to 1 only for INTEGRAL_TYPE_P type.

testsuite/ChangeLog:

        PR middle-end/32559
        * gcc.dg/pr32559.c: New test.

From-SVN: r126164
2007-07-01 12:38:03 +02:00
Daniel Berlin b941a8ae18 tree-ssa-pre.c (is_exception_related): New function
2007-06-30  Daniel Berlin  <dberlin@dberlin.org>

	* tree-ssa-pre.c (is_exception_related): New function
	(can_value_number_operation): Use it.

From-SVN: r126162
2007-07-01 02:20:06 +00:00
Joseph Myers dcb957d9dc configure.ac: Check for .gnu_attribute on MIPS.
* configure.ac: Check for .gnu_attribute on MIPS.
	* configure, config.in: Regenerate.
	* config/mips/mips.c (mips_file_start): If supported, output
	attribute for floating-point ABI.

From-SVN: r126157
2007-06-30 23:01:30 +01:00
Uros Bizjak 08024fb584 re PR target/32433 (Code for __builtin_ffs does not benefit from compiler optimizations)
PR target/32433
        * config/i386/i386.md (ffssi2): Expand as ffs_cmove for TARGET_CMOVE.
        (ffs_cmove): New expander to expand using ctz pattern.
        (*ffs_cmove): Remove pattern.
        (*ffs_no_cmove): Enable only for !TARGET_CMOVE.
        (ffsdi2): Expand using ctz pattern.
        (*ffs_rex64): Remove pattern.

From-SVN: r126154
2007-06-30 19:05:49 +02:00
John David Anglin b2e8326644 Fix last ChangeLog entry.
From-SVN: r126151
2007-06-30 15:17:27 +00:00
John David Anglin 62a5396890 pa.md (return): Delete pattern.
rtl-optimization/32296
	* pa.md (return): Delete pattern.
	(return_internal): Remove "(const_int 1)" from pattern.
	(epilogue): Use return_internal pattern for trivial returns.
	* pa-protos.h (hppa_can_use_return_insn_p): Delete declaration.
	* pa.c (hppa_can_use_return_insn_p): Delete function.  Include "df.h".

From-SVN: r126150
2007-06-30 14:26:18 +00:00
Daniel Berlin 89fb70a345 Fix PR tree-optimization/32540 Fix PR tree-optimization/31651
2007-06-30  Daniel Berlin  <dberlin@dberlin.org>
	
	Fix PR tree-optimization/32540
	Fix PR tree-optimization/31651

	* tree-ssa-sccvn.c: New file.

	* tree-ssa-sccvn.h: Ditto.
	
	* tree-vn.c: Include tree-ssa-sccvn.h
	(val_expr_paid_d): Removed.
	(value_table): Ditto.
	(vn_compute): Ditto.
	(val_expr_pair_hash): Ditto.
	(val_expr_pair_expr_eq): Ditto.
	(copy_vuses_from_stmt): Ditto.
	(vn_delete): Ditto.
	(vn_init): Ditto.
	(shared_vuses_from_stmt): Ditto.
	(print_creation_to_file): Moved up.
	(sort_vuses): Ditto.
	(sort_vuses_heap): Ditto.
	(set_value_handle): Make non-static.
	(make_value_handle): Ditto.
	(vn_add): Rewritten to use sccvn lookups.
	(vn_add_with_vuses): Ditto.
	(vn_lookup): Ditto (and second argument removed).
	(vn_lookup_with_vuses): Ditto.
	(vn_lookup_or_add): Ditto (and second argument removed);
	(vn_lookup_or_add_with_vuses): Ditto.
	(vn_lookup_with_stmt): New.
	(vn_lookup_or_add_with_stmt): Ditto.
	(create_value_handle_for_expr): Ditto.

	* tree-ssa-pre.c: Include tree-ssa-sccvn.h.
	(seen_during_translate): New function.
	(phi_trans_lookup): Use iterative_hash_expr, not vn_compute.
	(phi_trans_add): Ditto.
	(constant_expr_p): FIELD_DECL is always constant.
	(phi_translate_1): Renamed from phi_translate, add seen bitmap.
	Use constant_expr_p.
	Avoid infinite recursion on mutually valued expressions.
	Change callers of vn_lookup_or_add.
	(phi_translate): New function.
	(compute_antic_safe): Allow phi nodes.
	(create_component_ref_by_pieces): Update for FIELD_DECL change.
	(find_or_generate_expression): Rewrite slightly.
	(create_expression_by_pieces): Updated for vn_lookup_or_add
	change.
	Update VN_INFO for new names.
	(insert_into_preds_of_block): Update for new names.
	(add_to_exp_gen): New function.
	(add_to_sets): Use vn_lookup_or_add_with_stmt.
	(find_existing_value_expr): Rewrite to changed vn_lookup.
	(create_value_expr_from): Ditto, and use add_to_exp_gen.
	(try_look_through_load): Removed.
	(try_combine_conversion): Ditto.
	(get_sccvn_value): New function.
	(make_values_for_phi): Ditto.
	(make_values_for_stmt): Ditto.
	(compute_avail): Rewritten for vn_lookup_or_add changes and to use
	SCCVN.
	(init_pre): Update for SCCVN changes.
	(fini_pre): Ditto.
	(execute_pre): Ditto.

	* tree-flow.h (make_value_handle): Declare.
	(set_value_handle): Ditto.
	(sort_vuses_heap): Ditto.
	(vn_lookup_or_add_with_stmt): Ditto.
	(vn_lookup_with_stmt): Ditto.
	(vn_compute): Remove.
	(vn_init): Ditto.
	(vn_delete): Ditto.
	(vn_lookup): Update arguments.

	* Makefile.in (tree-ssa-pre.o): Add tree-ssa-sccvn.h
	(tree-vn.o): Ditto.
	(tree-ssa-sccvn.o): New.
	(OBJS-common): Add tree-ssa-sccvn.o

From-SVN: r126149
2007-06-30 14:15:26 +00:00
Manuel López-Ibáñez ad960f56f2 re PR c/4076 (-Wunused doesn't warn about static function only called by itself.)
2007-06-30  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>

	PR c/4076
	* c-typeck.c (build_external_ref): Don't mark as used if called
	from itself.
	* calls.c (rtx_for_function_call): Likewise.

testsuite/
	* gcc.dg/Wunused-function.c: New.

From-SVN: r126144
2007-06-30 12:56:43 +00:00
Richard Sandiford a4fbe84bd2 revert: dce.c (deletable_insn_p_1): New function, split out from...
gcc/
	Revert:

	2007-06-27  Richard Sandiford  <richard@codesourcery.com>

	* dce.c (deletable_insn_p_1): New function, split out from...
	(deletable_insn_p): ...here.  Only treat bare USEs and CLOBBERs
	specially, not those inside PARALLELs.  Remove BODY argument
	and adjust recursive call accordingly.
	(prescan_insns_for_dce): Update call to delete_insn_p.

From-SVN: r126143
2007-06-30 12:23:18 +00:00
Rask Ingemann Lambertsen 9d35384d74 combine.c (combine_validate_cost): New parameter NEWOTHERPAT.
* combine.c (combine_validate_cost): New parameter NEWOTHERPAT.
	(try_combine): Move potential calls to undo_all() so they happen
	before we commit to using the combined insns.

From-SVN: r126142
2007-06-30 11:28:57 +00:00
Jan Hubicka 2ed2257828 loop-unroll.c (unroll_loop_runtime_iterations): Unshare newly emit code.
* loop-unroll.c (unroll_loop_runtime_iterations): Unshare newly emit    
	code.

From-SVN: r126141
2007-06-30 11:16:33 +00:00
Thomas Neumann c5274326e0 ipa.c (cgraph_postorder): Cast according to the coding conventions.
* ipa.c (cgraph_postorder): Cast according to the coding conventions.
	(cgraph_remove_unreachable_nodes): Likewise.
	* ipa-cp.c (ipcp_propagate_stage): Use BOTTOM instead of integer 0.
	* ipa-inline.c (update_caller_keys): Cast according to the coding
	conventions.
	(cgraph_decide_recursive_inlining): Likewise.
	(cgraph_decide_inlining_of_small_function): Likewise.
	(try_inline): Likewise.
	(cgraph_decide_inlining_incrementally): Likewise.
	* ipa-pure-const.c (get_function_state): Likewise.
	(scan_function): Likewise.
	(analyze_function): Likewise.
 	(static_execute): Likewise.
	* gcc/ipa-reference.c (scan_for_static_refs): Likewise.
	(merge_callee_local_info): Likewise.
	(analyze_function): Use type safe memory macros.
	(static_execute): Likewise. Cast according to the coding conventions.
	* ipa-type-escape.c (scan_for_regs): Cast according to the coding
	conventions.
	* ipa-utils.c (searchc): Likewise. Avoid using C++ keywords as variable
	names.
	(ipa_utils_reduced_inorder): Likewise. Use type safe memory macros.
	* ipa-utils.h (struct ipa_dfa_info): Avoid using C++ keywords as
	variable names.

From-SVN: r126140
2007-06-30 10:52:30 +00:00
Andrew Pinski 23512eb32c Add forgotten PR number to the last changelog entry:
2007-06-29  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        PR middle-end/30024
        * emit-rtl.c (init_emit_once): Intilize const_tiny_rtx[0]
        for complex modes (both int and real).

From-SVN: r126137
2007-06-29 19:21:57 -07:00
Andrew Pinski e90721b110 emit-rtl.c (init_emit_once): Intilize const_tiny_rtx[0] for complex modes (both int and real).
2007-06-29  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        * emit-rtl.c (init_emit_once): Intilize const_tiny_rtx[0]
        for complex modes (both int and real).

From-SVN: r126136
2007-06-29 19:20:25 -07:00
Jan Hubicka 874d7c2f29 * cse.c: Rever accidentally comitted TODO_verify_rtl_sharing change.
From-SVN: r126130
2007-06-29 23:18:16 +00:00
Jan Hubicka acff804059 re PR rtl-optimization/32372 (ICE in df_refs_verify, at df-scan.c:4065)
PR middle-end/32372
	* cse.c (cse_insn): Avoid invalid sharing in between register note and
	the insn pattern.

From-SVN: r126122
2007-06-29 20:13:41 +00:00
Anatoly Sokolov 4e63b362a7 re PR target/32335 (libgcc build failure, ICE in cselib_record_set, at cselib.c:1508)
PR target/32335
	* config/avr/avr.c: Include dataflow header file.
	(expand_prologue): Adjust for prologue insn change.
	* config/avr/avr.md (call_prologue_saves): Only modify REG_SP once
	inside a insn.

From-SVN: r126121
2007-06-30 00:05:56 +04:00
Daniel Jacobowitz 8edd82f2b3 Correct date.
From-SVN: r126114
2007-06-29 14:28:19 +00:00
Richard Guenther 42f6e2ec11 re PR middle-end/32493 (Fails to inline varargs function with unused arguments)
2006-06-29  Richard Guenther  <rguenther@suse.de>

	PR middle-end/32493
	* gimplify.c (gimplify_call_expr): Ignore variable argument parts
	during type verification.

	* gcc.dg/inline-23.c: New testcase.

From-SVN: r126113
2007-06-29 13:43:10 +00:00
Jan Hubicka 29fbecf33f * recog.c (validate_change_rtx_1): Unshare TO argument.
From-SVN: r126112
2007-06-29 10:41:48 +00:00
Uros Bizjak b40c4f6816 re PR tree-optimization/24659 (Conversions are not vectorized)
PR tree-optimization/24659
	* tree-vect-transform.c (vectorizable_call): Handle
	(nunits_in == nunits_out / 2) and (nunits_out == nunits_in / 2) cases.

	* config/i386/sse.md (vec_pack_sfix_v2df): New expander.
	* config/i386/i386.c (enum ix86_builtins)
	[IX86_BUILTIN_VEC_PACK_SFIX]: New constant.
	(struct bdesc_2arg) [__builtin_ia32_vec_pack_sfix]: New builtin
	description.
	(ix86_init_mmx_sse_builtins): Define all builtins with 2 arguments as
	const using def_builtin_const.
	(ix86_expand_binop_builtin): Remove bogus assert() that insn wants
	input operands in the same modes as the result.
	(ix86_builtin_vectorized_function): Handle BUILT_IN_LRINT.

testsuite/ChangeLog:

	PR tree-optimization/24659
	* gcc.target/i386/vectorize2.c: New test.
	* gcc.target/i386/sse2-lrint-vec.c: New runtime test.
	* gcc.target/i386/sse2-lrintf-vec.c: Ditto.

From-SVN: r126111
2007-06-29 12:30:06 +02:00
Richard Sandiford 27178277a3 df-problems.c (df_set_unused_notes_for_mw): Fix formatting.
gcc/
	* df-problems.c (df_set_unused_notes_for_mw): Fix formatting.
	(df_set_dead_notes_for_mw): Likewise.

From-SVN: r126109
2007-06-29 07:05:23 +00:00
Eric Botcazou 280f1ffa27 c-common.c (pointer_int_sum): Do the negation in sizetype.
* c-common.c (pointer_int_sum): Do the negation in sizetype.

From-SVN: r126108
2007-06-29 06:11:17 +00:00
DJ Delorie 58ef0ffacc * config/m32c/m32c.h (OVERRIDE_OPTIONS): Omit unneeded semicolon.
From-SVN: r126092
2007-06-28 16:26:19 -04:00
Geoffrey Keating ddbfd28de9 Index: gcc/ChangeLog
2007-06-21  Geoffrey Keating  <geoffk@apple.com>

	* doc/invoke.texi (C++ Dialect Options): Document
	fvisibility-ms-compat.
	* c.opt (fvisibility-ms-compat): New.

Index: gcc/cp/ChangeLog
2007-06-21  Geoffrey Keating  <geoffk@apple.com>

	* decl2.c (determine_visibility): Implement
	flag_visibility_ms_compat effect on type info.
	* decl.c (cxx_init_decl_processing): Implement
	global effect of flag_visibility_ms_compat.

Index: gcc/testsuite/ChangeLog
2007-06-26  Geoffrey Keating  <geoffk@apple.com>

	* g++.dg/ext/visibility/ms-compat-1.C: New.

From-SVN: r126088
2007-06-28 19:31:45 +00:00
Andrew Pinski f46fe0e64c re PR middle-end/32417 (416.gamess ICEs (in aff_combination_add_elt, tree-affine.c))
2007-06-28  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        PR tree-opt/32417
        * tree-affine.c (aff_combination_add_elt): Handle
        pointer addition specially.

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

        PR tree-opt/32417
        * gfortran.fortran-torture/compile/pr32417.f90: New test.

From-SVN: r126082
2007-06-28 12:03:49 -07:00
Jakub Jelinek 8aa19d9599 [multiple changes]
2007-06-28  Jakub Jelinek  <jakub@redhat.com>

	* config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Ensure
	decl is non-external for AIX ABI.

2007-06-28  David Edelsohn  <edelsohn@gnu.org>

	* config/rs6000/predicates.md (current_file_function_operand):
	Ensure the symbol is non-external for AIX ABI.

From-SVN: r126076
2007-06-28 13:28:13 +02:00
Nick Clifton 6ae4be32f1 common.opt (fipa-matrix-reorg): Add Optimization attribute.
* common.opt (fipa-matrix-reorg): Add Optimization attribute.
  (fdce, fdse, fpredictive-commoning): Likewise.

From-SVN: r126073
2007-06-28 09:30:57 +00:00
Francois-Xavier Coudert 86db887aa6 re PR other/31400 (enable static linking of support libraries through -static-libXY)
PR other/31400

	* gcc.c (process_command): Recognize the new -static-libgfortran
	option.

	* lang.opt (static-libgfortran): New option.
	* gfortranspec.c (ADD_ARG_LIBGFORTRAN): New macro.
	(Option): Add OPTION_static and OPTION_static_libgfortran.
	(lookup_option): Handle the new -static-libgfortran option.
	(lang_specific_driver): Check whether -static is passed.
	Handle the new -static-libgfortran option.
	* options.c (gfc_handle_option): If -static-libgfortran is
	passed and isn't supported on this configuration, error out.

From-SVN: r126068
2007-06-27 22:58:37 +00:00
Rask Ingemann Lambertsen 99920b6fbb re PR target/32418 (ICE in global_alloc, at global.c:514)
2007-06-27  Rask Ingemann Lambertsen  <rask@sygehus.dk>

	PR target/32418
	* config/m32c/m32c.c (m32c_eh_return_stackadj_rtx): Dataflow fix:
	Use a call clobbered hard reg instead of a pseudo reg.

From-SVN: r126067
2007-06-27 22:23:35 +00:00
Kaz Kojima 2c19a53652 sh.md (load_gbr): Use correct operand constraint.
* config/sh/sh.md (load_gbr): Use correct operand constraint.

From-SVN: r126066
2007-06-27 22:18:59 +00:00
Kaz Kojima ba56ed6517 re PR target/32479 ([sh] ICE in cse_extended_basic_block, at cse.c:6117)
PR target/32479
	* config/sh/sh.md (udivsi3): Don't wrap the sequence with
	REG_LIBCALL and REG_RETVAL notes.
	(divsi3, mulsi3): Likewise.
	(mulhisi3): Likewise.  Use emit_libcall_block.
	(umulhisi3, smulsi3_highpart, umulsi3_highpart_i): Likewise.

From-SVN: r126065
2007-06-27 21:40:19 +00:00
Eric Botcazou 20de4d9913 Fix nits.
From-SVN: r126062
2007-06-27 19:56:56 +00:00
Seongbae Park 531ba5d285 re PR target/32481 (ICE in df_refs_verify, at df-scan.c:4058)
2007-06-27  Seongbae Park  <seongbae.park@gmail.com>

	PR rtl-optimization/32481
	* combine.c (adjust_for_new_dest): Rescan the changed insn.

From-SVN: r126058
2007-06-27 18:17:15 +00:00
Richard Sandiford b40b217257 dce.c (deletable_insn_p_1): New function, split out from...
gcc/
	* dce.c (deletable_insn_p_1): New function, split out from...
	(deletable_insn_p): ...here.  Only treat bare USEs and CLOBBERs
	specially, not those inside PARALLELs.  Remove BODY argument
	and adjust recursive call accordingly.
	(prescan_insns_for_dce): Update call to delete_insn_p.

From-SVN: r126056
2007-06-27 14:37:05 +00:00
Richard Guenther 3b35764639 re PR middle-end/32492 (attribute always_inline -> sorry, unimplemented: recursive inlining)
2007-06-27  Richard Guenther  <rguenther@suse.de>

	PR middle-end/32492
	* tree.h (fold_convertible_p): Declare.
	* fold-const.c (fold_convertible_p): New function.
	* gimplify.c (gimplify_call_expr): Use fold_convertible_p
	instead of lang_hooks.types_compatible_p.

	* gcc.dg/inline-22.c: New testcase.

From-SVN: r126054
2007-06-27 14:01:27 +00:00
Jan Hubicka 95e88efd10 fwprop.c (try_fwprop_subst): Use validate_unshare_change.
* fwprop.c (try_fwprop_subst): Use validate_unshare_change.
	* postreload.c (reload_cse_simplify_set): Instead of copying the rtx
	early use validate_unshare_change.
	(reload_combine): Likewise.
	* recog.c (change_t): New field unshare.
	(validate_change_1): Rename from validate_change; add argument unshare.
	(validate_change): Turn into wrapper of validate_change_1; update
	prototype for bools.
	(validate_unshare_change): New.
	(confirm_change_group): Unshare changes if asked for; avoid unnecesary
	calls of df_insn_rescan.
	* recog.h (validate_change): Replace ints by bools.
	(validate_unshare_change): Declare.

From-SVN: r126050
2007-06-27 01:21:13 +00:00
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