Commit Graph

31540 Commits

Author SHA1 Message Date
DJ Delorie 21f14ff955 reload1.c (choose_reload_regs): Check for invalid subregs before computing their locations, not after.
* reload1.c (choose_reload_regs): Check for invalid subregs before
computing their locations, not after.

From-SVN: r121198
2007-01-25 20:15:05 -05:00
Geoffrey Keating 22fa69dace re PR target/25127 (internal compiler error: in rs6000_emit_prologue, at config/rs6000/rs6000.c:14039)
2007-01-24  Geoffrey Keating  <geoffk@apple.com>

	PR 25127
	* config/rs6000/rs6000.c (first_altivec_reg_to_save): On Darwin,
	save Altivec registers in an eh_return function.
	(compute_vrsave_mask): Likewise.
	(rs6000_stack_info): Correct AIX/Darwin stack alignment computation
	for saving Altivec registers.
	(rs6000_emit_prologue): Don't allocate stack twice in
	eh_return function.  Correct expected value of altivec_save_offset
	when using save_world.  Describe save of R0 to stack when using
	save_world.  Describe stack pointer adjustment when using
	save_world.  Remove duplicated eh_return parameter register saving.
	Update sp_offset variable after save_world.
	* config/rs6000/t-darwin (LIB2FUNCS_STATIC_EXTRA): Remove
	darwin-world.asm.
	(LIB2FUNCS_EXTRA): Add darwin-world.asm.
	* config/rs6000/darwin.h (SUBTARGET_OVERRIDE_OPTIONS): -m64
	implies Altivec.

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

	* gcc.target/powerpc/darwin-ehreturn-1.c: New.
	* g++.dg/eh/simd-2.C: Also run on Darwin.
	* g++.dg/eh/simd-3.C: New.
	* g++.dg/eh/simd-4.C: New.

From-SVN: r121184
2007-01-25 20:32:06 +00:00
Steve Ellcey 79e8b6c016 * config.gcc (ia64*-*-hpux*): Make posix threads the default.
From-SVN: r121180
2007-01-25 18:08:16 +00:00
Steve Ellcey 7d52200069 re PR target/30182 (FAIL: gcc.dg/pr28796-2.c (test for excess errors))
PR other/30182
	* config/pa/pa.c (pa_init_builtins): Set asm names for finite routines.
	* config/ia64/ia64.c (ia64_init_builtins):  Ditto.

From-SVN: r121178
2007-01-25 17:06:55 +00:00
Richard Guenther 16c1c158d8 invoke.texi (-Wcoverage-mismatch): Document.
2007-01-25  Richard Guenther  <rguenther@suse.de>

	* doc/invoke.texi (-Wcoverage-mismatch): Document.
	* common.opt (-Wcoverage-mismatch): New warning option.
	* coverage.c (get_coverage_counts): Ignore coverage mismatch
	if -Wcoverage-mismatch is given.

	* gcc.dg/tree-prof/tree-prof.exp: Define _PROFILE_GENERATE
	and _PROFILE_USE.
	* gcc.dg/tree-prof/wcoverage-mismatch.c: New testcase.

From-SVN: r121169
2007-01-25 12:35:13 +00:00
Razya Ladelsky b9c369e618 ipa-cp.c (ipcp_insert_stage, [...]): Support for SSA.
2007-01-25  Razya Ladelsky  <razya@il.ibm.com>

        * ipa-cp.c (ipcp_insert_stage, ipcp_driver): Support for SSA.
          (ipcp_driver): Change to static definition.
          Add dumping of the ifunctions.
          (constant_val_insert): Remove unused parameter. Support for SSA.
          (ipcp_propagate_const): Support for SSA.
          (ipcp_profile_bb_print): Print only analyzed nodes.
          (ipcp_replace_map_create): Remove support for Fortran constant
          for now.
          * ipa-prop.c (ipa_method_modify_stmt,
          ipa_callsite_compute_param): Support for SSA.
          * ipa-prop.h (ipcp_driver): Remove declaration.
          (IS_VALID_TREE_MAP_INDEX): Add define.

From-SVN: r121167
2007-01-25 10:54:47 +00:00
Geoffrey Keating 9dc5c4f5eb * unwind-dw2.c (execute_stack_op): Handle DW_OP_swap.
From-SVN: r121165
2007-01-25 07:08:33 +00:00
Kaveh R. Ghazi 01ffa37015 re PR middle-end/30447 (Evaluate complex math functions at compile-time)
PR middle-end/30447
	* builtins.c (fold_builtin_cabs): Use MPFR to evaluate a
	constant argument to cabs and do it without checking for
	-funsafe-math-optimizations.

