Commit Graph

31831 Commits

Author SHA1 Message Date
Nick Clifton c1a1cc5fcb varasm.c (default_asm_output_anchor): Prepend * to . symbol in order to prevent it from being munged by the target.
* varasm.c (default_asm_output_anchor): Prepend * to . symbol in order to 
  prevent it from being munged by the target.

From-SVN: r121992
2007-02-15 10:33:59 +00:00
Uros Bizjak 62e4530bcf * config/i386/i386.md: Remove misleading comment.
From-SVN: r121991
2007-02-15 11:21:38 +01:00
Alexandre Oliva f4f81a669a frv.md (reload_incc, [...]): Remove invalid patterns.
* config/frv/frv.md (reload_incc, reload_outcc, reload_incc_uns,
reload_outcc_uns, reload_incc_nz, reload_outcc_nz): Remove
invalid patterns.

From-SVN: r121981
2007-02-15 04:47:23 +00:00
Alexandre Oliva 45f94ec730 tree-sra.c (instantiate_missing_elements): Canonicalize bit-field types.
gcc/ChangeLog:
* tree-sra.c (instantiate_missing_elements): Canonicalize
bit-field types.
(sra_build_assignment): New.
(generate_copy_inout, generate_element_copy,
generate_element_zero, generate_one_element_init): Use it.
gcc/testsuite/ChangeLog:
* g++.dg/tree-ssa/sra-1.C: New.

From-SVN: r121980
2007-02-15 04:24:50 +00:00
Alexandre Oliva db9e0d2af6 dwarf2out.c (dwarf2out_finish): Accept namespaces as context of limbo die nodes.
gcc/ChangeLog:
* dwarf2out.c (dwarf2out_finish): Accept namespaces as context of
limbo die nodes.
gcc/testsuite/ChangeLog:
* g++.dg/ext/interface4.C, g++.dg/ext/interface4.h: New.

From-SVN: r121979
2007-02-15 04:19:33 +00:00
Joseph Myers 07cb6e8c67 emit-rtl.c (set_mem_attributes_minus_bitpos): Treat complex types as aggregates not scalars.
* emit-rtl.c (set_mem_attributes_minus_bitpos): Treat complex
	types as aggregates not scalars.
	* function.c (assign_stack_temp_for_type): Likewise.

testsuite:
	* gcc.dg/torture/complex-alias-1.c: New test.

From-SVN: r121968
2007-02-14 23:38:01 +00:00
Zdenek Dvorak 702f9d782f tree-dump.c (dump_switch_p_1): Require exact match of the option name.
* tree-dump.c (dump_switch_p_1): Require exact match of the option
	name.

	* gcc.dg/tree-prof/update-tailcall.c: Use -fdump-tree-tailc
	instead of -fdump-tree-tailcall.

From-SVN: r121967
2007-02-14 22:06:11 +00:00
Zdenek Dvorak 3d88299026 passes.c (next_pass_1): Clear the next field of the copied pass structure.
* passes.c (next_pass_1): Clear the next field of the copied
	pass structure.

From-SVN: r121966
2007-02-14 21:54:44 +00:00
Richard Henderson 029f45bdc1 tree-sra.c (early_sra): New.
* tree-sra.c (early_sra): New.
        (decl_can_be_decomposed_p): Deny va_list if early_sra.
        (tree_sra_early, pass_sra_early): New.
        * tree-pass.h (pass_sra_early): Declare.
        * passes.c (init_optimization_passes): Use it.

From-SVN: r121953
2007-02-14 09:52:25 -08:00
Richard Biener c4e74b1aaa flags.h (issue_strict_overflow_warning): Convert to a macro.
2007-02-14  Richard Guenther  <rguenther@suse.de>

	* flags.h (issue_strict_overflow_warning): Convert to a macro.

From-SVN: r121951
2007-02-14 16:45:23 +00:00
Dorit Nuzman 932eea3d18 re PR tree-optimization/30771 (ice for legal code with -O2 -ftree-vectorize)
PR tree-optimization/30771
        * tree-vect-analyze.c (vect_determine_vectorization_factor): Traverse
        also phi nodes.
        (vect_analyze_operations): Induction phis can now be marked as
        used_in_loop.
        (vect_mark_stmts_to_be_vectorized): No special treatment for phis.
        Update documentation accordingly.

From-SVN: r121950
2007-02-14 14:10:57 +00:00
Nick Clifton 8225879cc7 builtin-types.def (DEF_FUNCTION_TYPE_x): Do not imply that at most 3 arguments are supported.
* builtin-types.def (DEF_FUNCTION_TYPE_x): Do not imply that at most 3 arguments are supported.
  (DEF_FUNCTION_TYPE_VAR_5): Fix typo in its description.

From-SVN: r121946
2007-02-14 08:27:01 +00:00
Seongbae Park 5ce02e408d bitmap.c (bitmap_and, [...]): Ensure dst->current is valid.
2007-02-13  Seongbae Park <seongbae.park@gmail.com>

       * bitmap.c (bitmap_and, bitmap_and_compl, bitmap_xor):
       Ensure dst->current is valid.

From-SVN: r121903
2007-02-14 05:01:14 +00:00
Paul Brook c147eacb9d config.gcc: Add arm*-*-uclinux-*eabi.
2007-02-13  Paul Brook  <paul@codesourcery.com>

	gcc/
	* config.gcc: Add arm*-*-uclinux-*eabi.
	* config/arm/uclinux-elf.h (TARGET_OS_CPP_BUILTINS): Define.
	(SUBTARGET_EXTRA_LINK_SPEC): Define.
	(STARTFILE_SPEC, ENDFILE_SPEC): Remove broken -shared handling.
	(LINK_GCC_C_SEQUENCE_SPEC): Undef.
	(LINK_SPEC): Define.
	(LIB_SPEC): Define.
	* config/arm/arm.c (arm_override_options): Use r9 as EABI PIC
	register.
	* config/arm/uclinux-eabi.h: New file.
	* config/arm/linux-eabi.h (WCHAR_TYPE): Remove.
	* config/arm/linux-gas.h (WCHAR_TYPE): Use unsigned long on AAPCS
	based targets.

From-SVN: r121902
2007-02-14 00:29:52 +00:00
Ian Lance Taylor 6ac015100f common.opt: Add Wstrict-overflow and Wstrict-overflow=.
./:	* common.opt: Add Wstrict-overflow and Wstrict-overflow=.
	* flags.h (warn_strict_overflow): Declare.
	(enum warn_strict_overflow_code): Define.
	(issue_strict_overflow_warning): New static inline function.
	* opts.c (warn_strict_overflow): New variable.
	(common_handle_option): Handle OPT_Wstrict_overflow and
	OPT_Wstrict_overflow_.
	* c-opts.c (c_common_handle_option): Set warn_strict_overflow for
	OPT_Wall.
	* fold-const.c: Include intl.h.
	(fold_deferring_overflow_warnings): New static variable.
	(fold_deferred_overflow_warning): New static variable.
	(fold_deferred_overflow_code): New static variable.
	(fold_defer_overflow_warnings): New function.
	(fold_undefer_overflow_warnings): New function.
	(fold_undefer_and_ignore_overflow_warnings): New function.
	(fold_deferring_overflow_warnings_p): New function.
	(fold_overflow_warning): New static function.
	(make_range): Add strict_overflow_p parameter.  Change all
	callers.
	(extract_muldiv, extract_muldiv_1): Likewise.
	(fold_unary) [ABS_EXPR]: Check ABS_EXPR before calling
	tree_expr_nonnegative_p.
	(fold_negate_expr): Call fold_overflow_warning.
	(fold_range_test): Likewise.
	(fold_comparison): Likewise.
	(fold_binary): Likewise.  Call tree_expr_nonnegative_warnv_p
	instead of tree_expr_nonnegative_p.
	(tree_expr_nonnegative_warnv_p): Rename from
	tree_expr_nonnegative_p, add strict_overflow_p parameter.
	(tree_expr_nonnegative_p): New function.
	(tree_expr_nonzero_warnv_p): Rename from tree_expr_nonzero_p, add
	strict_overflow_p parameter.
	(tree_expr_nonzero_p): New function.
	* passes.c (verify_interpass_invariants): New static function.
	(execute_one_pass): Call it.
	* tree-ssa-loop-niter.c (expand_simple_operations): Ignore fold
	warnings.
	(number_of_iterations_exit, loop_niter_by_eval): Likewise.
	(estimate_numbers_of_iterations): Likewise.
	(scev_probably_wraps_p): Likewise.
	* tree-ssa-ccp.c: Include "toplev.h".
	(evaluate_stmt): Defer fold overflow warnings until we know we are
	going to optimize.
	(struct fold_stmt_r_data): Add stmt field.
	(fold_stmt_r): Defer fold overflow warnings until we know we
	optimized.
	(fold_stmt): Initialize stmt field of fold_stmt_r_data.
	(fold_stmt_inplace): Likewise.
	* tree-cfgcleanup.c: Include "toplev.h" rather than "errors.h".
	(cleanup_control_expr_graph): Defer fold overflow warnings until
	we know we are going to optimize.
	* tree-cfg.c (fold_cond_expr_cond): Likewise.
	* tree-ssa-threadedge.c (simplify_control_stmt_condition):
	Likewise.
	* tree-vrp.c (vrp_expr_computes_nonnegative): Call
	tree_expr_nonnegative_warnv_p instead of tree_expr_nonnegative_p.
	* tree-ssa-loop-manip.c (create_iv): Likewise.
	* c-typeck.c (build_conditional_expr): Likewise.
	(build_binary_op): Likewise.
	* tree-vrp.c (vrp_expr_computes_nonzero): Call
	tree_expr_nonzero_warnv_p instead of tree_expr_nonzero_p.
	(extract_range_from_unary_expr): Likewise.
	* simplify-rtx.c (simplify_const_relational_operation): Warn when
	assuming that signed overflow does not occur.
	* c-common.c (pointer_int_sum): Ignore fold overflow warnings.
	* tree.h (tree_expr_nonnegative_warnv_p): Declare.
	(fold_defer_overflow_warnings): Declare.
	(fold_undefer_overflow_warnings): Declare.
	(fold_undefer_and_ignore_overflow_warnings): Declare.
	(fold_deferring_overflow_warnings_p): Declare.
	(tree_expr_nonzero_warnv_p): Declare.
	* doc/invoke.texi (Option Summary): Add -Wstrict-overflow to list
	of warning options.
	(Warning Options): Document -Wstrict-overflow.
	* Makefile.in (tree-ssa-threadedge.o): Depend on toplev.h.
	(tree-ssa-ccp.o): Likewise.
	(tree-cfgcleanup.o): Change errors.h dependency to toplev.h.
	(fold-const.o): Depend on intl.h.
testsuite/:
	* gcc.dg/Wstrict-overflow-1.c: New test.
	* gcc.dg/Wstrict-overflow-2.c: New test.
	* gcc.dg/Wstrict-overflow-3.c: New test.
	* gcc.dg/Wstrict-overflow-4.c: New test.
	* gcc.dg/Wstrict-overflow-5.c: New test.
	* gcc.dg/Wstrict-overflow-6.c: New test.
	* gcc.dg/Wstrict-overflow-7.c: New test.
	* gcc.dg/Wstrict-overflow-8.c: New test.
	* gcc.dg/Wstrict-overflow-9.c: New test.
	* gcc.dg/Wstrict-overflow-10.c: New test.

From-SVN: r121895
2007-02-13 22:34:45 +00:00
Ian Lance Taylor 30d18db484 re PR middle-end/30751 (internal compiler error: in extract_insn, at recog.c:2108)
PR middle-end/30751
	* lower-subreg.c (resolve_simple_move): Decompose subregs in
	addresses.

From-SVN: r121894
2007-02-13 22:18:26 +00:00
Stuart Hastings ce9c43a1bf * gcc/config/i386/i386.md (fixuns_truncdfhi2): Require SSE2.
From-SVN: r121891
2007-02-13 19:02:57 +00:00
Richard Henderson 138ae41e4d alpha.c (alpha_stdarg_optimize_hook): Strip handled_component_p before looking for the indirect_ref.
* config/alpha/alpha.c (alpha_stdarg_optimize_hook): Strip
        handled_component_p before looking for the indirect_ref.

From-SVN: r121886
2007-02-13 09:29:35 -08:00
Richard Henderson 2e6834d33e i386.md (bswapsi_1): Rename from bswapsi2, remove flags clobber.
* config/i386/i386.md (bswapsi_1): Rename from bswapsi2,
        remove flags clobber.
        (bswapsi2): New expander, emit code for !TARGET_BSWAP.
        (bswaphi_lowpart): New.
        (bswapdi2): Rename from bswapdi2_rex, remove flags clobber,
        remove TARGET_BSWAP test.  Delete expander of the same name.

        * optabs.c (widen_bswap, expand_doubleword_bswap): New.
        (expand_unop): Use them.

