Commit Graph

32865 Commits

Author SHA1 Message Date
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