From-SVN: r121163
2007-01-25 04:15:26 +00:00
Douglas Gregor e1f1ee86a8 c-common.h (RID_FIRST_CXX0X): New.
2007-01-24  Douglas Gregor  <dgregor@osl.iu.edu>

	* c-common.h (RID_FIRST_CXX0X): New.
	(RID_LAST_CXX0X): New.
	* c-opts.c (c_common_handle_option): -Wc++0x-compat is triggered
	by -Wall.
	* c.opt (Wc++0x-compat): New.
	* doc/invoke.texi (-Wc++0x-compat): Document.

From-SVN: r121162
2007-01-25 04:04:18 +00:00
Kaveh R. Ghazi 527cab2096 builtins.c (fold_builtin_carg): New.
* builtins.c (fold_builtin_carg): New.
	(fold_builtin_1): Use it.

testsuite:
	* gcc.dg/builtins-20.c: Test builtin carg.

From-SVN: r121159
2007-01-25 03:57:30 +00:00
Jan Hubicka ee41133693 * ipa-inline.c (cgraph_decide_inlining): Initialize initial_insns.
From-SVN: r121156
2007-01-25 01:13:02 +00:00
Jan Hubicka b7c27d5169 ipa-inline.c (initial_insns, max_insns): Delete.
* ipa-inline.c (initial_insns, max_insns): Delete.
	(compute_max_insns): New function.
	(cgraph_decide_inlining_of_small_function): Use it; take minimal amount
	of insns as base for code growth.
	(cgraph_decide_inlining): Make initial_insns local; do not compute
	max_insns.
	* params.def (PARAM_INLINE_UNIT_GROWTH): Set to 60.
	* doc/invoke.texi (inline-unit-growth): Update docs.

From-SVN: r121144
2007-01-24 22:45:00 +00:00
Jakub Jelinek 15a26abf30 i386.h (x86_cmpxchg16b): Remove const.
* config/i386/i386.h (x86_cmpxchg16b): Remove const.
	(TARGET_CMPXCHG16B): Define to x86_cmpxchg16b.
	* config/i386/i386.c (x86_cmpxchg16b): Remove const.
	(override_options): Add PTA_CX16 flag.  Set x86_cmpxchg16b
	for CPUs that have PTA_CX16 set.

From-SVN: r121140
2007-01-24 23:00:03 +01:00
Jakub Jelinek 07b7aade9d re PR middle-end/27416 (ICE on invalid firstprivate/lastprivate)
PR middle-end/27416
	* gimplify.c (omp_check_private): New function.
	(gimplify_scan_omp_clauses): Use it for
	firstprivate/lastprivate/reduction.

	* gcc.dg/gomp/pr27416.c: New test.

From-SVN: r121133
2007-01-24 21:58:21 +01:00
Jakub Jelinek 4288fea212 re PR middle-end/30494 (ICE with VLA and openmp)
PR middle-end/30494
	* gimplify.c (omp_add_variable): Don't call omp_notice_variable
	on TYPE_SIZE_UNIT for GOVD_LOCAL VLAs.

	* gcc.dg/gomp/pr30494.c: New test.
	* g++.dg/gomp/pr30494.C: New test.

	* testsuite/libgomp.c/pr30494.c: New test.

From-SVN: r121132
2007-01-24 21:56:45 +01:00
Jakub Jelinek 3d55c64b49 re PR middle-end/30421 (incorrect warning when using firstprivate and lastprivate clauses)
PR middle-end/30421
	* omp-low.c (lower_omp_for_lastprivate): Add dlist argument.
	If lower_lastprivate_clauses emits some statements, append them
	to dlist rather than body_p and to body_p append an initializer.
	(lower_omp_for): Adjust caller.

	* gcc.dg/gomp/pr30421.c: New test.