From-SVN: r121884
2007-02-13 08:42:12 -08:00
Uros Bizjak a23132e116 * config/i386/i386.md (cmpdi_ccno_1_rex64, *cmpsi_ccno_1,
*cmphi_ccno_1, *cmpqi_ccno_1, *movsi_xor, *movstricthi_xor,
	*movstrictqi_xor, *movdi_xor_rex64, *ashldi3_1_rex64,
	*ashldi3_cmp_rex64, *ashldi3_cconly_rex64, ashlsi3, *ashlsi3_1_zext,
	*ashlsi3_cmp, *ashlsi3_cconly, *ashlsi3_cmp_zext, *ashlhi3_1_lea,
	*ashlhi3_1, *ashlhi3_cmp, *ashlhi3_cconly, *ashlqi3_1_lea,
	*ashlqi3_1, *ashlqi3_cmp, *ashlqi3_cconly): Remove equivalent
	assembler dialect choice from asm templates.

From-SVN: r121883
2007-02-13 15:03:03 +01:00
Richard Henderson 174c12c748 i386.md (fixuns_trunc<SSEMODEF>si_1): New insn.
* config/i386/i386.md (fixuns_trunc<SSEMODEF>si_1): New insn.
        (fixuns_trunc<SSEMODEF>si2): Use it.
        * config/i386/sse.md (vec_setv4sf_0): Export.
        * config/i386/i386.c (ix86_build_const_vector): Export.
        (ix86_split_convert_uns_si_sse): Rename from
        ix86_expand_convert_uns_si_sse and rewrite as a splitter.
        * config/i386/i386-protos.h: Update.

From-SVN: r121877
2007-02-12 17:20:02 -08:00
Manuel López-Ibáñez 2397c5750e re PR c/29521 (Confusing warning for return with expression in function returning void)
2007-02-13  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>

	PR c/29521
	* c-typeck.c (c_finish_return): Improve warning message.

testsuite/
	* gcc.dg/c90-return-1.c: Update output.
	* gcc.dg/c99-return-1.c: Likewise.

From-SVN: r121876
2007-02-13 00:29:17 +00:00
Manuel López-Ibáñez 14a32e14b1 alias.c (find_symbolic_term): Delete unused function.
2007-02-12  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>

	* alias.c (find_symbolic_term): Delete unused function.

From-SVN: r121869
2007-02-13 00:13:29 +00:00
Uros Bizjak 0f7b6776a3 i386.md (paritydi2, paritysi2): New expanders.
* config/i386/i386.md (paritydi2, paritysi2): New expanders.
        (paritydi2_cmp, paritydi2_cmp): New insn and split patterns.
        (*parityhi2_cmp, *parityqi2_cmp): New insn patterns.

testsuite/ChangeLog:

        * gcc.target/i386/parity-1.c: New test.
        * gcc.target/i386/parity-2.c: New test.

From-SVN: r121863
2007-02-12 22:08:25 +01:00
Eric Botcazou 6170a99877 tree.h (DECL_IGNORED_P): Document further effect for FUNCTION_DECL.
* tree.h (DECL_IGNORED_P): Document further effect for FUNCTION_DECL.
	* cgraphunit.c (cgraph_expand_function): If DECL_IGNORED_P is set on
	the function, temporarily point the debug interface to the null one.

From-SVN: r121861
2007-02-12 21:01:33 +00:00
Eric Botcazou d996473d67 dwarf2out.c (round_up_to_align): New static function.
* dwarf2out.c (round_up_to_align): New static function.
	(field_byte_offset): Use it to round the offset.

From-SVN: r121859
2007-02-12 20:52:37 +00:00
Richard Henderson fffef1dc7a alpha.md (bswapsi2, bswapdi2): New.
* config/alpha/alpha.md (bswapsi2, bswapdi2): New.
        (inswl_const): Export.

From-SVN: r121853
2007-02-12 10:53:22 -08:00
Richard Henderson 7ab0aca2fe calls.c (emit_library_call_value_1): If PROMOTE_MODE modifed the result mode of the libcall, convert back to outmode.
* calls.c (emit_library_call_value_1): If PROMOTE_MODE modifed the
        result mode of the libcall, convert back to outmode.

From-SVN: r121852
2007-02-12 10:46:16 -08:00
Roger Sayle d8d25baea6 i386.md (*bswapdi2_rex): Renamed from bswapdi2.
* config/i386/i386.md (*bswapdi2_rex): Renamed from bswapdi2.
	(bswapdi2): New define_expand to implement 32-bit implementation.

	* gcc.target/i386/builtin-bswap-3.c: New test case.

From-SVN: r121851
2007-02-12 18:41:08 +00:00
Nick Clifton c662432e8c invoke.texi (Overall Options): Document --help=.
* doc/invoke.texi (Overall Options): Document --help=.                                                        
* gcc.c (target_help_flag): Rename to print_subprocess_flag.                                                  
  (cc1_options): Pass --help= on to cc1.                                                                      
  (display_help): Add description of --help=.                                                                 
  (process_command): Add code to handle --help=.  Allow translated                                            
  --help and --target-help switches to be passed on to compiler sub-process.                                                                                               
  (main): Remove unused if statement.                                                                         
* opts.c (columns): Remove.                                                                                   
  (LEFT_COLUMN): Define.                                                                                      
  (wrap_help): Add columns argument.                                                                          
  (print_filtered_help): Change parameters to be an include bitmask,                                          
  an exclude bitmask, an any bitmask and the column width.  Move the                                          
  code to display the params list here.  Add code to display the                                              
  status of options rather than their descriptions if the quiet flag                                          
  is not active.                                                                                              
  (print_specific_help): Change parameters to be an include bitmask,                                          
  an exclude bitmask and an any bitmask.  Move code to look up the                                            
  column width here.  Decide upon the title for an options listing.                                           
  (common_handle_options): Add code to handle --help=.  Adapt code                                            
  for --help and --target-help to use the revised form of the                                                 
  print_specific_help function.                                                                               
  (print_help): Delete.                                                                                       
  (print_param_help): Delete.                                                                                 
  (print_switch): Delete.                                                                                     
* opts.h (cl_lang_count): Add prototype.                                                                      
 (CL_PARAMS, CL_WARNING, CL_OPTIMIZATION, CL_MIN_OPTION_CLASS, CL_MAX_OPTION_CLASS): New defines.            
* optc-gen.awk: Add construction of cl_lang_count.                                                            
* c.opt: Add Warning attribute to warning options and Optimization attribute to optimization options.         
* common.opt: Likewise.                                                                                       
  Add --help=.                                                                                                
  Add -fhelp and -ftarget-help as aliases for the transformed --help and --target-help options.               
* opt-functions.awk: Add code to handle Warning and Optimization attributes.

From-SVN: r121849
2007-02-12 16:25:14 +00:00
Richard Henderson dfcbeaa576 constraints.md: New file.
* config/alpha/constraints.md: New file.
	* config/alpha/alpha.c: Include tm-constrs.h.
	(alpha_const_ok_for_letter_p, alpha_const_double_ok_for_letter_p,
	alpha_extra_constraint): Remove.
	(alpha_emit_conditional_branch): Use satisfies_constraint_*.
	* config/alpha/alpha-protos.h: Update.
	* config/alpha/alpha.h (REG_CLASS_FROM_LETTER): Remove.
	(CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P): Remove.
	(EXTRA_CONSTRAINT): Remove.
	* config/alpha/alpha.md: Include constraints.md.
	(adddi splitter): Use satisfies_constraint_*.
	* config/alpha/predicates.md (add_operand): Likewise.
	(sext_add_operand, addition_operation): Likewise.

From-SVN: r121847
2007-02-12 08:10:15 -08:00
Dorit Nuzman 9b3ffe5f7a re PR tree-optimization/29145 (unsafe use of restrict qualifier)
PR tree-optimization/29145
        * tree-data-ref.c (base_addr_differ_p): Make us more conservative
        in our handling of restrict qualified pointers.

From-SVN: r121844
2007-02-12 13:14:52 +00:00
Manuel López-Ibáñez 27f33b1531 re PR middle-end/7651 (Define -Wextra strictly in terms of other warning flags)
2007-02-12  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>

	PR middle-end/7651
	* doc/invoke.texi (Wunused-value): Update description.
	(Wextra): Delete item.
	* opts.c (set_Wextra): Don't use the value of Wextra to set the
	value of Wunused-value.
	* c-typeck.c (c_process_expr_stmt): Don't check extra_warnings.
	(c_finish_stmt_expr): Don't check extra_warnings.
	(emit_side_effect_warnings): The caller is responsible to check
	warn_unused_value.
cp/
	* cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
	Check warn_unused_value just once.

From-SVN: r121843
2007-02-12 09:32:08 +00:00
Roger Sayle 2376c58f22 simplify-rtx.c (simplify_relational_operation_1): Correct typo.
* simplify-rtx.c (simplify_relational_operation_1): Correct typo.


Co-Authored-By: Matt Thomas <matt@3am-software.com>

From-SVN: r121839
2007-02-12 04:19:42 +00:00
Roger Sayle 69fce32ff9 simplify-rtx.c (simplify_relational_operation_1): Optimize comparisons of POPCOUNT against zero.
* simplify-rtx.c (simplify_relational_operation_1): Optimize
	comparisons of POPCOUNT against zero.
	(simplify_const_relational_operation): Likewise.

	* gcc.target/ia64/builtin-popcount-1.c: New test case.
	* gcc.target/ia64/builtin-popcount-2.c: Likewise.

From-SVN: r121838
2007-02-12 01:43:50 +00:00
Manuel López-Ibáñez 10c5453183 invoke.texi (Wextra): Delete outdated paragraph.
2007-02-11  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>

	* doc/invoke.texi (Wextra): Delete outdated paragraph.

From-SVN: r121829
2007-02-11 22:29:27 +00:00
Manuel López-Ibáñez b04e13e8be dwarf2out.c (root_type): Delete unused function.
2007-02-11  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>

	* dwarf2out.c (root_type): Delete unused function.

From-SVN: r121828
2007-02-11 22:19:49 +00:00
Manuel López-Ibáñez 807331086b genattrtab.c (contained_in_p): Delete unused function.
2007-02-11  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>

	* genattrtab.c (contained_in_p): Delete unused function.
	(write_expr_attr_cache): Likewise.

From-SVN: r121827
2007-02-11 22:10:43 +00:00
Jan Hubicka 68e2e14118 ipa-inline.c (cgraph_edge_badness): Add "else" missing in the previous patch.
* ipa-inline.c (cgraph_edge_badness): Add "else" missing in the
	previous patch.

From-SVN: r121825
2007-02-11 21:28:32 +00:00
Steven Bosscher a31830a7ca fwprop.c (try_fwprop_subst): Use set_unique_reg_note to add the REG_EQ* note.
* fwprop.c (try_fwprop_subst): Use set_unique_reg_note
	to add the REG_EQ* note.
	* see.c (see_merge_one_use_extension): Likewise.
	* local-alloc.c (update_equiv_regs): Likewise.  Also don't
	turn REG_EQUAL notes into REG_EQUIV notes if the target
	register may have more than one set.
	* function.c (assign_parm_setup_reg): Use set_unique_reg_note.
	* gcse.c (try_replace_reg): Likewise.
	* alias.c (init_alias_analysis): Use find_reg_equal_equiv_note.
	* calls.c (fixup_tail_calls): Likewise.  Abort if there is
	more than one REG_EQUIV note.
	* reload1.c (gen_reload): Use set_unique_reg_note.

From-SVN: r121821
2007-02-11 19:53:11 +00:00
Uros Bizjak 4c38b6d942 i386.c (TARGET_VECTORIZE_BUILTIN_CONVERSION): Define.
* config/i386/i386.c (TARGET_VECTORIZE_BUILTIN_CONVERSION): Define.
        (ix86_builtin_conversion): New function.

testsuite/ChangeLog:

        * gcc.dg/vect/vect-intfloat-conversion-1.c: Loop gets vectorized
        on i?86 and x86_64.
        * gcc.dg/vect/vect-intfloat-conversion-2.c: Ditto.
        * gcc.dg/vect/vect-floatint-conversion-1.c: New.
        * gcc.dg/vect/vect-93.c: Another loop gets vectorized
        on i?86 and x86_64.
        * gcc.dg/vect/vect-113.c: Ditto.

From-SVN: r121820
2007-02-11 20:48:07 +01:00
Mark Mitchell 56fd65c7d9 re PR target/29487 (Shared libstdc++ fails to link)
PR target/29487
	* tree.h (DECL_REPLACEABLE_P): New macro.
	* except.c (set_nothrow_function_flags): Likewise.

	PR target/29487
	* decl.c (finish_function): Use DECL_REPLACEABLE.
	* tree.c (cp_cannot_inline_tree_fn): Likewise.

	PR c++/29487
	* g++.dg/eh/weak1-C: New test.
	* g++.dg/eh/weak1-a.cc: Likewise.
	* g++.dg/eh/comdat1.C: Likewise.

