Commit Graph

32894 Commits

Author SHA1 Message Date
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
Uros Bizjak 837a895482 i386.c (override_options): Merge TARGET_SSE4_2 and TARGET_ABM handling of x86_popcnt variable.
* config/i386/i386.c (override_options): Merge TARGET_SSE4_2 and
	TARGET_ABM handling of x86_popcnt variable.

From-SVN: r125570
2007-06-08 13:34:56 +02:00
Uros Bizjak 5513e23973 extend.texi (X86 Built-in Functions): Document __builtin_fabsq, __builtin_copysignq and __builtin_infq built-in functions.
* doc/extend.texi (X86 Built-in Functions): Document __builtin_fabsq,
	__builtin_copysignq and __builtin_infq built-in functions.

From-SVN: r125569
2007-06-08 13:22:44 +02:00
Uros Bizjak 291d9a2db0 extend.texi (X86 Built-in Functions): Add missing `@item's in SSE4.2 section.
* doc/extend.texi (X86 Built-in Functions): Add missing `@item's in
	SSE4.2 section.  Correct built-in function names in SSE4A section.

From-SVN: r125568
2007-06-08 13:08:12 +02:00
Uros Bizjak 459e691ae8 re PR tree-optimization/32243 (ICE in vectorizable_type_promotion, at tree-vect-transform.c:2890)
PR tree-optimization/32243
	* tree-vect-transform.c (vectorizable_type_promotion): Move check
	for ncopies after ratio check between nunits_out and nunits_in.
	(vectorizable_type_demotion): Remove single-use variable "scalar_type".

testsuite/ChangeLog:
	
	PR tree-optimization/32243
	* gcc.dg/vect/vect.exp: Add support for -O3 tests.  Reset default
	flags for -Os tests.
	* gcc.dg/vect/03-vect-pr32243.c: New test.

From-SVN: r125567
2007-06-08 11:06:46 +02:00
Dorit Nuzman 0d2665809f re PR tree-optimization/32224 (ICE in vect_analyze_operations, at tree-vect-analyze.c:374)
PR tree-optimization/32224
        * tree-vect-analyze.c (vect_determine_vectorization_factor): Fail
        vectorization upon a non GIMPLE_MODIFY_STMT.

From-SVN: r125566
2007-06-08 08:57:54 +00:00
Christian Bruel 4aa97413d3 re PR target/29953 ([SH-4] Perfomance regression in loops. cmp/eq used instead of dt)
PR target/29953
* config/sh/sh.md (doloop_end): New pattern and splitter.
* loop-iv.c (simple_rhs_p): Check for hardware registers.

From-SVN: r125564
2007-06-08 09:58:41 +02:00
Zdenek Dvorak 1fc3998daa re PR middle-end/32209 (Boot failure Comparing stages 2 and 3 with --disable-checking)
PR middle-end/32209
	* dominance.c (debug_dominance_tree, debug_dominance_tree_1): New
	functions.
	(verify_dominators): Do not change dominance tree.

From-SVN: r125563
2007-06-08 07:28:50 +00:00
Kaz Kojima 32a7ab3d80 constraints.md: New file.
* config/sh/constraints.md: New file.
	* config/sh/sh.c: Include tm-constrs.h.
	(reg_class_from_letter): Remove.
	(prepare_cbranch_operands): Use satisfies_constraint_*
	function instead of macro.
	(andcosts, broken_move, sh_secondary_reload): Likewise.
	* config/sh/predicates.md (trapping_target_operand): Likewise.
	(and_operand, arith_operand, arith_reg_or_0_operand,
	cmp_operand, logical_operand, target_operand,
	ua_address_operand, ua_offset, xor_operand): Likewise.
	* config/sh/sh.md: Include constraints.md.
	(*movsicc_t_false): Use satisfies_constraint_* function
	instead of macro.
	(*movsicc_t_true, ashlsi3_std, ashlhi3_k, lshrsi3_m,
	lshrsi3_k, movsi_const_16bit+2, *movhi_media+1,
	movdi_const_16bit+1, beq, bne, *ptb): Likewise.
	* config/sh/sh.h (reg_class_from_letter): Remove prototype.
	(OVERRIDE_OPTIONS): Don't modify reg_class_from_letter.
	(REG_CLASS_FROM_CONSTRAINT): Remove.
	(CONSTRAINT_LEN, CONST_OK_FOR_I20, CONST_OK_FOR_I,
	CONST_OK_FOR_J, CONST_OK_FOR_K16, CONST_OK_FOR_K,
	CONST_OK_FOR_P27, CONST_OK_FOR_P, CONST_OK_FOR_M,
	CONST_OK_FOR_N, CONST_OK_FOR_CONSTRAINT_P,
	CONST_DOUBLE_OK_FOR_LETTER_P): Likewise.
	(SECONDARY_INOUT_RELOAD_CLASS): Use satisfies_constraint_*
	function instead of macro.
	(SECONDARY_INPUT_RELOAD_CLASS): Likewise.
	(EXTRA_CONSTRAINT_Q, EXTRA_CONSTRAINT_A,
	EXTRA_CONSTRAINT_Bsc, EXTRA_CONSTRAINT_B,
	EXTRA_CONSTRAINT_Css, EXTRA_CONSTRAINT_Csu): Remove.
	(IS_PC_RELATIVE_LOAD_ADDR_P): New macro.
	(IS_LITERAL_OR_SYMBOLIC_S16_P): Likewise.
	(IS_LITERAL_OR_SYMBOLIC_U16_P): Likewise.
	(IS_NON_EXPLICIT_CONSTANT_P): Likewise.
	(EXTRA_CONSTRAINT_Csy, EXTRA_CONSTRAINT_Z, EXTRA_CONSTRAINT_W,
	EXTRA_CONSTRAINT_Cpg, EXTRA_CONSTRAINT_C,
	EXTRA_MEMORY_CONSTRAINT, EXTRA_CONSTRAINT_Sr0,
	EXTRA_CONSTRAINT_Sua, EXTRA_CONSTRAINT_S,
	EXTRA_CONSTRAINT_STR): Likewise.
	(GO_IF_LEGITIMATE_INDEX): Fix indentation.

From-SVN: r125561
2007-06-08 06:59:55 +00:00
Geoffrey Keating 2734e1c321 darwin.h (STACK_BOUNDARY): Define.
* config/i386/darwin.h (STACK_BOUNDARY): Define.

Co-Authored-By: Hui-May Chang <hm.chang@apple.com>

From-SVN: r125555
2007-06-08 03:22:56 +00:00
Simon Martin c1ae8be51f re PR c++/30759 (initializer-list accepted for object of non-POD type)
gcc/

2007-06-07  Simon Martin  <simartin@users.sourceforge.net>

	PR c++/30759
	* c-common.h (flag_cpp0x): Replaced by...
	(cxx_dialect): ... this new variable specifying the C++ dialect that
	is used.
	* c-common.c (flag_cpp0x): Removed.
	(cxx_dialect): Defined.
	* c-cppbuiltin.c (c_cpp_builtins): flag_cpp0x rewritten in terms of
	cxx_dialect.
	* c-opts.c (c_common_post_options): Likewise.
	(set_std_cxx98): Set cxx_dialect to cxx98.
	(set_std_cxx0x): Set cxx_dialect to cxx0x.

gcc/cp/

2007-06-07  Simon Martin  <simartin@users.sourceforge.net>

	PR c++/30759
	* decl.c (check_initializer): Report an error when a brace enclosed
	initializer is used for a non-aggregate type in C++98.
	(redeclaration_error_message): Rewrote flag_cpp0x in terms of
	cxx_dialect.
	(grokdeclarator): Likewise.
	(move_fn_p): Likewise.
	* typeck.c (check_return_expr): Likewise.
	* call.c (reference_binding): Likewise.
	* error.c (cp_cpp_error): Likewise.
	* pt.c (check_default_tmpl_args): Likewise.
	(tsubst): Likewise.
	* lex.c (init_reswords): Likewise.
	* parser.c (p_parser_primary_expression): Likewise.
	(TOKEN_PRECEDENCE): Likewise.
	(cp_parser_init_declarator): Likewise.
	(cp_parser_ptr_operator): Likewise.
	(cp_parser_parameter_declaration): Likewise.
	(cp_parser_enclosed_template_argument_list): Likewise.
	(cp_parser_skip_to_end_of_template_parameter_list): Likewise.
	(cp_parser_next_token_ends_template_argument_p): Likewise.

gcc/testsuite/

2007-06-07  Simon Martin  <simartin@users.sourceforge.net>

	PR c++/30759
	* g++.dg/init/brace6.C: New test.

From-SVN: r125539
2007-06-07 19:59:33 +00:00
Geoffrey Keating e46b55d038 Index: ChangeLog
2007-06-06  Geoffrey Keating  <geoffk@apple.com>
	    Hui-May Chang <hm.chang@apple.com>

	* doc/invoke.texi (Darwin Options): Update documentation for
	-mmacosx-version-min.
	* config.gcc (*-*-darwin*): Set extra_gcc_objs.
	* config/darwin-driver.c: New file.
	* config/darwin.h (GCC_DRIVER_HOST_INITIALIZATION): New.
	* config/t-darwin (darwin-driver.o): New rule.

	* config/darwin-c.c (version_as_macro): Ignore low digit.

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

	* gcc.dg/darwin-minversion-3.c: New.

Co-Authored-By: Hui-May Chang <hm.chang@apple.com>

From-SVN: r125537
2007-06-07 18:56:51 +00:00
Uros Bizjak edc5bbcd8f i386.md (standard sse constant splitter): Handle TFmode.
* config/i386/i386.md (standard sse constant splitter): Handle TFmode.
        (negtf2, abstf2, *absnegtf2_sse): New insn patterns.
        (CSGNMODE): New mode macro.
        (CSGNVMODE): New mode attribute.
        (copysign<mode>3): Rename from copysingsf3 and copysigndf3.  Macroize
        expander using CSGNMODE mode macro.  Handle TFmode.
        (copysign<mode>3_const): Rename from copysignsf3_const and
        copysigndf3_const.  Macroize pattern using CSGNMODE mode macro.
        Handle TFmode.
        (copysign<mode>3_var): Rename from copysignsf3_var and
        copysigndf3_var.  Macroize pattern using CSGNMODE mode macro.
        Handle TFmode.
        (copysign<mode>3_var splitter): Macroize pattern using CSGNMODE
        mode macro.  Handle TFmode.
        * config/i386/sse.md (andtf3, *andtf3, *nandtf3): New insn patterns.
        (iortf3, *iortf3): Ditto.
        (xortf3, *xortf3): Ditto.
        * config/i386/i386.c (ix86_build_signbit_mask): Create scalar
        TFmode and TImode masks.
        (ix86_expand_copysign): Expand TFmode copysign insn.
        (IX86_BUILTIN_INFQ): New.
        (IX86_BUILTIN_FABSQ): Ditto.
        (IX86_BUILTIN_COPYSIGNQ): Ditto.
        (ix86_init_mmx_sse_builtins) [__builtin_infq]: New builtin definition.
        [__builtin_fabsq]: Ditto.
        [__builtin_copysignq]: Ditto.
        (ix86_expand_builtin) [IX86_BUILTIN_INFQ]: Expand builtin.
        [IX86_BUILTIN_FABSQ]: Expand builtin using ix86_expand_unop_builtin().
        [IX86_BUILTIN_COPYSIGNQ]: Expand builtin using
        ix86_expand_unop_builtin().

testsuite/ChangeLog:
    
        * gcc.target/i386/builtin-copysign.c: New test.

From-SVN: r125535
2007-06-07 20:31:40 +02:00
Bob Wilson 125253d945 * config/xtensa/lib1funcs.asm: Clean up whitespace.
From-SVN: r125534
2007-06-07 18:27:42 +00:00
Steve Ellcey bb27eeda7d re PR target/31850 (gcc.c-torture/compile/limits-fnargs.c is slow at compiling for spu-elf)
PR target/31850
	* rtl.h (push_to_sequence2): New.
	* emit-rtl.c (push_to_sequence2): New.
	* function.c (assign_parm_data_all): Add new fields.
	(assign_parm_setup_block): Call push_to_sequence2 instead of 
	push_to_sequence.
	(assign_parm_setup_reg): Ditto.
	(assign_parm_setup_stack): Ditto.
	(assign_parms_unsplit_complex): Ditto.
	(assign_parms): Change field name.

From-SVN: r125532
2007-06-07 16:46:26 +00:00
Zdenek Dvorak 1b0cfaa6a8 re PR tree-optimization/32220 (internal compiler error: in eliminate_temp_copies, at tree-predcom.c:1937)
PR tree-optimization/32220
	* tree-predcom.c (eliminate_temp_copies): Handle the case that loop
	phi node is reached before defining statement.

	* gfortran.dg/predcom-2.f: New testcase.

From-SVN: r125531
2007-06-07 15:34:40 +00:00
Andrew Pinski 1344284efa re PR tree-optimization/32231 (Segfault in verify_ssa_name)
2007-06-06  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        PR tree-opt/32231
        * tree-vect-transform.c (vectorizable_call): Call update_stmt
        after changing the right hand side of the assignment.

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

        PR tree-opt/32231
        * gcc.target/i386/vectorize4.c: New test.

From-SVN: r125521
2007-06-06 19:12:31 -07:00
Eric Christopher 7a1eca8375 config.gcc (i?86-*-darwin*): Remove arch parameter.
2007-06-06  Eric Christopher  <echristo@apple.com>

	    * config.gcc (i?86-*-darwin*): Remove arch parameter.
	    (x86_64-*-darwin*): Ditto.
	    * config/i386/darwin.h (TARGET_SUBTARGET32_ISA_DEFAULT): Define.
	    (TARGET_SUBTARGET64_ISA_DEFAULT): Ditto.

From-SVN: r125508
2007-06-06 22:43:49 +00:00
Thomas Neumann c22940cd7c tree-ssa-alias-warnings.c (maybe_add_match): Cast according to the coding conventions.
* tree-ssa-alias-warnings.c (maybe_add_match): Cast according to the
	coding conventions.
	(add_key): Likewise.
	* tree-ssa.c (init_tree_ssa): Use type safe memory macros.
	* tree-ssa-ccp.c (ccp_fold_builtin): Avoid using C++ keywords as
	variable names.
	* tree-ssa-coalesce.c (find_coalesce_pair): Use type safe memory macros.
	(add_cost_one_coalesce): Likewise.
	* tree-ssa-copy.c (merge_alias_info): Avoid using C++ keywords as
	variable names. Rename orig to orig_name for consistency.
	* tree-ssa-dom.c (dom_thread_across_edge): Cast according to the coding
	conventions.
	(cprop_into_successor_phis): Avoid using C++ keywords as variable names.
	(record_equivalences_from_stmt): Likewise.
	* tree-ssa-dse.c (dse_initialize_block_local_data): Cast according to
	the coding conventions.
	(memory_ssa_name_same): Likewise.
	(dse_optimize_stmt): Likewise.
	(dse_record_phis): Likewise.
	(dse_finalize_block): Likewise.
	* tree-ssa-loop-im.c (outermost_invariant_loop_expr): Avoid using C++
	keywords as variable names.
	(may_move_till): Cast according to the coding conventions.
	(force_move_till_expr): Avoid using C++ keywords as variable names.
	(force_move_till): Cast according to the coding conventions.
	(memref_hash): Likewise.
	(memref_eq): Likewise.
	(gather_mem_refs_stmt): Likewise.
	* tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Avoid using C++
	keywords as variable names.
	(idx_find_step): Cast according to the coding conventions.
	(idx_record_use): Likewise.
	(find_depends): Likewise.
	(prepare_decl_rtl): Likewise.
	(mbc_entry_hash): Likewise.
	(mbc_entry_eq): Likewise.
	* tree-ssa-loop-niter.c (SWAP): Use the correct the type for tmp.
	(simplify_replace_tree): Avoid using C++ keywords as variable names.
	(idx_infer_loop_bounds): Cast according to the coding conventions.
	* tree-ssa-loop-prefetch.c (idx_analyze_ref): Likewise.
	* tree-ssa-math-opts.c (occ_new ): Likwise.
	* tree-ssanames.c (duplicate_ssa_name_ptr_info): Use type safe memory
	macros.
	* tree-ssa-operands.c (add_def_op): Avoid using C++ keywords as variable
	names.
	(add_use_op): Likewise.
	(add_vop): Likewise.
	(add_vuse_op): Likewise.
	(add_vdef_op): Likewise.
	(get_expr_operands): Likewise.
	(push_stmt_changes): Use type safe memory macros.
	* tree-ssa-phiopt.c (replace_phi_edge_with_variable): Avoid using C++
	keywords as variable names.
	(conditional_replacement): Likewise.
	(minmax_replacement): Likewise.
	(abs_replacement): Likewise.
	* tree-ssa-pre.c (create_expression_by_pieces): Cast according to the
	coding conventions.
	(insert_fake_stores): Avoid using C++ keywords as variable names.
	* tree-ssa-reassoc.c (add_to_ops_vec): Cast according to the coding
	conventions.
	* tree-ssa-structalias.c (heapvar_lookup): Likewise.
	(heapvar_insert): Use type safe memory macros.
	(new_var_info): Cast according to the coding conventions.
	(new_constraint): Likewise.
	(remove_preds_and_fake_succs): Use type safe memory macros.
	* tree-ssa-threadupdate.c (thread_block): Cast according to the coding
	conventions.
	(thread_single_edge): Likewise.

From-SVN: r125504
2007-06-06 20:18:47 +00:00
Eric Christopher d6b0b376ea i386.c (override_options): Move handling of TARGET_SUBTARGET* earlier.
2007-06-06  Eric Christopher  <echristo@apple.com>

        * config/i386/i386.c (override_options): Move handling
        of TARGET_SUBTARGET* earlier.

From-SVN: r125497
2007-06-06 18:39:25 +00:00
Paolo Bonzini 7258e976ea genmodes.c (tagged_printf, [...]): Don't use %n on printf.
2007-06-06  Paolo Bonzini  <bonzini@gnu.org>

	* genmodes.c (tagged_printf, emit_insn_modes_h): Don't
	use %n on printf.

From-SVN: r125494
2007-06-06 15:43:29 +00:00
Zdenek Dvorak a7b87f730f haifa-sched.c (restore_bb_notes): Clear bb field of the notes emited outside of basic block.
* haifa-sched.c (restore_bb_notes): Clear bb field of the notes
	emited outside of basic block.
	* cfgbuild.c (find_bb_boundaries): Clear bb field for insns between
	the created blocks.
	* rtl.h (delete_insn_chain): Declaration changed.
	* cfgrtl.c (delete_insn_chain): Add option to clear bb field for
	non-removed insns.
	(rtl_delete_block, rtl_merge_blocks): Pass true to delete_insn_chain.
	(delete_insn_chain_and_edges, try_redirect_by_replacing_jump,
	rtl_tidy_fallthru_edge, cfg_layout_merge_blocks): Pass false 
	to delete_insn_chain.
	(rtl_verify_flow_info_1): Verify that the insns in header and footer
	do not have bb field set.
	(rtl_verify_flow_info): Verify that insns between basic blocks do not
	have bb field set.
	* recog.c (peephole2_optimize): Add argument to delete_insn_chain call.
	* cfgcleanup.c (try_optimize_cfg): Ditto.

From-SVN: r125492
2007-06-06 14:46:34 +00:00
Thomas Neumann 45222d4a3d lambda-code.c (struct lambda_lattice_s): Add a name to the struct.
* lambda-code.c (struct lambda_lattice_s): Add a name to the struct.
	(lambda_body_vector_new): Use type safe memory macros.
	(lambda_linear_expression_new): Likewise.
	(lambda_loopnest_new): Likewise.
	(lambda_lattice_new): Likewise.
	(replace_uses_equiv_to_x_with_y): Cast according to the coding
	conventions. Use type safe memory macros.
	* lambda.h (struct lambda_trans_matrix_s): Add a name to the struct.
	(lambda_body_vector_s): Likewise.
	* lambda-mat.c (lambda_matrix_new): Use type safe memory macros.
	* lambda-trans.c (lambda_trans_matrix_new): Likewise.

From-SVN: r125491
2007-06-06 14:33:57 +00:00
Richard Biener 68c834d087 tree-ssa-forwprop.c (forward_propagate_into_cond): Return 2 if we need to schedule cfg_cleanup.
2007-06-06  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-forwprop.c (forward_propagate_into_cond): Return 2
	if we need to schedule cfg_cleanup.
	(tree_ssa_forward_propagate_single_use_vars): Do so.

From-SVN: r125490
2007-06-06 13:58:41 +00:00
Ian Lance Taylor 39ac2ffc71 fold-const.c (merge_ranges): If range_successor or range_predecessor fail, just return 0.
./:	* fold-const.c (merge_ranges): If range_successor or
	range_predecessor fail, just return 0.
testsuite/:
	* g++.dg/conversion/enum1.C: New test.

From-SVN: r125486
2007-06-06 13:56:00 +00:00
Uros Bizjak 9f106823dc re PR tree-optimization/32216 (ICE: verify_stmts failed (invalid reference prefix) with -ftree-vectorize)
PR tree-optimization/32216
	* tree-vectorizer.c (supportable_widening_operation): Determine
	signedness of FIX_TRUNC_EXPR from output operand.
	(supportable_narrowing_operation): Ditto.
	* tree-vect-generic.c (expand_vector_operations_1): Determine
	signedness of VEC_UNPACK_FLOAT_HI_EXPR and VEC_UNPACK_FLOAT_LO_EXPR
	from input operand.

testsuite/ChangeLog:
	
	PR tree-optimization/32216
	* gcc.dg/vect/pr32216.c: New test.

From-SVN: r125482
2007-06-06 14:12:32 +02:00
Thomas Neumann 9415ab7da8 i386.c (enum pta_flags): Move out of struct scope...
* config/i386/i386.c (enum pta_flags): Move out of struct scope...
	(struct pta): ...from here. Change flags to unsigned to avoid excessive
	casting (as it is used as a bit mask).
	(override_options): Add casts according to the coding convenventions.
	(x86_64_elf_unique_section): Likewise.
	(examine_argument): Avoid using C++ keywords as variable names.
	(construct_container): Likewise.
	(legitimize_pic_address): Likewise.
	(get_dllimport_decl): Cast according to the coding conventions. Use
	type safe memory macros.
	(legitimize_address): Cast according to the coding conventions.
	(emit_i387_cw_initialization): Corrected the type of slot to enum
	ix86_stack_slot.
	(ix86_init_machine_status): Use type safe memory macros.
	(bdesc_pcmpestr): Use UNKNOWN instead of integer 0.
	(bdesc_pcmpistr): Likewise.
	(bdesc_crc32): Likewise.
	(bdesc_sse_3arg): Likewise.
	(bdesc_2arg): Likewise.
	(bdesc_1arg): Likewise.
	(ix86_expand_sse_pcmpestr): Cast according to the coding conventions.
	(ix86_expand_sse_pcmpistr): Likewise.
	(ix86_expand_vec_set_builtin): Use EXPAND_NORMAL instead of integer 0.
	(ix86_builtin_vectorized_function): Change the type of fn to unsigned
	int to match the langhook definition.
	(ix86_builtin_conversion): Change the type of code to unsigned init to
	match the langhook definition.
	(ix86_preferred_reload_class): Avoid using C++ keywords as variable
	names.
	(ix86_preferred_output_reload_class): Likewise.
	(ix86_cannot_change_mode_class): Likewise.
	(ix86_memory_move_cost): Likewise.
	(ix86_rtx_costs): Cast the outer_code parameter to enum rtx_code to
	avoid excessive casting later on.
	(x86_output_mi_thunk): Avoid using C++ keywords as variable names.