From-SVN: r121131
2007-01-24 21:53:08 +01:00
Steve Ellcey 3b313c7838 Forgot ChangeLog in previous commit.
From-SVN: r121129
2007-01-24 19:40:57 +00:00
Andreas Krebbel f767122b2e unwind-dw2-fde.c (get_cie_encoding): Replaced _Unwind_Word with _uleb128_t and _Unwind_SWord with _sleb128_t.
2007-01-24  Andreas Krebbel  <krebbel1@de.ibm.com>

	* unwind-dw2-fde.c (get_cie_encoding): Replaced _Unwind_Word with 
	_uleb128_t and _Unwind_SWord with _sleb128_t.
	* unwind-dw2.c (extract_cie_info, execute_stack_op, execute_cfa_program,
	uw_frame_state_for, uw_update_context_1): Likewise.
	* unwind-c.c (parse_lsda_header, PERSONALITY_FUNCTION): Likewise.
	* unwind-pe.h (read_uleb128, read_sleb128,
	read_encoded_value_with_base): Likewise.
	* unwind-generic.h: Define _sleb128_t and _uleb128_t types.

2007-01-24  Andreas Krebbel  <krebbel1@de.ibm.com>

	* libsupc++/eh_personality.cc (parse_lsda_header, check_exception_spec,
	get_ttype_entry, empty_exception_spec, PERSONALITY_FUNCTION): Replaced
	_Unwind_Word with _uleb128_t and _Unwind_SWord with _sleb128_t.

2007-01-24  Andreas Krebbel  <krebbel1@de.ibm.com>

	* exception.cc (parse_lsda_header, PERSONALITY_FUNCTION): Replaced
	_Unwind_Word with _uleb128_t and _Unwind_SWord with _sleb128_t.

From-SVN: r121116
2007-01-24 14:46:47 +00:00
Richard Guenther 9d972b2dd3 builtins.c (expand_builtin_cexpi): Get the fndecl for cexp in the correct way.
2007-01-24  Richard Guenther  <rguenther@suse.de>

	* builtins.c (expand_builtin_cexpi): Get the fndecl
	for cexp in the correct way.

From-SVN: r121114
2007-01-24 13:49:18 +00:00
Jan Hubicka cf22730346 pr23382.c: Avoid DCE from eliminating dead variable.
* gcc.dg/tree-ssa/pr23382.c: Avoid DCE from eliminating dead variable.
	* tree-ssa-dce.c (eliminate_unnecesary_stmts): Remove dead LHS of calls.

From-SVN: r121108
2007-01-24 12:13:45 +00:00
Andreas Krebbel 024a85aeb6 c-cppbuiltin.c (builtin_define_type_sizeof): New function.
2007-01-24  Andreas Krebbel  <krebbel1@de.ibm.com>

	* c-cppbuiltin.c (builtin_define_type_sizeof): New function.
	(c_cpp_builtins): New builtin macros: __SIZEOF_INT__, __SIZEOF_LONG__,
	__SIZEOF_LONG_LONG__, __SIZEOF_SHORT__, __SIZEOF_POINTER__,
	__SIZEOF_FLOAT__, __SIZEOF_DOUBLE__, __SIZEOF_LONG_DOUBLE__,
	__SIZEOF_SIZE_T__, __SIZEOF_WCHAR_T__, __SIZEOF_WINT_T__ and
	__SIZEOF_PTRDIFF_T__.
	* doc/cpp.texi: Documentation for the new builtin macros added.

2007-01-24  Andreas Krebbel  <krebbel1@de.ibm.com>

	* gcc.c-torture/compile/sizeof-macros-1.c: New testcase.

From-SVN: r121107
2007-01-24 12:03:38 +00:00
Uros Bizjak 9db2744988 i386.md (tanxf2, [...]): Use op2 instead of operands[2] to avoid access past the end of array.
* config/i386/i386.md (tanxf2, tan<mode>2, atan<mode>2, log<mode>2,
	log10<mode>2, log2<mode>2, expxf2, exp10xf2, exp2xf2): Use op2
	instead of operands[2] to avoid access past the end of array.

From-SVN: r121106
2007-01-24 12:17:09 +01:00
Richard Sandiford 92d5459253 reload1.c (emit_reload_insns): Pass the reload register for a non-spill output reload through forget_old_reloads_1.
gcc/
	* reload1.c (emit_reload_insns): Pass the reload register
	for a non-spill output reload through forget_old_reloads_1.