From-SVN: r121819
2007-02-11 18:58:05 +00:00
Tehila Meyzels f57d17f1fc tm.texi (TARGET_VECTORIZE_BUILTIN_CONVERSION): New target hook.
* doc/tm.texi (TARGET_VECTORIZE_BUILTIN_CONVERSION): New target hook.
        * targhooks.c (default_builtin_vectorized_conversion): New.
        * targhooks.h (default_builtin_vectorized_function): New declaration.
        * target.h (struct vectorize): Add builtin_conversion field.
        * tree-vectorizer.h (type_conversion_vec_info_type): New enum
        stmt_vec_info_type value.
        (vectorizable_conversion): New declaration.
        * tree-vect-analyze.c (vect_analyze_operations): Add
        vectorizable_conversion call.
        * target-def.h (TARGET_VECTORIZE_BUILTIN_CONVERSION): New.
        * tree-vect-transform.c (vectorizable_conversion): New function.
        (vect_transform_stmt): Add case for type_conversion_vec_info_type.
        * tree-vect-generic.c (expand_vector_operations_1): Consider correct
        mode.
        * config/rs6000/rs6000.c (rs6000_builtin_conversion): New.
        (TARGET_VECTORIZE_BUILTIN_CONVERSION): Defined.
        (rs6000_expand_builtin): Add handling a case of ALTIVEC_BUILTIN_VCFUX or
        ALTIVEC_BUILTIN_VCFSX.


Co-Authored-By: Dorit Nuzman <dorit@il.ibm.com>
Co-Authored-By: Ira Rosen <irar@il.ibm.com>

From-SVN: r121818
2007-02-11 11:46:07 +00:00
Uros Bizjak 3de8da2a3c ChangeLog: Whitespace fixes.
* ChangeLog: Whitespace fixes.
	* gcc/ChangeLog: Ditto.
	* gcc/testsuite/ChangeLog: Ditto.

From-SVN: r121815
2007-02-11 09:09:03 +01:00
John David Anglin 51823d478c re PR target/30634 (FAIL: gfortran.fortran-torture/execute/intrinsic_set_exponent.f90)
PR target/30634
	* pa.md (movdf): For 64-bit target, fail if operand 1 is a non-zero
	CONST_DOUBLE and operand 0 is a hard register.
	(movdi): For 64-bit target, remove code to force CONST_DOUBLE to
	memory.  Fail if operand 1 is a non-zero CONST_INT and operand 0
	is a hard floating-point register.

From-SVN: r121802
2007-02-10 19:51:40 +00:00
Richard Henderson 8893239dc4 Makefile.in (libgcc-support, [...]): Add emutls.c.
gcc/ChangeLog:
* Makefile.in (libgcc-support, libgcc.mvars): Add emutls.c.
* builtin-types.def (BT_WORD): Make unsigned.
(BT_FN_VOID_PTR_WORD_WORD_PTR): New.
* builtins.def (BUILT_IN_EMUTLS_GET_ADDRESS): New.
(BUILT_IN_EMUTLS_REGISTER_COMMON): New.
* c-decl.c (grokdeclarator): Don't error if !have_tls.
* c-parser.c (c_parser_omp_threadprivate): Likewise.
* dwarf2out.c (loc_descriptor_from_tree_1): Don't do anything for
emulated tls.
* expr.c (emutls_var_address): New.
(expand_expr_real_1): Expand emulated tls.
(expand_expr_addr_expr_1): Likewise.
* libgcc-std.ver: Add __emutls_get_address, __emutls_register_common.
* output.h (emutls_finish): Declare.
* toplev.c (compile_file): Call it.
* tree-ssa-address.c (gen_addr_rtx): Check for const-ness of the
address before wrapping in CONST.
* varasm.c (emutls_htab, emutls_object_type): New.
(EMUTLS_VAR_PREFIX, EMUTLS_TMPL_PREFIX): New.
(get_emutls_object_name, get_emutls_object_type): New.
(get_emutls_init_templ_addr, emutls_decl): New.
(emutls_common_1, emutls_finish): New.
(assemble_variable): When emulating tls, swap decls; generate
constructor for the emutls objects.
(do_assemble_alias): When emulating tls, swap decl and target name.
(default_encode_section_info): Don't add SYMBOL_FLAG_TLS_SHIFT
for emulated tls.
* varpool.c (decide_is_variable_needed): Look at force_output.
Recurse for emulated tls.
(cgraph_varpool_remove_unreferenced_decls): Remove checks redundant
with decide_is_variable_needed.
* emutls.c: New file.
* config/sparc/sol2.h (ASM_DECLARE_OBJECT_NAME): Only emit
tls_object for real tls.
gcc/cp/ChangeLog:
* decl.c (grokvardecl): Don't error if !have_tls.
(grokdeclarator): Likewise.
* parser.c (cp_parser_omp_threadprivate): Likewise.
gcc/fortran/ChangeLog:
* f95-lang.c (gfc_init_builtin_functions): Add __emutls_get_address
and __emutls_register_common.
* openmp.c (gfc_match_omp_threadprivate): Don't error if !have_tls.
* trans-common.c (build_common_decl): Don't check have_tls.
* trans-decl.c (gfc_finish_var_decl): Likewise.
* types.def (BT_WORD, BT_FN_PTR_PTR): New.
(BT_FN_VOID_PTR_WORD_WORD_PTR): New.
gcc/testsuite/ChangeLog:
* lib/target-supports.exp (check_effective_target_tls): Redefine
to mean non-emulated tls.
* gcc.dg/tls/alias-1.c: Remove tls requirement.
* gcc.dg/tls/asm-1.c, gcc.dg/tls/debug-1.c, gcc.dg/tls/diag-1.c,
gcc.dg/tls/diag-2.c, gcc.dg/tls/diag-3.c, gcc.dg/tls/diag-4.c,
gcc.dg/tls/diag-5.c, gcc.dg/tls/init-1.c, gcc.dg/tls/nonpic-1.c,
gcc.dg/tls/opt-10.c, gcc.dg/tls/opt-5.c, gcc.dg/tls/opt-6.c,
gcc.dg/tls/opt-8.c, gcc.dg/tls/opt-9.c, gcc.dg/tls/pic-1.c,
gcc.dg/tls/struct-1.c, gcc.dg/tls/trivial.c: Likewise.

From-SVN: r121800
2007-02-10 19:19:10 +00:00
Kaz Kojima 4c9034c5e5 re PR rtl-optimization/29599 (ICE when building the kernel on SH4)
PR rtl-optimization/29599
	* reload1.c (eliminate_regs_in_insn): Take the destination
	mode into account when computing the offset.

From-SVN: r121792
2007-02-10 06:47:49 +00:00
Stuart Hastings ebff937c19 i386.h (TARGET_KEEPS_VECTOR_ALIGNED_STACK): New.
* gcc/config/i386/i386.h (TARGET_KEEPS_VECTOR_ALIGNED_STACK): New.
	* gcc/config/i386/darwin.h: (TARGET_KEEPS_VECTOR_ALIGNED_STACK): New.
	* gcc/config/i386/i386.md (fixuns_trunc<mode>si2, fixuns_truncsfhi2,
	fixuns_truncdfhi2): New.
	(fix_truncsfdi_sse): Call ix86_expand_convert_sign_didf_sse.
	(floatunsdidf2): Call ix86_expand_convert_uns_didf_sse.
	(floatunssisf2): Add call to ix86_expand_convert_uns_sisf_sse.
	(floatunssidf2): Allow nonimmediate source.
	* gcc/config/i386/sse.md (movdi_to_sse): New.  (vec_concatv2di): Drop '*'.
	* gcc/config/i386/i386-protos.h (ix86_expand_convert_uns_si_sse,
	ix86_expand_convert_uns_didf_sse, ix86_expand_convert_uns_sidf_sse,
	ix86_expand_convert_uns_sisf_sse, ix86_expand_convert_sign_didf_sse): New.
	* gcc/config/i386/i386.c (ix86_expand_convert_uns_si_sse,
	ix86_expand_convert_uns_didf_sse, ix86_expand_convert_uns_sidf_sse,
	ix86_expand_convert_uns_sisf_sse, ix86_expand_convert_sign_didf_sse,
	ix86_build_const_vector, ix86_expand_vector_init_one_nonzero): New.
	(ix86_build_signbit_mask): Fix decl of v, refactor to call ix86_build_const_vector.
	(x86_emit_floatuns): Rewrite.

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

From-SVN: r121790
2007-02-10 01:17:03 +00:00
Manuel López-Ibáñez 692b647c4f genautomata.c (longest_path_length): Delete unused function.
2007-02-10  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>

	* genautomata.c (longest_path_length): Delete unused function.
	(struct state): Delete unused longest_path_length.
	(UNDEFINED_LONGEST_PATH_LENGTH): Delete unused macro.
	(get_free_state): Delete unused.

From-SVN: r121789
2007-02-10 01:05:18 +00:00
Jan Hubicka d562c6687f params.def (PARAM_INLINE_UNIT_GROWTH): Set to 30.
* params.def (PARAM_INLINE_UNIT_GROWTH): Set to 30.
	* doc/invoke.texi (inline-unit-growth): Update default value.

From-SVN: r121781
2007-02-09 22:51:44 +00:00
Jan Hubicka 45a80bb9e8 Makefile.in (passes.o, [...]): Add dependencies.
* Makefile.in (passes.o, ipa-inline.o): Add dependencies.
	* cgraphbuild.c (build_cgraph_edges): Compute frequencies.
	(rebuild_cgraph_edges): Likewise.
	* cgraph.c (cgraph_set_call_stmt): Add new argument frequency.
	(dump_cgraph_node): Dump frequencies.
	(cgraph_clone_edge): Add frequency scales.
	(cgraph_clone_node): Add freuqnecy.
	* cgraph.h (cgraph_edge): Add freuqnecy argument.
	(CGRAPH_FREQ_BASE, CGRAPH_FREQ_MAX): New constants.
	(cgraph_create_edge, cgraph_clone_edge, cgraph_clone_node): Update.
	* tree-pass.h (TODO_rebuild_frequencies): New constant.
	* cgraphunit.c (verify_cgraph_node): Verify frequencies.
	(cgraph_copy_node_for_versioning): Update call of cgraph_clone_edge.
	(save_inline_function_body): Likewise.
	* ipa-inline.c: inluce rtl.h
	(cgraph_clone_inlined_nods): Update call of cgraph_clone_node.
	(cgraph_edge_badness): Use frequencies.
	(cgraph_decide_recursive_inlining): Update clonning.
	(cgraph_decide_inlining_of_small_function): Dump frequency.
	* predict.c (estimate_bb_frequencies): Export.
	* predict.h (estimate_bb_frequencies): Declare.
	* tree-inline.c (copy_bb): Watch overflows.
	(expand_call_inline): Update call of cgraph_create_edge.
	(optimize_inline_calls): Use TODO flags to update frequnecies.
	* passes.h: Include predict.h
	(init_optimization_passes): Move profile ahead.
	(execute_function_todo): Handle TODO_rebuild_frequencies.

From-SVN: r121780
2007-02-09 22:49:30 +00:00
Roger Sayle f2477b062c alpha.c (emit_insxl): Force the first operand of the insbl or inswl pattern into a register.
* config/alpha/alpha.c (emit_insxl): Force the first operand of
	the insbl or inswl pattern into a register.

From-SVN: r121779
2007-02-09 22:36:34 +00:00
Roger Sayle ff848f0e0f ia64.md (bswapdi2): New define_insn.
* config/ia64/ia64.md (bswapdi2): New define_insn.

	* gcc.target/ia64/builtin_bswap-1.c: New test case.

From-SVN: r121776
2007-02-09 21:33:36 +00:00
Richard Henderson ed69105c95 constraints.md (Ym): New constraint.
* config/i386/constraints.md (Ym): New constraint.
        * config/i386/i386.md (movsi_1): Change Y2 to Yi constraints.
        (movdi_1_rex64): Split sse and xmm general register moves from
        memory move alternatives.  Use conditional register constraints.
        (movsf_1, movdf_integer): Likewise.
        (zero_extendsidi2_32, zero_extendsidi2_rex64): Likewise.
        (movdf_integer_rex64): New.
        (pushsf_rex64): Fix output constraints.
        * config/i386/sse.md (sse2_loadld): Split rm alternative, use Yi.
        (sse2_stored): Likewise.
        (sse2_storeq_rex64): New.
        * config/i386/i386.c (x86_inter_unit_moves): Enable for not
        amd and not generic.
        (ix86_secondary_memory_needed): Don't bypass TARGET_INTER_UNIT_MOVES
        for optimize_size.  Remove SF/DFmode hack.

From-SVN: r121767
2007-02-09 10:17:09 -08:00
Dwarakanath Rajagopal 35a63f2131 driver-i386.c: Turn on -mtune=native for AMDFAM10.
2007-02-09  Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>

	* config/i386/driver-i386.c: Turn on -mtune=native for AMDFAM10.
	(bit_SSE4a): New.