From-SVN: r125357
2007-06-06 08:02:56 +00:00
Uros Bizjak f28eb39cee sse.md (sse4_2_pcmpestr_cconly): Prefer pcmpestrm as flags setting insn.
* config/i386/sse.md (sse4_2_pcmpestr_cconly): Prefer pcmpestrm
	as flags setting insn.
	(sse4_2_pcmpistr_cconly): Prefer pcmpistrm as flags setting insn.

	* config/i386/i386.md (UNSPEC_ROUNDP, UNSPEC_ROUNDS): Remove.
	(UNSPEC_ROUND): New.
	("sse4_1_round<mode>2"): New insn pattern.
	("rint<mode>2"): Expand using "sse4_1_round<mode>2" pattern for
	SSE4.1 targets.
	("floor<mode>2"): Rename from floordf2 and floorsf2.  Macroize
	expander using SSEMODEF mode macro.  Expand using
	"sse4_1_round<mode>2" pattern for SSE4.1 targets.
	("ceil<mode>2"): Rename from ceildf2 and ceilsf2.  Macroize
	expander using SSEMODEF mode macro.  Expand using
	"sse4_1_round<mode>2" pattern for SSE4.1 targets.
	("btrunc<mode>2"): Rename from btruncdf2 and btruncsf2.  Macroize
	expander using SSEMODEF mode macro.  Expand using
	"sse4_1_round<mode>2" pattern for SSE4.1 targets.
	* config/i386/sse.md ("sse4_1_roundpd", "sse4_1_roundps"): Use
	UNSPEC_ROUND instead of UNSPEC_ROUNDP.
	("sse4_1_roundsd", "sse4_1_roundss"): Use UNSPEC_ROUND instead of
	UNSPEC_ROUNDS.

From-SVN: r125356
2007-06-06 08:53:29 +02:00
Jan Sjodin 69f2880c76 lambda.h (build_linear_expr): New.
* lambda.h (build_linear_expr): New.
	* lambda-code.c (lbv_to_gcc_expression, lle_to_gcc_expression): 
	Use build_linear_expr, call fold and force_gimple_operand.
	(lambda_loopnest_to_gcc_loopnest): Check that there is
	something to insert.
	* testsuite/gcc.dg/tree-ssa/ltrans-6.c: New.


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

From-SVN: r125355
2007-06-06 06:08:58 +00:00
Joerg Wunsch f7fd775f02 re PR preprocessor/23479 (Implement binary constants with a "0b" prefix)
2007-06-05  Joerg Wunsch  <j.gnu@uriah.heep.sax.de>

	PR preprocessor/23479
gcc/
	* doc/extend.texi: Document the 0b-prefixed binary integer
	constant extension.

libcpp/
	* expr.c (cpp_classify_number): Implement 0b-prefixed binary
	integer constants.
	(append_digit): Likewise.
	* include/cpplib.h: Add CPP_N_BINARY, to be used for 0b-prefixed
	binary integer constants.

testsuite/
	* testsuite/gcc.dg/binary-constants-1.c: Add test suites for
	the 0b-prefixed binary integer constants.
	* testsuite/gcc.dg/binary-constants-2.c: Ditto.
	* testsuite/gcc.dg/binary-constants-3.c: Ditto.
	* testsuite/gcc.dg/binary-constants-4.c: Ditto.

From-SVN: r125346
2007-06-05 22:25:27 +00:00
Uros Bizjak 1a5f8b894c re PR tree-optimization/32215 (ICE in supportable_narrowing_operation, at tree-vectorizer.c:1907)
PR tree-optimization/32215
        * tree-vectorizer.c (supportable_widening_operation): Return false
        for unsupported FIX_TRUNC_EXPR tree code.
        (supportable_narrowing_operation): Ditto for FLOAT_EXPR tree code.

From-SVN: r125343
2007-06-05 22:23:58 +02:00
Nathan Froyd 52ff33d0eb rs6000.h (FIXED_SCRATCH): Use r0 as a scratch register on SPE targets.
* config/rs6000/rs6000.h (FIXED_SCRATCH): Use r0 as a scratch
	register on SPE targets.  Change documentation to reflect
	reality.
	* config/rs6000/rs6000.c (rs6000_conditional_register_usage):
	Change FIXED_SCRATCH to 14 and document why we're keeping r14
	out of the register allocation pool.
	(rs6000_reg_live_or_pic_offset_p): New function.
	(rs6000_emit_prologue): Move the actual saving of LR up to free
	r0 for holding r11.  Split saving of SPE 64-bit registers into
	its own case.  Ensure that offsets will always be in-range for
	'evstdd' by using r11 as a scratch register to point at the start
	of the SPE save area.  Save r11 if necessary, as it is the static
	chain register.
	(rs6000_emit_epilogue): Split restoring of SPE 64-bit registers
	into its own case.  Ensure that offsets will always be in-range
	for 'evldd' by using r11 as a scratch register to point at the
	start of the SPE save area.  Also adjust r11 when restoring
	the stack pointer to compensate for pre-loading r11.

From-SVN: r125340
2007-06-05 19:46:23 +00:00
Thomas Neumann 7fc40a9c9c typo
From-SVN: r125338
2007-06-05 16:16:23 +00:00
Thomas Neumann ae50c0cbc8 cfg.c (init_flow): Use type safe memory macros.
* cfg.c (init_flow): Use type safe memory macros.
	(alloc_block): Likewise.
	(unchecked_make_edge): Likewise.
	(dump_flow_info): Avoid using C++ keywords as variable names.
	(copy_original_table_clear): Cast according to the coding conventions.
	(copy_original_table_set): Likewise.
	* cfgexpand (label_rtx_for_bb): Likewise.
	(expand_gimüle_basic_block): Likewise.
	* cfghooks.c (dump_bb): Likewise.
	(lv_adjust_loop_header_phi): Avoid using C++ keywords as variable names.
	(lv_add_condition_to_bb): Likewise.
	* cfglayout (relink_block_chain): Cast according to the coding
	conventions.
	(fixup_reorder_chain): Likewise.
	(fixup_fallthru_exit_predecessor): Likewise.
	* cfgloop.c (glb_enum_p): Likewise.
	(get_exit_description): Likewise.
	(dump_recorded_exit): Likewise.
	* cfgloop.h (enum loop_estimation): Move out of struct scope...
	(struct loop): ... from here.
	* cfgloopmanip (rpe_enum_p): Cast according to the coding conventions.
	* cfgrtl.c (rtl_create_basic_block): Likewise.
	(rtl_split_block): Likewise.
	(rtl_dump_bb): Likewise.
	(cfg_layout_split_block): Likewise.
	(init_rtl_bb_info): Use typesafe memory macros.

	* graphds.h (struct graph_edge): Renamed edge to graph_edge.
	* graphds.h: Updated all usages of edge to graph_edge.
	* graphds.c: Likewise.
	* cfgloopanal.c: Likewise.

From-SVN: r125336
2007-06-05 15:41:04 +00:00
Ian Lance Taylor 3fe5bcaf11 tree-vrp.c (compare_values_warnv): Check TREE_NO_WARNING on a PLUS_EXPR or MINUS_EXPR node before setting...
./:	* tree-vrp.c (compare_values_warnv): Check TREE_NO_WARNING on a
	PLUS_EXPR or MINUS_EXPR node before setting *strict_overflow_p.
	(extract_range_from_assert): Set TREE_NO_WARNING when creating an
	expression.
	(test_for_singularity): Likewise.
testsuite/:
	* gcc.dg/Wstrict-overflow-19.c: New test.

From-SVN: r125334
2007-06-05 13:18:22 +00:00
H.J. Lu a176d60f9d constraints.md ("Y2"): Replaced by ...
2007-06-05  H.J. Lu  <hongjiu.lu@intel.com>

	* config/i386/constraints.md ("Y2"): Replaced by ...
	("Yt"): This.
	* config/i386/i386.md: Likewise.
	* config/i386/mmx.md: Likewise.
	* config/i386/sse.md: Likewise.

From-SVN: r125333
2007-06-05 05:54:41 -07:00
H.J. Lu c3b9a8d688 constraints.md ("z"): Replaced by ...
2007-06-05  H.J. Lu  <hongjiu.lu@intel.com>

	* config/i386/constraints.md ("z"): Replaced by ...
	("Y0"): This.
	* config/i386/sse.md (sse4_1_blendvpd): Likewise.
	(sse4_1_blendvps): Likewise.
	(sse4_1_pblendvb): Likewise.
	(sse4_2_pcmpestr): Likewise.
	(sse4_2_pcmpestrm): Likewise.
	(sse4_2_pcmpestr_cconly): Likewise.
	(sse4_2_pcmpistr): Likewise.
	(sse4_2_pcmpistrm): Likewise.
	(sse4_2_pcmpistr_cconly): Likewise.

Move testsuite ChangeLog to testsuite/ChangeLog.

From-SVN: r125332
2007-06-05 05:53:27 -07:00
Razya Ladelsky b8ff1d5bbb matrix-reorg.c (transform_access_sites): Fix computation.
2007-06-05  Razya Ladelsky  <razya@il.ibm.com>

        * matrix-reorg.c (transform_access_sites): Fix computation.
        (transform_allocation_sites): Same.
        * testsuite/gcc.dg/matrix/matrix-6.c: Remove conversion.

From-SVN: r125331
2007-06-05 10:48:33 +00:00
Uros Bizjak cc55c4b074 i386.c (override_options): Use TARGET_SUBTARGET32_ISA_DEFAULT to select default ix86_isa_flags.
* config/i386/i386.c (override_options): Use
	TARGET_SUBTARGET32_ISA_DEFAULT to select default ix86_isa_flags.

From-SVN: r125328
2007-06-05 08:44:17 +02:00
Uros Bizjak cb4828955f md (reg_not_xmm0_operand): New predicate.
* config/i386/predicates/md (reg_not_xmm0_operand): New predicate.
	(nonimm_not_xmm0_operand): Ditto.
	* config/i386/sse.md ("sse4_1_blendvpd"): Use "reg_not_xmm0_operand"
	as operand[0] and operand[1] predicate.  Use "nonimm_not_xmm0_operand"
	as operand[2] predicate.  Require "z" class XMM register for
	operand[3].  Adjust asm template.
	("sse4_1_blendvpd"): Ditto.
	("sse4_1_pblendvb"): Ditto.
 	* config/i386/i386.c (ix86_expand_sse_4_operands_builtin): Do not
	force op2 into xmm0 register for variable blend instructions.

From-SVN: r125327
2007-06-05 07:35:39 +02:00
Tom Tromey 7114359fb6 c-tree.h (start_enum): Update.
* c-tree.h (start_enum): Update.
	(build_enumerator): Likewise.
	* c-decl.c (enum_next_value): Removed.
	(enum_overflow): Likewise.
	(start_enum): Add c_enum_contents argument.  Don't use globals.
	(build_enumerator): Likewise.
	* c-tree.h (struct c_enum_contents): New struct.

From-SVN: r125322
2007-06-04 23:19:19 +00:00
Tom Tromey 762f7d9d8a * c-common.c (c_common_get_alias_set): Fix indentation.
From-SVN: r125321
2007-06-04 22:13:40 +00:00
Ian Lance Taylor 9a46cc164c tree-vrp.c (adjust_range_with_scev): When loop is not expected to overflow, reduce overflow infinity to regular infinity.
./:	* tree-vrp.c (adjust_range_with_scev): When loop is not expected
	to overflow, reduce overflow infinity to regular infinity.
	(vrp_var_may_overflow): New static function.
	(vrp_visit_phi_node): Check vrp_var_may_overflow.
testsuite/:
	* gcc.dg/Wstrict-overflow-18.c: New test.

From-SVN: r125319
2007-06-04 21:56:10 +00:00
Kazu Hirata b9d493510e * stor-layout.c (layout_type): Remove duplicate code.
From-SVN: r125318
2007-06-04 21:29:01 +00:00
Uros Bizjak 8de7ef2a87 re PR c/32191 (ICE with complex __float128)
PR c/32191
        * gcc/c-common.c (c_define_builtins): Call targetm.init_builtins ()
        before build_common_builtin_nodes ().

testsuite/ChangeLog:

        PR c/32191
        * gcc.dg/pr32191.c: New test.

From-SVN: r125314
2007-06-04 22:07:37 +02:00
Steve Ellcey 15eb3a2e59 re PR target/31733 (ICE in rtl_verify_flow_info, at cfgrtl.c:2050: {return_internal} (nil))
PR target/31733
	* cfgrtl.c (rtl_verify_flow_info): Skip notes when looking for barrier.

From-SVN: r125312
2007-06-04 15:58:12 +00:00
Jan Hubicka c443019c4d tree-predcom.c (replace_ref_with, [...]): Call build_gimple_modify_stmt instead of _stat version.
* tree-predcom.c (replace_ref_with, initialize_root_vars_lm,
	reassociate_to_the_same_stmt): Call build_gimple_modify_stmt
	instead of _stat version.

From-SVN: r125308
2007-06-04 07:20:01 +00:00
Zdenek Dvorak 49379cb193 re PR tree-optimization/32194 (ice for legal code with -O3 with complex in loop)
PR tree-optimization/32194
	* tree-predcom.c (determine_offset): Check that both references have
	the same type.

From-SVN: r125298
2007-06-03 19:21:12 +00:00
Zdenek Dvorak 66f97d31f2 cfgloopmanip.c (remove_path, [...]): Change dom_bbs to vector.
* cfgloopmanip.c (remove_path, loopify, duplicate_loop_to_header_edge):
	Change dom_bbs to vector.  Add argument to iterate_fix_dominators call.
	* loop-unroll.c (unroll_loop_runtime_iterations): Ditto.
	* tree-cfg.c (tree_duplicate_sese_region): Change doms to vector.
	Add argument to iterate_fix_dominators call.
	(remove_edge_and_dominated_blocks): Pass vector to bbs_to_fix_dom.
	* gcse.c (hoist_code): Change domby to vector.
	* cfghooks.c (make_forwarder_block): Change doms_to_fix to vector.
	Add argument to iterate_fix_dominators call.
	* loop-doloop.c (doloop_modify): Changed recount_dominator to
	recompute_dominator.
	* lambda-code.c (perfect_nestify): Ditto.
	* cfgloopanal.c: Include graphds.h.
	(struct edge, struct vertex, struct graph, dump_graph, new_graph,
	add_edge, dfs, for_each_edge, free_graph): Moved to graphds.c.
	(mark_irreducible_loops): Use graphds_scc.  Remove argument from
	add_edge call.
	* graphds.c: New file.
	* graphds.h: New file.
	* dominance.c: Include vecprim.h, pointer-set.h and graphds.h.
	(get_dominated_by, get_dominated_by_region): Change return type to
	vector.
	(verify_dominators): Recompute all dominators and compare the results.
	(recount_dominator): Renamed to ...
	(recompute_dominator): ... this.  Do not check that the block is
	dominated by entry.
	(iterate_fix_dominators): Reimplemented.
	(prune_bbs_to_update_dominators, root_of_dom_tree,
	determine_dominators_for_sons): New functions.
	* et-forest.c (et_root): New function.
	* et-forest.h (et_root): Declare.
	* Makefile.in (graphds.o): Add.
	(cfgloopanal.o): Add graphds.h dependency.
	(dominance.o): Add graphds.h, vecprim.h and pointer-set.h dependency.
	* basic-block.h (get_dominated_by, get_dominated_by_region,
	iterate_fix_dominators): Declaration changed.
	(recount_dominator): Renamed to ...
	(recompute_dominator): ... this.
	* tree-ssa-threadupdate.c (thread_block): Free dominance info.
	(thread_through_all_blocks): Do not free dominance info.

From-SVN: r125297
2007-06-03 19:10:44 +00:00
Andreas Schwab b6a9c30c80 m68k.c (override_options): Don't override REAL_MODE_FORMAT.
* config/m68k/m68k.c (override_options): Don't override
	REAL_MODE_FORMAT.
	* config/m68k/m68k-modes.def (SF, DF): Define to use
	motorola_single_format and motorola_double_format, resp.
	* real.c (motorola_single_format): Renamed from
	coldfire_single_format.
	(motorola_double_format): Renamed from coldfire_double_format.
	(encode_ieee_extended): Generate a proper canonical NaN image
	respecting canonical_nan_lsbs_set.
	(ieee_extended_motorola_format): Set canonical_nan_lsbs_set to
	true.
	* real.h: Adjust declarations.

From-SVN: r125295
2007-06-03 14:32:43 +00:00
Kaz Kojima 439211a08d re PR target/32163 (Compiling with stack protector causes reigster spill failure)
PR target/32163
	* config/sh/sh.md (symGOT_load): Don't schedule insns when
	the symbol is generated with the stack protector.

From-SVN: r125292
2007-06-03 04:38:52 +00:00
Kazu Hirata 2bccb817ce m68k.c (m68k_attribute_table): Add "interrupt".
* config/m68k/m68k.c (m68k_attribute_table): Add "interrupt".
	(m68k_get_function_kind): Return m68k_fk_interrupt_handler on
	"interrupt".
	* doc/extend.texi (interrupt): Mention m68k.

From-SVN: r125290
2007-06-03 00:43:21 +00:00
Uros Bizjak 57d47da6b8 revert: sse.md ("sse4_1_blendvpd"): Require "z" class XMM register for operand[3].
Revert:

 2007-06-02  Uros Bizjak  <ubizjak@gmail.com>
 
       * config/i386/sse.md ("sse4_1_blendvpd"): Require "z" class XMM
       register for operand[3].  Adjust asm template.
       ("sse4_1_blendvpd"): Ditto.
       ("sse4_1_pblendvb"): Ditto.
        * config/i386/i386.c (ix86_expand_sse_4_operands_builtin): Do not
       force operands[3] into xmm0 register for variable blend instructions.

From-SVN: r125285
2007-06-02 20:29:03 +02:00
H.J. Lu 8cdf2fb9d6 Fix a typo in ChangeLog.
From-SVN: r125284
2007-06-02 10:44:29 -07:00
Uros Bizjak c7a69424c9 i386.md ("sse4_1_blendvpd"): Require "z" class XMM register for operand[3].
* config/i386/i386.md ("sse4_1_blendvpd"): Require "z" class XMM
        register for operand[3].  Adjust asm template.
        ("sse4_1_blendvpd"): Ditto.
        ("sse4_1_pblendvb"): Ditto.
        * config/i386/i386.c (ix86_expand_sse_4_operands_builtin): Call
        safe_vector_operand() if input operand is VECTOR_MODE_P operand. Do not
        force operands[3] into xmm0 register for variable blend instructions.
        (ix86_expand_sse_pcmpestr): Do not check operands for
        "register_operand", when insn operand predicate is "register_operand".
        (ix86_expand_sse_pcmpistr): Ditto.

From-SVN: r125280
2007-06-02 14:49:07 +02:00
H.J. Lu 06f4e35d82 i386.h (enum reg_class): New.
* config/i386/i386.h (enum reg_class) [SSE_FIRST_REG]: New.
        (SSE_CLASS_P): Use reg_class_subset_p between SSE_REGS.
        (REG_CLASS_NAMES): Add "FIRST_SSE_REG" string.
        (REG_CLASS_CONTENTS): Add members of FIRST_SSE_REG class.
        * config/i386/constraints.md ("z"): New register constraint
        for members of SSE_FIRST_REG class.
        * config/i386/i386-modes.def (CCA, CCC, CCO, CCS): New compare modes.
        * config/i386/i386.c (regclass_map): Change class of %xmm0 to
        SSE_FIRST_REG class.
        (put_condition_code) [EQ, NE]: Output suffixes for new compare modes.
        (ix86_cc_modes_compatible): Handle CCA, CCC, CCO and CCS modes.
        (IX86_BUILTIN_PCMPESTRI128): New for SSE4.2.
        (IX86_BUILTIN_PCMPESTRM128): Likewise.
        (IX86_BUILTIN_PCMPESTRA128): Likewise.
        (IX86_BUILTIN_PCMPESTRC128): Likewise.
        (IX86_BUILTIN_PCMPESTRO128): Likewise.
        (IX86_BUILTIN_PCMPESTRS128): Likewise.
        (IX86_BUILTIN_PCMPESTRZ128): Likewise.
        (IX86_BUILTIN_PCMPISTRI128): Likewise.
        (IX86_BUILTIN_PCMPISTRM128): Likewise.
        (IX86_BUILTIN_PCMPISTRA128): Likewise.
        (IX86_BUILTIN_PCMPISTRC128): Likewise.
        (IX86_BUILTIN_PCMPISTRO128): Likewise.
        (IX86_BUILTIN_PCMPISTRS128): Likewise.
        (IX86_BUILTIN_PCMPISTRZ128): Likewise.
        (struct builtin_description): Change "flag" field to unsigned.
        (bdesc_pcmpestr): New builtin description table.
        (bdesc_pcmpistr): Likewise.
        (ix86_init_mmx_sse_builtins): Define int_ftype_v16qi_int_v16qi_int_int,
        v16qi_ftype_v16qi_int_v16qi_int_int and int_ftype_v16qi_v16qi_int.
        Initialize pcmp[ei]str[im] insns for SSE4.2.
        (ix86_expand_sse_pcmpestr): New subroutine of ix86_expand_builtin.
        (ix86_expand_sse_pcmpistr): Likewise.
        (ix86_expand_builtin): Expand pcmp[ei]str[im] builtins for SSE4.2.
        * config/i386/i386.md (UNSPEC_PCMPESTR): New for SSE4.2.
        (UNSPEC_PCMPISTR): Likewise.
        * config/i386/sse.md (sse4_2_pcmpestr): New insn patern and splitter.
        (sse4_2_pcmpestri):New isns pattern.
        (sse4_2_pcmpestrm): Likewise.
        (sse4_2_pcmpestr_cconly): Likewise.
        (sse4_2_pcmpistr): New insn patern and splitter.
        (sse4_2_pcmpistri):New isns pattern.
        (sse4_2_pcmpistrm): Likewise.
        (sse4_2_pcmpistr_cconly): Likewise.
        * config/i386/smmintrin.h: Enable pcmp[ei]str[im] intrinsics
        in SSE4.2.


Co-Authored-By: Uros Bizjak <ubizjak@gmail.com>

From-SVN: r125279
2007-06-02 11:07:00 +02:00
David Daney adb04511e3 mips.c (mips_output_mi_thunk): Only load gp if not LOADGP_ABSOLUTE and not binds_local_p.
* config/mips/mips.c (mips_output_mi_thunk): Only load gp if not
	LOADGP_ABSOLUTE and not binds_local_p.

From-SVN: r125276
2007-06-02 04:27:40 +00:00
Geoffrey Keating 648beecdcd darwin.h (LINK_SPEC): Pass -fpie through to the linker.
2007-06-01  Geoffrey Keating  <geoffk@apple.com>

	* config/darwin.h (LINK_SPEC): Pass -fpie through to the linker.

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

	* gcc.dg/pie-link.c: New test.

From-SVN: r125270
2007-06-01 22:58:14 +00:00
Ian Lance Taylor e07e405d7b tree-vrp.c (compare_name_with_value): Always set used_strict_overflow if we get a result from the variable itself.
./:	* tree-vrp.c (compare_name_with_value): Always set
	used_strict_overflow if we get a result from the variable itself.
testsuite/:
	* gcc.dg/Wstrict-overflow-17.c: New test.