From-SVN: r121105
2007-01-24 08:16:14 +00:00
Joseph Myers 17caeff262 rs6000-c.c (rs6000_cpu_cpp_builtins): Define _SOFT_DOUBLE if doubles use software floating-point.
gcc:
	* config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Define
	_SOFT_DOUBLE if doubles use software floating-point.
	* config/rs6000/libgcc-ppc-glibc.ver: Export additional long
	double functions if _SOFT_DOUBLE, not _SOFT_FLOAT.
	* config/rs6000/darwin-ldouble.c: Also compile functions for
	hard-float without FPRs.  Use fmsub function for all __NO_FPRS__
	cases.  Compile extra functions if _SOFT_DOUBLE, not _SOFT_FLOAT.
	* config/rs6000/linuxspe.h (SUBSUBTARGET_OVERRIDE_OPTIONS): Remove
	commented-out long double override.
	(CPP_LONGDOUBLE_DEFAULT_SPEC): Likewise.
	* config/rs6000/eabispe.h: Likewise.
	* config/rs6000/rs6000.c (rs6000_override_options): Don't override
	long double for non-SPE.
	(rs6000_handle_option): Likewise.
	(invalid_e500_subreg): Disallow more subregs involding DImode,
	DFmode, TImode or TFmode.
	(rs6000_legitimate_offset_address_p): Check TFmode offsets for
	E500 double.
	(legitimate_lo_sum_address_p): Also check for TFmode for E500
	double.
	(rs6000_legitimize_address): Also handle TFmode for E500 double.
	(rs6000_legitimize_reload_address): Also handle TFmode for E500
	double.
	(rs6000_legitimate_address): Also check for TFmode for E500
	double.
	(rs6000_emit_move): Use DFmode subregs of TFmode for E500 double.
	(spe_build_register_parallel): Handle TFmode and TCmode.
	(rs6000_spe_function_arg): Handle TFmode and TCmode for E500
	double.
	(function_arg): Handle TFmode and TCmode for E500 double.
	(rs6000_init_libfuncs): Initialize extra libfuncs for soft double
	in general.
	(print_operand): Handle TFmode and TImode for %y.
	(rs6000_generate_compare): Handle TFmode comparisons for E500
	double.
	(spe_func_has_64bit_regs_p): Check for TFmode for E500 double.
	(rs6000_function_value): Handle TFmode and TCmode for E500 double.
	(rs6000_libcall_value): Handle TFmode and TCmode for E500 double.
	* config/rs6000/rs6000.h (CANNOT_CHANGE_MODE_CLASS): Check for
	TFmode for E500 double.
	* config/rs6000/rs6000.md (FP): Allow TF for E500 double.
	(floatsidf2): Enable for E500 double.
	(movtf_softfloat): Use rs6000_nonimmediate_operand.
	(extenddftf2): Change to extenddftf2_fprs.
	(extenddftf2): Call gen_spe_extenddftf2 or gen_extenddftf2_fprs
	depending on TARGET_E500_DOUBLE.
	(extendsftf2): Enable for E500 double.
	(trunctfdf2): Enable for E500 double.
	(trunctfsf2): Change to trunctfsf2_fprs.
	(trunctfsf2): Call gen_spe_trunctfsf2 or gen_trunctfsf2_fprs
	depending on TARGET_E500_DOUBLE.
	(floatsitf2): Enable for E500 double.
	(fix_trunctfsi2): Change to fix_trunctfsi2_fprs.
	(fix_trunctfsi2): Call gen_spe_fix_trunctfsi2 or
	gen_fix_trunctfsi2_fprs depending on TARGET_E500_DOUBLE.
	(negtf2): Change to negtf2_internal.
	(negtf2): New expander.
	(abstf2): Enable for E500 double.  Call gen_spe_abstf2_tst,
	gen_spe_abstf2_cmp or gen_abstf2_internal depending on
	TARGET_E500_DOUBLE and flag_unsafe_math_optimizations.
	(movdi_internal32): Use rs6000_nonimmediate_operand.
	(unnamed splitter): Likewise.
	* config/rs6000/spe.md (CMPTFEQ_GPR, TSTTFEQ_GPR, CMPTFGT_GPR,
	TSTTFGT_GPR, CMPTFLT_GPR, TSTTFLT_GPR): New unspecs.
	(SPE64TF, DITI): New mode macros.
	(frob_df_di): Change to frob_<SPE64:mode>_<DITI:mode>; allow more
	modes.
	(frob_tf_ti): New.
	(frob_<mode>_di_2): New.
	(frob_tf_di_8_2): New.
	(frob_di_df): Change to frob_di_<mode>; allow more modes.
	(frob_ti_tf): New.
	(frob_di_df_2): Change to frob_<DITI:mode>_<SPE64:mode>_2; allow
	more modes.
	(frob_ti_<mode>_8_2): New.
	(frob_ti_tf_2): New.
	(mov_si<mode>_e500_subreg0, mov_si<mode>_e500_subreg0_2,
	mov_si<mode>_e500_subreg4, mov_si<mode>_e500_subreg4_2): Allow
	TFmode.
	(mov_sitf_e500_subreg8, mov_sitf_e500_subreg8_2,
	mov_sitf_e500_subreg12, mov_sitf_e500_subreg12_2): New.
	(spe_trunctfdf2_internal1, spe_trunctfsf2, spe_extenddftf2,
	spe_fix_trunctfsi2, spe_fix_trunctfsi2_internal,
	spe_negtf2_internal, spe_abstf2_cmp, spe_abstf2_tst): New.
	(cmptfeq_gpr, tsttfeq_gpr, cmptfgt_gpr, tsttfgt_gpr, cmptflt_gpr,
	tsttflt_gp): New.