From-SVN: r121763
2007-02-09 16:56:45 +00:00
Nathan Sidwell 10e96df47c 200x-xx-xx Nathan Sidwell <nathan@codesourcery.com> Richard Sandiford <richard@codesourcery.com>
gcc/
200x-xx-xx  Nathan Sidwell  <nathan@codesourcery.com>
	    Richard Sandiford  <richard@codesourcery.com>

	* config.gcc (m68010-*-netbsdelf*, m68k*-*-netbsdelf*)
	(m68k*-*-openbsd*, m68k-*-linux*): Set default_cf_cpu.
	(m68k-*-aout*, m68k-*-coff*, m68k-*-uclinux*, m68k-*-rtems*): Add
	m68k/t-mlib to tmake_file.
	(m68020-*-elf*, m68k-*-elf*): Likewise.  Add t-m68kbare as well.
	(m68k*-*-*): Use --with-arch to pick a default for --with-cpu.
	(m680[012]0-*-*, m68k*-*-*): Add support for --with-arch.
	Allow it to be cf or m68k.  Set m68k_arch_family.  If that
	variable is not empty, add t-$m68k_arch_family to tmake_file.
	Add t-mlibs to tmake_file.
	* doc/install.texi: Document --with-arch=m68k and --with-arch=cf.
	* config/m68k/t-cf: New file.
	* config/m68k/t-m68k: Likewise.
	* config/m68k/t-mlibs: Likewise.
	* config/m68k/t-m68kbare (MULTILIB_OPTIONS, MULTILIB_DIRNAMES)
	(MULTILIB_MATCHES, MULTILIB_EXCEPTIONS): Delete.
	(M68K_MLIB_DIRNAMES, M68K_MLIB_OPTIONS): Define.
	* config/m68k/t-m68kelf (MULTILIB_OPTIONS, MULTILIB_DIRNAMES)
	(MULTILIB_MATCHES, MULTILIB_EXCEPTIONS, LIBGCC, INSTALL_LIBGCC):
	Delete.
	* config/m68k/t-openbsd (MULTILIB_OPTIONS, LIBGCC): Delete.
	(INSTALL_LIBGCC): Delete.
	(M68K_MLIB_DIRNAMES, M68K_MLIB_OPTIONS): Define.
	* config/m68k/t-rtems (MULTILIB_OPTIONS, MULTILIB_DIRNAMES)
	(MULTILIB_MATCHES, MULTILIB_EXCEPTIONS): Delete.
	(M68K_MLIB_CPU): Define.
	* config/m68k/t-uclinux (MULTILIB_OPTIONS, MULTILIB_DIRNAMES)
	(MULTILIB_MATCHES, MULTILIB_EXCEPTIONS): Delete.
	(M68K_MLIB_CPU, M68K_MLIB_OPTIONS, M68K_MLIB_DIRNAMES): Define.

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