From-SVN: r125269
2007-06-01 22:47:02 +00:00
Ian Lance Taylor 0374328683 re PR rtl-optimization/31455 (lower subreg causes a performance regression in the inner loop sometimes)
PR rtl-optimization/31455
	* lower-subreg.c (find_decomposable_subregs): Don't decompose
	subregs which have a cast between modes which are not tieable.

From-SVN: r125265
2007-06-01 15:06:19 +00:00
Uros Bizjak b7e6d1da6e expr.c (force_operand): Remove breaks after return statements.
* expr.c (force_operand) [DIV, MOD, UDIV, UMOD, ASHIFTRT]: Remove
	breaks after return statements.

From-SVN: r125259
2007-06-01 07:59:23 +02:00
Kaz Kojima 5e77c6f932 sh.c (fpscr_set_from_mem): Call get_free_reg only after no_new_pseudos.
* config/sh/sh.c (fpscr_set_from_mem): Call get_free_reg
	only after no_new_pseudos.

From-SVN: r125258
2007-06-01 04:58:23 +00:00
Eric Christopher ed1223badd expr.c (convert_move): Assert that we don't have a BLKmode operand.
2007-05-31  Eric Christopher  <echristo@apple.com>

	* expr.c (convert_move): Assert that we don't have a BLKmode
	operand.
	(store_expr): Handle BLKmode moves by calling emit_block_move.

From-SVN: r125246
2007-06-01 00:08:26 +00:00
Daniel Berlin 2c751309df in gcc/ 2007-05-31 Daniel Berlin <dberlin@dberlin.org>
in gcc/
2007-05-31  Daniel Berlin  <dberlin@dberlin.org>

	* c-typeck.c (build_indirect_ref): Include type in error message.
	(build_binary_op): Pass types to binary_op_error.
	* c-common.c (binary_op_error): Take two type arguments, print out
	types with error.
	* c-common.h (binary_op_error): Update prototype.
In gcc/cp
2007-05-31  Daniel Berlin  <dberlin@dberlin.org>

	* typeck.c (build_binary_op): Include types in error.

From-SVN: r125239
2007-05-31 20:58:29 +00:00
H.J. Lu 6847c43d73 i386.c: Correct coments on -mno-sse4.
2007-05-31  H.J. Lu  <hongjiu.lu@intel.com>

	* config/i386/i386.c: Correct coments on -mno-sse4.

From-SVN: r125238
2007-05-31 13:50:51 -07:00
H.J. Lu 3b8dd0716f config.gcc (i[34567]86-*-*): Add nmmintrin.h to extra_headers.
2007-05-31  H.J. Lu  <hongjiu.lu@intel.com>

	* config.gcc (i[34567]86-*-*): Add nmmintrin.h to
	extra_headers.
	(x86_64-*-*): Likewise.

	* config/i386/i386.c (OPTION_MASK_ISA_MMX_UNSET): New.
	(OPTION_MASK_ISA_3DNOW_UNSET): Likewise.
	(OPTION_MASK_ISA_SSE_UNSET): Likewise.
	(OPTION_MASK_ISA_SSE2_UNSET): Likewise.
	(OPTION_MASK_ISA_SSE3_UNSET): Likewise.
	(OPTION_MASK_ISA_SSSE3_UNSET): Likewise.
	(OPTION_MASK_ISA_SSE4_1_UNSET): Likewise.
	(OPTION_MASK_ISA_SSE4_2_UNSET): Likewise.
	(OPTION_MASK_ISA_SSE4): Likewise.
	(OPTION_MASK_ISA_SSE4_UNSET): Likewise.
	(OPTION_MASK_ISA_SSE4A_UNSET): Likewise.
	(ix86_handle_option): Use OPTION_MASK_ISA_*_UNSET.  Handle
	SSE4.2.
	(override_options): Support SSE4.2.
	(ix86_build_const_vector): Support SImode and DImode.
	(ix86_build_signbit_mask): Likewise.
	(ix86_expand_int_vcond): Support V2DImode.
	(IX86_BUILTIN_CRC32QI): New for SSE4.2.
	(IX86_BUILTIN_CRC32HI): Likewise.
	(IX86_BUILTIN_CRC32SI): Likewise.
	(IX86_BUILTIN_CRC32DI): Likewise.
	(IX86_BUILTIN_PCMPGTQ): Likewise.
	(bdesc_crc32): Likewise.
	(bdesc_sse_3arg): Likewise.
	(ix86_expand_crc32): Likewise.
	(ix86_init_mmx_sse_builtins): Support SSE4.2.
	(ix86_expand_builtin): Likewise.

	* config/i386/i386.h (TARGET_CPU_CPP_BUILTINS): Define
	__SSE4_2__ for -msse4.2.

	* config/i386/i386.md (UNSPEC_CRC32): New for SSE4.2.
	(CRC32MODE): Likewise.
	(crc32modesuffix): Likewise.
	(crc32modeconstraint): Likewise.
	(sse4_2_crc32<mode>): Likewise.
	(sse4_2_crc32di): Likewise.

	* config/i386/i386.opt (msse4.2): New for SSE4.2.
	(msse4): Likewise.

	* config/i386/nmmintrin.h: New. The dummy SSE4.2 intrinsic header
	file.

	* config/i386/smmintrin.h: Add SSE4.2 intrinsics.

	* config/i386/sse.md (sse4_2_gtv2di3): New pattern for
	SSE4.2.
	(vcond<mode>): Use SSEMODEI instead of SSEMODE124.
	(vcondu<mode>): Likewise.

	* doc/extend.texi: Document SSE4.2 built-in functions.

	* doc/invoke.texi: Document -msse4.2/-msse4.

From-SVN: r125236
2007-05-31 12:52:24 -07:00
Zdenek Dvorak 2664efb66b re PR tree-optimization/32160 (ICE with -O3 in verify_ssa)
PR tree-optimization/32160
	* tree-predcom.c (predcom_tmp_var): New function.  Mark created
	variable as gimple reg.
	(initialize_root_vars, initialize_root_vars_lm): Use predcom_tmp_var.

	* gfortran.dg/predcom-1.f: New test.

From-SVN: r125228
2007-05-31 16:27:05 +00:00
Kazu Hirata 01e4dd0dad gcc.c (main): Don't consider linker options when issuing the warning about a linker input...
* gcc.c (main): Don't consider linker options when issuing the
	warning about a linker input file not being used.

From-SVN: r125226
2007-05-31 14:48:06 +00:00
Ralf Wildenhues 3b7bab4d68 * tree-vrp.c (compare_names): Initialize sop.
From-SVN: r125203
2007-05-30 22:51:22 +00:00
Dirk Mueller 62090afbfb cgraphunit.c (cgraph_analyze_function): Remove computation of inline parameters.
* cgraphunit.c (cgraph_analyze_function): Remove
        computation of inline parameters.