libgcc:
	* config/rs6000/t-ldbl128: Always use -mlong-double-128.

From-SVN: r121085
2007-01-23 19:38:33 +00:00
Ian Lance Taylor d5dc6badbf Makefile.in (OBJS-common): Reformat, alphabetize, but put insn-*.o first.
* Makefile.in (OBJS-common): Reformat, alphabetize, but put
	insn-*.o first.
	(OBJS-archive): Reformat, alphabetize.
	(OBJS): Change out_object_file to OBJS-md.

From-SVN: r121081
2007-01-23 15:12:44 +00:00
Uros Bizjak 7656aee4d0 i386.md: Use REG_P...
* config/i386/i386.md: Use REG_P, MEM_P, CONST_INT_P, LABEL_P,
	JUMP_P and CALL_P predicates where applicable.
	* config/i386/i386.c: Ditto.
	* config/i386/i386.md: Ditto.
	* config/i386/mmx.md: Ditto.
	* config/i386/predicates.md: Ditto.

From-SVN: r121079
2007-01-23 08:14:26 +01:00
Andreas Schwab c8832aae41 * config/m68k/m68k.h: Fix comment.
From-SVN: r121063
2007-01-22 21:16:24 +00:00
Jan Hubicka 6ffa0491ad passes.c (init_optimization_passes): Do not rerun pass_early_warn_uninitialized.
* passes.c (init_optimization_passes): Do not rerun
	pass_early_warn_uninitialized.

From-SVN: r121060
2007-01-22 18:51:56 +00:00
Richard Guenther 2f397a93c0 re PR tree-optimization/30038 (Call to sin(x), cos(x) should be transformed to sincos(x))
2007-01-22  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/30038
	* tree-ssa-math-opts.c (maybe_record_sincos): New static helper
	function.
	(execute_cse_sincos_1): Likewise.
	(execute_cse_sincos): Likewise.
	(gate_cse_sincos): Likewise.
	(pass_cse_sincos): New pass CSEing sin() and cos() calls using
	the cexpi() canonicalization of sincos().
	* tree-pass.h (pass_cse_sincos): Declare.
	* passes.c (init_optimization_passes): New pass pas_cse_sincos.

	* gcc.dg/builtins-62.c: New testcase.

From-SVN: r121052
2007-01-22 11:11:00 +00:00
Eric Botcazou 64c9193063 re PR rtl-optimization/29329 (internal consistency failure)
PR rtl-optimization/29329
	* combine.c (replaced_rhs_insn): Rename to i2mod.
	(replaced_rhs_value): Rename to i2mod_new_rhs.
	(i2mod_old_rhs): New global variable.
	(combine_instructions): Adjust for above change.  Save a copy of
	the old RHS into i2mod_old_rhs when the contents of a REG_EQUAL
	note are substituted in the second instruction.
	(distribute_notes) <REG_DEAD>: Adjust for above change.  Do not
	ditch the note if it pertains to the second eliminated register
	and this register is mentioned in i2mod_old_rhs.

	Revert:
	2006-09-12  Eric Botcazou  <ebotcazou@libertysurf.fr>

	* combine.c (distribute_notes) <REG_DEAD>: Do not consider SETs past
	the insn to which the note was originally attached.

From-SVN: r121037
2007-01-21 22:32:39 +00:00
Jan Hubicka 7fa49e7be7 ipa-inline.c (inlining_mode): Comment, move up.
* ipa-inline.c (inlining_mode): Comment, move up.
	(cgraph_decide_inlining_incrementally): Do not perform inlining itself; fix
	handling of flattening of self recursive functions.
	(cgraph_find_cycles): Remove.
	(cgraph_flatten_node): Remove.
	(cgraph_decide_inlining): Use incremental inliner to handle flattening.
	(try_inline): New function.
	(cgraph_early_inlining): Update call of cgraph_decide_inlining_incrementally.
	Apply inlining here.
	(apply_inline): Update call of cgraph_decide_inlining_incrementally.