From-SVN: r121743
2007-02-09 13:47:25 +00:00
Zdenek Dvorak b44e7f07c5 re PR tree-optimization/23361 (Can't eliminate empty loops with power of two step and variable bounds)
2007-02-09  Zdenek Dvorak  <dvorakz@suse.cz>
	Richard Guenther  <rguenther@suse.de>

	PR middle-end/23361
	* fold-const.c (fold_comparison): Handle obfuscated comparisons
	against INT_MIN/INT_MAX.
	* tree-ssa-loop-ivcanon.c (remove_empty_loop): Print to dump
	file if a loop is removed.

	* gcc.dg/fold-compare-3.c: New testcase.
	* gcc.dg/tree-ssa/loop-24.c: Likewise.

Co-Authored-By: Richard Guenther <rguenther@suse.de>

From-SVN: r121742
2007-02-09 13:29:11 +00:00
Joseph Myers 46bd2beed4 calls.c (store_one_arg): Pass correct alignment to emit_push_insn for non-BLKmode values.
* calls.c (store_one_arg): Pass correct alignment to
	emit_push_insn for non-BLKmode values.
	* expr.c (emit_push_insn): If STRICT_ALIGNMENT, copy to an
	unaligned stack slot via a suitably aligned slot.

From-SVN: r121736
2007-02-09 01:11:18 +00:00
DJ Delorie 67fc44cbd6 m32c.c (m32c_unpend_compare): Add default to silence warnings.
* config/m32c/m32c.c (m32c_unpend_compare): Add default to silence
warnings.
(legal_subregs): Use unsigned char, make const.
(m32c_illegal_subreg_p): Use ARRAY_SIZE.  Delete unused variables.

From-SVN: r121733
2007-02-08 19:49:48 -05:00
Paul Brook 4531703eaa lib1funcs.asm (RETLDM): Pop directly into PC when no special interworking needed.
2007-02-08  Paul Brook  <paul@codesourcery.com>

	* config/arm/lib1funcs.asm (RETLDM): Pop directly into PC when no
	special interworking needed.

From-SVN: r121727
2007-02-08 23:49:59 +00:00
Harsha Jagasia c1d91dbdc5 xmmintrin.h: Make inclusion of emmintrin.h conditional to __SSE2__.
* config/i386/xmmintrin.h: Make inclusion of emmintrin.h
        conditional to __SSE2__.
        (Entries below should have been added to first ChangeLog
        entry for amdfam10 dated 2007-02-05)
        * config/i386/emmintrin.h: Generate #error if __SSE2__ is not
        defined.
        * config/i386/pmmintrin.h: Generate #error if __SSE3__ is not
        defined.
        * config/i386/tmmintrin.h: Generate #error if __SSSE3__ is not
        defined.

From-SVN: r121726
2007-02-08 22:37:01 +00:00
DJ Delorie f9b8943888 m32c-protos.h (m32c_illegal_subreg_p): New.
* config/m32c/m32c-protos.h (m32c_illegal_subreg_p): New.
* config/m32c/m32c.c (legal_subregs): New.
(m32c_illegal_subreg_p): New.
* config/m32c/predicates.md (m32c_any_operand): Use it to reject
unsupported subregs of hard regs.

From-SVN: r121725
2007-02-08 17:22:52 -05:00
Jan Hubicka ff39b79b8f tree-cfg.c (bsi_replace): Shortcut when replacing the statement with the same one; always update histograms.
* tree-cfg.c (bsi_replace): Shortcut when replacing the statement with
	the same one; always update histograms.

From-SVN: r121724
2007-02-08 22:04:22 +00:00
Diego Novillo b3f7d793a9 passes.c (init_optimization_passes): Tidy comment.
* passes.c (init_optimization_passes): Tidy comment.

From-SVN: r121723
2007-02-08 16:38:41 -05:00
Roger Sayle 9f05adb09f simplify-rtx.c (simplify_unary_operation_1): We can strip zero_extend, bswap and rotates from POCOUNT's argument.
* simplify-rtx.c (simplify_unary_operation_1) <POPCOUNT>: We can
	strip zero_extend, bswap and rotates from POCOUNT's argument.
	<PARITY>: Likewise, we can strip not, bswap, sign_extend,
	zero_extend and rotates from PARITY's argument.
	<BSWAP>: A byte-swap followed by a byte-swap is an identity.
	(simplify_const_unary_operation) <BSWAP>: Evaluate the byte-swap
	of an integer constant at compile-time.

	* gcc.target/i386/builtin-bswap-2.c: New test case.

From-SVN: r121716
2007-02-08 17:10:56 +00:00
Diego Novillo d37d06fef8 re PR tree-optimization/30562 (remove unused variable is removing a referenced variable (in STORED_SYMS or LOADED_SYMS))
PR 30562
	* tree-flow.h (struct var_ann_d): Remove field 'is_used'.
	Update all users.
	* tree-ssa-alias.c (compute_is_aliased): Remove.  Update all
	users.
	(init_alias_info):
	* tree-ssa-live.c (remove_unused_locals): Do not remove
	TREE_ADDRESSABLE variables.
	* tree-ssa-structalias.c (compute_points_to_sets): Tidy.
	* tree-ssa-operands.c (add_virtual_operand): Remove argument
	FOR_CLOBBER.  Update all users.
	If VAR has an associated alias set, add a virtual operand for
	it if no alias is found to conflict with the memory reference.

From-SVN: r121715
2007-02-08 11:55:43 -05:00
Jan Hubicka 674474a525 value-prof.c (visit_hist, free_hist): Return 1 instead of 0.
* value-prof.c (visit_hist, free_hist): Return 1 instead of 0.

Co-Authored-By: Robert Kidd <rkidd@crhc.uiuc.edu>

From-SVN: r121711
2007-02-08 09:56:34 +00:00
Ian Lance Taylor 1f64a0811b * lower-subreg.c (simple_move): Reject PARTIAL_INT modes.
From-SVN: r121707
2007-02-08 00:59:14 +00:00
Roger Sayle e42ac3dede rs6000.md (ctz<mode>2, [...]): Remove constraints from define_expand's match_operands.
* config/rs6000/rs6000.md (ctz<mode>2, ffs<mode>2, popcount<mode>2,
	parity<mode>2, smulsi3_highpart, abstf2_internal, allocate_stack,
	tablejumpdi, movsi_to_cr_one): Remove constraints from
	define_expand's match_operands.

From-SVN: r121706
2007-02-08 00:25:06 +00:00
Roger Sayle 28890c8243 global.c (compute_regsets): Move declatation of "i" inside of #ifdef ELIMINABLE_REGS to avoid unused...
* global.c (compute_regsets): Move declatation of "i" inside of
	#ifdef ELIMINABLE_REGS to avoid unused variable bootstrap failure.

From-SVN: r121697
2007-02-07 21:29:17 +00:00
Jakub Jelinek e02a048f46 re PR c++/30703 (ICE Segmentation fault on using OpenMP)
PR c++/30703
	* gimplify.c (gimplify_scan_omp_clauses): Remove special casing
	of INDIRECT_REF <RESULT_DECL>.

	* cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
	parameters and result decls in omp clauses.
	(cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
	by reference.

	* testsuite/libgomp.c++/pr30703.C: New test.

From-SVN: r121688
2007-02-07 13:16:22 +01:00
Jakub Jelinek ca6e5fe994 * config/i386/i386.c (override_options): Set PTA_SSSE3 for core2.
From-SVN: r121687
2007-02-07 13:13:39 +01:00
J"orn Rennecke 6f8eec2991 re PR target/29746 (gcc fails to bootstrap on sh4-*-linux-gnu)
PR target/29746
	* config/sh/sh.c (expand_cbranchdi4): Use scratch register
	properly.
	(sh_initialize_trampoline): Add parentheses to avoid a warning.


Co-Authored-By: Kaz Kojima <kkojima@gcc.gnu.org>

From-SVN: r121671
2007-02-06 23:12:35 +00:00
Zdenek Dvorak 89f8f30f35 loop.texi: Document possibility not to perform disambiguation of loops with multiple latches.
* doc/loop.texi: Document possibility not to perform disambiguation
	of loops with multiple latches.
	* cfgloopmanip.c (alp_enum_p): Removed.
	(add_loop): Handle subloops.  Use get_loop_body_with_size.
	(create_preheader): Do not allow ENTRY_BLOCK_PTR to be preheader.
	* cfghooks.c (redirect_edge_and_branch_force): Set dominator for
	the new forwarder block.
	(make_forwarder_block): Only call new_bb_cbk if it is not NULL.
	Handle the case latch is NULL.
	* tree-ssa-dom.c (tree_ssa_dominator_optimize): Avoid cfg modifications
	when marking loop exits.
	* ifcvt.c (if_convert): Ditto.  Mark loop exits even if cfg cannot
	be modified.
	* loop-init.c (loop_optimizer_init): Do not modify cfg.  Call
	disambiguate_loops_with_multiple_latches.
	* tree-cfgcleanup.c (cleanup_tree_cfg_loop): Calculate dominators
	before fix_loop_structure.
	* cfgloop.c: Include pointer-set.h and output.h.
	(canonicalize_loop_headers, HEADER_BLOCK, LATCH_EDGE,
	update_latch_info, mfb_keep_just, mfb_keep_nonlatch): Removed.
	(get_loop_latch_edges, find_subloop_latch_edge_by_profile,
	find_subloop_latch_edge_by_ivs, find_subloop_latch_edge,
	mfb_redirect_edges_in_set, form_subloop, merge_latch_edges,
	disambiguate_multiple_latches, get_loop_body_with_size,
	disambiguate_loops_with_multiple_latches): New functions.
	(flow_loop_dump): Dump multiple latch edges.
	(flow_loop_nodes_find): Handle loops with multiple latches.
	(flow_loops_find): Ditto. Do not call canonicalize_loop_headers.
	(glb_enum_p): Modified.
	(get_loop_body): Use get_loop_body_with_size.
	* cfgloop.h (LOOPS_HAVE_RECORDED_EXITS): New flag.
	(AVOID_CFG_MODIFICATIONS): New constant.
	(disambiguate_loops_with_multiple_latches, add_loop,
	get_loop_body_with_size): Declare.
	* Makefile.in (cfgloop.o): Add pointer-set.h and output.h.

	* gcc.dg/tree-ssa/loop-25.c: New test.

From-SVN: r121670
2007-02-06 21:49:49 +00:00
Seongbae Park ad8e8d0b46 re PR inline-asm/28686 (ebp from clobber list used as operand)
2007-02-06  Seongbae Park <seongbae.park@gmail.com>

	PR inline-asm/28686
	* global.c (compute_regsets): New function.
	(global_alloc): Refactored ELIMINABLE_REGSET
	and NO_GLOBAL_ALLOC_REGS computation out.
	(rest_of_handle_global_alloc): Call compute_regsets()
	for non-optimizing case.

From-SVN: r121663
2007-02-06 19:43:41 +00:00
Richard Henderson 5096114103 constraints.md (Y2): Rename from Y.
* config/i386/constraints.md (Y2): Rename from Y.
        (Yi): New constraint. 
        * config/i386/i386.md (movsi_1, movdi_2, pushdf_nointeger,
        pushdf_integer, movdf_nointeger, movdf_integer, zero_extendsidi2_32,
        zero_extendsidi2_rex64, truncxfdf2_mixed): Change Y constraints to Y2.
        (extendsfdf2_mixed, extendsfdf2_sse, truncdfsf_fast_mixed,
        truncdfsf_fast_sse, truncdfsf_mixed, fix_truncdfdi_sse,
        fix_truncdfsi_sse, floatsidf2_mixed, floatsidf2_sse,
        floatdidf2_mixed, floatdidf2_sse, absnegdf2_mixed,
        absnegdf2_sse, sse_setccdf, fop_df_comm_mixed, fop_df_comm_sse,
        fop_df_1_mixed, fop_df_1_sse): Change Y constraints to x.
        * config/i386/mmx.md (mov<MMXMODEI>_internal_rex64,
        mov<MMXMODEI>_internal, movv2sf_internal_rex64, movv2sf_internal,
        vec_extractv2si_1): Change Y constraints to Y2.
        * config/i386/sse.md (vec_setv4sf_0, vec_concatv2df, vec_dupv4si,
        vec_dupv2di, sse2_concatv2si, vec_concatv4si_1, vec_concatv2di):
        Change Y constraints to Y2.
        (sse2_loadld): Change Y constraints to x.

From-SVN: r121660
2007-02-06 10:25:47 -08:00
Roger Sayle 565ef4bafb rs6000.md (popcount<mode>2): Rewrite.
* config/rs6000/rs6000.md (popcount<mode>2): Rewrite.
	(parity<mode>2): New define_expand using rs6000_emit_parity.
	* config/rs6000/rs6000.c (rs6000_emit_popcount,
	rs6000_emit_parity): New functions.
	* config/rs6000/rs6000-protos.h (rs6000_emit_popcount,
	rs6000_emit_parity): Prototype here.

	* gcc.target/powerpc/popcount-1.c: New test case.
	* gcc.target/powerpc/parity-1.c: Likewise.

From-SVN: r121653
2007-02-06 17:29:44 +00:00
Ian Lance Taylor 7e0c3f57e0 lower-subreg.c (simple_move_operand): Reject CONST.
* lower-subreg.c (simple_move_operand): Reject CONST.
	(resolve_clobber): Call validate_change rather than directly
	assigning to XEXP (pat, 0).

From-SVN: r121652
2007-02-06 17:19:27 +00:00
Paolo Bonzini 15814ba0a2 Makefile.in (tree-ssa-loop-ivopts.o): Add pointer-set.h dependency.
2006-02-06  Paolo Bonzini  <bonzini@gnu.org>

	* Makefile.in (tree-ssa-loop-ivopts.o): Add pointer-set.h dependency.
	(tree-ssa-reassoc.o): Add pointer-set.h dependency.
	(tree-cfg.o): Remove hashtab.h dependency.

	* tree-ssa-loop-ivopts.c: Include pointer-set.h.
	(struct ivopts_data): Change niters to pointer_map_t.
	(struct nfe_cache_elt, nfe_hash, nfe_eq): Delete.
	(niter_for_exit): Create pointer_map on demand.  Change for
	pointer_map API.
	(tree_ssa_iv_optimize_init): Initialize data->niters to NULL.
	(free_loop_data): Destroy data->niters if created and reset field.
	(tree_ssa_iv_optimize_finalize): Don't delete data->niters here.
	(tree_ssa_iv_optimize_loop): Check for presence of stale data.

	* tree-ssa-reassoc.c: Include pointer-set.h.
	(bb_rank): Change to long *.
	(operand_rank): Change to pointer_map_t.
	(find_operand_rank): Return long, -1 if not found.  Declare as inline.
	(insert_operand_rank): Accept long.
	(operand_entry_hash, operand_entry_eq): Remove.
	(get_rank): Return long.  Adjust for changes above.
	(init_reassoc): Change rank type to long.  Adjust creation of bb_rank
	and operand_rank.
	(fini_reassoc): Delete operand_rank with pointer_map_destroy.

	* tree-ssa-structalias.c (vi_for_tree): Change to pointer_map.
	(struct tree_vi, tree_vi_t, tree_vi_hash, tree_vi_eq): Delete.
	(insert_vi_for_tree): Rewrite for pointer_map API.  Assert argument
	is not NULL.
	(lookup_vi_for_tree): Rewrite for pointer_map API.  Return varinfo_t
	directly since it cannot be NULL.
	(get_vi_for_tree): Rewrite for pointer_map API.
	(find_what_p_points_to): Adjust for change to lookup_vi_for_tree.
	(init_alias_vars): Create vi_for_tree as pointer_map.
	(delete_points_to_sets): Delete vi_for_tree using pointer_map_destroy.

	* tree-cfg.c: Don't include hashtab.h.
	(edge_to_cases): Declare as pointer_map.
	(struct edge_to_cases_elt, edge_to_cases_hash, edge_to_cases_eq):
	Delete.
	(edge_to_cases_cleanup): Rewrite as pointer_map_traverse callback.
	(start_recording_case_labels): Create edge_to_cases as pointer_map.
	(end_recoding_case_labels): Cleanup edge_to_cases manually before
	destroying it.
	(record_switch_edge): Delete.
	(get_cases_for_edge): Adjust for pointer_map API, inline
	record_switch_edge (rewritten for new API), remove goto.

From-SVN: r121648
2007-02-06 14:34:51 +00:00
Paolo Bonzini 0802f6a2f7 tree.c (tree_int_map_hash, [...]): Remove prototypes and make them non-static.
gcc:
2007-02-06  Paolo Bonzini  <bonzini@gnu.org>

	* tree.c (tree_int_map_hash, tree_int_map_eq, tree_int_map_marked_p):
	Remove prototypes and make them non-static.
	(struct tree_int_map): Remove.
	* tree.h (struct tree_int_map): Move here, turning TO into an
	unsigned int.
	(tree_int_map_hash, tree_int_map_eq, tree_int_map_marked_p): Declare.

	* tree.h (TREE_COMPLEXITY): Remove.
	(struct tree_exp): Remove complexity field.
	* tree.c (build1_stat): Don't set it.

gcc/ada:
2007-02-06  Paolo Bonzini  <bonzini@gnu.org>

	* Make-lang.in (ada/decl.o): Add gt-ada-decl.h dependency.
	* decl.c: Include gt-ada-decl.h.
	(annotate_value_cache): New.
	(annotate_value): Use it instead of TREE_COMPLEXITY.

From-SVN: r121647
2007-02-06 13:55:01 +00:00
Dorit Nuzman fbf798fcc5 tree-vectorizer.c (vect_is_simple_use): Support induction.
2007-02-06  Dorit Nuzman  <dorit@il.ibm.com>
            Victor Kaplansky  <victork@il.ibm.com>

        * tree-vectorizer.c (vect_is_simple_use): Support induction.
        (vect_is_simple_reduction): Support reduction with induction as
        one of the operands.
        (vect_is_simple_iv_evolution): Fix formatting.
        * tree-vect-analyze.c (vect_mark_stmts_to_be_vectorized): Fix
        formatting.  Don't mark induction phis for vectorization.
        (vect_analyze_scalar_cycles): Analyze all inductions, then reductions.
        * tree-vect-transform.c (get_initial_def_for_induction): New function.
        (vect_get_vec_def_for_operand): Support induction.
        (vect_get_vec_def_for_stmt_copy): Fix formatting and add check for
        induction case.
        (vectorizable_reduction): Support reduction with induction as one of
        the operands.
        (vectorizable_type_demotion): Use def-type of stmt argument rather
        than dummy def-type.

        * tree-ssa-loop.c (gate_scev_const_prop): Return the value of
        flag_tree_scev_cprop.
        * common.opt (tree-scev-cprop): New flag.

        * tree-vect-transform.c (vect_create_destination_var): Use 'kind' in
        call to vect_get_new_vect_var.


Co-Authored-By: Victor Kaplansky <victork@il.ibm.com>

From-SVN: r121643
2007-02-06 10:08:51 +00:00
Ira Rosen 03d3e95382 tree-vect-patterns.c (vect_recog_widen_mult_pattern): Check that vectype is not NULL.
* tree-vect-patterns.c (vect_recog_widen_mult_pattern): Check that 
	vectype is not NULL.
	(vect_pattern_recog_1): Likewise.

From-SVN: r121640
2007-02-06 08:41:01 +00:00
Kaveh R. Ghazi 8fbbe90b26 fold-const.c (negate_expr_p): Handle CONJ_EXPR.
* fold-const.c (negate_expr_p): Handle CONJ_EXPR.
	(fold_negate_expr): Likewise.
	
testsuite:
	* gcc.dg/builtins-20.c: Add more cases.

From-SVN: r121639
2007-02-06 02:50:39 +00:00
Alexandre Oliva 792eaee2cb re PR debug/30189 (ICE on modified_type_die)
gcc/ChangeLog:
PR debug/30189
* dwarf2out.c (modified_type_die): Follow DECL_ORIGINAL_TYPE
even if cv-qualification is the same.
gcc/testsuite/ChangeLog:
PR debug/30189
* gcc.dg/pr30189.c: New test.

From-SVN: r121638
2007-02-06 01:35:10 +00:00
Geoffrey Keating 9be75e444a darwin-tramp.asm (__trampoline_setup): Call __enable_execute_stack on completion.
* config/rs6000/darwin-tramp.asm (__trampoline_setup): Call
	__enable_execute_stack on completion.

From-SVN: r121633
2007-02-06 00:32:44 +00:00
Harsha Jagasia 21efb4d464 amdfam10
From-SVN: r121625
2007-02-05 23:33:54 +00:00
Bob Wilson 63694bdd4e * config/xtensa/xtensa.c (constantpool_mem_p): Skip over SUBREGs.
From-SVN: r121622
2007-02-05 22:50:31 +00:00
Richard Guenther b95becfc09 tree-vectorizer.h (vectorizable_function): Add argument type argument, change return type.
2007-02-05  Richard Guenther  <rguenther@suse.de>

	* tree-vectorizer.h (vectorizable_function): Add argument type
	argument, change return type.
	* tree-vect-patterns.c (vect_recog_pow_pattern): Adjust caller.
	* tree-vect-transform.c (vectorizable_function): Handle extra
	argument, return vectorized function decl.
	(build_vectorized_function_call): Remove.
	(vectorizable_call): Handle calls with result and argument types
	differing.  Handle loop vectorization factor correctly.
	* targhooks.c (default_builtin_vectorized_function): Adjust for
	extra argument.
	* targhooks.h (default_builtin_vectorized_function): Likewise.
	* target.h (builtin_vectorized_function): Add argument type
        argument.
	* config/i386/i386.c (ix86_builtin_vectorized_function): Handle
	extra argument, allow vectorizing of lrintf.
	* doc/tm.texi (TARGET_VECTORIZE_BUILTIN_VECTORIZED_FUNCTION): Adjust
	documentation of target hook.

	* gcc.target/i386/vectorize3.c: New testcase.

From-SVN: r121617
2007-02-05 21:38:53 +00:00
Hans-Peter Nilsson aa3386a543 re PR target/30665 (peephole2 misapplied on postinc mem)
PR target/30665
	* config/cris/cris.md ("*andsi_movu", "*andsi_clear", "*andhi_movu")
	("*andhi_clear", andu (casesi+45)): For size-changed operand where
	memory is allowed, require !side_effects_p, not just !MEM_VOLATILE_P.

From-SVN: r121613
2007-02-05 21:22:24 +00:00
Hans-Peter Nilsson c3e786e725 cris.md ("*andsi_movu", [...]): For size-changed operand where memory is allowed...
* config/cris/cris.md ("*andsi_movu", "*andsi_clear", "*andhi_movu")
	("*andhi_clear", andu (casesi+45)): For size-changed operand where
	memory is allowed, require !side_effects_p, not just !MEM_VOLATILE_P.

From-SVN: r121612
2007-02-05 21:21:50 +00:00
Roger Sayle 2d38026be8 fold-const.c (fold_unary): Test for availability of BUILT_IN_COS before simplifying REAL_PART(CEXPI)) to COS.
* fold-const.c (fold_unary) <REAL_PART>: Test for availability of
	BUILT_IN_COS before simplifying REAL_PART(CEXPI)) to COS.
	<IMAG_PART>: Likewise, check for availability of BUILT_IN_SIN.
	* builtins.c (fold_builtin_sincos): Check for TARGET_C99_FUNCTIONS
	before canonicalizing sincos to cexpi.
	(fold_builtin_cexp): Likewise, for canonicalizing cexp to cexpi.