From-SVN: r125202
2007-05-30 22:22:43 +00:00
Uros Bizjak b42f4d620b * config/i386/darwin.h (TARGET_SUBTARGET_DEFAULT): Undef before define.
From-SVN: r125198
2007-05-30 22:07:06 +02:00
Richard Sandiford 9403b7f7ca config.gcc (arm-wrs-vxworks): Remove dbxelf.h from tm_file.
gcc/
	* config.gcc (arm-wrs-vxworks): Remove dbxelf.h from tm_file.
	Add vx-common.h.  Include vxworks.h between vx-common.h and
	arm/vxworks.h.
	* config/vx-common.h (DWARF2_UNWIND_INFO): Undefine before
	redefining.
	* config/vxworks.h (TARGET_ASM_CONSTRUCTOR): Likewise.
	(TARGET_ASM_DESTRUCTOR): Likewise.
	* config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Check arm_arch_xscale
	instead of arm_is_xscale.  Use VXWORKS_OS_CPP_BUILTINS.
	(OVERRIDE_OPTIONS, SUBTARGET_CPP_SPEC): Define.
	(CC1_SPEC): Add -tstrongarm.  Line up backslashes.
	(VXWORKS_ENDIAN_SPEC): Define.
	(ASM_SPEC): Add VXWORKS_ENDIAN_SPEC.
	(LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Redefine to their
	VXWORKS_* equivalents.
	(LINK_SPEC): Likewise, but add VXWORKS_ENDIAN_SPEC.
	(ASM_FILE_START): Delete.
	(TARGET_VERSION): Reformat.
	(FPUTYPE_DEFAULT, FUNCTION_PROFILER): Define.
	(DEFAULT_STRUCTURE_SIZE_BOUNDARY): Define.
	* config/arm/t-vxworks (LIB1ASMSRC, LIB1ASMFUNCS): Define.
	(FPBIT, DPBIT): Define.
	(fp-bit.c, dp-bit.c): New rules.
	(MULTILIB_OPTIONS): Add strongarm, -mrtp and -mrtp/-fPIC multilibs.
	(MULTILIB_MATCHES, MULTILIB_EXCEPTIONS): Define.
	* config/arm/arm-protos.h (arm_emit_call_insn): Declare.
	* config/arm/arm.h: Include vxworks-dummy.h.
	* config/arm/arm.c (arm_elf_asm_constructor, arm_elf_asm_destructor):
	Mark with ATTRIBUTE_UNUSED.
	(arm_override_options): Do not allow VxWorks RTP PIC to be used
	for Thumb.  Force r9 to be the PIC register for VxWorks RTPs and
	make it incompatible with -msingle-pic-base.
	(arm_function_ok_for_sibcall): Return false for calls that might
	go through a VxWorks PIC PLT entry.
	(require_pic_register): New function, split out from...
	(legitimize_pic_address): ...here.  Do not use GOTOFF accesses
	for VxWorks RTPs.
	(arm_load_pic_register): Handle the VxWorks RTP initialization
	sequence.  Use pic_reg as a shorthand for cfun->machine->pic_reg.
	(arm_emit_call_insn): New function.
	(arm_assemble_integer): Do not use GOTOFF accesses for VxWorks RTP.
	* config/arm/arm.md (UNSPEC_PIC_OFFSET): New unspec number.
	(pic_offset_arm): New pattern.
	(call, call_value): Use arm_emit_call_insn.
	(call_internal, call_value_internal): New expanders.
	* config/arm/lib1funcs.asm (__PLT__): Define to empty for
	VxWorks unless __PIC__.

From-SVN: r125196
2007-05-30 19:04:09 +00:00
Eric Christopher 5abc5de971 genrecog.c: Include regs.h in generated file.
2007-05-30  Eric Christopher  <echristo@gmail.com>

	* genrecog.c: Include regs.h in generated file.
	* genemit.c: Ditto. Fix up formatting.
	* config/mn10300/constraints.md: New.
	* config/mn10300/mn10300.md: Include.
	* config/mn10300/mn10300.c(mn10300_secondary_reload_class):
	Fix up for removed macro.
	* config/mn10300/predicates.md (call_address_operand):  Ditto.
	* config/mn10300/mn10300.h (REG_CLASS_FROM_LETTER): Delete.
	(CONST_OK_FOR_I): Ditto.
	(CONST_OK_FOR_J): Ditto.
	(CONST_OK_FOR_K): Ditto.
	(CONST_OK_FOR_L): Ditto.
	(CONST_OK_FOR_M): Ditto.
	(CONST_OK_FOR_N): Ditto.
	(CONST_DOUBLE_OK_FOR_LETTER_P): Ditto.
	(OK_FOR_Q): Ditto.
	(OK_FOR_R): Ditto.
	(OK_FOR_T): Ditto.
	(EXTRA_CONSTRAINT): Ditto.

From-SVN: r125192
2007-05-30 17:07:58 +00:00
Uros Bizjak 853a33f384 i386.h (MASK_64BIT, [...]): Remove defines.
* config/i386/i386.h (MASK_64BIT, MASK_MMX, MASK_3DNOW*, MASK_SSE*):
	Remove defines.
	* config/i386/biarch.h (TARGET_64BIT_DEFAULT): Define to
	OPTION_MASK_ISA_64BIT.
	* config/i386/i386.c: Rename MASK_* macros to OPTION_MASK_ISA_*.

From-SVN: r125189
2007-05-30 16:44:35 +02:00
Richard Guenther fa13976560 re PR middle-end/32152 (omp lowering creates mismatched types)
2007-05-30  Richard Guenther  <rguenther@suse.de>

	PR middle-end/32152
	* gimplify.c (gimplify_omp_atomic_pipeline): Use correct
	types for comparison.
	* fold-const.c (fold_comparison): Call maybe_canonicalize_comparison
	with original typed arguments.
	* config/i386/i386.c (ix86_gimplify_va_arg): Fix type mismatches.

From-SVN: r125187
2007-05-30 14:11:06 +00:00
Jakub Jelinek 722ba5eeac re PR tree-optimization/31769 (ICE with OpenMP and exceptions)
PR tree-optimization/31769
	* except.c (duplicate_eh_regions): Clear prev_try if
	ERT_MUST_NOT_THROW region is inside of ERT_TRY region.

	* g++.dg/gomp/pr31769.C: New test.

From-SVN: r125183
2007-05-30 15:46:25 +02:00
Zdenek Dvorak 1896570321 tree-scalar-evolution.c (scev_const_prop): Do not create labels.
* tree-scalar-evolution.c (scev_const_prop): Do not create labels.
	* tree-ssa-sink.c (statement_sink_location): Return basic block and
	bsi of the location where statements should be inserted.
	(sink_code_in_bb): Take bsi from statement_sink_location.
	* lambda-code.c (lambda_loopnest_to_gcc_loopnest): Use bsi_after_labels
	instead of bsi_start.
	* tree-profile.c (tree_gen_ic_func_profiler): Pass BSI_NEW_STMT to
	bsi_insert_after.
	* tree-cfg.c (bsi_move_after): Pass BSI_NEW_STMT to bsi_insert_after.
	(bsi_move_before): Document inconsistency with bsi_move_after.
	(tree_redirect_edge_and_branch): Do not create labels if not necessary.

From-SVN: r125181
2007-05-30 13:29:51 +00:00
Uros Bizjak 0a1c5e5520 i386.h (TARGET_ABM): New define.
* config/i386/i386.h (TARGET_ABM): New define.
	(TARGET_POPCNT): Ditto.
	(TARGET_64BIT, TARGET_MMX, TARGET_3DNOW, TARGET_3DNOW_A, TARGET_SSE*):
	New temporary defines to redefine from OPTION_ISA_* defines.
	(MASK_64BIT, MASK_MMX, MASK_3DNOW, MASK_3DNOW_A, MASK_SSE*):
	New temporary defines to redefine from OPTION_MASK_ISA_* defines.
	(ix86_isa_flags): New extern int declaration.
	(TARGET_SUBTARGET_DEFAULT): New define.
	(TARGET_SUBTARGET_ISA_DEFAULT): Ditto.
	(TARGET_SUBTARGET32_DEFAULT): Ditto.
	(TARGET_SUBTARGET32_ISA_DEFAULT): Ditto.
	(TARGET_SUBTARGET64_ISA_DEFAULT): Ditto.
	* config/i386/unix.h: Undef TARGET_SUBTARGET_DEFAULT before define.
	* config/i386/darwin.h: Change TARGET_64BIT define to
	OPTION_ISA_64BIT.

	* config/i386/i386.opt (m3dnowa): Define as undocumented option
	using existing "ix86_isa_flags" varible.
	(m32, m64): Use existing "ix86_isa_flags" variable.
	(mmmx, m3dnow): Ditto.
	(msse, msse2, msse3, mssse3, msse4.1, msse4a): Ditto.
	(mabm): Define as non-negative option using "x86_abm" variable.
	(mpopcnt): Define as non-negative option using "x86_popcnt" variable.

	* config/i386/i386.c (ix86_arch_features) [X86_ARCH_CMOVE]:
	Rewrite feature test bitmap.
	(ix86_isa_flags): New initialized global int varible.
	(ix86_isa_flags_explicit): New static int variable.
	(ix86_handle_option): Set "ix86_isa_flags_explicit" when mmmx, m3dnow,
	msse, msse2, msse3, msse4.1 and msse4a option is processed.  Change
	i86_isa_flags and ix86_isa_flags_explicit, not target_flags and
	target_flags_explicit.
	(override_options): Remove "target_enable" and "target_disable" fields
	from "struct ptt". Update processor_target_table accordingly. Remove
	PTA_PREFETCH_SSE from processor_alias_table entry if PTE_SSE is
	defined and rearrange PTA_* bits.  Use "ix86_isa_flags" instead of
	"target_flags" and "ix86_isa_flags_explicit" instead of
	"target_flags_explicit" when masked with MASK_64BIT, MASK_MMX,
	MASK_3DNOW, MASK_3DNOW_A or MASK_SSE*.  Set "x86_abm" to true when
	PTA_ABM is set in processor_alias_table flags entry.  Set "x86_popcnt"
	to true when either of PTA_POPCNT or PTA_ABM is set in
	processor_alias_table flags entry.  Set "x86_prefetch_sse" to true
	when either of PTA_PREFETCH_SSE or PTA_SSE is set in
	processor_alias_table flags entry.  Remove handling of
	"target_enable" and "target_disable" fields of processor_target_table.
	Mask "target_flags" with TARGET_SUBTARGET32_DEFAULT for 32-bit
	targets or with TARGET_SUBTARGET64_DEFAULT for 64-bit targets.
	Mask "ix86_isa_flags" with TARGET_SUBTARGET32_ISA_DEFAULT for 32-bit
	targets or with TARGET_SUBTARGET64_ISA_DEFAULT for 64-bit targets.
	(def_builtin): Mask "mask" variable with "ix86_isa_flags", not
	"target_flags".
	(TARGET_DEFAULT_TARGET_FLAGS): Do not include TARGET_64BIT_DEFAULT.

From-SVN: r125180
2007-05-30 13:24:32 +02:00
David Daney e440de0e40 re PR target/31975 (segfault in try_split on mips during bootstrap)
PR gcc/31975
	* config/mips/mips.c (mips_output_mi_thunk): Emit
	NOTE_INSN_PROLOGUE_END at beginning of the thunk.

From-SVN: r125178
2007-05-30 04:21:24 +00:00
Hui-May Chang f2f0a9602a i386.c (ix86_function_regparm): Added checking of ix86_force_align_arg_pointer to determine the number of...
* config/i386/i386.c (ix86_function_regparm): Added checking of 
	ix86_force_align_arg_pointer to determine the number of
	register parameters.
	* gcc.target/i386/stack-realign.c: New.

From-SVN: r125173
2007-05-29 22:49:42 +00:00
Zdenek Dvorak 5417e0224b tree-vectorizer.h (DR_MISALIGNMENT): Cast aux to integer.
* tree-vectorizer.h (DR_MISALIGNMENT): Cast aux to integer.
	(SET_DR_MISALIGNMENT): New.
	* tree-vect-analyze.c (vect_compute_data_ref_alignment,
	vect_update_misalignment_for_peel, vect_enhance_data_refs_alignment):
	Use SET_DR_MISALIGNMENT.
	* tree-predcom.c (split_data_refs_to_components): Cast dr->aux from
	pointer.
	* tree-data-ref.c (create_data_ref, compute_all_dependences,
	find_loop_nest): Export.
	* tree-data-ref.h (struct data_reference): Change aux field to pointer.
	(create_data_ref, compute_all_dependences, find_loop_nest): Declare.
	* tree-ssa-loop-prefetch.c: Include tree-data-ref.h.
	(L1_CACHE_SIZE_BYTES, L2_CACHE_SIZE_BYTES, NONTEMPORAL_FRACTION):
	New macros.
	(struct mem_ref): Add field reuse_distance.
	(find_or_create_group, record_ref): Use XNEW instead of xcalloc.
	Initialize reuse_distance field.
	(issue_prefetch_ref): Select temporality of prefetch according to
	reuse_distance.
	(volume_of_references, volume_of_dist_vector, add_subscript_strides,
	self_reuse_distance, determine_loop_nest_reuse): New functions.
	(loop_prefetch_arrays): Call determine_loop_nest_reuse.
	(tree_ssa_prefetch_arrays): Dump L2 cache size.
	* Makefile.in (tree-ssa-loop-prefetch.o): Add TREE_DATA_REF_H
	dependency.

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

From-SVN: r125172
2007-05-29 21:55:47 +00:00
Daniel Berlin 6e2dc028a3 tree-ssa-alias.c: Add aliasing overview.
2007-05-29  Daniel Berlin  <dberlin@dberlin.org>

	* tree-ssa-alias.c: Add aliasing overview.

From-SVN: r125162
2007-05-29 13:09:30 +00:00
Zuxy Meng 9bd196f0e3 re PR target/29498 (FTZ/DAZ for SSE should be ported to mingw32)
libgcc 
	PR target/29498
	* config.host (i[34567]86-*-cygwin* | i[34567]86-*-mingw*) Add
	crtfastmath.o to extra_parts.  Add i386/t-crtfm to tmake_file.
	* config/i386/t-crtfm: Compile crtfastmath.o with
	-minline-all-stringops.

gcc

	PR target/29498
	* config/i386/t-crtfm: Compile crtfastmath.o with
	-minline-all-stringops.
	* config/i386/cygwin.h (ENDFILE_SPECS): Add crtfastmath.o.
	* config/i386/mingw32.h (ENDFILE_SPECS): Add crtfastmath.o.


Co-Authored-By: Danny Smith <dannysmith@users.sourceforge.net>

From-SVN: r125160
2007-05-29 08:09:16 +00:00
John David Anglin 8119b4e4bb md.texi: Document constraints on HP PA-RISC.
* doc/md.texi: Document constraints on HP PA-RISC.

From-SVN: r125158
2007-05-29 01:12:58 +00:00
John David Anglin 5b28114174 constraints.md: New file.
* pa/constraints.md: New file.
	* pa.md: Include constraints.md.
	* pa.c (cint_ok_for_move): Avoid using CONST_OK_FOR_LETTER_P.
	(integer_store_memory_operand, ldil_cint_p): New functions.
	* pa-protos.h (integer_store_memory_operand, ldil_cint_p): Declare.
	* pa.h (CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P,
	IS_RELOADING_PSEUDO_P, EXTRA_CONSTRAINT): Remove.
	* pa32-regs.h (REG_CLASS_FROM_LETTER): Remove.
	* pa64-regs.h (REG_CLASS_FROM_LETTER): Remove.

From-SVN: r125157
2007-05-29 01:01:32 +00:00
Andrew Pinski a87db577fb [multiple changes]
2007-05-28  Andrew Pinski  <Andrew_pinski@playstation.sony.com>

        PR c/31339
        * c-typeck.c (build_unary_op <case PREINCREMENT_EXPR,
        case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
        case POSTDECREMENT_EXPR>): Return the error_mark_node
        if either the real or imaginary parts would an
        error_mark_node.

2007-05-28  Andrew Pinski  <Andrew_pinski@playstation.sony.com>

        PR c++/31339
        * typeck.c (build_unary_op <case PREINCREMENT_EXPR,
        case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
        case POSTDECREMENT_EXPR>): Return the error_mark_node
        if either the real or imaginary parts would an
        error_mark_node.

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

        PR c/31339
        * gcc.dg/boolcomplex-1.c: New test.

        PR c++/31339
        * g++.dg/ext/boolcomplex-1.c: New test

From-SVN: r125156
2007-05-28 17:25:25 -07:00
Daniel Berlin 3659e0cd91 tree-ssa-dce.c (eliminate_unnecessary_stmts): Release LHS SSA name when we remove it from a call.
2007-05-28  Daniel Berlin  <dberlin@dberlin.org>

	* tree-ssa-dce.c (eliminate_unnecessary_stmts): Release LHS SSA
	name when we remove it from a call.

From-SVN: r125147
2007-05-28 21:56:51 +00:00
Kazu Hirata 179daa1590 * global.c (EXECUTE_IF_CONFLICT): Remove.
From-SVN: r125146
2007-05-28 21:29:29 +00:00
Kazu Hirata 70ea680b5d langhooks-def.h: Remove the prototype for hook_get_alias_set_0.
* langhooks-def.h: Remove the prototype for
	hook_get_alias_set_0.
	* langhooks.c (hook_get_alias_set_0): Remove.

From-SVN: r125145
2007-05-28 21:28:31 +00:00
Kazu Hirata cf9226fbc5 targhooks.c (default_narrow_bitfield): Remove.
* targhooks.c (default_narrow_bitfield): Remove.
	* targhooks.h: Remove the prototype for
	default_narrow_bitfield.

From-SVN: r125144
2007-05-28 21:27:29 +00:00
Andrew Pinski 3613c7abfa re PR tree-optimization/32100 (vrp bitfield miscompilation)
2007-05-28  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        PR tree-opt/32100
        * fold-const.c (tree_expr_nonnegative_warnv_p): Don't
        return true when truth_value_p is true and the type
        is of signed:1.

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

        PR tree-opt/32100
         * gcc.c-torture/execute/vrp-7.c: New test.

From-SVN: r125139
2007-05-28 12:43:10 -07:00
Gerald Pfeifer 565f8ce5ff install.texi (Prerequisites): We no longer require Autoconf 2.13 for the top-level.
* doc/install.texi (Prerequisites): We no longer require Autoconf
	2.13 for the top-level.

From-SVN: r125131
2007-05-28 15:42:25 +00:00
Uros Bizjak e9dd4c3e04 i386.c (ix86_expand_vector_move): Expand unaligned memory access via x86_expand_vector_move_misalign() only for...
* target/i386/i386.c (ix86_expand_vector_move): Expand unaligned
	memory access via x86_expand_vector_move_misalign() only for
	TImode values on 32-bit targets.

From-SVN: r125129
2007-05-28 14:17:42 +02:00
Razya Ladelsky 138e99d1a0 Change date of changelog
From-SVN: r125127
2007-05-28 11:23:08 +00:00
Razya Ladelsky 43d861a5bc matrix-reorg.c: New file.
2007-05-07  Razya Ladelsky  <razya@il.ibm.com>  
        
        * matrix-reorg.c: New file. Implement matrix flattening and transposing
	    optimization.
        * tree-pass.h: Add matrix reorg pass.
        * common.opt: Add fipa-mreorg flag.
        * Makefile.in: Add matrix-reorg.c.
        * passes.c: Add matrix reorg pass.
	  * varpool.c (add_new_static_var): New function.
	  * cgraph.h (add_new_static_var): Declare.

From-SVN: r125126
2007-05-28 11:10:27 +00:00
Eric Christopher bcb2d70142 rs6000.c (rs6000_emit_prologue): Update sp_offset depending on stack size.
2007-05-27  Eric Christopher  <echristo@apple.com>

	    * config/rs6000/rs6000.c (rs6000_emit_prologue): Update
	    sp_offset depending on stack size. Save r12 depending
	    on registers we're saving later.
	    (rs6000_emit_epilogue): Update sp_offset depending only
	    on stack size.

From-SVN: r125116
2007-05-27 19:13:07 +00:00
Zdenek Dvorak d51157deee tree-vrp.c (execute_vrp): Do not check whether current_loops == NULL.
* tree-vrp.c (execute_vrp): Do not check whether current_loops == NULL.
	* tree-chrec.c (evolution_function_is_invariant_rec_p): Ditto.
	* ifcvt.c (if_convert): Ditto.
	* tree-ssa-threadupdate.c (thread_block): Ditto.
	(thread_through_all_blocks): Ditto.  Assert that loops were analysed.
	* tree-ssa-loop-manip.c (rewrite_into_loop_closed_ssa,
	verify_loop_closed_ssa): Check number_of_loops instead of current_loops.
	* predict.c (tree_estimate_probability): Ditto.
	* tree-if-conv.c (main_tree_if_conversion): Ditto.
	* tree-ssa-loop-ch.c (copy_loop_headers): Ditto.
	* modulo-sched.c (sms_schedule): Ditto.
	* tree-scalar-evolution.c (scev_const_prop): Ditto.
	(scev_finalize): Do not do anything if scev analysis was not
	initialized.
	* cfgloopanal.c (mark_irreducible_loops): Do not check whether
	current_loops == NULL.
	(mark_loop_exit_edges): Check number_of_loops instead of current_loops.
	* loop-init.c (loop_optimizer_init): Do not free current_loops when
	there are no loops.
	(loop_optimizer_finalize): Assert that loops were analyzed.
	(rtl_move_loop_invariants, rtl_unswitch, rtl_unroll_and_peel_loops,
	rtl_doloop): Check number_of_loops instead of current_loops.
	* tree-ssa-loop.c (tree_loop_optimizer_init): Do not check whether
	current_loops == NULL.
	(tree_ssa_loop_init, tree_ssa_loop_im, tree_ssa_loop_unswitch,
	gate_tree_vectorize tree_linear_transform, check_data_deps,
	tree_ssa_loop_ivcanon, tree_ssa_empty_loop, tree_ssa_loop_bounds,
	tree_complete_unroll, tree_ssa_loop_prefetch, tree_ssa_loop_ivopts):
	Check number_of_loops instead of current_loops.
	(tree_ssa_loop_done): Do not check whether current_loops == NULL.
	* tree-ssa-pre.c (fini_pre): Do not take do_fre argument.  Always
	free loops if available.
	(execute_pre): Do not pass do_fre to fini_pre.

From-SVN: r125114
2007-05-27 17:23:11 +00:00
Tobias Burnus fe67caf629 re PR middle-end/32083 (bug in transfer integer->real->integer)
2007-05-26  Tobias Burnus  <burnus@net-b.de>

	PR fortran/32083
	* real.c (mpfr_from_real): Fix sign of -Inf.

2007-05-26  Tobias Burnus  <burnus@net-b.de>

	PR fortran/32083
	* gfortran.dg/transfer_simplify_3.f90: New.

From-SVN: r125108
2007-05-27 10:09:51 +02:00
H.J. Lu 8ff43db0f9 tree-vect-transform.c (vectorizable_conversion): Initialize tree_code variables to ERROR_MARK.
2007-05-27  H.J. Lu  <hongjiu.lu@intel.com>

	* tree-vect-transform.c (vectorizable_conversion): Initialize
	tree_code variables to ERROR_MARK.
	(vectorizable_type_demotion): Likewise.
	(vectorizable_type_promotion): Likewise.

From-SVN: r125107
2007-05-27 00:21:58 -07:00
Uros Bizjak 72bd078f6e re PR target/32065 (Many dfp testsuite failures for -msse targets)
PR target/32065
        * config/i386/i386.md (movti): Handle push operands via
        ix86_expand_push().

testsuite/ChangeLog:

        PR target/32065
        * gcc.target/i386/pr32065-1.c: Rename from pr32065.c.  Add -std=gnu99
        to compile options.
        * gcc.target/i386/pr32065-2.c: New test.

From-SVN: r125102
2007-05-26 23:35:41 +02:00
Kazu Hirata 5ef1348f3c tree-flow.h: Remove the prototype for is_aliased_with.
* tree-flow.h: Remove the prototype for is_aliased_with.
	* tree-ssa-alias.c (is_aliased_with): Remove.

From-SVN: r125095
2007-05-26 15:17:38 +00:00
Kazu Hirata eb83419390 basic-block.h: Remove the prototype for merge_seq_blocks.
* basic-block.h: Remove the prototype for merge_seq_blocks.
	* cfgcleanup.c (merge_seq_blocks): Remove.

From-SVN: r125094
2007-05-26 15:16:45 +00:00
H.J. Lu e5ac0b9bce i386-protos.h (ix86_expand_sse4_unpack): New.
2007-05-26  H.J. Lu  <hongjiu.lu@intel.com>

	* config/i386/i386-protos.h (ix86_expand_sse4_unpack): New.

	* config/i386/i386.c (ix86_expand_sse4_unpack): New.

	* config/i386/sse.md (vec_unpacku_hi_v16qi): Call
	ix86_expand_sse4_unpack if SSE4.1 is enabled.
	(vec_unpacks_hi_v16qi): Likewise.
	(vec_unpacku_lo_v16qi): Likewise.
	(vec_unpacks_lo_v16qi): Likewise.
	(vec_unpacku_hi_v8hi): Likewise.
	(vec_unpacks_hi_v8hi): Likewise.
	(vec_unpacku_lo_v8hi): Likewise.
	(vec_unpacks_lo_v8hi): Likewise.
	(vec_unpacku_hi_v4si): Likewise.
	(vec_unpacks_hi_v4si): Likewise.
	(vec_unpacku_lo_v4si): Likewise.
	(vec_unpacks_lo_v4si): Likewise.

From-SVN: r125093
2007-05-26 07:34:21 -07:00
Kazu Hirata 110abdbc68 i386.c, [...]: Fix comment typos.
* config/i386/i386.c, config/pa/pa.c, config/spu/spu.c,
	df-problems.c, df-scan.c, domwalk.c, ebitmap.c, ebitmap.h,
	fold-const.c, gcc.c, ipa-type-escape.c, omega.c, omega.h,
	tree-ssa-coalesce.c, tree-ssa-live.c, tree-ssa-structalias.c,
	tree-vrp.c: Fix comment typos.  Follow spelling conventions.
	* doc/tm.texi: Follow spelling conventions.

From-SVN: r125090
2007-05-26 13:00:47 +00:00
Kazu Hirata 4dad0aca14 c-typeck.c, [...]: Fix typos and follow spelling conventions in various warning/error/diagnostic...
* c-typeck.c, config/arm/arm.c, config/darwin.c,
	config/sh/symbian.c, gcc.c, ipa-cp.c, ipa-inline.c, loop-iv.c,
	omega.c, tree-ssa-loop-niter.c, treestruct.def: Fix typos and
	follow spelling conventions in various
	warning/error/diagnostic messages.

From-SVN: r125089
2007-05-26 12:17:52 +00:00
Andrew Pinski 150594ba69 re PR tree-optimization/32090 (ICE in forwprop with zero sized array)
2007-05-25  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        PR tree-opt/32090
        * tree-ssa-forwprop.c
        (forward_propagate_addr_into_variable_array_index): Remove
        the lhs argument.  Use the type of def_rhs instead of lhs.
        (forward_propagate_addr_expr_1): Update use of
        forward_propagate_addr_into_variable_array_index.

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

        PR tree-opt/32090
        * g++.dg/opt/array2.C: New testcase.

From-SVN: r125087
2007-05-25 20:29:58 -07:00
Sandra Loosemore cd3a59b38e mips.c (mips_attribute_table): Add "near" and "far" function attributes, "far" being an alias for "long_call".
2007-05-25  Sandra Loosemore  <sandra@codesourcery.com>
	    Nigel Stephens  <nigel@mips.com>

	gcc/
	* config/mips/mips.c (mips_attribute_table): Add "near" and "far"
	function attributes, "far" being an alias for "long_call".
	(TARGET_COMP_TYPE_ATTRIBUTES): Define as mips_comp_type_attributes.
	(mips_near_type_p, mips_far_type_p): New.
	(mips_comp_type_attributes): New function to check that attributes
	attached to a function type are compatible.
	(mips_output_mi_thunk): Test SYMBOL_REF_LONG_CALL_P() rather than
	TARGET_LONG_CALLS when deciding	whether we can do a direct sibcall
	to the target function of the thunk.
	(mips_encode_section_info): Check for "near" and "far" function
	attributes, and always set the SYMBOL_FLAG_LONG_CALL bit explicitly.

	* config/mips/predicates.md (const_call_insn_operand): Test only
	SYMBOL_REF_LONG_CALL_P() and not TARGET_LONG_CALLS.

	* doc/extend.texi (Function Attributes): Document MIPS "near" and
	"far" attributes.

	* testsuite/gcc.target/mips/near-far-1.c:  New test case.
	* testsuite/gcc.target/mips/near-far-2.c:  New test case.
	* testsuite/gcc.target/mips/near-far-3.c:  New test case.
	* testsuite/gcc.target/mips/near-far-4.c:  New test case.

Co-Authored-By: Nigel Stephens <nigel@mips.com>

From-SVN: r125086
2007-05-25 22:02:37 -04:00
Eric Christopher 8536ebb582 config.gcc: Add i386/t-fprules-softfp64 and soft-fp/t-softfp to x86-darwin configurations.
2007-05-25  Eric Christopher  <echristo@apple.com>

	    * config.gcc: Add i386/t-fprules-softfp64 and soft-fp/t-softfp
	    to x86-darwin configurations.
	    * config/i386/t-darwin: Add softfp support.
	    * config/i386/t-darwin64: Ditto.
	    * config/i386/sfp-machine.h: If mach then don't use
	    aliasing, emit a stub to call.

From-SVN: r125085
2007-05-26 01:58:51 +00:00
Kazu Hirata c80b4100e0 cfglayout.c, [...]: Fix comment typos.
* cfglayout.c, cgraphunit.c, config/avr/avr.c, fold-const.c,
	haifa-sched.c, optabs.h, tree-affine.c, tree-data-ref.c,
	tree-predcom.c, tree-ssa-alias-warnings.c,
	tree-ssa-forwprop.c, tree-vect-analyze.c, tree-vrp.c: Fix
	comment typos.  Follow spelling conventions.
	* doc/cpp.texi, doc/invoke.texi: Fix typos.

From-SVN: r125080
2007-05-25 22:58:16 +00:00
Uros Bizjak 4d2a42a1f6 re PR target/32065 (Many dfp testsuite failures for -msse targets)
PR target/32065
        * target/i386/i386.c (ix86_expand_vector_move): Force SUBREGs of
        constants into memory.  Expand unaligned memory references for
        SSE modes via x86_expand_vector_move_misalign() function.

testsuite/ChangeLog:

        PR target/32065
        * gcc.target/i386/pr32065.c: New test.

From-SVN: r125077
2007-05-26 00:36:10 +02:00
Uros Bizjak 5b98f74d38 sse.md (*vec_extractv2di_1_sse2): Do not calculate "memory" attribute for "sseishft" type insn without operands[2].
* config/i386/sse.md (*vec_extractv2di_1_sse2): Do not calculate
        "memory" attribute for "sseishft" type insn without operands[2].

From-SVN: r125075
2007-05-25 23:58:21 +02:00
Dirk Mueller 51bc54a661 extend.texi (alloc_size): New attribute.
2007-05-25  Dirk Mueller  <dmueller@suse.de>
            Marcus Meissner <meissner@suse.de>

        * doc/extend.texi (alloc_size): New attribute.
        * c-common.c (handle_alloc_size_attribute): New.
        * tree-object-size.c (alloc_object_size): Use alloc_size
        attribute, if available.

        * testsuite/gcc.dg/attr-alloc_size.c: New.


Co-Authored-By: Marcus Meissner <meissner@suse.de>

From-SVN: r125073
2007-05-25 21:18:15 +00:00
H.J. Lu fc6c9f75ef i386.c (__builtin_ia32_vec_ext_v2df): Mark it with MASK_SSE2.
gcc/

2007-05-25  H.J. Lu  <hongjiu.lu@intel.com>

	* config/i386/i386.c (__builtin_ia32_vec_ext_v2df): Mark it
	with MASK_SSE2.
	(__builtin_ia32_vec_ext_v2di): Likewise.
	(__builtin_ia32_vec_ext_v4si): Likewise.
	(__builtin_ia32_vec_ext_v8hi): Likewise.
	(__builtin_ia32_vec_ext_v16qi): Likewise.
	(__builtin_ia32_vec_set_v8hi): Likewise.

gcc/testsuite/

2007-05-25  H.J. Lu  <hongjiu.lu@intel.com>

	* gcc.target/i386/sse2-check.h: New.
	* gcc.target/i386/sse2-vec-1.c: Likewise.
	* gcc.target/i386/sse2-vec-2.c: Likewise.
	* gcc.target/i386/sse2-vec-3.c: Likewise.
	* gcc.target/i386/sse2-vec-4.c: Likewise.
	* gcc.target/i386/sse2-vec-5.c: Likewise.
	* gcc.target/i386/sse2-vec-6.c: Likewise.

From-SVN: r125063
2007-05-25 07:33:27 -07:00
H.J. Lu 77315816df sse.md (*vec_extractv2di_1_sse2): Correct shift.
2007-05-25  H.J. Lu  <hongjiu.lu@intel.com>

	* config/i386/sse.md (*vec_extractv2di_1_sse2): Correct shift.

From-SVN: r125061
2007-05-25 05:27:27 -07:00
Richard Sandiford 25a6519845 arm-protos.h (arm_encode_call_attribute): Delete.
gcc/
	* config/arm/arm-protos.h (arm_encode_call_attribute): Delete.
	(arm_is_longcall_p): Rename to...
	(arm_is_long_call_p): ...this.  Take a single tree argument and
	return a bool.
	* config/arm/arm.h (CALL_SHORT, CALL_LONG, CALL_NORMAL): Delete.
	(CUMULATIVE_ARGS): Remove call_cookie.
	(SHORT_CALL_FLAG_CHAR, LONG_CALL_FLAG_CHAR, ENCODED_SHORT_CALL_ATTR_P)
	(ENCODED_LONG_CALL_ATTR_P): Delete.
	(ARM_NAME_ENCODING_LENGTHS): Remove SHORT_CALL_FLAG_CHAR and
	LONG_CALL_FLAG_CHAR cases.
	(ARM_DECLARE_FUNCTION_SIZE): Delete.
	* config/arm/elf.h (ASM_DECLARE_FUNCTION_SIZE): Don't use
	ARM_DECLARE_FUNCTION_SIZE.
	* config/arm/arm.c (arm_init_cumulative_args): Don't set call_cookie.
	(arm_function_arg): Return const0_rtx for VOIDmode arguments.
	(arm_encode_call_attribute, current_file_function_operand): Delete.
	(arm_function_in_section_p): New function.
	(arm_is_longcall_p): Rename to...
	(arm_is_long_call_p): ...this.  Take the target function as a single
	argument and return a bool.  Do not rely on call cookies.  Check
	whether the target symbol is in the same section as the current
	function, not just the same compilation unit.
	(arm_function_ok_for_sibcall): Use arm_is_long_call_p.
	(arm_encode_section_info): Don't encode a call type.
	* config/arm/arm.md (call, call_value): Update calls to
	arm_is_long(_)call_p.  Simplify logic.
	(*call_symbol, *call_value_symbol, *call_insn, *call_value_insn):
	Update calls to arm_is_long(_)call_p.

gcc/testsuite/
	* gcc.target/arm/long-calls-1.c: New test.
	* gcc.target/arm/long-calls-2.c: Likewise.
	* gcc.target/arm/long-calls-3.c: Likewise.
	* gcc.target/arm/long-calls-4.c: Likewise.

From-SVN: r125060
2007-05-25 11:36:06 +00:00
Richard Guenther 88efe45a92 re PR tree-optimization/31982 (Missed forw prop with indirect ref and addr. (and char types or sizeof(type) == 1))
2007-05-24  Richard Guenther  <rguenther@suse.de>
        Andrew Pinski  <andrew_pinski@playstation.sony.com>

	PR tree-optimization/31982
	* tree-ssa-forwprop.c
	(forward_propagate_addr_into_variable_array_index): Handle arrays
	with element size one.

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

Co-Authored-By: Andrew Pinski <andrew_pinski@playstation.sony.com>

From-SVN: r125058
2007-05-25 09:07:29 +00:00
Andrew Pinski 03fd30b180 spu.md (smulsi3_highpart): Unshare the rtl chain.
2007-05-24  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        * config/spu/spu.md (smulsi3_highpart): Unshare the rtl chain.
        (umulsi3_highpart): Likewise.

From-SVN: r125055
2007-05-24 22:57:42 -07:00
Ian Lance Taylor 88d1c2ad47 re PR rtl-optimization/32069 (segfault in regclass() with -O0 -fsplit-wide-types)
PR rtl-optimization/32069
	* regclass.c (regclass): Don't crash if the entry in regno_reg_rtx
	is NULL.

From-SVN: r125043
2007-05-24 22:12:31 +00:00
Mike Stump 0f17a91f46 darwin.h (LINK_COMMAND_SPEC): Add .cxx/.cp for dsymutil handling as well.
* config/darwin.h (LINK_COMMAND_SPEC): Add .cxx/.cp for dsymutil
	handling as well.
	* config/darwin9.h (LINK_COMMAND_SPEC): Likewise.

From-SVN: r125042
2007-05-24 21:36:20 +00:00
Ollie Wild a702045a24 macro.c (_cpp_builtin_macro_text): Handle BT_COUNTER.
* macro.c (_cpp_builtin_macro_text): Handle BT_COUNTER.
	* pch.c (cpp_write_pch_deps): Save __COUNTER__ state.
	(cpp_write_pch_state): Save __COUNTER__ state.
	(cpp_valid_state): Check valid __COUNTER__ state.
	(cpp_read_state): Read new __COUNTER__ state.
	* include/cpplib.h (enum builtin_type): Add BT_COUNTER enumerator.
	* init.c (builtin_array): Add __COUNTER__/BT_COUNTER.
	* internal.h (struct cpp_reader): Add counter member.

	* gcc.dg/cpp/counter-1.c: New test.
	* gcc.dg/pch/counter-1.c: New test.
	* gcc.dg/pch/counter-1.hs: New file.
	* gcc.dg/pch/counter-2.c: New test.
	* gcc.dg/pch/counter-2.hs: New file.
	* gcc.dg/pch/counter-3.c: New test.
	* gcc.dg/pch/counter-3.hs: New file.

	* doc/cpp.texi (Common Predefined Macros): Add __COUNTER__
	description.

From-SVN: r125041
2007-05-24 20:55:36 +00:00
Richard Sandiford 5da20cfe73 postreload-gcse.c (reg_changed_after_insn_p): New function.
gcc/
	* postreload-gcse.c (reg_changed_after_insn_p): New function.
	(oprs_unchanged_p): Use it to check all registers in a REG.
	(record_opr_changes): Look for clobbers in CALL_INSN_FUNCTION_USAGE.
	(reg_set_between_after_reload_p): Delete.
	(reg_used_between_after_reload_p): Likewise.
	(reg_set_or_used_since_bb_start): Likewise.
	(eliminate_partially_redundant_load): Use reg_changed_after_insn_p
	and reg_used_between_p instead of reg_set_or_used_since_bb_start.
	Use reg_set_between_p instead of reg_set_between_after_reload_p.
	* rtlanal.c (reg_set_p): Check whether REG overlaps
	regs_invalidated_by_call, rather than just checking the
	membership of REGNO (REG).

From-SVN: r125037
2007-05-24 19:19:31 +00:00
Uros Bizjak dc675301cb ChangeLog: Whitespace fixes.
* gcc/ChangeLog: Whitespace fixes.
	* gcc/testsuite/ChangeLog: Ditto

From-SVN: r125035
2007-05-24 19:14:15 +02:00
Zdenek Dvorak bbc8a8dc0d passes.texi: Document predictive commoning.
* doc/passes.texi: Document predictive commoning.
	* doc/invoke.texi (-fpredictive-commoning): Document.
	* opts.c (decode_options): Enable flag_predictive_commoning on -O3.
	* tree-ssa-loop-im.c (get_lsm_tmp_name): Export.  Allow
	adding indices to the generated name.
	(schedule_sm): Pass 0 to get_lsm_tmp_name.
	* tree-ssa-loop-niter.c (stmt_dominates_stmt_p): Export.
	* tree-pretty-print.c (op_symbol_1): Renamed to ...
	(op_symbol_code): ... and exported.
	(dump_omp_clause, op_symbol): Use op_symbol_code
	instead of op_symbol_1.
	* tree-pass.h (pass_predcom): Declare.
	* timevar.def (TV_PREDCOM): New timevar.
	* tree-ssa-loop.c (run_tree_predictive_commoning,
	gate_tree_predictive_commoning, pass_predcom): New.
	* tree-data-ref.c (find_data_references_in_loop): Find the
	references in dominance order.
	(canonicalize_base_object_address): Ensure that the result has
	pointer type.
	(dr_analyze_innermost): Export.
	(create_data_ref): Code to fail for references with invariant
	address moved ...
	(find_data_references_in_stmt): ... here.
	* tree-data-ref.h (dr_analyze_innermost): Declare.
	* tree-affine.c: Include tree-gimple.h and hashtab.h.
	(aff_combination_find_elt, name_expansion_hash,
	name_expansion_eq, tree_to_aff_combination_expand,
	double_int_constant_multiple_p, aff_combination_constant_multiple_p):
	New functions.
	* tree-affine.h (aff_combination_constant_multiple_p,
	tree_to_aff_combination_expand): Declare.
	* tree-predcom.c: New file.
	* common.opt (fpredictive-commoning): New option.
	* tree-flow.h (op_symbol_code, tree_predictive_commoning,
	stmt_dominates_stmt_p, get_lsm_tmp_name): Declare.
	* Makefile.in (tree-predcom.o): Add.
	(tree-affine.o): Add TREE_GIMPLE_H dependency.
	* passes.c (init_optimization_passes):  Add dceloop after
	copy propagation in loop optimizer.  Add predictive commoning
	to loop optimizer passes.

	* gcc.dg/tree-ssa/predcom-1.c: New test.
	* gcc.dg/tree-ssa/predcom-2.c: New test.
	* gcc.dg/tree-ssa/predcom-3.c: New test.
	* gcc.dg/tree-ssa/predcom-4.c: New test.
	* gcc.dg/tree-ssa/predcom-5.c: New test.
	* gcc.dg/vect/dump-tree-dceloop-pr26359.c: Test dceloop2 dumps.

From-SVN: r125030
2007-05-24 16:09:26 +00:00
Jan Hubicka 956741d54f Fotgotten changelog entry:
* gengenrtl.c (gendecl, gendef): Output the gens annotated for
	statistics.
	(genheader): Include statistics.h.

From-SVN: r125029
2007-05-24 15:47:07 +00:00
H.J. Lu cb8b507b65 target-def.h (TARGET_MANGLE_DECL_ASSEMBLER_NAME): Correct default hook.
2007-05-24  H.J. Lu  <hongjiu.lu@intel.com>

	* target-def.h (TARGET_MANGLE_DECL_ASSEMBLER_NAME): Correct
	default hook.

From-SVN: r125027
2007-05-24 07:35:00 -07:00
Jan Hubicka 9dbe7947ab invoke.texi (-fdump-unnumbered): Update docs when line number notes are gone.
* doc/invoke.texi (-fdump-unnumbered): Update docs when line number
	notes are gone.
	* print-rtl.c (flag_dump_unnumbered): Update comments.
	(print_rtl): Fix my previous change.
	* emit-rtl.c (emit_note_before, emit_note_after): Clear out note
	specific data.

From-SVN: r125026
2007-05-24 14:21:14 +00:00
Zdenek Dvorak 561e8a90fd re PR middle-end/32018 (ICE on optimization)
PR middle-end/32018
	* tree-ssa-threadupdate.c (thread_through_loop_header): Use
	set_loop_copy.
	(thread_through_all_blocks): Call initialize_original_copy_tables
	and free_original_copy_tables.
	* cfgloopmanip.c (duplicate_loop, duplicate_loop_to_header_edge):
	Use set_loop_copy.
	* tree-cfg.c (tree_duplicate_sese_region): Ditto.
	* cfghooks.c (duplicate_block): Use get_loop_copy.
	* cfg.c: Include cfgloop.h.
	(loop_copy): New hash table.
	(initialize_original_copy_tables): Initialize loop_copy table.
	(free_original_copy_tables): Free loop_copy table.
	(copy_original_table_clear, copy_original_table_set,
	set_loop_copy, get_loop_copy): New functions.
	(set_bb_original, set_bb_copy): Use copy_original_table_set.
	* cfgloop.h (struct loop): Remove copy field.
	* Makefile.in (cfg.o): Add CFGLOOP_H dependency.
	* basic-block.h (set_loop_copy, get_loop_copy): Declare.

From-SVN: r125024
2007-05-24 14:02:12 +00:00
H.J. Lu 66da42bc85 i386.c (ix86_handle_option): Handle SSE4.1 for -msse/-msse2/-msse3.
2007-05-24  H.J. Lu  <hongjiu.lu@intel.com>

	* config/i386/i386.c (ix86_handle_option): Handle SSE4.1 for
	-msse/-msse2/-msse3.

From-SVN: r125023
2007-05-24 06:31:05 -07:00
H.J. Lu 5691b85a26 i386.c (ix86_init_mmx_sse_builtins): Mark __builtin_ia32_vec_set_v2di with MASK_64BIT.
2007-05-24  H.J. Lu  <hongjiu.lu@intel.com>

	* config/i386/i386.c (ix86_init_mmx_sse_builtins): Mark
	__builtin_ia32_vec_set_v2di with MASK_64BIT.

From-SVN: r125022
2007-05-24 06:28:49 -07:00
Danny Smith 5234b8f573 re PR target/27067 (Compile errors with multiple inheritance where the stdcall attribute is applied to virtual functions.)
ChangeLog
	
	PR target/27067
	* doc/tm.texi (TARGET_MANGLE_DECL_ASSEMBLER_NAME): Document.
	* targhooks.h (default_mangle_decl_assembler_name): Declare
	default hook.
	* targhooks.c (default_mangle_decl_assembler_name): Define
	default hook.
	* target-def.h (TARGET_MANGLE_DECL_ASSEMBLER_NAME) New. Set to
	default hook.
	* target.h (struct gcc_target): Add mangle_decl_assembler_name field.
	* langhooks.c (lhd_set_decl_assembler_name): Call
	targetm.mangle_decl_assembler_name for names with global scope.

	* config/i386/cygming.h (TARGET_MANGLE_DECL_ASSEMBLER_NAME) Override
	default.
	(ASM_OUTPUT_DEF_FROM_DECLS): Simplify to use DECL_ASSEMBLER_NAME.
	* config/i386/i386-protos.h (i386_pe_mangle_decl_assembler_name):
	Declare.
	* config/i386/winnt.c (i386_pe_maybe_mangle_decl_assembler_name):
	New. Factored out of i386_pe_encode_section_info.
	(gen_stdcall_or_fastcall_suffix): Get name identifier as argument.
	Move check for prior decoration of stdcall
	symbols to i386_pe_encode_section_info.
	(i386_pe_encode_section_info): Adjust call to
	gen_stdcall_or_fastcall_suffix.  Use
	i386_pe_maybe_mangle_decl_assembler_name, if needed.
	(i386_pe_mangle_decl_assembler_name): New. Wrap
	i386_pe_maybe_mangle_decl_assembler_name.


cp/ChangeLog

        * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.

From-SVN: r125020
2007-05-24 10:11:49 +00:00
Rafael Avila de Espindola 1e2041330f c-common.c (c_common_signed_or_unsigned_type): Delay the check for INTEGRAL_TYPE_P and TYPE_UNSIGNED.
* c-common.c (c_common_signed_or_unsigned_type): Delay the check for
       INTEGRAL_TYPE_P and TYPE_UNSIGNED.
       * langhooks.c (get_signed_or_unsigned_type): Don't check for
       INTEGRAL_TYPE_P or TYPE_UNSIGNED.
       (lhd_signed_or_unsigned_type): Check for INTEGRAL_TYPE_P and
       TYPE_UNSIGNED.

From-SVN: r125012
2007-05-24 04:38:27 +00:00
Sandra Loosemore a38e0142a8 Fix up MIPS16 hard float and add support for complex.
2007-05-23  Sandra Loosemore  <sandra@codesourcery.com>
	    Nigel Stephens  <nigel@mips.com>
	    Richard Sandiford  <richard@codesourcery.com>

	gcc/
	Fix up MIPS16 hard float and add support for complex.

	* config/mips/mips.h (TARGET_HARD_FLOAT_ABI): New.
	(TARGET_SOFT_FLOAT_ABI): New.
	(TARGET_CPU_CPP_BUILTINS): Define __mips_hard_float and
	__mips_soft_float to reflect the ABI in use, not whether the
	FPU is directly accessible (e.g., in MIPS16 mode).
	(UNITS_PER_HWFPVALUE): Use TARGET_SOFT_FLOAT_ABI.
	(UNITS_PER_FPVALUE): Likewise.

	* config/mips/mips.c (mips_expand_call): Remove redundant
	TARGET_MIPS16 check.
	(mips_arg_regno): New.
	(function_arg_advance): When setting bits in cum->fp_code for
	MIPS16, don't subtract 1 from cum->arg_number, since it is now
	zero-based.
	(function_arg): Use mips_arg_regno.
	(mips_return_mode_in_fpr_p): New.
	(mips16_call_stub_mode_suffix): New.
	(mips16_cfun_returns_in_fpr_p): New.
	(mips_save_reg_p): Use mips16_cfun_returns_in_fpr_p.
	(mips_output_function_prologue): Test mips16_hard_float, not
	!TARGET_SOFT_FLOAT, to decide when a function stub is required.
	(mips_expand_epilogue): Call MIPS16 helper routines to copy
	return value into a floating-point register.
	(mips_can_use_return_insn): Use mips16_cfun_returns_in_fpr_p.
	(mips_function_value): Rewrite to use mips_return_mode_in_fpr_p.
	(mips16_fp_args): Handle MIPS32r2 ISA which supports
	TARGET_FLOAT64, and use mfhc1/mthc1 to copy the most significant
	word of double arguments from or to the high bits of 64-bit
	floating point registers.
	(build_mips16_function_stub): Fill in DECL_RESULT for stubdecl.
	(mips16_fpret_double): New helper function.
	(build_mips16_call_stub): Use mips16_return_mode_in_fpr_p.  Add
	support for complex modes.  Fill in DECL_RESULT for stubdecl.
	(mips_init_libfuncs): Remove redundant TARGET_MIPS16 check.

	* config/mips/mips16.S 
	(RET, ARG1, ARG2): New.
	(MERGE_GPRf, MERGE_GPRt): New.
	(DELAYt, DELAYf): New.
	(MOVE_SF_BYTE0, MOVE_SI_BYTE0): New.
	(MOVE_SF_BYTE4, MOVE_SF_BYTE8): New.
	(MOVE_DF_BYTE0, MOVE_DF_BYTE8): New.
	(MOVE_SF_RET, MOVE_SC_RET, MOVE_DF_RET, MOVE_DC_RET, MOVE_SI_RET): New.
	(SFOP): Renamed to...
	(OPSF3): This, and macro-ified.  Updated all uses.
	(SFOP2): Renamed to...
	(OPSF2): This, and macro-ified.  Updated all uses.
	(SFCMP): Renamed to...
	(CMPSF): This, and macro-ified.  Updated all uses.
	(SFREVCMP): Renamed to...
	(REVCMPSF): This, and macro-ified.  Updated all uses.
	(__mips16_floatsisf, __mips16_fix_truncsfsi): Macro-ified.
	(LDDBL1, LDDBL2, RETDBL): Deleted.
	(DFOP): Renamed to...
	(OPDF3): This, and macro-ified.  Updated all uses.
	(DFOP2): Renamed to...
	(OPDF2): This, and macro-ified.  Updated all uses.
	(__mips16_extendsfdf2, __mips16_truncdfsf2): Macro-ified.
	(DFCMP): Renamed to...
	(CMPDF): This, and macro-ified.  Updated all uses.
	(DFREVCMP): Renamed to...
	(REVCMPDF): This, and macro-ified.  Updated all uses.
	(__mips16_floatsidf, __mips16_fix_truncdfsi): Macro-ified.
	(RET_FUNCTION): New.
	(__mips16_ret_sf, __mips16_ret_df): Macro-ified.
	(__mips16_ret_sc, __mips16_ret_dc): New.
	(STUB_ARGS_0, STUB_ARGS_1, STUB_ARGS_5, STUB_ARGS_9, STUB_ARGS_2,
	STUB_ARGS_6, STUB_ARGS_10): New.
	(CALL_STUB_NO_RET): New.
	(__mips16_call_stub_1): Macro-ified.
	(__mips16_call_stub_5): Macro-ified.
	(__mips16_call_stub_2): Macro-ified.
	(__mips16_call_stub_6): Macro-ified.
	(__mips16_call_stub_9): Macro-ified.
	(__mips16_call_stub_10): Macro-ified.
	(CALL_STUB_RET): New.
	(__mips16_call_stub_sf_0): Macro-ified.
	(__mips16_call_stub_sf_1): Macro-ified.
	(__mips16_call_stub_sf_5): Macro-ified.
	(__mips16_call_stub_sf_2): Macro-ified.
	(__mips16_call_stub_sf_6): Macro-ified.
	(__mips16_call_stub_sf_9): Macro-ified.
	(__mips16_call_stub_sf_10): Macro-ified.
	(__mips16_call_stub_df_0): Macro-ified.
	(__mips16_call_stub_df_1): Macro-ified.
	(__mips16_call_stub_df_5): Macro-ified.
	(__mips16_call_stub_df_2): Macro-ified.
	(__mips16_call_stub_df_6): Macro-ified.
	(__mips16_call_stub_df_9): Macro-ified.
	(__mips16_call_stub_df_10): Macro-ified.
	(__mips16_call_stub_sc_0): New.
	(__mips16_call_stub_sc_1): New.
	(__mips16_call_stub_sc_5): New.
	(__mips16_call_stub_sc_2): New.
	(__mips16_call_stub_sc_6): New.
	(__mips16_call_stub_sc_9): New.
	(__mips16_call_stub_sc_10): New.
	(__mips16_call_stub_dc_0): New.
	(__mips16_call_stub_dc_1): New.
	(__mips16_call_stub_dc_5): New.
	(__mips16_call_stub_dc_2): New.
	(__mips16_call_stub_dc_6): New.
	(__mips16_call_stub_dc_9): New.
	(__mips16_call_stub_dc_10): New.
	
	* config/mips/t-elf (LIB1ASMFUNCS): Add MIPS16 floating-point stubs.
	* config/mips/t-isa3264 (LIB1ASMFUNCS): Likewise.
	* config/mips/t-r2900 (LIB1ASMFUNCS): Likewise.

	gcc/testsuite/
	* gcc.target/mips/inter/mips16_stubs_1_main.c: New.
	* gcc.target/mips/inter/mips16_stubs_1_x.c: New.
	* gcc.target/mips/inter/mips16_stubs_1_y.c: New.
	* gcc.target/mips/inter/mips16-inter.exp: New.


Co-Authored-By: Nigel Stephens <nigel@mips.com>
Co-Authored-By: Richard Sandiford <richard@codesourcery.com>

From-SVN: r124999
2007-05-23 16:03:00 -04:00
Ian Lance Taylor 70f57af18f invoke.texi (Invoking GCC): Document that the order of the -l option matters.
* doc/invoke.texi (Invoking GCC): Document that the order of the
	-l option matters.

From-SVN: r124995
2007-05-23 15:55:34 +00:00
Chen Liqin 6d0ceb7638 re PR target/30987 (Problem while compiling gcc for score)
2007-05-23  Chen Liqin  <liqin@sunnorth.com.cn>

	PR target/30987
	* config/score/misc.md (bitclr_c, bitset_c, bittgl_c): remove.
	* config/score/predicate.md (const_pow2, const_npow2): remove.
	* config/score/score.h (ASM_OUTPUT_EXTERNAL): add ASM_OUTPUT_EXTERNAL undef.
	PR target/30474
	* config/score/score.c (score_print_operand): makes sure that only lower 
        bits are used.

From-SVN: r124983
2007-05-23 06:09:20 +00:00
Ian Lance Taylor b80cca7b47 tree-vrp.c (avoid_overflow_infinity): New static function, broken out of set_value_range_to_value.
* tree-vrp.c (avoid_overflow_infinity): New static function,
	broken out of set_value_range_to_value.
	(set_value_range_to_value): Call avoid_overflow_infinity.
	(extract_range_from_assert): Likewise.

From-SVN: r124981
2007-05-23 05:53:21 +00:00
Andrew Pinski 1809a5208f re PR middle-end/31095 (ICE in expand_expr_real_1, at expr.c:8786)
2007-05-22  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        PR middle-end/31095
         * builtins.c (expand_builtin_memmove_args): Strip nops that don't
        change the type before looking for a COMPOUND_EXPR.

2007-05-22  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        PR middle-end/31095
        * gcc.c-torture/compile/bcopy-1.c: New testcase.

From-SVN: r124975
2007-05-22 18:17:14 -07:00
Ian Lance Taylor 1570a70441 lower-subreg.c (decompose_multiword_subregs): If we change an insn, call remove_retval_note on it.
* lower-subreg.c (decompose_multiword_subregs): If we change an
	insn, call remove_retval_note on it.

From-SVN: r124969
2007-05-22 23:42:17 +00:00
Richard Sandiford 09e18274fd regs.h (end_hard_regno): New function.
gcc/
	* regs.h (end_hard_regno): New function.
	(END_HARD_REGNO, END_REGNO): New macros.
	(add_to_hard_reg_set): New function.
	(remove_from_hard_reg_set): Likewise.
	(in_hard_reg_set_p): Likewise.
	(overlaps_hard_reg_set_p): Likewise.
	* bt-load.c (find_btr_reference): Use overlaps_hard_reg_set_p.
	(note_btr_set): Use END_HARD_REGNO.
	* caller-save.c (setup_save_areas): Use end_hard_regno.
	(mark_set_regs): Use END_HARD_REGNO.
	(add_stored_regs): Use end_hard_regno.
	(mark_referenced_regs): Use add_to_hard_reg_set.
	* combine.c (update_table_tick): Use END_REGNO.
	(record_value_for_reg): Likewise.
	(record_dead_and_set_regs): Likewise.
	(get_last_value_validate): Likewise.
	(use_crosses_set_p): Likewise.
	(reg_dead_at_p_1): Likewise.
	(reg_dead_at_p): Likewise.
	(mark_used_regs_combine): Use add_to_hard_reg_set.
	(move_deaths): Use END_HARD_REGNO.
	(reg_bitfield_target_p): Use end_hard_regno.
	(distribute_notes): Use END_HARD_REGNO.
	* cse.c (mention_regs): Use END_REGNO.
	(insert): Use add_to_hard_reg_set.
	(invalidate): Use END_HARD_REGNO.
	(invalidate_for_call): Likewise.
	(exp_equiv_p): Use END_REGNO.
	(cse_insn): Likewise.
	* cselib.c (cselib_invalidate_regno): Use end_hard_regno.
	* df-problems.c (df_urec_mark_reg_change): Use END_HARD_REGNO.
	* df-scan.c (df_ref_record): Use END_HARD_REGNO.
	* function.c (keep_stack_depressed): Use end_hard_regno.
	* global.c (global_alloc): Use end_hard_regno.
	(global_conflicts): Use add_to_hard_reg_set instead of
	mark_reg_live_nc.
	(find_reg): Likewise.
	(mark_reg_store): Likewise.
	(mark_reg_conflicts): Likewise.
	(mark_reg_death): Use remove_from_hard_reg_set.
	(mark_reg_live_nc): Delete.
	(set_preference): Use end_hard_regno.
	* local-alloc.c (mark_life): Use add_to_hard_reg_set and
	remove_from_hard_reg_set.
	(post_mark_life): Use add_to_hard_reg_set.
	* mode-switching.c (reg_dies): Use remove_from_hard_reg_set.
	(reg_becomes_live): Use add_to_hard_reg_set.
	* recog.c (reg_fits_class_p): Use in_hard_reg_set_p.
	(peep2_find_free_register): Use add_to_hard_reg_set.
	* reg-stack.c (convert_regs_exit): Use END_HARD_REGNO.
	* regclass.c (record_reg_classes): Use in_hard_reg_set_p.
	* regrename.c (note_sets): Use add_to_hard_reg_set.
	(clear_dead_regs): Use remove_from_hard_reg_set.
	(regrename_optimize): Use add_to_hard_reg_set.
	(find_oldest_value_reg): Use in_hard_reg_set_p.
	* reload.c (push_reload): Use in_hard_reg_set_p and end_hard_regno.
	(hard_reg_set_here_p): Use end_hard_regno.
	(decompose): Likewise.
	(reg_overlap_mentioned_for_reload_p): Use END_HARD_REGNO.
	(find_equiv_reg): Use in_hard_reg_set_p and end_hard_regno.
	* reload1.c (compute_use_by_pseudos): Use add_to_hard_reg_set.
	(mark_home_live): Use end_hard_regno.
	(spill_hard_reg): Likewise.
	(clear_reload_reg_in_use): Likewise.
	* reorg.c (delete_prior_computation): Use END_REGNO.
	* resource.c (update_live_status): Use END_HARD_REGNO.
	(mark_referenced_resources): Use add_to_hard_reg_set.
	(mark_set_resources): Likewise.
	(mark_target_live_regs): Likewise.  Use remove_from_hard_reg_set.
	* rtlanal.c (refers_to_regno_p): Use END_REGNO.
	(reg_overlap_mentioned_p): Likewise.
	(dead_or_set_p): Likewise.  Use an exclusive upper loop bound.
	(covers_regno_no_parallel_p): Use END_REGNO.
	(find_regno_note): Likewise.
	(find_reg_fusage): Use END_HARD_REGNO.
	* stmt.c (decl_overlaps_hard_reg_set_p): Use overlaps_hard_reg_set_p.
	* var-tracking.c (emit_note_insn_var_location): Use end_hard_regno.

From-SVN: r124961
2007-05-22 20:52:39 +00:00
Richard Sandiford 408bed3c38 mode-switching.c (reg_dies): Change type of second argument to "HARD_REG_SET *".
gcc/
	* mode-switching.c (reg_dies): Change type of second argument to
	"HARD_REG_SET *".
	(optimize_mode_switching): Update accordingly.

From-SVN: r124955
2007-05-22 19:41:10 +00:00
Richard Sandiford 56b138aed2 hard-reg-set.h (GO_IF_HARD_REG_SUBSET, [...]): Delete in favor of...
gcc/
	* hard-reg-set.h (GO_IF_HARD_REG_SUBSET, GO_IF_HARD_REG_EQUAL): Delete
	in favor of...
	(hard_reg_subset_p, hard_reg_sets_equal_p, hard_reg_sets_intersect_p)
	(hard_reg_set_empty_p): ...these new functions.
	* bt-load.c (choose_btr): Use hard_reg_subset_p instead of
	GO_IF_HARD_REG_SUBSET.
	* cfgcleanup.c (old_insns_match_p): Use hard_reg_sets_equal_p
	instead of GO_IF_HARD_REG_EQUAL.
	* df-problems.c (df_urec_local_compute): Use hard_reg_set_empty_p
	instead of GO_IF_HARD_REG_EQUAL.
	* global.c (find_reg): Use hard_reg_set_empty_p instead of
	GO_IF_HARD_REG_SUBSET.
	(modify_reg_pav): Use hard_reg_set_empty_p instead of
	GO_IF_HARD_REG_EQUAL.
	* local-alloc.c (find_free_reg): Use hard_reg_subset_p instead
	of GO_IF_HARD_REG_SUBSET.
	* reg-stack.c (change_stack, convert_regs_1): Use hard_reg_sets_equal_p
	instead of GO_IF_HARD_REG_EQUAL.
	* regclass.c (init_reg_sets_1, reg_scan_mark_refs): Use
	hard_reg_subset_p instead of GO_IF_HARD_REG_SUBSET.
	(reg_classes_intersect_p): Use hard_reg_sets_intersect_p instead
	of GO_IF_HARD_REG_SUBSET,
	* reload1.c (finish_spills): Use hard_reg_subset_p instead of
	GO_IF_HARD_REG_SUBSET.
	* struct-equiv.c (death_notes_match_p): Use hard_reg_sets_equal_p
	instead of GO_IF_HARD_REG_EQUAL.
	* config/sh/sh.c (push_regs, calc_live_regs): Use
	hard_reg_sets_intersect_p instead of hard_regs_intersect_p.
	(hard_regs_intersect_p): Delete.

From-SVN: r124954
2007-05-22 19:33:37 +00:00
Janis Johnson ba2f32a925 gcc/
* doc/sourcebuild.texi (Test Directives) Add dg-message.
gcc/testsuite/
	* lib/gcc-dg.exp(process_message): New proc.
	(dg-message): New test directive.
	* gcc.dg/always_inline.c: Use dg-message.
	* gcc.dg/always_inline2.c: Ditto.
	* gcc.dg/always_inline3.c: Ditto.
	* gcc.dg/invalid-call-1.c: Ditto.
	* gcc.dg/pr17506.c: Ditto.
	* gcc.dg/simd-5.c: Ditto.
	* gcc.dg/simd-6.c: Ditto.
	* gcc.dg/va-arg-2.c: Ditto.
	* gcc.dg/cpp/syshdr.c: Ditto.
	* gcc.dg/cpp/unc4.c: Ditto.
	* gcc.dg/cpp/trad/mi1.c: Ditto.
	* gcc.dg/cpp/trad/mi5.c: Ditto.
	* gcc.dg/cpp/trad/mi7.c: Ditto.
	* gcc.test-framework/dg-outexistsnot-exp-P.c: Ditto.
	* gcc.test-framework/dg-outexists-exp-F.c: Ditto.
	* gcc.test-framework/test-framework.awk: Special-case outexists
	tests.

Co-Authored-By: Manuel López-Ibáñez <manu@gcc.gnu.org>

From-SVN: r124952
2007-05-22 18:01:12 +00:00
H.J. Lu 9a5cee0228 config.gcc (i[34567]86-*-*): Add smmintrin.h to extra_headers.
2007-05-22  H.J. Lu  <hongjiu.lu@intel.com>
	    Richard Henderson  <rth@redhat.com>

	* config.gcc (i[34567]86-*-*): Add smmintrin.h to
	extra_headers.
	(x86_64-*-*): Likewise.

	* i386/i386-modes.def (V2QI): New.

	* config/i386/i386.c (ix86_handle_option): Handle SSE4.1 and
	SSE4A.
	(override_options): Support SSE4.1.
	(IX86_BUILTIN_BLENDPD): New for SSE4.1.
	(IX86_BUILTIN_BLENDPS): Likewise.
	(IX86_BUILTIN_BLENDVPD): Likewise.
	(IX86_BUILTIN_BLENDVPS): Likewise.
	(IX86_BUILTIN_PBLENDVB128): Likewise.
	(IX86_BUILTIN_PBLENDW128): Likewise.
	(IX86_BUILTIN_DPPD): Likewise.
	(IX86_BUILTIN_DPPS): Likewise.
	(IX86_BUILTIN_INSERTPS128): Likewise.
	(IX86_BUILTIN_MOVNTDQA): Likewise.
	(IX86_BUILTIN_MPSADBW128): Likewise.
	(IX86_BUILTIN_PACKUSDW128): Likewise.
	(IX86_BUILTIN_PCMPEQQ): Likewise.
	(IX86_BUILTIN_PHMINPOSUW128): Likewise.
	(IX86_BUILTIN_PMAXSB128): Likewise.
	(IX86_BUILTIN_PMAXSD128): Likewise.
	(IX86_BUILTIN_PMAXUD128): Likewise.
	(IX86_BUILTIN_PMAXUW128): Likewise.
	(IX86_BUILTIN_PMINSB128): Likewise.
	(IX86_BUILTIN_PMINSD128): Likewise.
	(IX86_BUILTIN_PMINUD128): Likewise.
	(IX86_BUILTIN_PMINUW128): Likewise.
	(IX86_BUILTIN_PMOVSXBW128): Likewise.
	(IX86_BUILTIN_PMOVSXBD128): Likewise.
	(IX86_BUILTIN_PMOVSXBQ128): Likewise.
	(IX86_BUILTIN_PMOVSXWD128): Likewise.
	(IX86_BUILTIN_PMOVSXWQ128): Likewise.
	(IX86_BUILTIN_PMOVSXDQ128): Likewise.
	(IX86_BUILTIN_PMOVZXBW128): Likewise.
	(IX86_BUILTIN_PMOVZXBD128): Likewise.
	(IX86_BUILTIN_PMOVZXBQ128): Likewise.
	(IX86_BUILTIN_PMOVZXWD128): Likewise.
	(IX86_BUILTIN_PMOVZXWQ128): Likewise.
	(IX86_BUILTIN_PMOVZXDQ128): Likewise.
	(IX86_BUILTIN_PMULDQ128): Likewise.
	(IX86_BUILTIN_PMULLD128): Likewise.
	(IX86_BUILTIN_ROUNDPD): Likewise.
	(IX86_BUILTIN_ROUNDPS): Likewise.
	(IX86_BUILTIN_ROUNDSD): Likewise.
	(IX86_BUILTIN_ROUNDSS): Likewise.
	(IX86_BUILTIN_PTESTZ): Likewise.
	(IX86_BUILTIN_PTESTC): Likewise.
	(IX86_BUILTIN_PTESTNZC): Likewise.
	(IX86_BUILTIN_VEC_EXT_V16QI): Likewise.
	(IX86_BUILTIN_VEC_SET_V2DI): Likewise.
	(IX86_BUILTIN_VEC_SET_V4SF): Likewise.
	(IX86_BUILTIN_VEC_SET_V4SI): Likewise.
	(IX86_BUILTIN_VEC_SET_V16QI): Likewise.
	(bdesc_ptest): New.
	(bdesc_sse_3arg): Likewise.
	(bdesc_2arg): Likewise.
	(bdesc_1arg): Likewise.
	(ix86_init_mmx_sse_builtins): Support SSE4.1.  Handle SSE builtins
	with 3 args.
	(ix86_expand_sse_4_operands_builtin): New.
	(ix86_expand_unop_builtin): Support 2 arg builtins with a constant
	smaller than 8 bits as the 2nd arg.
	(ix86_expand_sse_ptest): New.
	(ix86_expand_builtin): Support SSE4.1. Support 3 arg SSE builtins.
	(ix86_expand_vector_set): Support SSE4.1.
	(ix86_expand_vector_extract): Likewise.

	* config/i386/i386.h (TARGET_CPU_CPP_BUILTINS): Define
	__SSE4_1__ for -msse4.1.

	* config/i386/i386.md (UNSPEC_BLENDV): New for SSE4.1.
	(UNSPEC_INSERTPS): Likewise.
	(UNSPEC_DP): Likewise.
	(UNSPEC_MOVNTDQA): Likewise.
	(UNSPEC_MPSADBW): Likewise.
	(UNSPEC_PHMINPOSUW): Likewise.
	(UNSPEC_PTEST): Likewise.
	(UNSPEC_ROUNDP): Likewise.
	(UNSPEC_ROUNDS): Likewise.

	* config/i386/i386.opt (msse4.1): New for SSE4.1.

	* config/i386/predicates.md (const_pow2_1_to_2_operand): New.
	(const_pow2_1_to_32768_operand): Likewise.

	* config/i386/smmintrin.h: New. The SSE4.1 intrinsic header
	file.

	* config/i386/sse.md (*vec_setv4sf_sse4_1): New pattern for
	SSE4.1.
	(sse4_1_insertps): Likewise.
	(*sse4_1_extractps): Likewise.
	(sse4_1_ptest): Likewise.
	(sse4_1_mulv2siv2di3): Likewise.
	(*sse4_1_mulv4si3): Likewise.
	(*sse4_1_smax<mode>3): Likewise.
	(*sse4_1_umax<mode>3): Likewise.
	(*sse4_1_smin<mode>3): Likewise.
	(*sse4_1_umin<mode>3): Likewise.
	(sse4_1_eqv2di3): Likewise.
	(*sse4_1_pinsrb): Likewise.
	(*sse4_1_pinsrd): Likewise.
	(*sse4_1_pinsrq): Likewise.
	(*sse4_1_pextrb): Likewise.
	(*sse4_1_pextrb_memory): Likewise.
	(*sse4_1_pextrw_memory): Likewise.
	(*sse4_1_pextrq): Likewise.
	(sse4_1_blendpd): Likewise.
	(sse4_1_blendps): Likewise.
	(sse4_1_blendvpd): Likewise.
	(sse4_1_blendvps): Likewise.
	(sse4_1_dppd): Likewise.
	(sse4_1_dpps): Likewise.
	(sse4_1_movntdqa): Likewise.
	(sse4_1_mpsadbw): Likewise.
	(sse4_1_packusdw): Likewise.
	(sse4_1_pblendvb): Likewise.
	(sse4_1_pblendw): Likewise.
	(sse4_1_phminposuw): Likewise.
	(sse4_1_extendv8qiv8hi2): Likewise.
	(*sse4_1_extendv8qiv8hi2): Likewise.
	(sse4_1_extendv4qiv4si2): Likewise.
	(*sse4_1_extendv4qiv4si2): Likewise.
	(sse4_1_extendv2qiv2di2): Likewise.
	(*sse4_1_extendv2qiv2di2): Likewise.
	(sse4_1_extendv4hiv4si2): Likewise.
	(*sse4_1_extendv4hiv4si2): Likewise.
	(sse4_1_extendv2hiv2di2): Likewise.
	(*sse4_1_extendv2hiv2di2): Likewise.
	(sse4_1_extendv2siv2di2): Likewise.
	(*sse4_1_extendv2siv2di2): Likewise.
	(sse4_1_zero_extendv8qiv8hi2): Likewise.
	(*sse4_1_zero_extendv8qiv8hi2): Likewise.
	(sse4_1_zero_extendv4qiv4si2): Likewise.
	(*sse4_1_zero_extendv4qiv4si2): Likewise.
	(sse4_1_zero_extendv2qiv2di2): Likewise.
	(*sse4_1_zero_extendv2qiv2di2): Likewise.
	(sse4_1_zero_extendv4hiv4si2): Likewise.
	(*sse4_1_zero_extendv4hiv4si2): Likewise.
	(sse4_1_zero_extendv2hiv2di2): Likewise.
	(*sse4_1_zero_extendv2hiv2di2): Likewise.
	(sse4_1_zero_extendv2siv2di2): Likewise.
	(*sse4_1_zero_extendv2siv2di2): Likewise.
	(sse4_1_roundpd): Likewise.
	(sse4_1_roundps): Likewise.
	(sse4_1_roundsd): Likewise.
	(sse4_1_roundss): Likewise.
	(mulv4si3): Don't expand for SSE4.1.
	(smax<mode>3): Likewise.
	(umaxv4si3): Likewise.
	(uminv16qi3): Likewise.
	(umin<mode>3): Likewise.
	(umaxv8hi3): Rewrite.  Only enabled for SSE4.1.

	* doc/extend.texi: Document SSE4.1 built-in functions.

	* doc/invoke.texi: Document -msse4.1.

Co-Authored-By: Richard Henderson <rth@redhat.com>

From-SVN: r124945
2007-05-22 07:37:19 -07:00
Nathan Sidwell bebb3a98ce linux.h (ASM_SPEC): Add asm_pcrel_spec.
* config/m68k/linux.h (ASM_SPEC): Add asm_pcrel_spec.
	* config/m68k/m68k-none.h (ASM_SPEC): Don't override here.
	* config/m68k/m68k.h (ASM_PCREL_SPEC): New.
	(ASM_SPEC): Add asm_pcrel_spec.
	(EXTRA_SPECS): Add asm_pcrel_spec.

From-SVN: r124937
2007-05-22 06:55:27 +00:00
David Daney c076e75f30 install.texi (Building a cross compiler): Add requirements for Java cross compiler.
* doc/install.texi (Building a cross compiler): Add requirements
	for Java cross compiler.

From-SVN: r124936
2007-05-22 04:06:06 +00:00
Andrew Pinski a50411de14 re PR tree-optimization/31995 (can't determine dependence between p->a[x+i] and p->a[x+i+1])
2007-05-21  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        PR middle-end/31995
        * tree-chrec.c (evolution_function_is_affine_multivariate_p):
        Add loopno argument.  Use evolution_function_is_invariant_rec_p
        instead of evolution_function_is_constant_p.
        Update calls to evolution_function_is_affine_multivariate_p.
        * tree-chrec.h  (evolution_function_is_affine_multivariate_p):
        Add loopno argument.
        * tree-scalar-evolution.c (gather_chrec_stats): Call
        evolution_function_is_affine_multivariate_p with a  loop
        number of 0.
        * tree-data-ref.c (analyze_miv_subscript): Likewise.
        (analyze_overlapping_iterations): Likewise.
        (access_functions_are_affine_or_constant_p):
        Likewise.
        (build_classic_dist_vector_1): If the access functions
        are equal, don't do anything.

2007-05-21  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        PR middle-end/31995
        * gcc.dg/vect/vect-102a.c: New test.

From-SVN: r124927
2007-05-21 16:08:54 -07:00
Paolo Bonzini 60c4429c7e c-cppbuiltin.c (c_cpp_builtins): Define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1...
2007-05-21  Paolo Bonzini  <bonzini@gnu.org>
            Paolo Carlini  <pcarlini@suse.de>
	    Uros Bizjak  <ubizjak@gmail.com>

	* c-cppbuiltin.c (c_cpp_builtins): Define
	__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1, __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2,
	__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4, __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8,
	__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16, if appropriate.
	* doc/cpp.texi ([Standard Predefined Macros]): Document.

2007-05-21  Paolo Bonzini  <bonzini@gnu.org>
            Paolo Carlini  <pcarlini@suse.de>
	    Uros Bizjak  <ubizjak@gmail.com>

	* gcc.dg/gcc-have-sync-compare-and-swap.c,
	gcc.target/i386/gcc-have-sync-compare-and-swap-1.c,
	gcc.target/i386/gcc-have-sync-compare-and-swap-2.c,
	gcc.target/i386/gcc-have-sync-compare-and-swap-3.c,
	gcc.target/i386/gcc-have-sync-compare-and-swap-4.c,
	New testcases.

Co-Authored-By: Paolo Carlini <pcarlini@suse.de>
Co-Authored-By: Uros Bizjak <ubizjak@gmail.com>

From-SVN: r124926
2007-05-21 22:48:38 +00:00
Mike Stump ccd3cc0992 darwin.h (LINK_COMMAND_SPEC): Add .cxx for dsymutil handling as well.
* config/darwin.h (LINK_COMMAND_SPEC): Add .cxx for dsymutil
	handling as well.
	* config/darwin9.h (LINK_COMMAND_SPEC): Likewise.
Radar 5214697

From-SVN: r124909
2007-05-21 20:54:46 +00:00
Uros Bizjak 32fe15ec71 tmmintrin.h (_mm_alignr_epi8): Provide macro implementation if __OPTIMIZE__ is not defined.
* config/i386/tmmintrin.h (_mm_alignr_epi8): Provide macro
	implementation if __OPTIMIZE__ is not defined.
	(_mm_alignr_pi8): Ditto.
	* config/i386/ammintrin.h (_mm_extracti_si64): Ditto.
	(_mm_inserti_si64): Ditto.
	* config/i386/emmintrin.h (_mm_shuffle_pd): Ditto.
	(_mm_slli_epi16): Ditto.
        (_mm_slli_epi32): Ditto.
        (_mm_slli_epi64): Ditto.
	(_mm_srai_epi16): Ditto.
	(_mm_srai_epi32): Ditto.
	(_mm_srli_si128): Ditto.
	(_mm_slli_si128): Ditto.
	(_mm_srli_epi16): Ditto.
        (_mm_srli_epi32): Ditto.
        (_mm_srli_epi64): Ditto.
	(_mm_extract_epi16): Ditto.
	(_mm_insert_epi16): Ditto.
	(_mm_shufflehi_epi16): Ditto.
	(_mm_shufflelo_epi16): Ditto.
	(_mm_shuffle_epi32): Ditto.
        * config/i386/xmmintrin.h (_mm_extract_pi16): Ditto.
        (_m_pextrw): Ditto.
        (_mm_insert_pi16): Ditto.
        (_m_pinsrw): Ditto.
        (_mm_shuffle_pi16): Ditto.
        (_m_pshufw): Ditto.
        (_mm_shufle_ps): Ditto.
        (_mm_prefetch): Ditto.

testsuite/ChangeLog:

	* gcc.target/i386/sse-14.c: Remove all intrinsic redefines.
	* gcc.target/i386/sse-12: Add -O to compile options.
	* g++.dg/other/i386-2.C: Use "-march=k8 -m3dnow -mssse3
	-msse4a" instead of "-msse3".  Include only ammintrin.h, tmmintrin.h
	and mm3dnow.h.  Add -O to compile options.

From-SVN: r124904
2007-05-21 17:40:01 +02:00
Andreas Krebbel 4d8a8a0a22 defaults.h (IBM_FLOAT_FORMAT): Macro definition removed.
2007-05-21  Andreas Krebbel  <krebbel1@de.ibm.com>

	* defaults.h (IBM_FLOAT_FORMAT): Macro definition removed.
	* doc/tm.texi (IBM_FLOAT_FORMAT): Documentation entry removed.
	* real.c (encode_i370_single, decode_i370_single,
	encode_i370_double, decode_i370_double): Functions removed.
	(i370_single_format, i370_double_format): Initializations removed.
	(real_maxval, round_for_format, exact_real_truncate, significand_size):
	Consider the log2_b field to always be one.
	(ieee_single_format, mips_single_format, coldfire_single_format,
	ieee_double_format, mips_double_format,	coldfire_double_format,
	ieee_extended_motorola_format, ieee_extended_intel_96_format,
	ieee_extended_intel_128_format, ieee_extended_intel_96_round_53_format,
	ibm_extended_format, mips_extended_format, ieee_quad_format,
	mips_quad_format, vax_f_format, vax_d_format, vax_g_format,
	decimal_single_format, decimal_double_format, decimal_quad_format,
	c4x_single_format, c4x_extended_format, real_internal_format): Remove
	initialization of log2_b.
	* real.h (i370_single_format, i370_double_format): Declarations removed.
	* c-cppbuiltin.c (builtin_define_float_constants): Consider the log2_b
	field to always be one.

From-SVN: r124901
2007-05-21 12:53:08 +00:00
Andreas Schwab 740aeb384d ia64.c (emit_predicate_relation_info): Fix use of NOTE_INSN_BASIC_BLOCK_P.
* config/ia64/ia64.c (emit_predicate_relation_info): Fix use of
	NOTE_INSN_BASIC_BLOCK_P.
	(process_for_unwind_directive): Likewise.

From-SVN: r124899
2007-05-21 11:29:35 +00:00
Nathan Sidwell ecaebb9e0b builtins.c (expand_builtin_setjmp_setup): Update comment.
* builtins.c (expand_builtin_setjmp_setup): Update comment.
	* function.h (struct function): Move va_list_gpr_size,
	va_list_fpr_size, function_frequency to front of bitfields.  Add
	calls_unwind_init.
	(current_function_calls_unwind_init): New.
	* except.c (expand_builtin_unwind_init): Set
	current_function_calls_unwind_init not
	current_function_has_nonlocal_label.
	* reload1.c (has_nonexceptional_receiver): New.
	(reload): Use it and current_function_calls_unwind_init to
	determine whether call-saved regs must be saved.

From-SVN: r124898
2007-05-21 10:58:29 +00:00
Jan Hubicka a38e7aa544 gengtype.c (adjust_field_rtx_def): Use NOTE_KIND instead of NOTE_LINE_NUMBER...
* gengtype.c (adjust_field_rtx_def): Use NOTE_KIND instead of
	NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible.
	* ddg.c (create_ddg): LIkewise.
	* final.c (final): Remove hunk moving line numbernotes around since
	they are no longer present at this stage.
	(final_scan_insn): Use NOTE_KIND instead of
	NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible.
	(output_asm_label): Likewise.
	* reorg.c (dbr_schedule): Likewise.
	* haifa-sched.c (unlink_other_notes): Likewise.
	* mode-switching.c (optimize_mode_switching): Likewise.
	* graph.c (start_bb): Likewise.
	* rtl.def (NOTE): Update description.
	* jump.c (squeeze_notes): Delete.
	(mark_jump_label): Use NOTE_KIND instead of NOTE_LINE_NUMBER; use
	NOTE_INSN_BASIC_BLOCK_P when possible.
	* ifcvt.c (dead_or_predicable): Remove call of squeeze_notes.
	* dwarf2out.c (gen_label_die): Use NOTE_KIND instead of
        NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible.
	(dwarf2out_var_location): Likewise.
	* cfgbuild.c (make_edges): Likewise.
	(find_basic_blocks_1): Likewise.
	* function.c (reorder_blocks_1): Likewise.
	(epilogue_done): Likewise.
	(reposition_prologue_and_epilogue_notes): Likewise.
	* print-rtl.c (print_rtx): Likewise; drop code for printing line number
	notes.
	(print_rtl): Likewise.
	(print_rtl_single): Likewise.
	* gcse.c (insert_insn_start_bb): Likewise.
	* alias.c (init_alias_analysis): Likewise.
	* calls.c (fixup_tail_calls): Likewise.
	* except.c (sjlj_emit_function_enter): Likewise.
	* emit-rtl.c (add_insn_after): Likeiwse.
	(emit_label_before): Likewise.
	(emit_label_after): Likewise.
	(emit_note_before, emit_note_after, emit_note): Update
	parameter to be enum insn_note; do not deal with source
	files.
	* cfgcleanup.c (merge_blocks_move_predecessor_nojumps):
	Use NOTE_KIND instead of NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P
	when possible.
	(merge_blocks_move_successor_nojumps): Simplify now when
	we don't have BLOCK notes.
	(try_optimize_cfg): Likewise.
	* cfglayout.c (skip_insns_after_block): Likewise.
	(record_effective_endpoints): Likewise.
	(duplicate_insn_chain): Likewise.
	* varasm.c (output_constant_pool_1): Likewise.
	* sched-deps.c (sched_analyze): Likewise.
	* rtl.c (NOTE_INSN_MAX_isnt_negative_adjust_NOTE_INSN_BIAS):
	Exterminate.
	(note_insn_name): Simplify now when NOTE_INSN_BIAS is gone.
	* rtl.h (NOTE_SOURCE_LOCATION, NOTE_EXPANDED_LOCATION): Exterminate.
	(SET_INSN_DELETED): Simplify.
	(NOTE_LINE_NUMBER): Exterminate.
	(NOTE_LINE_KIND): New.
	(NOTE_INSN_BASIC_BLOCK_P): Update.
	(enum insn_note): Simplify.
	(GET_NOTE_INSN_NAME) Simplify.
	(emit_note_before, emit_note_after, emit_note): Update prototype.
	(squeeze_notes): Remove.
	* sched-int.h (NOTE_NOT_BB_P): Update.
	* resource.c (mark_target_live_regs): Update.
	* sched-rgn.c (debug_dependencies): Update.
	* sched-vis.c (print_insn): Update.
	* config/alpha/alpha.c (alpha_handle_trap_shadows): Update.
	* config/i386/i386.c (ix86_output_function_epilogue): Update.
	* config/sh/sh.c (sh_adjust_unroll_max): Function dead since gcc 4.0.0.
	(TARGET_ADJUST_UNROLL_MAX): Likewise.
	(split_branches): Update.
	(sh_optimize_target_register_callee_saved): Remove hunk dead since gcc
	4.0.0.
	(sh_adjust_unroll_max): Exterminate.
	* config/c4x/c4x.c (c4x_reorg): Use SET_INSN_DELETED.
	* config/m68hc11/m68hc11.c (m68hc11_check_z_replacement): Likewise.
	(m68hc11_reorg): Likewise.
	* config/ia64/ia64.c (emit_insn_group_barriers): Update.
	(emit_predicate_relation_info): Update.
	(process_for_unwind_directive): Update.
	* config/rs6000/rs6000.c (rs6000_output_function_epilogue): Update.
	(output_call): Update.
	* config/pa/pa.c (output_lbranch): Update.
	(output_millicode_call): Update.
	(output_call): Update.
	(pa_combine_instructions): Update.
	* config/mips/mips.c (mips16_gp_pseudo_reg): Update.
	* config/bfin/bfin.c (gen_one_bundle): Update.
	* cfgrtl.c (can_delete_note_p): Update.
	(delete_insn): Update.
	(rtl_merge_blocks): Update.
	(commit_one_edge_insertion): Update.
	(rtl_verify_flow_info): Update.
	* stmt.c (expand_case): Do not call squeeze_notes.

From-SVN: r124895
2007-05-21 06:19:50 +00:00
Manuel López-Ibáñez aac8bf8060 Changelog: Fix wrong year.
* gcc/Changelog: Fix wrong year.
        * gcc/testsuite/Changelog: Likewise.

From-SVN: r124877
2007-05-20 20:56:52 +00:00
Manuel López-Ibáñez f6aa72dd49 re PR middle-end/7651 (Define -Wextra strictly in terms of other warning flags)
2007-05-20  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
	
	PR middle-end/7651
	PR c++/11856
	PR c/12963
	PR c/23587
	PR other/29694
	* c.opt (Wtype-limits): New.
	* doc/invoke.texi (Wtype-limits): Document it.
	(Wextra): Enabled by -Wextra.
	* c-opts.c (c_common_post_options): Enabled by -Wextra.
	* c-common.c (shorten_compare): Warn with Wtype-limits.

testsuite/
	* gcc.dg/compare6.c: Replace Wall with Wtype-limits.
	* gcc.dg/Wtype-limits.c: New.
	* gcc.dg/Wtype-limits-Wextra.c: New.
	* gcc.dg/Wtype-limits-no.c: New.
	* g++.dg/warn/Wtype-limits.C: New.
	* g++.dg/warn/Wtype-limits-Wextra.C: New.
	* g++.dg/warn/Wtype-limits-no.C: New.

From-SVN: r124875
2007-05-20 20:29:55 +00:00
Uros Bizjak 46fb8f6ba3 tmmintrin.h (_mm_alignr_epi32): Implement as always inlined function, not as a macro.
* config/i386/tmmintrin.h (_mm_alignr_epi32): Implement as always
        inlined function, not as a macro.
        (_mm_alignr_pi8): Ditto.
        * config/i386/ammintrin.h (_mm_extracti_si64): Ditto.
        (_mm_inserti_si64): Ditto.
        * config/i386/emmintrin.h (_mm_shuffle_pd): Ditto.
        (_mm_extract_epi16): Ditto.
        (_mm_insert_epi16): Ditto.
        (_mm_shufflehi_epi16): Ditto.
        (_mm_shufflelo_epi16): Ditto.
        (_mm_shuffle_epi32): Ditto.
        * config/i386/xmmintrin.h (_mm_set_ss): Use 0.0f for float constant.
        * config/386/mm3dnow.h: Add __attribute__((__always_inline__)) to
        all functions.
        (_m_from_float): Add __extension__ to conversion.  Use 0.0f for
        float constant.
        (_m_to_float): Use C89 compatible assignment.

testsuite/ChangeLog:

        * gcc.target/i386/sse-vect-types.c: Revert 'Use "-msse"
        instead of "-msse2".'
        * gcc.target/i386/sse-12.c: Use "-march=k8 -m3dnow -mssse3 -msse4a"
        instead of "-msse3".  Include only ammintrin.h, tmmintrin.h
        and mm3dnow.h.
        * gcc.target/i386/sse-13.c (__builtin_ia32_extrqi): Redefine
        to test with immediate operand.
        (__builtin_ia32_insertqi): Ditto.
        (__builtin_ia32_palignr128): Ditto.
        (__builtin_ia32_palignr): Ditto.
        (__builtin_ia32_pshufhw): Ditto.
        (__builtin_ia32_pshuflw): Ditto.
        (__builtin_ia32_pshufd): Ditto.
        (__builtin_ia32_vec_set_v8hi): Ditto.
        (__builtin_ia32_vec_ext_v8hi): Ditto.
        (__builtin_ia32_shufpd): Ditto.
        * gcc.target/i386/sse-14.c: Same changes as sse-13.c.

From-SVN: r124873
2007-05-20 15:41:13 +02:00
Martin Michlmayr dde27bba7d re PR target/32007 (bootstrap broken on ARM v3)
2007-04-20  Martin Michlmayr  <tbm@cyrius.com>

	PR target/32007
	* config/arm/lib1funcs.asm: Define __ARM_ARCH__ on v2/v3 machines.

From-SVN: r124871
2007-05-20 11:18:27 +00:00
Manuel López-Ibáñez ffd5f27613 re PR middle-end/7651 (Define -Wextra strictly in terms of other warning flags)
2006-05-20  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>

	PR middle-end/7651
	* doc/invoke.texi (Wreturn-type): Complete description.
	(Wextra): Delete item about return-type warning.
	* c-decl.c: Delete redundant Wextra warning.

testsuite/
	* gcc.dg/20030906-1.c: Replace Wextra with Wreturn-type.
	* gcc.dg/20030906-2.c: Likewise.
	* objc.dg/method-17.m: Add -Wreturn-type.
	* obj-c++.dg/method-21.mm: Likewise.

From-SVN: r124866
2007-05-20 00:45:58 +00:00
Uros Bizjak 376a4c0534 re PR target/31585 (gcc.target/i386/sse-vect-types.c FAILs (also sse-13.c and sse-14.c))
PR target/31585
        * config/i386/pmmintrin.h: Do not include xmmintrin.h
        * config/i386/xmmintrin.h (_mm_extract_pi16): Implement as always
        inlined function, not as a macro.
        (_mm_prefetch): Ditto.
        (_m_pextrw): Ditto.
        (_mm_insert_pi16): Ditto.
        (_m_pinsrw): Ditto.
        (_mm_shuffle_pi16): Ditto.  Add const to __N argument.
        (_m_pshufw): Ditto. Add const to __N argument.
        (_mm_shufle_ps): Ditto.  Add const to __mask argument.
        * config/i386/emmintrin.h (_mm_slli_epi16): Add const to __B argument.
        (_mm_slli_epi32): Ditto.
        (_mm_srli_si128): Implement as always inlined function, not as a macro.
        Add __inline to function declaration.
        (_mm_slli_si128): Ditto.

testsuite/ChangeLog:

        PR target/31585
        * gcc.target/i386/sse-13.c: Use -mssse3 and -msse4a compile options.
        (__builtin_ia32_psllwi128): Redefine to test with immediate operand.
        (__builtin_ia32_psrlqi128): Ditto.
        (__builtin_ia32_psrlwi128): Ditto.
        (__builtin_ia32_psrldi128): Ditto.
        (__builtin_ia32_psrldqi128): Ditto.
        (__builtin_ia32_pslldqi128): Ditto.
        (__builtin_ia32_psrawi128): Ditto.
        (__builtin_ia32_psradi128): Ditto.
        (__builtin_ia32_psllqi128): Ditto.
        (__builtin_ia32_pslldi128): Ditto.
        (__builtin_prefetch): Ditto.
        (__builtin_ia32_pshufw): Ditto.
        (__builtin_ia32_vec_set_v4hi): Ditto.
        (__builtin_ia32_vec_ext_v4hi): Ditto.
        (__builtin_ia32_shufps): Ditto.
        * gcc.target/i386/sse-14.c: Same changes as sse-13.c.

From-SVN: r124861
2007-05-20 01:27:48 +02:00
Uros Bizjak e9d416168f sfp-machine.h (FP_EX_INVALID, [...]): New constants.
* config/i386/sfp-machine.h (FP_EX_INVALID, FP_EX_DENORM,
        FP_EXP_DIVZERO, FP_EX_OVERFLOW, FP_EX_UNDERFLOW, FP_EX_INEXACT):
        New constants.
        (struct fenv): New structure.
        (FP_HANDLE_EXCEPTIONS): New define.
        (FP_RND_NEAREST, FP_RND_ZERO, FP_RND_PINF, FP_RND_MINF): New constants.
        (_FP_DECL_EXP): New define.
        (FP_INIT_ROUNDMODE): New define.
        (FP_ROUNDMODE): New define.

From-SVN: r124857
2007-05-19 21:19:08 +02:00
Manuel López-Ibáñez 7060db96db invoke.texi (Warning Options): Add -Wconversion-sign.
2007-05-19  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>

	* doc/invoke.texi (Warning Options): Add -Wconversion-sign.
	(Wconversion): Update description.
	(Wconversion-sign): New.
	* c.opt (Wconversion-sign): New.
	* c-opts.c (c_common_post_options): Uninitialized Wconversion-sign
	means disabled for C++. Otherwise, take the status of Wconversion.
	* c-common.c (conversion_warning): Warn with either Wconversion or
	Wconversion-sign.
	(warnings_for_convert_and_check): Conditions are already checked by
	conversion_warning.
	(convert_and_check): Don't check warnings if the conversion failed.

cp/
	* cvt.c (cp_convert_and_check): Don't check warnings if the
	conversion failed.

testsuite/
	* gcc.dg/Wconversion-integer.c: Group testcases and add more.
	* gcc.dg/Wconversion-sign.c: New.
	* gcc.dg/Wconversion-integer-no-sign.c: New.
	* g++.dg/warn/Wconversion-integer.C: Move some warnings to
	Wconversion-sign.C
	* g++.dg/warn/Wconversion-sign.C: New.
	* g++.old-deja/g++.other/warn4.C: Update.
	* g++.dg/warn/Wconversion1.C: Likewise.

From-SVN: r124856
2007-05-19 13:32:03 +00:00
Andy Hutchinson 4fc2b4ff18 avr-protos.h (expand_prologue, [...]): Add declaration.
* config/avr/avr-protos.h (expand_prologue, expand_epilogue, 
	avr_epilogue_uses) : Add declaration.
	* config/avr/predicates.md (avr_sp_immediate_operand): New predicate.
	* config/avr/constraints.md (R): New constraint.
	config/avr/avr.md (SREG_ADDR,  UNSPEC_SEI, UNSPEC_CLI, 
	UNSPECV_PROLOGUE_SAVES, UNSPECV_EPILOGUE_RESTORES): New constants.
	(*pop1, *pop2, *pop3, *pop4, *pop5): Combine into ...
	(*addhi3_sp_R_pc2, *addhi3_sp_R_pc3): ... these patterns.
	(*movhi_sp, popqi, pophi, enable_interrupt, disable_interrupt, 
	call_prologue_saves, epilogue_restores, return_from_epilogue,
	return_from_main_epilogue, return_from_interrupt_epilogue, 
	return_from_naked_epilogue, prologue, epilogue): New patterns.
	(jump): Handle symbol reference.
	* config/avr/avr.c (out_adj_frame_ptr, out_set_stack_ptr, 
	avr_output_function_prologue, avr_output_function_epilogue): Remove 
	functions.
	(avr_init_machine_status, expand_prologue, expand_epilogue, 
	avr_asm_function_end_prologue, avr_epilogue_uses, 
	avr_asm_function_begin_epilogue): New functions.
	(prologue_size, epilogue_size, jump_tables_size): Remove global 
	variables.
	(TARGET_ASM_FUNCTION_PROLOGUE, TARGET_ASM_FUNCTION_EPILOGUE): Remove.
	(TARGET_ASM_FUNCTION_END_PROLOGUE): Define.
	(TARGET_ASM_FUNCTION_BEGIN_EPILOGUE): Define.
	(avr_override_options): Initialise init_machine_status.
	(output_movhi): Handle all stack pointer loads.
	(out_movqi_r_mr, out_movqi_mr_r): Handle SREG_ADDR address.
	(avr_output_addr_vec_elt): Do not use variable jump_tables_size.
	* config/avr/avr.h (AVR_2_BYTE_PC, AVR_3_BYTE_PC): New.
	(EPILOGUE_USES) Redefine.
	(machine_function) Declare.

Co-Authored-By: Anatoly Sokolov <aesok@dol.ru>

From-SVN: r124854
2007-05-19 14:59:17 +04:00
Richard Sandiford 6de3644168 mips.c (mips_offset_within_alignment_p): Tweak comment.
gcc/
	* config/mips/mips.c (mips_offset_within_alignment_p): Tweak comment.
	Use a single return statement.

From-SVN: r124853
2007-05-19 07:21:41 +00:00
Kaveh R. Ghazi 752b7d38db re PR middle-end/30250 (Evaluate lgamma/gamma at compile-time)
PR middle-end/30250
	* builtins.c (do_mpfr_lgamma_r): New.
	(fold_builtin_2): Handle builtin gamma_r/lgamma_r.
	* tree.h (CASE_FLT_FN_REENT): New.

testsuite:
	* gcc.dg/torture/builtin-math-2.c: Add gamma_r/lgamma_r tests.
	* gcc.dg/torture/builtin-math-4.c: Likewise.

From-SVN: r124849
2007-05-19 04:18:05 +00:00
Geoffrey Keating 8d5b1b6786 Index: gcc/java/ChangeLog
2007-05-18  Geoffrey Keating  <geoffk@apple.com>

	* jcf-dump.c (HANDLE_MAGIC): Use 'unsigned long' for %lx.
	(print_constant): Likewise.

Index: gcc/ChangeLog
2007-05-18  Geoffrey Keating  <geoffk@apple.com>

	* dwarf2out.c (print_die): Use '%ld' not '%lu' to print a 'long'.
	(output_die): Use 'unsigned long' with %x.
	* sched-vis.c (print_value): Use 'unsigned HOST_WIDE_INT' and
	HOST_WIDE_INT_PRINT_HEX to print HOST_WIDE_INT.
	* tree-dump.c (dump_pointer): Use 'unsigned long' for %lx.

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

	* mangle.c (write_real_cst): Use 'unsigned long' for %lx.

From-SVN: r124839
2007-05-18 23:05:50 +00:00
Geoffrey Keating ca0d5e024b * unwind-dw2.c (uw_identify_context): Use the CFA, not the IP.
From-SVN: r124837
2007-05-18 22:50:18 +00:00
H.J. Lu f8024378a1 re PR target/31989 (Gcc miscompiles C/C++ on Linux/x86-64)
2007-05-18  H.J. Lu  <hongjiu.lu@intel.com>

	PR target/31989
	PR target/31681
	PR target/31666
	* config/i386/i386.c (init_cumulative_args): Set maybe_vaarg to
	true if function has no argument.

From-SVN: r124835
2007-05-18 14:35:12 -07:00
DJ Delorie 8b5fb3a36f mips.c (mips_offset_within_alignment_p): New.
* config/mips/mips.c (mips_offset_within_alignment_p): New.
(mips_symbolic_constant_p): Call it for TPREL and DTPREL symbols.

From-SVN: r124833
2007-05-18 17:15:50 -04:00
Uros Bizjak e7e0aaeca8 longlong.h (__x86_64__): Add definitions for add_ssaaaa...
* longlong.h (__x86_64__): Add definitions for add_ssaaaa,
        sub_ddmmss, umul_ppmm, udiv_qrnnd, count_leading_zeros and
        count_trailing_zeros.
        (__i386__): Implement count_leading_zeros using __builtin_clz().
        Implement count_trailing_zeros usign __builtin_ctz().

From-SVN: r124832
2007-05-18 22:14:31 +02:00
Richard Sandiford 10d7f5f36e vxworks.h (ASM_PREFERRED_EH_DATA_FORMAT): Undefine.
gcc/
	* config/i386/vxworks.h (ASM_PREFERRED_EH_DATA_FORMAT): Undefine.

From-SVN: r124827
2007-05-18 09:31:33 +00:00
Uros Bizjak 8ecaacaf28 * PR rtl-optimization/31344 is actually middle-end bug.
From-SVN: r124826
2007-05-18 10:46:30 +02:00
Uros Bizjak 4bcc9de5fd re PR middle-end/31344 (bootstrap broken on i[345]86-linux)
PR rtl-optimization/31344
	* expr.c (emit_move_change_mode): Change mode of push operands here.

testsuite/ChangeLog:

	PR rtl-optimization/31344
	* gcc.dg/pr31344.c: New test.

From-SVN: r124825
2007-05-18 10:37:03 +02:00
Ian Lance Taylor b60b471172 re PR tree-optimization/31953 (ICE in set_value_range, at tree-vrp.c:305)
./:	PR tree-optimization/31953
	* tree-vrp.c (set_value_range_to_value): Add equiv parameter.
	Change all callers.
	(set_value_range_to_null): Call set_value_range_to_value.
	(extract_range_from_comparison): Likewise.
testsuite/:
	PR tree-optimization/31953
	* gcc.c-torture/compile/pr31953.c: New test.

From-SVN: r124823
2007-05-18 05:37:27 +00:00
Kaveh R. Ghazi 0968bb3d1d toplev.c (print_version): Output GMP/MPFR version info.
* toplev.c (print_version): Output GMP/MPFR version info.

From-SVN: r124822
2007-05-18 02:04:02 +00:00
Kaveh R. Ghazi bf460eec6f builtins.c (CASE_MATHFN_REENT): New macro.
* builtins.c (CASE_MATHFN_REENT): New macro.
	(mathfn_built_in): Use it.
	* builtins.def (BUILT_IN_GAMMA_R, BUILT_IN_GAMMAF_R,
	BUILT_IN_GAMMAL_R, BUILT_IN_LGAMMA_R, BUILT_IN_LGAMMAF_R,
	BUILT_IN_LGAMMAL_R): New.
	* doc/extend.texi: Document new builtins.

testsuite:
	* gcc.dg/builtins-1.c: Test reentrant gamma functions.

From-SVN: r124821
2007-05-18 01:42:15 +00:00
Kaveh R. Ghazi ea91f95764 re PR middle-end/31796 (Evaluate remquo/remainder/drem at compile-time)
PR middle-end/31796
	* builtins.c (do_mpfr_remquo): New.
	(fold_builtin_2): Handle BUILT_IN_DREM/BUILT_IN_REMAINDER.
	(fold_builtin_3): Handle BUILT_IN_REMQUO.

testsuite:
	* gcc.dg/torture/builtin-math-2.c: Add tests for remquo, remainder
	and drem.
	* gcc.dg/torture/builtin-math-4.c: Likewise.

From-SVN: r124820
2007-05-18 01:31:20 +00:00
Kaveh R. Ghazi fd2ef596b5 re PR middle-end/30251 (Evaluate bessel functions at compile-time)
PR middle-end/30251
	* builtins.c (fold_builtin_1): Handle y0, y1.
	(fold_builtin_2): Handle yn.

testsuite:
	* gcc.dg/torture/builtin-math-2.c: Test y0, y1, yn.
	* gcc.dg/torture/builtin-math-4.c: Likewise.

From-SVN: r124819
2007-05-18 01:15:28 +00:00
Kaveh R. Ghazi 550b318767 re PR middle-end/30251 (Evaluate bessel functions at compile-time)
PR middle-end/30251
	* builtins.c (do_mpfr_bessel_n): New.
	(fold_builtin_1): Handle BUILT_IN_J0 and BUILT_IN_J1.
	(fold_builtin_2): Handle BUILT_IN_JN.

testsuite:
	* gcc.dg/torture/builtin-math-4.c: New test.

From-SVN: r124818
2007-05-18 01:04:12 +00:00
Danny Smith a7d0b2d809 re PR target/31965 (_INTEGRAL_MAX_BITS defined incorrectly)
PR target/31965
	* config/i386/mingw32.h (_INTEGRAL_MAX_BITS): Define builtin as
	TYPE_PRECISION (intmax_type_node).

From-SVN: r124813
2007-05-17 22:51:05 +00:00
Steve Ellcey 0fa4cb7dd9 re PR target/31850 (gcc.c-torture/compile/limits-fnargs.c is slow at compiling for spu-elf)
PR target/31850
	* reload.c (subst_reloads): Remove checking.

From-SVN: r124810
2007-05-17 20:29:34 +00:00
Eric Botcazou 4eff80454b re PR rtl-optimization/31691 (optimized code taking the wrong branch)
PR rtl-optimization/31691
	* combine.c (simplify_set): Build a new src pattern instead of
	substituting its operands in the COMPARE case.

From-SVN: r124797
2007-05-17 13:29:10 +00:00
Zdenek Dvorak b02b9b53ec tree-vrp.c (finalize_jump_threads): Do not care about dominance info.
* tree-vrp.c (finalize_jump_threads): Do not care about dominance info.
	(execute_vrp): Preserve loops through jump threading.
	* tree-ssa-threadupdate.c (thread_single_edge,
	dbds_continue_enumeration_p, determine_bb_domination_status,
	thread_through_loop_header): New functions.
	(create_edge_and_update_destination_phis,
	create_edge_and_update_destination_phis): Set loops for the new blocks.
	(prune_undesirable_thread_requests): Removed.
	(redirect_edges): Do not pretend that redirect_edge_and_branch can
	create new blocks.
	(thread_block): Do not call prune_undesirable_thread_requests.
	Update loops.
	(mark_threaded_blocks): Select edges to thread here.
	(thread_through_all_blocks): Take may_peel_loop_headers argument.
	Thread edges through loop headers independently.
	* cfgloopmanip.c (create_preheader, mfb_keep_just): Export.
	* tree-pass.h (TODO_mark_first_instance): New.
	(first_pass_instance): Declare.
	* cfghooks.c (duplicate_block): Put the block to the original loop
	if copy is not specified.
	* tree-ssa-dom.c (tree_ssa_dominator_optimize): Preserve loops through
	jump threading.  Pass may_peel_loop_headers to
	thread_through_all_blocks according to first_pass_instance.
	* cfgloop.h (create_preheader): Declare.
	* tree-flow.h (thread_through_all_blocks): Declaration changed.
	* basic-block.h (mfb_keep_just, mfb_kj_edge): Declare.
	* passes.c (first_pass_instance): New variable.
	(next_pass_1): Set TODO_mark_first_instance.
	(execute_todo): Set first_pass_instance.

	* gcc.dg/tree-ssa/ssa-dom-thread-2.c: New test.
	* gcc.dg/vect/vect-102.c, gcc.dg/vect/vect-103.c,
	gcc.dg/vect/vect-104.c: Use more complex construction to prevent vectorizing.
	* gcc.dg/tree-ssa/pr21559.c: Update outcome.

From-SVN: r124786
2007-05-17 08:10:24 +00:00
Uros Bizjak d9987fb407 re PR tree-optimization/24659 (Conversions are not vectorized)
PR tree-optimization/24659
        * optabs.h (enum optab_index): Add OTI_vec_unpacks_float_hi,
	OTI_vec_unpacks_float_lo, OTI_vec_unpacku_float_hi,
	OTI_vec_unpacku_float_lo, OTI_vec_pack_sfix_trunc and
	OTI_vec_pack_ufix_trunc.
	(vec_unpacks_float_hi_optab): Define new macro.
	(vec_unpacks_float_lo_optab): Ditto.
	(vec_unpacku_float_hi_optab): Ditto.
	(vec_unpacku_float_lo_optab): Ditto.
	(vec_pack_sfix_trunc_optab): Ditto.
	(vec_pack_ufix_trunc_optab): Ditto.
	* genopinit.c (optabs): Implement vec_unpack[s|u]_[hi|lo]_optab
	and vec_pack_[s|u]fix_trunc_optab using
	vec_unpack[s|u]_[hi\lo]_* and vec_pack_[u|s]fix_trunc_* patterns
	* tree-vectorizer.c (supportable_widening_operation): Handle
	FLOAT_EXPR and CONVERT_EXPR.  Update comment.
	(supportable_narrowing_operation): New function.
	* tree-vectorizer.h (supportable_narrowing_operation): Prototype.
	* tree-vect-transform.c (vectorizable_conversion): Handle
	(nunits_in == nunits_out / 2) and (nunits_out == nunits_in / 2) cases.
	(vect_gen_widened_results_half): Move before vectorizable_conversion.
	(vectorizable_type_demotion): Call supportable_narrowing_operation()
	to check for target support.
	* optabs.c (optab_for_tree_code) Return vec_unpack[s|u]_float_hi_optab
	for VEC_UNPACK_FLOAT_HI_EXPR, vec_unpack[s|u]_float_lo_optab
	for VEC_UNPACK_FLOAT_LO_EXPR and vec_pack_[u|s]fix_trunc_optab
	for VEC_PACK_FIX_TRUNC_EXPR.
	(expand_binop): Special case mode of the result for
	vec_pack_[u|s]fix_trunc_optab.
	(init_optabs): Initialize vec_unpack[s|u]_[hi|lo]_optab and
	vec_pack_[u|s]fix_trunc_optab.

	* tree.def (VEC_UNPACK_FLOAT_HI_EXPR, VEC_UNPACK_FLOAT_LO_EXPR,
	VEC_PACK_FIX_TRUNC_EXPR): New tree codes.
	* tree-pretty-print.c (dump_generic_node): Handle
	VEC_UNPACK_FLOAT_HI_EXPR, VEC_UNPACK_FLOAT_LO_EXPR and
	VEC_PACK_FIX_TRUNC_EXPR.
	(op_prio): Ditto.
	* expr.c (expand_expr_real_1): Ditto.
	* tree-inline.c (estimate_num_insns_1): Ditto.
	* tree-vect-generic.c (expand_vector_operations_1): Ditto.

	* config/i386/sse.md (vec_unpacks_float_hi_v8hi): New expander.
	(vec_unpacks_float_lo_v8hi): Ditto.
	(vec_unpacku_float_hi_v8hi): Ditto.
	(vec_unpacku_float_lo_v8hi): Ditto.
	(vec_unpacks_float_hi_v4si): Ditto.
	(vec_unpacks_float_lo_v4si): Ditto.
	(vec_pack_sfix_trunc_v2df): Ditto.

	* doc/c-tree.texi (Expression trees) [VEC_UNPACK_FLOAT_HI_EXPR]:
	Document.
	[VEC_UNPACK_FLOAT_LO_EXPR]: Ditto.
	[VEC_PACK_FIX_TRUNC_EXPR]: Ditto.
	* doc/md.texi (Standard Names) [vec_pack_sfix_trunc]: Document.
	[vec_pack_ufix_trunc]: Ditto.
	[vec_unpacks_float_hi]: Ditto.
	[vec_unpacks_float_lo]: Ditto.
	[vec_unpacku_float_hi]: Ditto.
	[vec_unpacku_float_lo]: Ditto.

testsuite/ChangeLog:

	PR tree-optimization/24659
	* gcc.dg/vect/vect-floatint-conversion-2.c: New test.
	* gcc.dg/vect/vect-intfloat-conversion-1.c: Require vect_float,
	not vect_int target.
	* gcc.dg/vect/vect-intfloat-conversion-2.c: Require vect_float,
	not vect_int target.  Loop is vectorized for vect_intfloat_cvt
	targets.
	* gcc.dg/vect/vect-intfloat-conversion-3.c: New test.
	* gcc.dg/vect/vect-intfloat-conversion-4a.c: New test.
	* gcc.dg/vect/vect-intfloat-conversion-4b.c: New test.

From-SVN: r124784
2007-05-17 08:31:05 +02:00
Uros Bizjak 27735edb45 README: Update for new files.
* soft-fp/README: Update for new files.
        * soft-fp/floattisf.c: New file.
        * soft-fp/floattidf.c: New file.
        * soft-fp/floattitf.c: New file.
        * soft-fp/floatuntisf.c: New file.
        * soft-fp/floatuntidf.c: New file.
        * soft-fp/floatuntitf.c: New file.
        * soft-fp/fixsfti.c: New file.
        * soft-fp/fixdfti.c: New file.
        * soft-fp/fixtfti.c: New file.
        * soft-fp/fixunssfti.c: New file.
        * soft-fp/fixunsdfti.c: New file.
        * soft-fp/fixunstfti.c: New file.
        * soft-fp/extendxftf.c: New file.
        * soft-fp/trunctfxf.c: New file.

        * libgcc-std.ver (__extendxftf2): Added to GCC_4.3.0 section.
        (__trunctfxf2): Ditto.

        * config/i386/libgcc-x86_64-glibc.ver (__addtf3, __divtf3, __eqtf2,
        __extenddftf2, __extendsftf2, __fixtfdi, __fixtfsi, __fixtfti,
        __fixunstfdi, __fixunstfsi, __fixunstfti, __floatditf, __floatsitf,
        __floattitf, __floatunditf, __floatunsitf, __floatuntitf, __getf2,
        __letf2, __multf3, __negtf2, __subtf3, __trunctfdf2, __trunctfsf2,
        __unordtf2): Exclude and add to GCC_4.3.0 section for x86_64 targets.

        * config/i386/t-fprules-softfp64: New file.
        * config/i386/sfp-machine.h: New file.
        * config.gcc (x86_64-*-linux*, x86_64-*-kfreebsd*-gnu,
        x86_64-*-knetbsd*-gnu): Add i386/t-fprules-softfp64
        and soft-fp/t-softfp to tmake_file.
        (i[34567]86-*-linux*, i[34567]86-*-kfreebsd*-gnu,
        i[34567]86-*-knetbsd*-gnu): Ditto for --enable-targets=all.

        * config/i386/t-linux64 (softfp_wrap_start): New.
        (softfp_wrap_end): New.
        * config/i386/i386.c (ix86_scalar_mode_supported): TFmode is
        supported for TARGET_64BIT.

testsuite/ChangeLog:

        * gcc.dg/torture/fp-int-convert-float128.c: Do not xfail for i?86-*-*
        and x86_64-*-* targets.
        * gcc.dg/torture/fp-int-convert-float128-timode.c: Ditto.

From-SVN: r124775
2007-05-16 19:07:07 +02:00
Rafael Avila de Espindola c74a03d23e c-common.c (c_common_signed_or_unsigned_type): Emulate c_common_unsigned_type behavior.
2007-05-16  Rafael Avila de Espindola  <espindola@google.com>

       * c-common.c (c_common_signed_or_unsigned_type): Emulate
       c_common_unsigned_type behavior.

From-SVN: r124771
2007-05-16 16:26:21 +00:00
Paolo Bonzini 2d79fde8c2 i386.c (legitimize_tls_address): Mark __tls_get_addr calls as pure.
2007-05-16  Paolo Bonzini  <bonzini@gnu.org>

        * config/i386/i386.c (legitimize_tls_address): Mark __tls_get_addr
        calls as pure.

From-SVN: r124765
2007-05-16 09:23:21 +00:00
Eric Christopher 2b2c2fe51a rs6000.c (rs6000_emit_prologue): Move altivec register saving after stack push.
2007-05-16  Eric Christopher  <echristo@apple.com>

	* config/rs6000/rs6000.c (rs6000_emit_prologue): Move altivec register
        saving after stack push. Set sp_offset whenever we push.
        (rs6000_emit_epilogue): Move altivec register restore before stack push.

From-SVN: r124763
2007-05-16 08:30:10 +00:00
Richard Sandiford 748670c25b configure.ac: Allow sysroots to be relocated under $prefix as well as $exec_prefix.
gcc/
	* configure.ac: Allow sysroots to be relocated under $prefix as
	well as $exec_prefix.
	* configure: Regenerate.

From-SVN: r124762
2007-05-16 07:14:40 +00:00
Richard Sandiford 4ef2b6ed33 revert: configure.ac (gcc_gxx_include_dir): Use $(libsubdir_to_prefix).
gcc/
	Revert:

	2007-05-12  Richard Sandiford  <richard@codesourcery.com>

	* 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: r124760
2007-05-16 06:43:36 +00:00
Janis Johnson 3bf6bfcc7e c-typeck.c (build_binary_op): Return early for error.
gcc/
	* c-typeck.c (build_binary_op): Return early for error.
gcc/testsuite/
	* gcc.dg/dfp/usual-arith-conv-bad.c: New test.

From-SVN: r124732
2007-05-14 23:49:36 +00:00
Zdenek Dvorak 9e2f83a5e8 tree-ssa-loop-niter.c (record_estimate): Use GGC_NEW to allocate struct nb_iter_bound.
* tree-ssa-loop-niter.c (record_estimate): Use GGC_NEW to allocate
	struct nb_iter_bound.
	(free_numbers_of_iterations_estimates_loop): Use ggc_free.
	* gengtype.c (open_base_files): Add cfhloop.h to the list of includes.
	* cfgloopmanip.c (place_new_loop): Vector larray is gc-allocated.
	* tree-scalar-evolution.c: Include gt-tree-scalar-evolution.h.
	(struct scev_info_str, scalar_evolution_info): Add GTY markers.
	(new_scev_info_str): Use GGC_NEW to allocate struct scev_info_str.
	(del_scev_info): Use ggc_free.
	(scev_initialize): Allocate scalar_evolution_info in gc memory.
	* loop-init.c: Include ggc.h.
	(loop_optimizer_init): Use GGC_CNEW to allocate struct loops.
	(loop_optimizer_finalize): Use ggc_free.
	* tree-ssa-loop.c (pass_tree_unswitch, pass_vectorize,
	pass_linear_transfom, pass_empty_loop, pass_complete_unroll,
	pass_iv_optimize): Add TODO_ggc_collect.
	* function.h (struct function): Remove skip marker from x_current_loops.
	* cfgloop.c: Include ggc.h.
	(flow_loops_free, flow_loop_free): Free the loop descriptions in gc
	memory.
	(establish_preds): Vector superloops is gc allocated.
	(alloc_loop): Allocate loop using GGC_CNEW.  Allocate head of
	loop->exits list.
	(flow_loops_find): Vector larray is gc allocated.
	(loop_exit_free): Use ggc_free.
	(rescan_loop_exit): Use GGC_NEW to allocate struct loop_exit.  Reflect
	that head of exits list is now not a part of struct loop.
	(record_loop_exits): Allocate exits table in gc memory.
	(get_loop_exit_edges, verify_loop_structure, single_exit): Reflect that
	head of exits list is now not a part of struct loop.
	* cfgloop.h (struct lpt_decision, struct nb_iter_bound,
	struct loop_exit): Add GTY marker.
	(struct loop): Add GTY marker.  Make superloops vector gc allocated.
	Add skip marker to aux field.  Make head of exits list a separate
	object.
	(struct loops): Add GTY marker.  Make larray vector gc allocated.
	Add param marker to exits table.
	(get_loops): Type changed.
	* Makefile.in (tree-scalar-evolution.o): Add gt-tree-scalar-evolution.h
	dependency.
	(cfgloop.o, loop-init.o): Add ggc.h dependency.
	(GTFILES): Add cfgloop.h and tree-scalar-evolution.c.
	* basic-block.h (struct basic_block_def): Remove skip marker from
	loop_father field.

From-SVN: r124727
2007-05-14 21:58:42 +00:00
Uros Bizjak 49452c070f builtins.c (expand_builtin_mathfn): Use EXPAND_NORMAL instead of 0 in the call to expand_expr().
* builtins.c (expand_builtin_mathfn): Use EXPAND_NORMAL instead
        of 0 in the call to expand_expr().
        (expand_builtin_mathfn_3): Ditto.
        (expand_builtin_interclass_mathfn): Ditto.
        (expand_builtin_cexpi): Ditto.
        (expand_builtin_int_roundingfn): Ditto.
        (expand_builtin_int_roundingfn_2): Ditto.
        (expand_builtin_pow): Ditto.
        (expand_builtin_powi): Ditto.
        (expand_builtin_bswap): Ditto.
        (expand_builtin_unop): Ditto.
        (expand_builtin_fabs): Ditto.
        (get_builtin_sync_mem): Use NULL_RTX instead of NULL in
        the call to expand_expr().
        (expand_builtin_sync_operation): Ditto.
        (expand_builtin_compare_and_swap): Ditto.
        (expand_builtin_lock_test_and_set): Ditto.
        * except.c (expand_builtin_eh_return_data_regno): Use EXPAND_NORMAL
        instead of 0 in the call to expand_expr().
        (expand_builtin_extract_return_addr): Ditto.
        (expand_builtin_eh_return): Ditto.
        (expand_eh_return): Ditto.
        * explow.c (expr_size): Ditto.
        * expr.c (optimize_bitfield_assignment_op): Ditto.
        (expand_assignement): Ditto.
        (store_expr): Ditto.
        (store_field): Ditto.
        (expand_expr_addr_expr_1): Use NULL_RTX instead of NULL in
        the call to expand_expr().
        (expand_expr_real_1) [COMPLEX_CST]: Use EXPAND_NORMAL instead of 0
        in the call to expand_expr().
        [CONSTRUCTOR, PLUS_EXPR, MINUS_EXPR, NEGATE_EXPR, ABS_EXPR,
        BIT_NOT_EXPR, LSHIFT_EXPR, LT_EXPR, TRUTH_NOT_EXPR]: Ditto.
        [VEC_UNPACK_HI_EXPR, VEC_UNPACK_LO]: Use expand_normal() instead
        of expand_expr().
        * optabs.c (expand_vec_shift_expr): Ditto.
        (expand_vec_cond_expr): Ditto.
        (vector_compare_rtx): Use EXPAND_STACK_PARM instead of 1 in the
        call to expand_expr().
        * stmt.c (expand_return): Use EXPAND_NORMAL instead of 0
        in the call to expand_expr().

From-SVN: r124722
2007-05-14 21:42:47 +02:00
Dave Korn 9c40feebdb genautomata.c (gen_regexp_el): Allocate correct size for regexp.
2007-05-14  Dave Korn  <dave.korn@artimi.com>

	* genautomata.c (gen_regexp_el):  Allocate correct size for regexp.

From-SVN: r124718
2007-05-14 16:46:44 +00:00
Rafael Avila de Espindola ca5ba2a3ea c-common.c (warnings_for_convert_and_check): Use unsigned_type_for instead of c_common_unsigned_type.
gcc/
       * c-common.c (warnings_for_convert_and_check): Use unsigned_type_for
       instead of c_common_unsigned_type.
       (c_common_unsigned_type): Remove.
       (shorten_compare): Use c_common_signed_or_unsigned_type instead of
       c_common_unsigned_type.
       (c_common_nodes_and_builtins): Use unsigned_type_for instead of
       c_common_unsigned_type.
       * c-common.h (c_common_unsigned_type): Remove.
       * c-decl.c (grokdeclarator): Use unsigned_type_for instead of
       c_common_unsigned_type.
       * c-format.c (check_format_types): Use unsigned_type_for instead of
       c_common_unsigned_type.
       * c-objc-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
       * c-typeck.c (convert_for_assignment): Use unsigned_type_for instead of
       c_common_unsigned_type.
       * convert.c (convert_to_integer): Use unsigned_type_for instead of
       lang_hooks.types.unsigned_type.
       * expmed.c (make_tree): Use unsigned_type_for instead of
       lang_hooks.types.unsigned_type.
       * fold-const.c (fold_negate_expr): Use unsigned_type_for instead of
       lang_hooks.types.unsigned_type.
       (build_range_check): Likewise.
       (fold_unary): Likewise.
       (fold_binary): Likewise.
       (fold_ternary): Likewise.
       * langhooks-def.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
       * langhooks.h (lang_hooks_for_types): Remove unsigned_type.
       * tree.c (get_unsigned_type): New.
       (unsigned_type_for): Use get_unsigned_type instead of
       lang_hooks.types.unsigned_type

gcc/ada
       * misc.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.

gcc/cp
       * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
       * decl.c (grokdeclarator): Use unsigned_type_for instead of
       c_common_unsigned_type.

gcc/fortran
       * f95-lang.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
       * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Use unsigned_type_for
       instead of gfc_unsigned_type.
       * trans-stmt.c (gfc_trans_do): Use unsigned_type_for instead of
       gfc_unsigned_type.
       * trans-types.c (gfc_unsigned_type): Remove.
       * trans-types.h (gfc_unsigned_type): Remove.

gcc/java
       * expr.c (build_java_binop): Use unsigned_type_for instead of
       java_unsigned_type.
       * java-tree.h (java_unsigned_type): Remove.
       * lang.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
       * typeck.c (java_unsigned_type): Remove.

gcc/treelang
       * treetree.c (tree_lang_unsigned_type): Remove.
       (LANG_HOOKS_UNSIGNED_TYPE): Remove.

From-SVN: r124715
2007-05-14 14:37:17 +00:00
Kazu Hirata a424273720 m68k-protos.h: Rename m68k_interrupt_function_p to m68k_get_function_kind.
gcc/
	* config/m68k/m68k-protos.h: Rename m68k_interrupt_function_p
	to m68k_get_function_kind.  Update its prototype.
	* config/m68k/m68k.c (m68k_attribute_table): Add an entry for
	interrupt_thread.
	(m68k_interrupt_function_p): Return enum m68k_function_type
	instead of bool.  Rename to m68k_get_function_kind.
	(m68k_handle_fndecl_attribute): Reject interrupt_thread if the
	target is not fido.
	(m68k_compute_frame_layout): Don't mark any register for save
	if an interrupt_thread attribute is specified.
	(m68k_hard_regno_rename_ok): Update a use of
	m68k_interrupt_function_p.
	* config/m68k/m68k.h (EPILOGUE_USES): Update a use of
	m68k_interrupt_function_p.
	(m68k_function_type): New.
	* config/m68k/m68k.md (*return): Output a 'sleep' instruction
	for a function with an interrupt_thread attribute.
	* doc/extend.texi: Document the interrupt_thread attribute.

gcc/testsuite/
	* gcc.target/m68k/interrupt_thread-1.c,
	gcc.target/m68k/interrupt_thread-2.c,
	gcc.target/m68k/interrupt_thread-3.c: New.
	* gcc.target/m68k/m68k.exp: Accept fido.

From-SVN: r124713
2007-05-14 13:52:18 +00:00
Daniel Berlin 4076455d9b re PR tree-optimization/31911 (Short function (md4) takes very long to compile)
2007-05-13  Daniel Berlin  <dberlin@dberlin.org>

	Fix PR tree-optimization/31911
	* tree-ssa-pre.c (phi_translate): Make sure to cache results even
	if they didn't change the expression.

From-SVN: r124657
2007-05-13 21:52:10 +00:00
Zdenek Dvorak 3cb960c703 tree-scalar-evolution.c (resolve_mixers): Exported.
* tree-scalar-evolution.c (resolve_mixers): Exported.
	* tree-scalar-evolution.h (resolve_mixers): Declare.
	* tree-data-ref.c (object_analysis, ptr_decl_may_alias_p,
	ptr_ptr_may_alias_p, may_alias_p, record_ptr_differ_p,
	record_record_differ_p, record_array_differ_p, array_ptr_differ_p,
	base_object_differ_p, base_addr_differ_p, analyze_array_indexes,
	init_array_ref, init_pointer_ref, analyze_indirect_ref,
	strip_conversion, analyze_offset_expr, address_analysis,
	object_analysis, analyze_offset): Removed.
	(dr_analyze_innermost, dr_analyze_indices, dr_analyze_alias,
	split_constant_offset, canonicalize_base_object_address,
	object_address_invariant_in_loop_p, disjoint_objects_p,
	dr_may_alias_p, dr_address_invariant_p): New functions.
	(create_data_ref): Use dr_analyze_innermost, dr_analyze_indices
	and dr_analyze_alias.
	(initialize_data_dependence_relation): Use dr_may_alias_p
	and object_address_invariant_in_loop_p.
	(compute_self_dependence): Handle the case when DDR_ARE_DEPENDENT (ddr)
	is chrec_dont_know.
	(find_data_references_in_stmt): Restrict the analysis of data references
	to the given loop nest.
	(find_data_references_in_loop): Made static.  Pass loop nest to
	find_data_references_in_stmt.
	(compute_data_dependences_for_loop): Use DR_VOPS.
	(free_data_ref): Free DR_VOPS.
	* tree-data-ref.h (struct first_location_in_loop): Replaced by ...
	(struct innermost_loop_behavior): ... new.
	(struct base_object_info): Replaced by ...
	(struct indices): ... new.
	(struct dr_alias): New.
	(enum data_ref_type): Removed.
	(struct data_reference): Consist of struct innermost_loop_behavior,
	struct indices and struct dr_alias.
	(DR_SET_ACCESS_FNS, DR_FREE_ACCESS_FNS): Removed.
	(DR_MEMTAG): Renamed to ...
	(DR_SYMBOL_TAG): ... this.
	(find_data_references_in_loop): Declaration removed.
	* tree-vect-analyze.c (vect_compute_data_ref_alignment): Use DR_INIT
	instead of DR_OFFSET_MISALIGNMENT.  DR_ALIGNED_TO is never NULL.
	(vect_analyze_data_refs): Use DR_SYMBOL_TAG instead of DR_MEMTAG.
	* tree-vect-transform.c (vect_create_data_ref_ptr): Ditto.

	* gcc.dg/vect/no-section-anchors-vect-69.c: Fix outcome.
	* gcc.dg/tree-ssa/loop-30.c: New test.

From-SVN: r124655
2007-05-13 17:32:06 +00:00
Revital Eres 8a8b05f463 Extend dse
From-SVN: r124651
2007-05-13 07:49:47 +00:00
Steven Bosscher bae8b6b2c3 gcse.c (gcse_main): Do jump bypassing in CPROP2.
* gcse.c (gcse_main): Do jump bypassing in CPROP2.
	* passes.c (init_optimization_passes): Move pass_jump_bypass
	after loop2.

	* basic-block.h (bb_has_eh_pred): Fix style issue.

From-SVN: r124640
2007-05-12 18:15:38 +00:00
Steven Bosscher 7f6055d052 re PR rtl-optimization/31848 (Invalid loop optimization causes bootstrap failure in genautomata)
PR rtl-optimization/31848
	* loop-invariant.c (move_invariant_reg): If we move an insn
	with a REG_EQUAL note, and that insn is not always executed,
	remove the REG_EQUAL note.

From-SVN: r124639
2007-05-12 18:12:54 +00:00