From-SVN: r121034
2007-01-21 18:35:27 +00:00
Dirk Mueller 1eb7b04904 re PR bootstrap/30511 (False array bound check causes gcc failed to boostrap)
2007-01-21  Dirk Mueller  <dmueller@suse.de>

        PR bootstrap/30511
        * tree-vrp.c (check_array_bounds): do not warn
        about ADDR_EXPR's of ARRAY_REF's which are immediately
        used in binary expressions.

From-SVN: r121032
2007-01-21 16:12:10 +00:00
Ira Rosen 6004caaf4d tree-vectorizer.h (struct _stmt_vec_info): Add new field read_write_dep and macros for its access.
* tree-vectorizer.h (struct _stmt_vec_info): Add new field
	read_write_dep and macros for its access.
	* tree-vectorizer.c (new_stmt_vec_info): Initialize the new field.
	* tree-vect-analyze.c (vect_analyze_data_ref_dependence): Remove
	argument, call vect_check_interleaving for every independent pair of
	data-refs. Mark loads that access the same memory location as a store
	in the loop.
	(vect_check_dependences): Remove.
	(vect_analyze_data_ref_dependences): Remove  vect_check_dependences
	call, fix the call to vect_analyze_data_ref_dependence.
	(vect_analyze_data_ref_access): For statements that access the same
	data-ref, check that they are not stores; for loads, check that there
	is no store that access the same location.

From-SVN: r121026
2007-01-21 09:22:56 +00:00
Roger Sayle 78681dbdee invoke.texi (-fdump-rtl-combine): Fix under/overfull hbox.
* doc/invoke.texi (-fdump-rtl-combine): Fix under/overfull hbox.
	(-fdump-rtl-stack): Likewise.
	(-fno-signed-zeros): Use @minus{} for a minus sign.  Correct typo.
	(-mcheck-zero-division, -mcpu): Fix under/overfull hbox.
	(-mpt-fixed): Use @minus{} for minus sign.
	(Using Precompiled Headers): Fix under/overfull hbox.


Co-Authored-By: Joseph Myers <joseph@codesourcery.com>

From-SVN: r121023
2007-01-21 03:54:41 +00:00
Jan Hubicka d48a05c3c4 tree-flow.h (struct stmt_ann_d): Move references_memory to proper place within annotation.
* tree-flow.h (struct stmt_ann_d): Move references_memory to proper
	place within annotation.

From-SVN: r121022
2007-01-21 02:54:43 +00:00
Basile Starynkevitch b153d3e1ca gcc/Changelog typos
From-SVN: r121006
2007-01-20 17:59:46 +00:00
John David Anglin 4c6d872614 pa.c (output_move_double): Change array size of xoperands to 4.
* pa.c (output_move_double): Change array size of xoperands to 4.

From-SVN: r121002
2007-01-20 16:27:06 +00:00
Jan Hubicka bbba68dd6b tree-tailcall.c (adjust_return_value): Do not use RESULT_DECL as temporary.
* tree-tailcall.c (adjust_return_value): Do not use RESULT_DECL
	as temporary.

From-SVN: r120999
2007-01-20 11:24:06 +00:00
Ian Lance Taylor e4c9f3c21d expmed.c (expand_divmod): Cast constant to unsigned HOST_WIDE_INT before negating.
* expmed.c (expand_divmod) [TRUNC_MOD_EXPR, TRUNC_DIV_EXPR]: Cast
	constant to unsigned HOST_WIDE_INT before negating.

From-SVN: r120995
2007-01-20 02:04:31 +00:00
Ian Lance Taylor b2bcf5577a tree-ssa-operands.h (struct vuse_vec_d): Change num_vuse field to unsigned.
* tree-ssa-operands.h (struct vuse_vec_d): Change num_vuse field
	to unsigned.
	(VUSE_VECT_ELEMENT) [ENABLE_CHECKING]: Use unsigned comparison.
	(VUSE_ELEMENT_PTR) [ENABLE_CHECKING]: Likewise.
	(SET_VUSE_VECT_ELEMENT) [ENABLE_CHECKING]: Likewise.
	(SET_VUSE_ELEMENT_VAR) [ENABLE_CHECKING]: Likewise.
	(SET_VUSE_ELEMENT_PTR) [ENABLE_CHECKING]: Likewise.
	(realloc_vdef, realloc_vuse): Change second parameter to
	unsigned.
	(ssa_operand_iterator_d): Change vuse_index and mayuse_index
	fields to unsigned.
	* tree-ssa-operands.c (realloc_vop): Change num_elem parameter to
	unsigned. Change x and lim locals to unsigned.
	(realloc_vdef, realloc_vuse): Change num_elem parameter to
	unsigned.
	(finalize_ssa_vuse_ops): Change old_i local to unsigned.
	(copy_virtual_operands): Change i and n locals to unsigned.