From-SVN: r121607
2007-02-05 19:10:44 +00:00
Roger Sayle b6e46ca136 alpha.c (alpha_add_builtins): New Helper function.
* config/alpha/alpha.c (alpha_add_builtins): New Helper function.
	Set TREE_READONLY and TREE_NOTHROW directly, not via attributes.
	(alpha_init_builtins): Use alpha_add_builtins to process tables.

From-SVN: r121603
2007-02-05 16:39:58 +00:00
Roger Sayle 8d0510ddbd mips-tfile.c (initialize_init_file): Correct endianness test.
* mips-tfile.c (initialize_init_file): Correct endianness test.

From-SVN: r121602
2007-02-05 16:37:05 +00:00
Kazu Hirata d6fb69e757 m68k.md (pushdi-1, [...]): Don't use the 'y' constraint.
* config/m68k/m68k.md (pushdi-1, pushdi, movsi+1): Don't use
	the 'y' constraint.

From-SVN: r121600
2007-02-05 14:05:24 +00:00
Richard Sandiford 55d6f63112 dwarf2out.c (dwarf2out_frame_debug_expr): Record the register saves in a PARALLEL before the register assignments.
gcc/
	* dwarf2out.c (dwarf2out_frame_debug_expr): Record the register
	saves in a PARALLEL before the register assignments.

From-SVN: r121594
2007-02-05 10:41:26 +00:00
Richard Sandiford 5cd0f9153d tm.texi (DWARF_ALT_FRAME_RETURN_COLUMN): Do not require DWARF_FRAME_RETURN_COLUMN to be a general register.
gcc/
	* doc/tm.texi (DWARF_ALT_FRAME_RETURN_COLUMN): Do not require
	DWARF_FRAME_RETURN_COLUMN to be a general register.
	* dwarf2out.c (init_return_column_size): New function, split from...
	(expand_builtin_init_dwarf_reg_sizes): ...here.  Allow both
	DWARF_FRAME_RETURN_COLUMN and DWARF_ALT_FRAME_RETURN_COLUMN
	to be nongeneral registers.
	* config/m68k/m68k.h (DWARF_FRAME_REGNUM): Only map FP and
	integer registers.
	(DWARF_FRAME_REGISTERS, DWARF_FRAME_RETURN_COLUMN): Define.
	(DWARF_ALT_FRAME_RETURN_COLUMN): Define.

From-SVN: r121593
2007-02-05 10:38:46 +00:00
Zdenek Dvorak 83bd032b4b cfgcleanup.c (try_optimize_cfg): Avoid removing ENTRY_BLOCK_PTR.
* cfgcleanup.c (try_optimize_cfg): Avoid removing ENTRY_BLOCK_PTR.

From-SVN: r121584
2007-02-04 23:51:28 +00:00
Zdenek Dvorak 14fa2cc057 cfgloopmanip.c (loop_delete_branch_edge): Removed.
* cfgloopmanip.c (loop_delete_branch_edge): Removed.
	(remove_path): Use can_remove_branch_p and remove_branch instead
	of loop_delete_branch_edge.
	* tree-ssa-loop-manip.c (scale_dominated_blocks_in_loop): New function.
	(tree_transform_and_unroll_loop): Remove dead branches immediately.
	Update profile using scale_dominated_blocks_in_loop.
	* cfghooks.c (can_remove_branch_p, remove_branch): New functions.
	* cfghooks.h (struct cfg_hooks): Add can_remove_branch_p.
	(can_remove_branch_p, remove_branch): Declare.
	* tree-cfg.c (tree_can_remove_branch_p): New function.
	(tree_cfg_hooks): Add tree_can_remove_branch_p.
	* cfgrtl.c (rtl_can_remove_branch_p): New function.
	(rtl_cfg_hooks, cfg_layout_rtl_cfg_hook): Add rtl_can_remove_branch_p.

From-SVN: r121583
2007-02-04 23:47:09 +00:00
Jan Hubicka 284893341f re PR middle-end/30696 (Linker failure with OpenMP and inline function)
PR middle-end/30696
	* ipa-inline.c (cgraph_clone_inlined_nodes): When there are unanalyzed
	nodes in cgraph, don't remove offline copy of the function.

From-SVN: r121582
2007-02-04 23:40:58 +00:00
Eric Botcazou f81ef9b362 Small tweaks.
From-SVN: r121579
2007-02-04 19:42:37 +00:00
Jan Hubicka bf3892af75 tree-sra.c (sra_walk_expr): Add linebreaks.
* tree-sra.c (sra_walk_expr): Add linebreaks. BITFIELD_REFs into
	vectors might cause maybe_lookup_element_for_expr to be called
	on non-sra-candidate.

From-SVN: r121578
2007-02-04 17:58:26 +00:00
Kazu Hirata 942fd98f64 bfin-modes.def, [...]: Follow spelling conventions.
* config/bfin/bfin-modes.def, config/bfin/bfin.c,
	config/bfin/bfin.md, config/bfin/predicates.md: Follow
	spelling conventions.

From-SVN: r121577
2007-02-04 16:40:30 +00:00
Richard Guenther 713e3ec92f re PR middle-end/30636 (incorrect array bounds warning on multi-dimensional arrays)
2007-02-04  Richard Guenther  <rguenther@suse.de>

	PR middle-end/30636
	* fold-const.c (try_move_mult_to_index): Make sure to not
	overflow one dimension of a multi-dimensional array access.

	* g++.dg/warn/pr30636.C: New testcase.
	* g++.dg/tree-ssa/tmmti-2.C: XFAIL parts.

From-SVN: r121575
2007-02-04 15:15:38 +00:00
Jan Hubicka f1bd2543db * passes.c (init_optimization_passes): Reindent.
From-SVN: r121573
2007-02-04 14:28:00 +00:00
Jan Hubicka 1084e68953 tree-optimize.c (has_abnormal_outgoing_edge_p): Move to tree-inline.
* tree-optimize.c (has_abnormal_outgoing_edge_p): Move to tree-inline.
	(execute_fixup_cfg): Break out the abnormal goto code.
	* tree-inline.c (has_abnormal_outgoing_edge_p): Move here from
	tree-optimize.c.
	(make_nonlocal_label_edges): Move here from execute_fixup_cfg.
	(optimize_inline_calls): Call make_nonlocal_label_edges.

Co-Authored-By: Eric Botcazou <ebotcazou@libertysurf.fr>

From-SVN: r121572
2007-02-04 13:27:23 +00:00
Jan Hubicka facbf9482d tree-ssa-copyrename.c (copy_rename_partition_coalesce): Return true when something was changed.
* tree-ssa-copyrename.c (copy_rename_partition_coalesce): Return
	true when something was changed.
	(rename_ssa_copies): When something was changed, do
	TODO_remove_unused_locals.
	* tree-ssa-forwprop.c (tree_ssa_forward_propagate_single_use_value):
	add TODO_remove_unused_locals when instruction was removed.

From-SVN: r121571
2007-02-04 13:02:45 +00:00
Jan Hubicka 22ad64b60c ipa-inline.c (try_inline): Improve debug output; work on already inline edges too.
* ipa-inline.c (try_inline): Improve debug output; work on already
	inline edges too.
	(cgraph_decide_inlining_incrementally): Indent; improve debug output;
	call try_inline for already inlined edges too when flattening; 
	inline also functions that make callee growth but overall unit size
	reduce.

From-SVN: r121570
2007-02-04 13:01:13 +00:00
Kazu Hirata 22f2398563 v850.c, [...]: Follow spelling conventions.
* config/v850/v850.c, config/v850/v850.h, config/v850/v850.md:
	Follow spelling conventions.

From-SVN: r121567
2007-02-04 04:33:45 +00:00
Kazu Hirata 85f650932f bitops.md, [...]: Follow spelling conventions.
* config/m32c/bitops.md, config/m32c/jump.md,
	config/m32c/m32c.c, config/m32c/m32c.h, config/m32r/m32r.c,
	config/m32r/m32r.h, config/m32r/m32r.md,
	config/m32r/predicates.md, config/m68hc11/larith.asm,
	config/m68hc11/m68hc11.c, config/m68hc11/m68hc11.h,
	config/m68k/m68k.h, config/mcore/mcore.md, config/mips/4k.md,
	config/mips/mips-protos.h, config/mips/mips.c,
	config/mips/mips.h, config/mips/mips.md, config/mips/mips16.S,
	config/mn10300/mn10300.h, config/mn10300/predicates.md,
	config/mt/mt.c, config/mt/mt.h, config/mt/mt.md: Follow
	spelling conventions.

From-SVN: r121565
2007-02-04 04:11:52 +00:00
Douglas Gregor beeffe367a c-opts.c (c_common_post_options): If C++0x mode is enabled, don't warn about C++0x compatibility.
2007-02-03  Douglas Gregor  <doug.gregor@gmail.com>

       * c-opts.c (c_common_post_options): If C++0x mode is enabled, don't
       warn about C++0x compatibility.

From-SVN: r121564
2007-02-04 04:00:38 +00:00
Kazu Hirata da55315a51 h8300.c, [...]: Follow spelling conventions.
* config/h8300/h8300.c, config/h8300/h8300.h,
	config/h8300/h8300.md: Follow spelling conventions.

From-SVN: r121562
2007-02-04 00:51:14 +00:00
Uros Bizjak 28b02c6064 re PR middle-end/30667 (ICE in immed_double_const, at emit-rtl.c:468)
PR middle-end/30667
        * combine.c (try_combine): Do not substitute source operand
        with constants wider than 2 * HOST_BITS_PER_WIDE_INT.

testsuite/ChangeLog:

        PR middle-end/30667
        * gfortran.dg/pr30667.f: New test.

From-SVN: r121555
2007-02-04 00:39:31 +01:00
Jan Hubicka 3855c807ce re PR gcov-profile/30650 (ICE with -fprofile-use)
PR gcov-profile/30650
	* value-prof.c (stringop_block_profile): Fix handling of size counter;
	do not divide by zero for never executed counters.
	(tree_find_values_to_profile): Fix counters.
	* gcov-ui.h (GCOV_COUNTER_AVERAGE, GCOV_COUNTER_IOR): Fix comments.

From-SVN: r121554
2007-02-03 23:35:42 +00:00
Ian Lance Taylor 2b54c30fb0 lower-subreg.c (simple_move_operand): New static function, broken out of simple_move.
* lower-subreg.c (simple_move_operand): New static function,
	broken out of simple_move.  Reject LABEL_REF, SYMBOL_REF, and HIGH
	operands.
	(simple_move): Call simple_move_operand.
	(find_decomposable_subregs): Add special handling of MEMs.
	(can_decompose_p): Rename from cannot_decompose_p.  Reverse
	meaning of return value.  If we see a hard register, test whether
	it can store a word_mode value.  Change all callers.

From-SVN: r121553
2007-02-03 23:24:05 +00:00
John David Anglin 7fcc8dcf4a pa.md (addvdi3, [...]): New ftrapv insns and expanders.
* pa.md (addvdi3, addvsi3, subvdi3, subvsi3, negvdi2, negvsi2): New
	ftrapv insns and expanders.
	(subdi3): Change define_expand operand 1 to arith11_operand, and
	operand 2 to reg_or_0_operand.  Change constraints of 64-bit insn
	pattern to handle reg_or_0 operands.  Revise 32-bit insn pattern to
	handle 11-bit constants and reg_or_0 operands in operands 1 and 2,
	respectively.

From-SVN: r121552
2007-02-03 21:18:18 +00:00
John David Anglin 2e3e8cea38 re PR middle-end/30174 (FAIL: g++.old-deja/g++.abi/cxa_vec.C execution test)
PR middle-end/30174
	* varasm.c (notice_global_symbol): Treat global objects as weak when
	flag_shlib is true.

From-SVN: r121551
2007-02-03 21:15:15 +00:00
Kaveh R. Ghazi b86a760aed emit-rtl.c (dconstpi): Delete.
* emit-rtl.c (dconstpi): Delete.
	(dconstsqrt2): New.
	(init_emit_once): Delete dconstpi and init dconstsqrt2.
	* real.h (dconstpi): Delete.
	(dconstsqrt2): New.
	* builtins.c (fold_builtin_cabs): Use dconstsqrt2.
	(fold_builtin_hypot): Likewise.

From-SVN: r121550
2007-02-03 20:49:51 +00:00
Tom Tromey 3a610de879 re PR driver/30246 (-ggdb3 does not cause -dD to be passed to cc1 for preprocessing)
PR driver/30246
	* gcc.c (cpp_unique_options): Any of -ggdb3, -gstabs3,
	-gcoff3, -gxcoff3, -gvms3 implies -dD.

From-SVN: r121549
2007-02-03 19:35:06 +00:00
Kazu Hirata 9f5ed61a80 c-decl.c, [...]: Fix comment typos.
* c-decl.c, config/avr/avr.c, config/avr/avr.h,
	config/m68k/m68k.c, config/m68k/netbsd-elf.h,
	config/mn10300/mn10300.c, config/pdp11/pdp11.h,
	config/rs6000/cell.md, config/rs6000/darwin.h,
	config/sh/sh.md, config/sh/sh4-300.md, config/spu/spu.c,
	config/spu/spu.md, cselib.c, expr.c, haifa-sched.c, hwint.h,
	jump.c, reload.c, sched-deps.c, sched-int.h, tree-inline.c,
	tree-profile.c, tree-ssa-live.h, tree-vrp.c: Fix comment
	typos.  Follow spelling conventions.
	* doc/invoke.texi: Follow spelling conventions.