From-SVN: r120994
2007-01-20 01:31:06 +00:00
Kaveh R. Ghazi 92d966284c re PR middle-end/29335 (transcendental functions with constant arguments should be resolved at compile-time)
PR middle-end/29335
	* builtins.c (fold_builtin_1): Handle builtin fdim.

testsuite:
	* gcc.dg/torture/builtin-math-3.c: Test fdim.

From-SVN: r120993
2007-01-20 00:33:00 +00:00
Jan Hubicka c9fa8bd45b tree-ssa.c (init_tree_ssa): Do not call init_alias_heapvars.
* tree-ssa.c (init_tree_ssa): Do not call init_alias_heapvars.
        * tree-ssa-structalias.c (compute_points_to_sets): Do call
        init_alias_heapvars.
        (init_alias_heapvars): Initialize only when not already initialized.
        (delete_alias_heapvars): Set heapvar_for_stmt to NULL.

From-SVN: r120983
2007-01-20 00:13:38 +00:00
Roger Sayle db02da7917 common.opt (fsigned-zeros): New command line option.
* common.opt (fsigned-zeros): New command line option.
	* flags.h (HONOR_SIGNED_ZEROS): Control via flag_signed_zeros instead
	of flag_unsafe_math_optimizations.
	* opts.c (set_fast_math_flags): The -ffast-math command line option
	implies -fno-signed-zeros.
	(fast_math_flags_set_p): Likewise.

	* doc/invoke.texi: Document new -fno-signed-zeros option, and update
	the documentation of -ffast-math appropriately.  Wrap long lines.

	* gcc.dg/pr30172-1.c: Specify the -fno-signed-zeros command line
	option instead of -funsafe-math-optimizations.

From-SVN: r120978
2007-01-19 19:35:22 +00:00
Steve Ellcey 67e47f30d0 system.h (ASM_MAKE_LABEL_LINKONCE): Poison.
* system.h (ASM_MAKE_LABEL_LINKONCE): Poison.
	* varasm.c (globalize_decl): Remove ASM_MAKE_LABEL_LINKONCE ifdef.

From-SVN: r120976
2007-01-19 18:38:30 +00:00
Tomas Bily 6bad26173d Patch by Tomas Bily <tbily@suse.cz>
Patch by Tomas Bily  <tbily@suse.cz>
        * cgraphunit.c (cgraph_finalize_function): Updating of pid
        * tree-profile.c:
        (tree_init_ic_make_global_vars): New function
        (tree_init_edge_profiler): call of tree_init_ic_make_global_vars
        (tree_gen_ic_profiler): New function
        (tree_gen_ic_func_profiler): New function
        (tree_profiling): Added calling of tree_gen_ic_func_profiler
        (tree_profile_hooks): Added hook for indirec/virtual calls
        * value-prof.c (tree_find_values_to_profile): New case for
        indirect calls
        (tree_values_to_profile): Call for determining indirect/virtual
        counters
        (tree_indirect_call_to_profile): New function
        (tree_ic_transform): New function
        (tree_ic): New function
        (find_func_by_pid): New function
        (init_pid_map): New function
        (tree_value_profile_transformations): Added check for
        indirect/virtual call transformation
        * value-prof.h (enum hist_type): New counter type for
        indirect/virtual calls
        (profile_hooks): Added new hook for profiling indirect/virtual
        calls
        * profile.c (instrument_values): New case for indirect/virtual
        call added
        * gcov-io.h (GCOV_LAST_VALUE_COUNTER): Changed to 6
        (GCOV_COUNTER_V_INDIR): New counter type
        (GCOV_COUNTER_NAMES): New name of counter "indirect" added
        (GCOV_MERGE_FUNCTIONS): New merge function for indirect/virtual
        call added
        * cgraph.c: Definition of cgraph_max_pid
        (cgraph_create_node): Default init of pid attribute
        * cgraph.h: Declaration of cgraph_max_pid
        (struct cgraph_node): Added pid attribute
        * libgcov.c (__gcov_indirect_call_profiler): New function
	(__gcov_one_value_profiler_body): New function
	(__gcov_one_value_profiler): Body was moved to
	__gcov_one_value_profiler_body and calls it

	gcc.dg/tree-prof/indir-call-prof.c: New.
	g++.dg/dg.exp: Add tree-prof subdirectory.
	g++.dg/tree-prof/indir-call-prof.C: New.
	g++.dg/tree-prof/tree-prof.exp: New.