From-SVN: r121546
2007-02-03 16:47:06 +00:00
Roger Sayle 3fa0cacdb5 simplify-rtx.c (simplify_relational_operation_1): Implement some canonicalization transformations that attempt to simplify...
* simplify-rtx.c (simplify_relational_operation_1): Implement some
	canonicalization transformations that attempt to simplify integer
	constant comparisons to become comparisons against zero.

From-SVN: r121544
2007-02-03 16:22:09 +00:00
Kaveh R. Ghazi d1ad84c204 builtins.c (fold_builtin_cabs): Fold cabs(x+xi) into fabs(x)*sqrt(2).
* builtins.c (fold_builtin_cabs): Fold cabs(x+xi) into
	fabs(x)*sqrt(2).
	* fold-const.c (fold_binary): Fix comment typos.  Fold complex
	(x,0)-(0,y) into (x,-y).  Likewise (0,y)-(x,0) into (-x,y).

testsuite:
	* gcc.dg/builtins-54.c: Add more cases.

From-SVN: r121542
2007-02-03 16:13:23 +00:00
Mike Stump 75b1b789dd darwin9.h (DARWIN_LINKER_GENERATES_ISLANDS): Add.
* config/darwin9.h (DARWIN_LINKER_GENERATES_ISLANDS): Add.
	* config/rs6000/rs6000.c (DARWIN_GENERATE_ISLANDS): Add.
	(output_call): Use DARWIN_GENERATE_ISLANDS to decide when to
	generate a branch island.
Radar 4967371

From-SVN: r121534
2007-02-03 04:52:51 +00:00
Bob Wilson da1f39e475 xtensa.c (smalloffset_mem_p): Use BASE_REG_P.
* config/xtensa/xtensa.c (smalloffset_mem_p): Use BASE_REG_P.
	(xtensa_legitimate_address_p): New.
	(xtensa_legitimize_address): New.
	(xtensa_output_addr_const_extra): New.
	* config/xtensa/xtensa.h (REG_OK_STRICT_FLAG): Define.
	(BASE_REG_P): New.
	(REG_OK_FOR_BASE_P): Use BASE_REG_P.
	(GO_IF_LEGITIMATE_ADDRESS): Move code to xtensa_legitimate_address_p.
	(LEGITIMIZE_ADDRESS): Move code to xtensa_legitimize_address.
	(OUTPUT_ADDR_CONST_EXTRA): Move code to xtensa_output_addr_const_extra.
	* config/xtensa/xtensa-protos.h (xtensa_legitimate_address_p): New.
	(xtensa_legitimize_address): New.
	(xtensa_output_addr_const_extra): New.

From-SVN: r121533
2007-02-03 01:23:05 +00:00
Steve Ellcey 86ad1da0d3 * config/ia64/ia64.c (ia64_print_operand): Fix compare strings.
From-SVN: r121530
2007-02-03 00:44:21 +00:00
Ian Lance Taylor 093253be06 * expmed.c (expand_divmod): Add comment.
From-SVN: r121519
2007-02-02 19:16:04 +00:00
Kazu Hirata a638bdc2fd emit-rtl.c (renumber_insns): Remove.
* emit-rtl.c (renumber_insns): Remove.
	* flags.h: Remove the extern for flag_renumber_insns.
	* rtl.h: Remove the prototype for renumber_insns.
	* toplev.c (flag_renumber_insns): Remove.

From-SVN: r121517
2007-02-02 19:02:18 +00:00
Hui-May Chang 88c6f10182 revert: i386.c (ix86_function_arg_regno_p): Put back the code before the following patch under TARGET_MACHO.
2007-02-02  Hui-May Chang  <hm.chang@apple.com>

	Revert for x86 darwin:
	2005-06-19  Uros Bizjak  <uros@kss-loka.si>

	* config/i386/i386.c (ix86_function_arg_regno_p): Put back the
	code before the following patch under TARGET_MACHO.
	(ix86_function_value_regno_p): Likewise.

From-SVN: r121515
2007-02-02 18:19:13 +00:00
Kaveh R. Ghazi 1aeef52679 fold-const.c (negate_expr_p, [...]): Handle COMPLEX_EXPR.
* fold-const.c (negate_expr_p, fold_negate_expr): Handle
	COMPLEX_EXPR.
	
testsuite:
	* gcc.dg/builtins-20.c: Add more cases.

From-SVN: r121511
2007-02-02 17:09:55 +00:00
Maxim Kuvyrkov f6ec1d1163 re PR target/29682 (ICE: in change_pattern, at haifa-sched.c:4066 with -O3 -msched-control-spec)
PR target/29682
	* config/ia64/ia64.c (ia64_speculate_insn): Restrict to memory loads to
	general or fp registers.  Add comments.
	* config/ia64/ia64.md (reg_pred_prefix): Add comment.

	PR target/29682
	* gcc-target/ia64/pr29682.c: New test.

From-SVN: r121510
2007-02-02 16:57:18 +00:00
Paolo Bonzini ad12460bed pointer-set.c (insert_aux): Only return insertion slot.
2007-02-02  Paolo Bonzini  <bonzini@gnu.org>

	* pointer-set.c (insert_aux): Only return insertion slot.
	(pointer_set_insert): Adjust.
	(pointer_set_traverse, struct pointer_map_t, pointer_map_create,
	pointer_map_destroy, pointer_map_insert, pointer_map_contains,
	pointer_map_traverse): New.
	* pointer-set.h (pointer_set_traverse, struct pointer_map_t,
	pointer_map_create,  pointer_map_destroy, pointer_map_insert,
	pointer_map_contains, pointer_map_traverse): Declare.

From-SVN: r121507
2007-02-02 16:21:18 +00:00
Jakub Jelinek 6b01cd54dd re PR middle-end/30473 (Internal Compiler Error with a sprintf with few arguments for format %s)
PR middle-end/30473
	* builtins.c (fold_builtin_sprintf): Do not attempt to optimize
	sprintf (str, "%s").  Do not optimize sprintf (str, "nopercent", p++).

	* gcc.dg/pr30473.c: New test.
	* gcc.c-torture/execute/20070201-1.c: New test.

From-SVN: r121495
2007-02-02 13:21:13 +01:00
Maxim Kuvyrkov b198261f9c re PR middle-end/28071 (A file that can not be compiled in reasonable time/space)
* sched-int.h (ds_to_dk, dk_to_ds): Declare functions.
	
	(struct _dep): New type.
	(dep_t): New typedef.
	(DEP_PRO, DEP_CON, DEP_KIND): New access macros.
	(DEP_STATUS): New access macro.  The macro with the same name was
	renamed to DEP_LINK_STATUS.
	(dep_init): Declare function

	(struct _dep_link): New type.
	(dep_link_t): New typedef.
	(DEP_LINK_NODE, DEP_LINK_NEXT, DEP_LINK_PREV_NEXTP): New access macros.
	(DEP_LINK_DEP, DEP_LINK_PRO, DEP_LINK_CON, DEP_LINK_KIND): New macros.
	(DEP_LINK_STATUS): New macro.
	(debug_dep_links): New debug function.

	(struct _deps_list): New type.
	(deps_list_t): New typedef.
	(DEPS_LIST_FIRST): New access macro.
	(FOR_EACH_DEP_LINK): New cycle macro.
	(create_deps_list, free_deps_list, delete_deps_list): Declare
	functions.
	(deps_list_empty_p, debug_deps_list, add_back_dep_to_deps_list): Ditto.
	(find_link_by_pro_in_deps_list, find_link_by_con_in_deps_list): Ditto.
	(copy_deps_list_change_con): Ditto.

	(move_dep_link): Declare function.

	(struct _dep_node): New type.
	(dep_node_t): New typedef.
	(DEP_NODE_BACK, DEP_NODE_DEP, DEP_NODE_FORW): New access macros.

	(struct haifa_insn_data.back_deps): New field to hold backward
	dependencies of the insn.
	(struct haifa_insn_data.depend): Rename to forw_deps.  Change its type
	to deps_list_t.
	(struct haifa_insn_data.resolved_deps): Rename to resolved_back_deps.
	Change its type	to deps_list_t.
	(INSN_BACK_DEPS): New access macro to use instead of LOG_LINKS.
	(INSN_DEPEND): Rename to INSN_FORW_DEPS.
	(RESOLVED_DEPS): Rename to INSN_RESOLVED_BACK_DEPS.

	(INSN_COST): Move to haifa-sched.c.  Use insn_cost () instead.
	
	(DEP_STATUS): Rename to DEP_LINK_STATUS.  Fix typo in the comment.

	(add_forw_dep, delete_back_forw_dep, insn_cost): Update declaration and
	all callers.
	(dep_cost): Declare.
	
	* sched-deps.c (CHECK): New macro to (en/dis)able sanity checks.
	(ds_to_dk, dk_to_ds): New functions.
	
	(init_dep_1): New static function.
	(init_dep): New function.
	(copy_dep): New static function.
	
	(dep_link_consistent_p, attach_dep_link, add_to_deps_list): New static
	functions.
	(detach_dep_link): New static function.
	(move_dep_link): New function.
	
	(dep_links_consistent_p, dump_dep_links): New static functions.
	(debug_dep_links): New debugging function.
	
	(deps_obstack, dl_obstack, dn_obstack): New static variables.
	
	(alloc_deps_list, init_deps_list): New static functions.
	(create_deps_list): New function.
	(clear_deps_list): New static function.
	(free_deps_list, delete_deps_list, deps_list_empty_p): New functions.
	(deps_list_consistent_p, dump_deps_list): New static functions.
	(debug_deps_list): New function.
	(add_back_dep_to_deps_list, find_link_by_pro_in_deps_list): New
	functions.
	(find_link_by_con_in_deps_list, copy_deps_list_change_con): Ditto.

	(maybe_add_or_update_back_dep_1, add_or_update_back_dep_1): Update to
	use new scheduler dependencies lists.
	(add_back_dep, delete_all_dependences, fixup_sched_groups): Ditto.
	(sched_analyze): Ditto.  Initialize dependencies lists.
	(add_forw_dep, compute_forward_dependences): Update to use new
	scheduler dependencies lists.
	
	(init_dependency_caches): Init deps_obstack.
	(free_dependency_caches): Free deps_obstack.
	
	(adjust_add_sorted_back_dep, adjust_back_add_forw_dep): Update to use
	new scheduler dependencies lists.
	(delete_forw_dep, add_or_update_back_forw_dep): Ditto.
	(add_back_forw_dep, delete_back_forw_dep): Ditto.

	* sched-rgn.c (set_spec_fed, find_conditional_protection, is_pfree):
	Update to use new scheduler dependencies lists.
	(is_conditionally_protected, is_prisky, add_branch_dependences): Ditto.
	(debug_dependencies): Ditto.
	(schedule_region): Update comments.
	
	* sched-ebb.c (earliest_block_with_similiar_load): Update to use new
	scheduler dependencies lists.
	(schedule_ebb): Update comments.
	
	* rtl.def (DEPS_LIST): Remove.
	
	* lists.c (unused_deps_list): Remove.
	(free_list): Update assertions.
	
	(alloc_DEPS_LIST, free_DEPS_LIST_list, free_DEPS_LIST_node): Remove.
	(remove_free_DEPS_LIST_elem, copy_DEPS_LIST_list): Ditto.

	* rtl.h (free_DEPS_LIST_list, alloc_DEPS_LIST): Remove declarations.
	(remove_free_DEPS_LIST_elem, copy_DEPS_LIST_list): Ditto.
	
	* haifa-sched.c (comments): Update.
	(insn_cost1): Remove.  Inline the code into insn_cost ().
	(insn_cost): Update to use new scheduler dependencies lists.  Move
	processing of the dependency cost to dep_cost ().
	(dep_cost): New function.  Use it instead of insn_cost () when
	evaluating cost of the dependency.  Use compatible interface to
	interact with the target.
	(priority): Update to use new scheduler dependencies lists.
	(rank_for_schedule): Ditto.  Optimize heuristic that prefers the insn
	with greater number of insns that depend on the insn.
	(schedule_insn): Update to use new scheduler dependencies lists.  Add
	code to free backward dependencies lists.  Inline and optimize code
	from resolve_dep () - see PR28071.
	(ok_for_early_queue_removal): Update to use new scheduler dependencies
	lists.  Update call to targetm.sched.is_costly_dependence hook.
	
	(fix_inter_tick, try_ready, fix_tick_ready): Update to use new
	scheduler dependencies lists.
	
	(resolve_dep): Remove.  Move the logic to schedule_insn ().
	(init_h_i_d): Initialize dependencies lists.
	
	(process_insn_depend_be_in_spec): Rename to
	process_insn_forw_deps_be_in_spec.  Update to use new scheduler
	dependencies lists.
	(add_to_speculative_block, create_check_block_twin, fix_recovery_deps):
	Update to use new scheduler dependencies lists.
	(clear_priorities, calc_priorities, add_jump_dependencies): Ditto.
	
	* ddg.c (create_ddg_dependence, create_ddg_dep_no_link): Update to use
	new scheduler dependencies lists.
	(build_intra_loop_deps): Ditto.
	
	* target.h (struct _dep): Declare to use in
	gcc_target.sched.is_costly_dependence.
	(struct gcc_target.sched.adjust_cost): Fix typo.
	(struct gcc_target.sched.is_costly_dependence): Change signature to use
	single dep_t parameter instead of an equivalent triad.
	(struct gcc_target.sched.adjust_cost_2): Remove.

	* target-def.h (TARGET_SCHED_ADJUST_COST_2): Remove.

	* reg-notes.def (DEP_TRUE, DEP_OUTPUT, DEP_ANTI): Update comments.

	* doc/tm.texi (TARGET_SCHED_IS_COSTLY_DEPENDENCE): Update
	documentation.
	(TARGET_SCHED_ADJUST_COST_2): Remove documentation.

	* doc/rtl.texi (LOG_LINKS): Remove part about instruction scheduler.
	(REG_DEP_TRUE): Document.
	
	* config/ia64/ia64.c (ia64_adjust_cost_2): Rename to ia64_adjust_cost.
	Change signature to correspond to the targetm.sched.adjust_cost hook.  
	Update use in TARGET_SCHED_ADJUST_COST_2.
	(TARGET_SCHED_ADJUST_COST_2): Rename to TARGET_SCHED_ADJUST_COST.
	(ia64_dependencies_evaluation_hook, ia64_dfa_new_cycle): Update to use
	new scheduler dependencies lists.
	(ia64_gen_check): Ditto.

	* config/mips/mips.c (vr4130_swap_insns_p): Update to use new scheduler
	dependencies lists.
	
	* config/rs6000/rs6000.c (rs6000_is_costly_dependence): Change
	signature to correspond to the targetm.sched.is_costly_dependence hook.
	(is_costly_group): Update to use new scheduler dependencies lists.

	* config/spu/spu.c (spu_sched_adjust_cost): Use insn_cost () function
	instead of INSN_COST () macro.