From-SVN: r120975
2007-01-19 18:34:02 +00:00
Basile Starynkevitch b7c75af4b5 gty.texi (Options): Document the mark_hook option to GTY.
2007-01-19  Basile Starynkevitch  <basile@starynkevitch.net>

	* doc/gty.texi (Options): Document the mark_hook option to
	GTY.
	* gcc/gengtype.c (write_types_data, write_func_for_structure,
	write_types, ggc_wtd, pch_wtd): Added skip_hooks to
	write_types_data, ggc_wtd, pch_wtd for mark_hook.
	(walk_type, write_func_for_structure): Generate the mark_hook if
	needed.

From-SVN: r120974
2007-01-19 18:05:08 +00:00
Jan Hubicka c3056c2d23 ipa-inline.c (cgraph_decide_inlining_incrementally): Instead of 'early' argument take inlining mode argument specifying whether to...
* ipa-inline.c (cgraph_decide_inlining_incrementally): Instead of 'early' argument
	take inlining mode argument specifying whether to inline for size/speeed or all
	functions; add support for flattening; improve dumpting.
	(cgraph_early_inlining): Update call of decide_inlining_incrementally.

From-SVN: r120970
2007-01-19 17:20:20 +00:00
Manuel López-Ibáñez e65fff3cde re PR c++/17947 (bad warning with implicit conversion and __attribute__((deprecated)))
2007-01-19  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>

	PR c++/17947
	* toplev.c (warn_deprecated_use): Use %qD instead of %qs to
	print the name of the declared identifier.
		
testsuite/
	* g++.dg/warn/deprecated.C: Update warning output.
	* g++.dg/warn/deprecated-2.C: Likewise.
	* g++.dg/warn/deprecated-3.C: New.

From-SVN: r120969
2007-01-19 16:04:57 +00:00
Dirk Mueller b0fede98c0 i386.h (CONDITIONAL_REGISTER_USAGE): Store result of PIC_OFFSET_TABLE_REGNUM in temporary variable to avoid...
2007-01-19  Dirk Mueller  <dmueller@suse.de>

       * config/i386.h (CONDITIONAL_REGISTER_USAGE): Store
       result of PIC_OFFSET_TABLE_REGNUM in temporary variable to avoid
       duplicate evaluation.

From-SVN: r120967
2007-01-19 14:11:05 +00:00
Uros Bizjak e2fc57a3e1 i386.md (acos<mode>2): Rename from acossf2 and acosdf2.
* config/i386/i386.md (acos<mode>2): Rename from acossf2 and acosdf2.
	Macroize expander using X87MODEF12 mode macro.  Extend operand 1
	to XFMode, use acosxf2 and truncate result to requested mode.
	Use SSE_FLOAT_MODE_P to disable patterns for SSE math.
	(asin<mode>2): Similarly, with asin expanders.
	(*fscalexf4_i387): Rename from *fscalexf4.
	(expNcorexf3): New expander.
	(expxf2, exp10xf2, exp2xf2): Use expNcorexf3 expander.
	(exp<mode>2): Rename from expsf2 and expdf2. Macroize expander using
	X87MODEF12 mode macro.  Extend operand 1 to XFMode, use expxf2 and
	truncate result to requested mode. Use SSE_FLOAT_MODE_P to disable
	patterns for SSE math.
	(exp10<mode>2): Similarly, with exp10 expanders.
	(exp2<mode>2): Similarly, with exp2 expanders.
	(expm1<mode>2): Similarly, with expm1 expanders.
	(ldexp<mode>3): Similarly, with ldexp expanders.
	(log<mode>2, log10<mode>2, log2<mode>2, log1p<mode>2, logb<mode>2):
	Use gen_truncxf<mode>2_i387_noop to truncate result.

From-SVN: r120966
2007-01-19 15:03:17 +01:00