From-SVN: r121494
2007-02-02 09:11:11 +00:00
Ian Lance Taylor 9a5a8e58d2 * lower-subreg.c (resolve_clobber): Handle a subreg of a concatn.
From-SVN: r121493
2007-02-02 07:20:35 +00:00
Guy Martin 546dcc4352 pa.md (tp_load): Correct mfctl instruction syntax.
* pa.md (tp_load): Correct mfctl instruction syntax.

From-SVN: r121487
2007-02-02 02:09:36 +00:00
Geoffrey Keating 9278121c0f rs6000.c (rs6000_stack_info): Correct altivec_padding_size calculation on AIX.
* config/rs6000/rs6000.c (rs6000_stack_info): Correct
	altivec_padding_size calculation on AIX.  Improve comment, add
	assert to verify that it's right.

From-SVN: r121485
2007-02-02 01:47:02 +00:00
Geoffrey Keating 7c40d6662b darwin.h (MD_UNWIND_SUPPORT): Don't define for 64-bit.
* config/rs6000/darwin.h (MD_UNWIND_SUPPORT): Don't define for
	64-bit.

From-SVN: r121484
2007-02-02 01:37:53 +00:00
Seongbae Park 9012cdf36a 2007-2-01 Seongbae Park <seongbae.park@gmail.com>
PR inline-asm/28686
	* global.c (global_alloc): Add mising initialization of
	ELIMINABLE_REGSET.

2007-02-01  Roger Sayle  <roger@eyesopen.com>

From-SVN: r121477
2007-02-01 23:15:13 +00:00
Roger Sayle 62e5bf5d42 alias.c (init_alias_analysis): Correct whitespace.
* alias.c (init_alias_analysis): Correct whitespace.
	* bb-reorder.c (fix_edges_for_rarely_executed_code,
	partition_hot_cold_basic_blocks): Likewise.
	* builtins.c (expand_builtin_printf, expand_builtin_fprintf,
	expand_builtin_sprintf, fold_builtin_carg, fold_builtin_sprintf,
	maybe_emit_sprintf_chk_warning, fold_builtin_sprintf_chk,
	fold_builtin_snprintf_chk, fold_builtin_printf,
	fold_builtin_fprintf, do_mpfr_ckconv, do_mpfr_arg1, do_mpfr_arg2,
	do_mpfr_arg3, do_mpfr_sincos): Likewise.
	* cfgcleanup.c (cleanup_cfg): Likewise.
	* cfgexpand.c (tree_expand_cfg): Likewise.
	* fold-const.c (fold_binary) <RDIV_EXPR>: Likewise.
	* function.c (get_next_funcdef_no): Likewise.
	* gengtype.c (main): Likewise.
	* genmodes.c (main): Likewise.
	* gcse.c (bypass_conditional_jumps, print_ldst_list): Likewise.
	* haifa-sched.c (schedule_block, extend_h_i_d): Likewise.
	* ifcvt.c (noce_emit_move_insn): Likewise.
	* modulo-sched.c (generate_prolog_epilog, sms_schedule_by_order):
	Likewise.
	* stor-layout.c (get_best_mode): Likewise.
	* tree-ssa-loop-niter.c (get_val_for): Likewise.
	* tree-ssa-structalias.c (get_varinfo, get_varinfo_fc,
	scc_visit, do_ds_constraint, do_complex_constraint, label_visit,
	perform_var_substitution, solve_graph): Likewise.
	* tree-vrp.c (vrp_finalize): Likewise.

From-SVN: r121470
2007-02-01 20:32:20 +00:00
Ian Lance Taylor 0e6c5b5854 lower-subreg.c (simplify_gen_subreg_concatn): If we ask for the high part of a paradoxical subreg, return a constant zero.
* lower-subreg.c (simplify_gen_subreg_concatn): If we ask for the
	high part of a paradoxical subreg, return a constant zero.

From-SVN: r121466
2007-02-01 16:43:20 +00:00
Zdenek Dvorak c0d919fa35 toplev.c (lang_dependent_init): Call init_set_costs.
* toplev.c (lang_dependent_init): Call init_set_costs.
	* loop-init.c (loop_optimizer_init): Do not call init_set_costs.

From-SVN: r121464
2007-02-01 14:57:08 +00:00
Richard Guenther ee7d8048d5 re PR middle-end/30656 (ICE with -ftrapv)
2007-02-01  Richard Guenther  <rguenther@suse.de>

	PR middle-end/30656
	* fold-const.c (fold_negate_expr): Allow negating a
	constant if overflow does not change.

From-SVN: r121460
2007-02-01 10:27:17 +00:00
Ralf Wildenhues ab873839aa c-tree.texi (Expression trees): Improve markup.
2007-01-31  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	* doc/c-tree.texi (Expression trees): Improve markup.
	* doc/tm.texi (Register Classes, Addressing Modes)
	(Floating Point): Fix spacing after abbreviations.  Fix some
	typos.

From-SVN: r121457
2007-01-31 21:36:17 -08:00
Ben Elliston b818de221c invoke.texi: Replace "bugfix" with "bug fix" throughout.
* doc/invoke.texi: Replace "bugfix" with "bug fix" throughout.
	* doc/contrib.texi: Likewise.
	* doc/install.texi: Likewise.

From-SVN: r121455
2007-02-01 14:05:18 +11:00
Ian Lance Taylor e53a16e75f lower-subreg.c: New file.
gcc/:
	* lower-subreg.c: New file.
	* rtl.def (CONCATN): Define.
	* passes.c (init_optimization_passes): Add pass_lower_subreg and
	pass_lower_subreg2.
	* emit-rtl.c (update_reg_offset): New static function, broken out
	of gen_rtx_REG_offset.
	(gen_rtx_REG_offset): Call update_reg_offset.
	(gen_reg_rtx_offset): New function.
	* regclass.c: Revert patch of 2006-03-05, restoring
	reg_scan_update.
	(clear_reg_info_regno): New function.
	* dwarf2out.c (concatn_loc_descriptor): New static function.
	(loc_descriptor): Handle CONCATN.
	* common.opt (fsplit_wide_types): New option.
	* opts.c (decode_options): Set flag_split_wide_types when
	optimizing.
	* timevar.def (TV_LOWER_SUBREG): Define.
	* rtl.h (gen_reg_rtx_offset): Declare.
	(reg_scan_update): Declare.
	* regs.h (clear_reg_info_regno): Declare.
	* tree-pass.h (pass_lower_subreg): Declare.
	(pass_lower_subreg2): Declare.
	* doc/invoke.texi (Option Summary): List -fno-split-wide-types.
	(Optimize Options): Add -fsplit-wide-types to -O1 list.  Document
	-fsplit-wide-types.
	* doc/rtl.texi (Regs and Memory): Document concat and concatn.
	* Makefile.in (OBJS-common): Add lower-subreg.o.
	(lower-subreg.o): New target.
gcc/testsuite/:
	* gcc.dg/lower-subreg-1.c (test): New test.

From-SVN: r121453
2007-02-01 01:09:35 +00:00
Kazu Hirata 52f7138e13 * config/sh/sh.h (HAVE_SECONDARY_RELOADS): Remove.
From-SVN: r121443
2007-01-31 23:46:54 +00:00
Anatoly Sokolov d1fc69e4a5 re PR target/19087 (Overflowed address in dwarf debug line information)
PR target/19087
	* config/avr/avr.c (DWARF2_ADDR_SIZE): Define.

From-SVN: r121426
2007-01-31 20:23:49 +03:00
Kaveh R. Ghazi 4fc7842350 re PR middle-end/29335 (transcendental functions with constant arguments should be resolved at compile-time)
PR middle-end/29335
	* builtins.c (fold_builtin_sqrt): Use MPFR for constant args.

testsuite:
	* gcc.dg/torture/builtin-math-2.c: Add sqrt cases.
	* gcc.dg/torture/builtin-math-3.c: Likewise.

From-SVN: r121423
2007-01-31 15:06:19 +00:00
Zdenek Dvorak 677cc14d2d cfgloop.h: Include vec-prim.h.
* cfgloop.h: Include vec-prim.h.
	(enum li_flags): Remove LI_ONLY_OLD.
	(loop_iterator): Changed.
	(fel_next, fel_init): Iterate over loop tree.
	(FOR_EACH_LOOP_BREAK): New macro.
	* loop-unswitch.c (unswitch_loops): Do not pass LI_ONLY_OLD to
	FOR_EACH_LOOP.
	* tree-ssa-loop-unswitch.c (tree_ssa_unswitch_loops): Ditto.
	* modulo-sched.c (sms_schedule): Ditto.
	* tree-vectorizer.c (vectorize_loops): Ditto.
	* doc/loop.texi: Update information on loop numbering and behavior of
	FOR_EACH_LOOP wrto new loops.
	* tree-scalar-evolution.c (compute_overall_effect_of_inner_loop,
	add_to_evolution_1): Test nestedness of loops instead of comparing
	their numbers.
	* tree-chrec.c (chrec_fold_plus_poly_poly,
	chrec_fold_multiply_poly_poly, chrec_evaluate,
	hide_evolution_in_other_loops_than_loop, chrec_component_in_loop_num,
	reset_evolution_in_loop): Ditto.
	* Makefile.in (CFGLOOP_H): Add vecprim.h dependency.

From-SVN: r121422
2007-01-31 13:50:06 +00:00
Dirk Mueller e7917d06e8 c-common.c (warn_about_parentheses): Separate warning about un-parenthized sequence of comparison operators from the...
2007-01-31  Dirk Mueller  <dmueller@suse.de>

        * c-common.c (warn_about_parentheses): Separate warning about
        un-parenthized sequence of comparison operators from the one
        which is supposed to warn about x <= y <= z.

        * testsuite/gcc.dg/Wparentheses-2.c: Update and add new tests.

From-SVN: r121421
2007-01-31 13:43:40 +00:00
Uros Bizjak 9ed4207fce optabs.h (enum optab_index): Add new OTI_isinf.
* optabs.h (enum optab_index): Add new OTI_isinf.
	(isinf_optab): Define corresponding macro.
	* optabs.c (init_optabs): Initialize isinf_optab.
	* genopinit.c (optabs): Implement isinf_optab using isinf?f2
	patterns.
	* builtins.c (mathfn_built_in): Handle BUILT_IN_ISINF{,F,L}.
	(expand_builtin_interclass_mathfn): Expand BUILT_IN_ISINF{,F,L}
	using isinf_optab.
	(expand_builtin): Expand BUILT_IN_ISINF{,F,L} using
	expand_builtin_interclass_mathfn.
	* reg_stack.c (subst_stack_regs_pat): Handle UNSPEC_FXAM.
	* config/i386/i386.md (UNSPEC_FXAM): New constant.
	(fxam<mode>2_i387): New insn pattern.
	(isinf<mode>2) New expander to implement isinf, isinff and isinfl
	built-in functions as x87 inline asm.

testsuite/ChangeLog:

	* gcc.dg/builtins-63.c: New test.

From-SVN: r121419
2007-01-31 13:30:20 +01:00