Commit Graph

32173 Commits

Author SHA1 Message Date
Dorit Nuzman 5773afc5b5 re PR middle-end/30784 (ICE on loop vectorization (-O1 -march=athlon-xp -ftree-vectorize))
PR tree-optimization/30784
        * fold-const.c (fold_ternary): Handle CONSTRUCTOR in case
        BIT_FIELD_REF.

From-SVN: r123197
2007-03-25 11:08:29 +00:00
Revital Eres 3ece6cc239 fix in tree-if-conv.c
From-SVN: r123194
2007-03-25 06:53:02 +00:00
David Edelsohn e65a3857a5 darwin.md (load_macho_picbase): Ignore operand 0.
* config/rs6000/darwin.md (load_macho_picbase): Ignore operand 0.
        (load_macho_picbase_{si,di}): Convert to LR hard reg.
        (call_indirect_nonlocal_darwin64): Same.
        (call_nonlocal_darwin64): Same.
        (call_value_indirect_nonlocal_darwin64): Same.
        (call_value_nonlocal_darwin64): Same.
        (sibcall_nonlocal_darwin64): Same.
        (sibcall_value_nonlocal_darwin64): Same.
        (sibcall_symbolic_64): Same.
        (sibcall_value_symbolic_64): Same.
        * config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Remove
        LR pseudo.
        (rs6000_emit_load_toc_table): Same.
        * config/rs6000/altivec.md (restore_world): Convert to LR hard reg.
        * config/rs6000/rs6000.md (mulh_call): Convert to LR hard reg.
        (mull_call): Same.
        (divss_call): Same.
        (divus_call): Same.
        (quoss_call): Same.
        (quous_call): Same.
        (load_toc_v4_pic_si): Same
        (load_toc_v4_PIC_1): Same.
        (load_toc_v4_PIC_1b): Same.
        (call_indirect_aix{32,64}): Same.
        (call_value_indirect_aix{32,64}): Same.
        (call): Same.
        (call_value): Same.
        (call_local{32,64}): Same.
        (call_value_local{32,64}): Same.
        (call_indirect_nonlocal_aix{32,64}): Same.
        (call_nonlocal_aix{32,64}): Same.
        (call_value_indirect_nonlocal_aix{32,64}): Same.
        (call_value_nonlocal_aix{32,64}): Same.
        (call_indirect_nonlocal_sysv<mode>): Same.
        (call_nonlocal_sysv<mode>): Same.
        (call_value_indirect_nonlocal_sysv<mode>): Same.
        (call_value_nonlocal_sysv<mode>): Same.
        (sibcall): Same.
        (sibcall_local{32,64}): Same.
        (sibcall_value_local{32,64}): Same.
        (sibcall_nonlocal_aix{32,64}): Same.
        (sibcall_value_nonlocal_aix{32,64}): Same.
        (sibcall_value_nonlocal_aix{32,64}): Same.
        (sibcall_nonlocal_sysv<mode>): Same.
        (sibcall_value): Same.
        (sibcall_value_nonlocal_sysv<mode>): Same.

From-SVN: r123193
2007-03-24 22:41:54 -04:00
Paul Brook 3303be154c lib1funcs.asm (div0): Use ARM_FUNC_START and do_push.
2007-03-24  Paul Brook  <paul@codesourcery.com>

	* config/arm/lib1funcs.asm (div0): Use ARM_FUNC_START and do_push.
	* config/arm/linux-eabi.h: Remove legacy syscall hack.

From-SVN: r123192
2007-03-25 01:07:45 +00:00
Richard Henderson 13f703423a constraints.md: New file.
* config/ia64/constraints.md: New file.
        * config/ia64/predicates.md: Replace CONST_OK_FOR_? with
        satisfies_constraint_?.
        * config/ia64/ia64.c (ia64_move_ok, ia64_legitimate_constant_p,
        ia64_reload_gp, spill_restore_mem, ia64_expand_prologue,
        ia64_expand_epilogue, ia64_split_return_addr_rtx, ia64_rtx_costs,
        ia64_output_mi_thunk): Likewise.
        (ia64_const_ok_for_letter_p): Remove.
        (ia64_const_double_ok_for_letter_p): Remove. 
        (ia64_extra_constraint): Remove.
        * config/ia64/ia64.h (REG_CLASS_FROM_LETTER): Remove.
        (CONST_OK_FOR_I, CONST_OK_FOR_J, CONST_OK_FOR_K, CONST_OK_FOR_L,
        CONST_OK_FOR_M, CONST_OK_FOR_N, CONST_OK_FOR_O, CONST_OK_FOR_P,
        CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_G,
        CONST_DOUBLE_OK_FOR_LETTER_P, EXTRA_CONSTRAINT,
        EXTRA_MEMORY_CONSTRAINT): Remove.
        * config/ia64/ia64.md: Include constriants.md.  Replace
        CONST_OK_FOR_? with satisfies_constraint_?.

From-SVN: r123186
2007-03-24 12:28:37 -07:00
Michael Meissner 79b87c74d7 Add BID decimal support
Co-Authored-By: H.J. Lu <hongjiu.lu@intel.com>
Co-Authored-By: Marius Cornea <marius.cornea@intel.com>

From-SVN: r123185
2007-03-24 17:04:47 +00:00
Ian Lance Taylor f870ab63f9 * fold-const.c (fold_binary): Correct warning for X - c >= X.
From-SVN: r123172
2007-03-23 23:21:46 +00:00
Ian Lance Taylor ed3d212ba2 * tree-dump.c (dump_files): Correct comment.
From-SVN: r123171
2007-03-23 23:19:25 +00:00
Ian Lance Taylor c8539275c3 * tree-vrp.c (operand_less_p): Ignore fold overflow warnings.
From-SVN: r123170
2007-03-23 23:17:02 +00:00
Steven Bosscher c0a78a1786 Remove the patch from ChangeLog
From-SVN: r123168
2007-03-23 23:06:52 +00:00
Steven Bosscher ad21dab7f7 tracer.c (tracer): Don't take FLAGS argument.
* tracer.c (tracer): Don't take FLAGS argument.  Assert we are
	in cfglayout mode.  Don't go into and out of cfglayout mode.
	Link the blocks in the order of the constructed traces.
	(rest_of_handle_tracer): Adjust call to tracer.
	* loop-init.c (rtl_loop_init): Assert we are in cfglayout mode.
	Don't go into cfglayout mode.
	(rtl_loop_done): Don't go out of cfglayout mode.
	* cfglayout.c (relink_block_chain): New function, split out from...
	(fixup_reorder_chain): ...here.  Remove redundant checking.
	(cfg_layout_finalize): Don't clear the header, footer, and aux
	fields here, move the code to do so to relink_block_chain.  Likewise
	for free_original_copy_tables.
	* rtl.h (tracer): Update prototype.
	* bb-reorder.c (reorder_basic_blocks): Don't take FLAGS argument.
	Assert we are in cfglayout mode.  Don't go into and out of cfglayout
	mode.  Use relink_block_chain to serialize the CFG according to the
	new basic block order.  Move targetm.cannot_modify_jumps_p check from
	here...
	(gate_handle_reorder_blocks): ...to here.
	(duplicate_computed_gotos): Move targetm.cannot_modify_jumps_p check
	from here...
	(gate_duplicate_computed_gotos): ...to here.
	(rest_of_handle_reorder_blocks): Don't see if anything has changed,
	something always changes when going into and out of cfglayout mode.
	Perform an expensive cfg cleanup while going into cfglayout mode.
	Always update liveness information on HAVE_conditional_execution
	targets.  Reserialize the basic blocks and go out of cfglayout mode.
	* reg-stack.c: Include cfglayout.h.
	(rest_of_handle_stack_regs): Go into and out of cfglayout mode around
	the call to reorder_basic_blocks.
	* basic-block.h (reorder_basic_blocks): Update prototype.
	(relink_block_chain): New prototype.
	* passes.c (pass_outof_cfg_layout_mode): Move after cse2.

From-SVN: r123167
2007-03-23 23:05:28 +00:00
Joseph Myers 00f9e1ca8e mips.md (type, [...]): Change xfer instruction type to mfc and mtc, as applicable.
* config/mips/mips.md (type, hazard, *movdi_32bit,
	*movdi_gp32_fp64, *movdi_64bit, *movsi_internal, movcc,
	*movhi_internal, *movqi_internal, *movsf_hardfloat,
	*movdf_hardfloat_64bit, *movdf_hardfloat_32bit, *movdf_softfloat,
	movv2sf_hardfloat_64bit, load_df_low, load_df_high, store_df_high,
	mthc1, mfhc1): Change xfer instruction type to mfc and mtc, as
	applicable.
	(movcc): Change first xfer to multi.
	* config/mips/24k.md, config/mips/4100.md, config/mips/4300.md,
	config/mips/5000.md, config/mips/5400.md, config/mips/5500.md,
	config/mips/5k.md, config/mips/7000.md, config/mips/9000.md,
	config/mips/generic.md: Change reservations using "xfer" to use
	"mfc,mtc".
	* config/mips/sb1.md (ir_sb1_mtxfer): Use "mtc" instead of
	using match_operand.
	(ir_sb1_mfxfer): Use "mfc" instead of using match_operand.
	* config/mips/sr71k.md (ir_sr70_xfer_from): Use "mfc" instead of
	examining mode.
	(ir_sr70_xfer_to): Use "mtc" instead of examining mode.

From-SVN: r123164
2007-03-23 19:44:46 +00:00
Richard Henderson 2ed941ecd0 i386.c: Remove unnecessary function declarations.
* config/i386/i386.c: Remove unnecessary function declarations.
        Move targetm definition, and all related macros, to the end of
        the file.  Resort some functions to put definitions before uses.
        (ix86_attribute_table): Make static.  Move to end of file.
        (ix86_gimplify_va_arg): Make static.

From-SVN: r123159
2007-03-23 09:34:51 -07:00
Richard Henderson ee2f65b4bf i386.c (ix86_function_regparm): Early exit for 64-bit...
* config/i386/i386.c (ix86_function_regparm): Early exit for 64-bit;
        don't increase local_regparm with force_align_arg_pointer check.
        (ix86_function_sseregparm): Assert 32-bit.
        (type_has_variadic_args_p): New.
        (ix86_return_pops_args): Early exit for 64-bit.  Reindent; use
        type_has_variadic_args_p.
        (ix86_function_arg_regno_p): Use == 0 instead of ! test for eax.
        (init_cumulative_args): Remove TARGET_DEBUG_ARG.  Remove zero_cum;
        use memset instead.  Do maybe_vaarg check first; skip attribute
        tests if true; skip attribute tests for 64-bit.
        (construct_container): Remove TARGET_DEBUG_ARG.
        (function_arg_advance_32, function_arg_advance_64): Split out ...
        (function_arg_advance): ... from here.
        (function_arg_32, function_arg_64): Split out ...
        (function_arg): ... from here.
        (ix86_pass_by_reference): Tidy.
        (ix86_function_value_regno_p): Rearrange w/ switch on regno.
        (function_value_32): New, from parts of ix86_function_value
        and ix86_value_regno.
        (function_value_64): New, from parts of ix86_function_value
        and ix86_libcall_value.
        (ix86_function_value_1): New.
        (ix86_function_value, ix86_libcall_value): Use it.
        (return_in_memory_32, return_in_memory_64): Split out ...
        (ix86_return_in_memory): ... from here. 
        (ix86_struct_value_rtx): Skip for 64-bit.
        (ix86_libcall_value, ix86_value_regno): Remove.
        (setup_incoming_varargs_64): Split out ...
        (ix86_setup_incoming_varargs): ... from here. 
        (ix86_va_start): Remove TARGET_DEBUG_ARG.
        (legitimate_address_p, legitimize_address): Remove TARGET_DEBUG_ADDR.
        * config/i386/i386-protos.h (ix86_function_value): Remove.
        * config/i386/i386.opt (TARGET_DEBUG_ADDR, TARGET_DEBUG_ARG): Remove.

From-SVN: r123146
2007-03-22 19:02:38 -07:00
Manuel López-Ibáñez 92ef5cf999 re PR other/23572 (No warning for assigning a value to a 'float' variable that overflows with option -Wextra)
2007-03-22  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>

	PR other/23572
	* c-lex.c (interpret_float): On overflow, emit pedantic warning if
	infinities not supported, otherwise emit warning if -Woverflow. On
	underflow, emit warning if -Woverflow.
	* real.c (real_from_string): Return -1 if underflow, +1 if overflow
	and 0 otherwise.
	* real.h (real_from_string): Update declaration
testsuite/
	* gcc.dg/float-range-4.c: New.
	* gcc.dg/float-range-1.c: Update. Test for a warning.
	* gcc.dg/float-range-3.c: New.
	* gcc.dg/float-range-5.c: New.

From-SVN: r123137
2007-03-22 23:04:24 +00:00
Kai Tietz ac294f0bbc defaults.h (OUTGOING_REG_PARM_STACK_SPACE): Provide default.
* defaults.h (OUTGOING_REG_PARM_STACK_SPACE): Provide default.
        * calls.c (compute_argument_block_size, expand_call,
        emit_library_call_value_1): Don't ifdef OUTGOING_REG_PARM_STACK_SPACE.
        * expr.c (block_move_libcall_safe_for_call_parm): Likewise.
        * function.c (STACK_DYNAMIC_OFFSET): Likewise.
        * doc/tm.texi (OUTGOING_REG_PARM_STACK_SPACE): Update.
        * config/alpha/unicosmk.h, config/bfin/bfin.h, config/iq2000/iq2000.h,
        config/mips/mips.h, config/mn10300/mn10300.h, config/mt/mt.h,
        config/pa/pa.h, config/rs6000/rs6000.h, config/score/score.h,
        config/spu/spu.h, config/v850/v850.h (OUTGOING_REG_PARM_STACK_SPACE):
        Set to 1.

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

From-SVN: r123135
2007-03-22 14:33:45 -07:00
Joseph Myers 9a20062365 c-incpath.c (add_sysroot_to_chain): New.
* c-incpath.c (add_sysroot_to_chain): New.
	(merge_include_chains): Add sysroot argument.  Call
	add_sysroot_to_chain if sysrooted.
	(register_include_chains): Update call to merge_include_chains.
	* doc/cppopts.texi: Document use of '=' in include directory
	arguments.

From-SVN: r123134
2007-03-22 20:38:27 +00:00
Uros Bizjak 8766652c6e i386.md (cmp<mode>): Rename from cmpsf and cmpdf.
* config/i386/i386.md (cmp<mode>): Rename from cmpsf and cmpdf.
	Macroize expander using SSEMODEF mode macro.  Use SSE_FLOAT_MODE_P.
	(*cmpfp_<mode>): Rename from *cmpfp_sf and *cmpfp_df. Macroize
	insn pattern using X87MODEF12 mode macro.

From-SVN: r123128
2007-03-22 15:59:10 +01:00
Seongbae Park 1e4c6dc5b9 regmove.c (regmove_optimize): Use reg_mentioned_p instead of reg_overlap_mentioned_p for DST.
2007-03-21  Seongbae Park <seongbae.park@gmail.com>

	* regmove.c (regmove_optimize): Use reg_mentioned_p
	instead of reg_overlap_mentioned_p for DST.

From-SVN: r123124
2007-03-22 06:18:33 +00:00
Mike Stump 2cbac420ea * c.opt: Fixup for Objective-C/C++.
From-SVN: r123114
2007-03-21 18:45:40 +00:00
Steve Ellcey 17939c986e explow.c (convert_memory_address): Fold memory reference when POINTERS_EXTEND_UNSIGNED < 0
* explow.c (convert_memory_address): Fold memory reference when
	POINTERS_EXTEND_UNSIGNED < 0

From-SVN: r123113
2007-03-21 16:02:32 +00:00
Richard Henderson b5cf27d7ec re PR target/31245 (SSE2 generation bug with 4.1.2 and -O3)
PR target/31245
        * config/i386/emmintrin.h (__m128i, __m128d): Mark may_alias.
        * config/i386/mmintrin.h (__m64): Likewise.
        * config/i386/xmmintrin.h (__m128): Likewise.

From-SVN: r123112
2007-03-21 08:52:23 -07:00
Richard Sandiford cb717c4098 vxworks.h (VXWORKS_ADDITIONAL_CPP_SPEC): Remove -D options.
gcc/
	* config/vxworks.h (VXWORKS_ADDITIONAL_CPP_SPEC): Remove -D options.
	(VXWORKS_OS_CPP_BUILTINS): Define.
	* config/i386/vxworks.h (VXWORKS_CPU_DEFINE): Fold into...
	(TARGET_OS_CPP_BUILTINS): ...here.  Use VXWORKS_OS_CPP_BUILTINS.

From-SVN: r123108
2007-03-21 12:21:33 +00:00
Richard Sandiford 2a45063980 rtl.h (constant_pool_reference_p): Delete.
gcc/
	* rtl.h (constant_pool_reference_p): Delete.
	(find_constant_src): Declare.
	* rtlanal.c (find_constant_src): New function.
	* simplify-rtx.c (constant_pool_reference_p): Delete.
	* config/i386/i386.md: Use find_constant_src instead of
	constant_pool_reference_p/avoid_constant_pool_reference pairs.

From-SVN: r123106
2007-03-21 09:10:08 +00:00
Richard Sandiford 7c0ffd09f8 invoke.texi (-fpie, -fPIE): Document __pie__ and __PIE__.
gcc/
	* doc/invoke.texi (-fpie, -fPIE): Document __pie__ and __PIE__.
	* c-cppbuiltin.c (c_cpp_builtins): Define them.

From-SVN: r123104
2007-03-21 09:07:19 +00:00
Mark Mitchell 9f2966203f elf.h (TARGET_ASM_DESTRUCTOR): Define.
* config/arm/elf.h (TARGET_ASM_DESTRUCTOR): Define.
	* config/arm/arm.c (arm_elf_asm_cdtor): New function.
	(arm_elf_asm_constructor): Use it.
	(arm_elf_asm_destructor): New function.

From-SVN: r123103
2007-03-21 05:21:31 +00:00
Bernd Schmidt 5dab4eb703 jump.c (mark_jump_label): Treat SEQUENCE specially.
* jump.c (mark_jump_label): Treat SEQUENCE specially.

From-SVN: r123096
2007-03-20 23:43:33 +00:00
Nathan Sidwell caaf5345bb * config/vxlib.c (tls_delete_hook): Use TCB for kernel tasks.
From-SVN: r123086
2007-03-20 14:13:30 +00:00
Andrew Haley 2b31200511 [multiple changes]
2007-03-19  Andrew Haley  <aph@redhat.com>

        PR tree-optimization/31264
        * tree-vrp.c (register_edge_assert_for_1): Don't look though
        VIEW_CONVERT_EXPRs.

2007-03-20  Andrew Haley  <aph@redhat.com>

        * testsuite/libjava.lang/PR31264.java: New test.

From-SVN: r123085
2007-03-20 12:45:19 +00:00
Paolo Bonzini fb4061627b re PR middle-end/30907 (Propagation of addresses within loops pessimizes code)
2007-03-19  Paolo Bonzini  <bonzini@gnu.org>

	PR rtl-optimization/30907
	* fwprop.c (forward_propagate_into): Never propagate inside a loop.
	(fwprop_init): Always call loop_optimizer_initialize.
	(fwprop_done): Always call loop_optimizer_finalize.
	(fwprop): We always have loop info now.
	(gate_fwprop_addr): Remove.
	(pass_fwprop_addr): Use gate_fwprop as gate.

	PR rtl-optimization/30841
	* df-problems.c (df_ru_local_compute, df_rd_local_compute,
	df_chain_alloc): Call df_reorganize_refs unconditionally.
	* df-scan.c (df_rescan_blocks, df_reorganize_refs): Change
	refs_organized to refs_organized_size.
	(df_ref_create_structure): Use refs_organized_size instead of
	bitmap_size if refs had been organized, and keep refs_organized_size
	up-to-date.
	* df.h (struct df_ref_info): Change refs_organized to
	refs_organized_size.
	(DF_DEFS_SIZE, DF_USES_SIZE): Use refs_organized_size instead of
	bitmap_size.

From-SVN: r123084
2007-03-20 08:31:13 +00:00
Mark Mitchell 0a85ec2e8c except.c (output_function_exception_table): Do not reference the EH personality routine for functions that do not require...
* except.c (output_function_exception_table): Do not reference the
	EH personality routine for functions that do not require an
	exception table.

From-SVN: r123082
2007-03-20 03:16:25 +00:00
Jakub Jelinek 79077aea85 re PR c/30762 (IMA messes up with inlining)
PR c/30762
	* c-typeck.c (convert_for_assignment): Call comptypes for
	RECORD_TYPE or UNION_TYPE.

	* gcc.dg/pr30762-1.c: New test.
	* gcc.dg/pr30762-2.c: New test.

From-SVN: r123073
2007-03-20 00:26:14 +01:00
Jakub Jelinek 5d8a54345a re PR inline-asm/30505 (asm operand has impossible constraints.)
PR inline-asm/30505
	* reload1.c (reload): Do invalid ASM checking after
	cleanup_subreg_operands.

	* gcc.target/i386/pr30505.c: New test.

From-SVN: r123072
2007-03-20 00:24:43 +01:00
Jeff Law 1799efef2c re PR tree-optimization/30984 (ICE with computed goto and constants)
* tree-cfg.c (find_taken_edge): Tighten conditions for
        optimizing computed gotos.

        * PR tree-optimization/30984
        * gcc.c-torture/pr30984.c: New test.

From-SVN: r123067
2007-03-19 13:52:19 -06:00
Michael Matz 1e395249a9 builtins.c (expand_builtin_sync_operation, [...]): Care for extending CONST_INTs correctly.
* builtins.c (expand_builtin_sync_operation,
        expand_builtin_compare_and_swap,
        expand_builtin_lock_test_and_set): Care for extending CONST_INTs
        correctly.

        * config/i386/sync.md (sync_double_compare_and_swapdi_pic,
        sync_double_compare_and_swap_ccdi_pic): Use "SD" as constraint
        for operand 3.

From-SVN: r123064
2007-03-19 17:07:29 +00:00
Andreas Krebbel 17f6dbbf4e tm.texi: Add brackets around the return type of TARGET_SECONDARY_RELOAD.
2007-03-19  Andreas Krebbel  <krebbel1@de.ibm.com>

	* doc/tm.texi: Add brackets around the return type of
	TARGET_SECONDARY_RELOAD.

From-SVN: r123062
2007-03-19 15:17:55 +00:00
Andrew Pinski 60e0af9418 re PR tree-optimization/31254 (verify_ssa failed: type mismatch between an SSA_NAME and its symbol)
2007-03-19  Andrew Pinski  <andrew_pinski@playstation.sony.com>
	Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/31254
	* tree-ssa-forwprop.c (forward_propagate_addr_expr_1):
	Use handled_component_p () where appropriate.  Continue
	propagating into the rhs if we propagated into an INDIRECT_REF
	on the lhs.

	* gcc.dg/torture/pr31254.c: New testcase.

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

From-SVN: r123060
2007-03-19 13:36:29 +00:00
Andreas Krebbel 609e7e8092 s390.md (op_type attribute): RRR instruction type added.
2007-03-19  Andreas Krebbel  <krebbel1@de.ibm.com>

	* config/s390/s390.md (op_type attribute): RRR instruction type added.
	(FP, DFP, SD_SF, DD_DF, TD_TF): New mode macros.
	(xde, xdee): Mode attributes adjusted to support DFP modes.
	(RRer, f0, op1, Rf, bt, bfp, HALF_TMODE): New mode attributes added.
	("cmp<mode>", "*cmp<mode>_css_0", "*cmp<mode>_ccs", TF move splitters,
	DF move splitters, "floatdi<mode>2", "add<mode>3", "*add<mode>3", 
	"*add<mode>3_cc", "*add<mode>3_cconly", "sub<mode>3", "*sub<mode>3",
	"*sub<mode>3_cc", "*sub<mode>3_cconly", "mul<mode>3", "*mul<mode>3",
	"div<mode>3", "*div<mode>3", "*neg<mode>2_nocc", "*abs<mode>2_nocc",
	"*negabs<mode>2_nocc", "copysign<mode>3"): Adjusted to support DFP 
	numbers.
	("*movtf_64", "*movtf_31", "*movdf_64dfp", "*movdf_64", "*movdf_31",
	"movsf"): Insn definitions removed.
	("*mov<mode>_64", "*mov<mode>_31", "mov<mode>", "*mov<mode>_64dfp",
	"*mov<mode>_64", "*mov<mode>_31", "fix_trunc<DFP:mode>di2",
	"trunctddd2", "truncddsd2", "extendddtd2", "extendsddd2"): Insn
	definitions added.
	("fixuns_truncdddi2", "fixuns_trunctddi2", "mov<mode>",
	"reload_in<mode>", "reload_out<mode>"): Expander added.
	("movtf", "movdf", "reload_outtf", "reload_outdf", "reload_intf"):
	Expander removed.

From-SVN: r123058
2007-03-19 08:51:20 +00:00
Andreas Krebbel 7b6baae190 s390.md: Only non-functional changes.
2007-03-19  Andreas Krebbel  <krebbel1@de.ibm.com>

	* config/s390/s390.md: Only non-functional changes.  Renamed
	FPR mode macro to BFP all over the file.

From-SVN: r123057
2007-03-19 08:49:53 +00:00
Andreas Krebbel 85dae55a9a s390.md (UNSPEC_COPYSIGN): New constant.
2007-03-19  Andreas Krebbel  <krebbel1@de.ibm.com>

	* config/s390/s390.md (UNSPEC_COPYSIGN): New constant.
	(op_type attribute): RRF instruction type added.
	(fT0): New mode attribute.
	("*movdi_64dfp", "*movdf_64dfp", "*neg<mode>2_nocc", "*abs<mode>2_nocc",
	"*negabs<mode>2_nocc", "copysign<mode>3"): Insn definitions added.
	* config/s390/s390.h (SECONDARY_MEMORY_NEEDED): Due to a new instruction
	no secondary memory is needed when moving DFmode values between GPRs
	and FPRs.

From-SVN: r123056
2007-03-19 08:48:36 +00:00
Andreas Krebbel 3443392a8a s390.opt ("mhard-float", [...]): Bit value inverted and documentation adjusted.
2007-03-19  Andreas Krebbel  <krebbel1@de.ibm.com>

	* config/s390/s390.opt ("mhard-float", "msoft-float"): Bit value
	inverted and documentation adjusted.
	("mhard-dfp", "msoft-dfp"): New options.
	* config/s390/s390.c (s390_handle_arch_option): New architecture
	switch: z9-ec.
	(override_options): Sanity checks for the new options added.
	* config.gcc: New architecture switch: z9-ec.
	* config/s390/s390.h (processor_flags): PF_DFP added.
	(TARGET_CPU_DFP, TARGET_DFP): Macro definitions added.
	(TARGET_DEFAULT): Due to the s390.opt changes hard float is enabled
	when the bit is NOT set so remove it from the defaults.

From-SVN: r123055
2007-03-19 08:46:57 +00:00
Andreas Krebbel c413e1b5be genemit.c (main): Print include statement for dfp.h.
2007-03-19  Andreas Krebbel  <krebbel1@de.ibm.com>

	* genemit.c (main): Print include statement for dfp.h.
	* dfp.h (decimal_real_arithmetic): Hide prototype if tree_code enum
	is not available.

From-SVN: r123054
2007-03-19 08:45:29 +00:00
Hans-Peter Nilsson 1375006a87 * config/cris/t-elfmulti (EXTRA_MULTILIB_PARTS): Do not define here.
From-SVN: r123053
2007-03-19 08:29:43 +00:00
Kaz Kojima c6ac6e82ac re PR target/31022 ([SH4] internal compiler error with inline)
PR target/31022
	* config/sh/sh.c (sh_adjust_cost): Use the result of single_set
	instead of PATTERN.

From-SVN: r123049
2007-03-19 04:14:59 +00:00
John David Anglin ecc418c4f9 pa.c (output_deferred_plabels, [...]): Cleanup formatting of targetm calls.
* pa.c (output_deferred_plabels, output_bb, output_millicode_call,
	attr_length_call, output_call, output_indirect_call): Cleanup
	formatting of targetm calls.

From-SVN: r123048
2007-03-19 01:48:34 +00:00
Hans-Peter Nilsson c3271cd263 * config/cris/cris.h (HANDLE_PRAGMA_PACK_PUSH_POP): Define to 1.
From-SVN: r123043
2007-03-18 23:46:02 +00:00
John David Anglin d4f2728ad9 pa.md: Add fpstore_load and store_fpload instruction types.
* pa.md: Add fpstore_load and store_fpload instruction types.  Provide
	reservation, bypass and anti-bypass descriptions for these instructions.
	Update move patterns.
	* pa.c (hppa_fpstore_bypass_p): Check for both TYPE_FPSTORE_LOAD and
	TYPE_FPSTORE.

From-SVN: r123041
2007-03-18 19:47:43 +00:00
Dorit Nuzman f58e97341c tree-vect-transform.c (get_initial_def_for_induction): Replace GET_MODE_NUNITS with TYPE_VECTOR_SUBPARTS.
* tree-vect-transform.c (get_initial_def_for_induction): Replace
        GET_MODE_NUNITS with TYPE_VECTOR_SUBPARTS.
        (get_initial_def_for_reduction): Likewise.

From-SVN: r123034
2007-03-18 04:37:32 +00:00
Daniel Berlin 1e4816bcc9 re PR tree-optimization/29922 ([Linux] ICE in insert_into_preds_of_block)
2007-03-16  Daniel Berlin  <dberlin@dberlin.org>

	Fix PR tree-optimization/29922
	* tree-ssa-pre.c (bb_bitmap_sets): Remove RVUSE_* members.
	(get_representative): Removed.
	(value_dies_in_block_x): Update for rvuse removal.
	(valid_in_sets): Update for renaming of vuses_dies_in_block_x.
	(compute_antic_aux): Handle when PHI nodes appear in
	non-single-successors. 
	(dump_bitmap_of_names): Removed.
	(compute_antic_safe): Renamed and removed rvuse calculation.
	Calculate only antic safe.
	(insert_into_preds_of_block): Remove assert.
	(execute_pre): Update for renamed functions.
	(defer_or_phi_translate_block): New function.

From-SVN: r123029
2007-03-17 23:07:34 +00:00
Kazu Hirata 79b8aae86d * tree-data-ref.h: Remove the prototype for analyze_array.
From-SVN: r123026
2007-03-17 17:51:39 +00:00
Kazu Hirata 44c7bd63b6 arm.c, [...]: Fix comment typos.
* config/arm/arm.c, config/arm/thumb2.md, config/m68k/m68k.c,
	config/spu/spu.c, omega.h, passes.c, predict.c: Fix comment
	typos.
	* doc/cpp.texi, doc/extend.texi, doc/invoke.texi: Fix typos.
	Follow spelling conventions.

From-SVN: r123025
2007-03-17 17:44:02 +00:00
Dorit Nuzman c492dc9a66 re PR tree-optimization/31041 (verify_stmts failed: invalid operand to binary operator with -O2 -ftree-vectorize)
PR tree-optimization/31041
        * tree-vect-transform.c (get_initial_def_for_induction): Call
        force_gimple_operand.

From-SVN: r123023
2007-03-17 14:43:30 +00:00
Olga Golovanevsky 44d974b5d2 ipa-type-escape fix for ada
From-SVN: r123022
2007-03-17 12:47:53 +00:00
Kazu Hirata 604e4ce3fe final.c (final_scan_insn): Alter the condition of a conditional trap if we have nonstandard CC.
* final.c (final_scan_insn): Alter the condition of a
	conditional trap if we have nonstandard CC.

From-SVN: r123021
2007-03-17 11:43:07 +00:00
Alexandre Oliva cf0eb7a12b configure.ac: Remove excess quoting from asm line 0 test.
* configure.ac: Remove excess quoting from asm line 0 test.
* configure: Rebuilt.

From-SVN: r123006
2007-03-16 23:44:42 +00:00
Manuel López-Ibáñez 07231d4f83 invoke.texi (-Wconversion): Document warnings specific to C++.
2007-03-16  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>

	* doc/invoke.texi (-Wconversion): Document warnings specific to C++.
	* c-common.c (convert_and_check): Move warning logic to...
	(warnings_for_convert_and_check): ...here. Define.
	* c-common.h (warnings_for_convert_and_check): Declare.
cp/
	* cvt.c (cp_convert_and_check) : Define.
	* cp-tree.h (cp_convert_and_check): Declare.
	* call.c (convert_conversion_warnings): Rename to
	conversion_null_warnings.  The warning for floating-point to
	integer is handled by convert_and_check in convert_like_real.
	(convert_like_real): convert_conversion_warnings was renamed as
	conversion_null_warnings.
	* typeck.c (build_binary_op): Use cp_convert_and_check to warn for
	overflow and changes of value during conversion.
testsuite/
	* g++.dg/warn/Wconversion-integer.C: New
	* g++.dg/warn/Wconversion-real.C: New.
	* g++.dg/warn/Wconversion-real-integer.C: New.
	* g++.dg/warn/conv2.C: Updated.

From-SVN: r123005
2007-03-16 23:32:12 +00:00
John David Anglin aefd26064c pa.c (attr_length_call): Partially revert change of 2007-03-09.
* pa.c (attr_length_call): Partially revert change of 2007-03-09.
	(output_call): Likewise.

From-SVN: r123002
2007-03-16 23:12:46 +00:00
Richard Sandiford ad8577fdb6 vxworks.h (SUPPORTS_INIT_PRIORITY): Define.
gcc/
	* config/vxworks.h (SUPPORTS_INIT_PRIORITY): Define.

From-SVN: r122992
2007-03-16 14:35:26 +00:00
Richard Sandiford d95d45fd6b vx-common.h (WINT_TYPE, [...]): Define.
gcc/
	* config/vx-common.h (WINT_TYPE, WINT_TYPE_SIZE): Define.

From-SVN: r122991
2007-03-16 14:34:56 +00:00
Uros Bizjak 0935e0910e i386.c (override_options): Add PTA_NO_SAHF to k8...
* config/i386/i386.c (override_options): Add PTA_NO_SAHF to k8,
	opteron, athlon-64 and athlon-fx processor_alias_table entries.

From-SVN: r122989
2007-03-16 13:32:08 +01:00
Sebastian Pop a9549792d3 re PR tree-optimization/31183 (ICE in int_cst_value, at tree.c:7684 with -O3 -ftree-loop-linear)
PR tree-optimization/31183
	* tree-loop-linear.c (gather_interchange_stats, try_interchange_loops): 
	Use double_int instead of unsigned int for representing access_strides.
	* testsuite/gcc.dg/tree-ssa/pr31183.c: New.

From-SVN: r122988
2007-03-16 11:30:48 +00:00
Richard Guenther 7b1737d07a re PR tree-optimization/31146 (forwprop does not look through casts)
2007-03-16  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/31146
	* tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Restructure
	to allow recursion of forward_propagate_addr_expr.
	(forward_propagate_addr_into_variable_array_index): Likewise.
	(forward_propagate_addr_expr): Likewise.
	(tree_ssa_forward_propagate_single_use_vars): Likewise.
	(forward_propagate_addr_expr_1): Recurse on simple copies
	instead of propagating into them.  Do so for useless conversions
	as well.
	(forward_propagate_addr_expr): Clean up unused statements after
	recursion.

	* g++.dg/tree-ssa/pr31146.C: New testcase.

From-SVN: r122985
2007-03-16 10:11:14 +00:00
Richard Guenther 4c8a652e3f builtins.c (expand_builtin_cexpi): Use the right argument for the expansion via cexp.
2007-03-16  Richard Guenther  <rguenther@suse.de>

	* builtins.c (expand_builtin_cexpi): Use the right argument
	for the expansion via cexp.

From-SVN: r122982
2007-03-16 09:54:39 +00:00
Alexandre Oliva 43bc306a76 configure.ac: Don't require ELF binutils to tolerate # 0 "".
* configure.ac: Don't require ELF binutils to tolerate # 0 "".
* configure: Rebuilt.

From-SVN: r122978
2007-03-16 05:50:58 +00:00
Alexandre Oliva 8857ae1c20 re PR debug/29906 (-g option creates internal compiler error)
gcc/ChangeLog:
PR debug/29906
* dwarf2out.c (force_type_die): Adjust comment.
(dwarf2out_imported_module_or_decl): Handle base AT_import types.
gcc/testsuite/ChangeLog:
PR debug/29906
* g++.dg/debug/pr29906.C: New

From-SVN: r122976
2007-03-16 05:08:25 +00:00
DJ Delorie ba502ad6be predicates.md (minmax_operator): Don't check operands here.
* config/frv/predicates.md (minmax_operator): Don't check operands
here.

From-SVN: r122971
2007-03-15 20:56:36 -04:00
Zdenek Dvorak 9bdb685eda tree-ssa-loop-niter.c (record_estimate): Add "upper" argument.
* tree-ssa-loop-niter.c (record_estimate): Add "upper" argument.
	Update constant estimates of number of iterations.
	(record_nonwrapping_iv): Add "upper" argument.  "data_size_bounds_p"
	argument renamed to "realistic".
	(compute_estimated_nb_iterations): Removed.
	(record_niter_bound): New function.
	(idx_infer_loop_bounds): For possible but unlikely tail arrays,
	call record_nonwrapping_iv with upper = false.
	(infer_loop_bounds_from_signedness): Pass upper argument to
	record_nonwrapping_iv.
	(estimate_numbers_of_iterations_loop): Do not call
	compute_estimated_nb_iterations.  Record estimate based on profile
	information.  Initialize the constant estimates of number of
	iterations.
	* tree-data-ref.c (estimated_loop_iterations): Return the recorded
	estimates.
	* tree-ssa-loop-prefetch.c (loop_prefetch_arrays): Add dump when
	number of iterations is too small.
	* cfgloop.h (struct nb_iter_bound): Remove "realistic" field.
	(EST_NOT_AVAILABLE): Removed.
	(struct loop): Replace estimated_nb_iterations by any_upper_bound,
	nb_iterations_upper_bound, any_estimate and nb_iterations_estimate
	fields.

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

From-SVN: r122969
2007-03-16 00:25:30 +00:00
Zdenek Dvorak 17b236ed68 tree-ssa-loop-niter.c (refine_bounds_using_guard, [...]): Handle NE_EXPR guards.
* tree-ssa-loop-niter.c (refine_bounds_using_guard, bound_difference):
	Handle NE_EXPR guards.

From-SVN: r122963
2007-03-15 23:47:18 +00:00
Manuel López-Ibáñez 9b439fe168 re PR c++/24924 (front end and preprocessor pedantic_errors settings should agree)
2007-03-15  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>

	PR c++/24924
	* c-opts.c (c_common_post_options): Handle C++ post-processing here.
	Set also -pedantic-errors by default for the  preprocessor unless
	-fpermissive is given.
cp/
	* decl.c (cxx_init_decl_processing): Move command-line options
	processing to c-opts.c.
testsuite/
	* g++.dg/cpp/pedantic-errors.C: New.
	* g++.dg/cpp/permissive.C: New.

From-SVN: r122961
2007-03-15 22:24:42 +00:00
Richard Guenther 34a24c113b re PR middle-end/29719 (newlib targets ICEs in expand_builtin_int_roundingfn)
2007-03-15  Richard Guenther  <rguenther@suse.de>

	PR middle-end/29719
	PR middle-end/31161
	* builtins.c (expand_builtin_int_roundingfn): Always fall
	back to floor/ceil and its variants even if they may be
	not available.
	(expand_builtin_cexpi): As a fallback if we
	don't have builtins for sincos or cexp create a function
	declaration for cexp and expand to a call to that.

From-SVN: r122958
2007-03-15 20:14:49 +00:00
Steven Bosscher 49ea3702aa cfglayout.c (fixup_reorder_chain): Postpone deleting dead jump tables...
* cfglayout.c (fixup_reorder_chain): Postpone deleting dead
	jump tables, move the call to delete_dead_jumptables from here...
	(cfg_layout_finalize): ...to here.  But rebuild jump labels first.
	* cfgrtl.c (cfg_layout_can_merge_blocks_p): When not optimizing,
	don't allow merging of blocks that try_redirect_by_replacing_jump
	also does not handle when not optimizing.

From-SVN: r122957
2007-03-15 20:08:29 +00:00
Uros Bizjak 419452fe7e i386.md (x86_sahf_1): Correctly handle HAVE_AS_IX86_SAHF.
* config/i386/i386.md (x86_sahf_1): Correctly handle
       HAVE_AS_IX86_SAHF.


Co-Authored-By: Francois-Xavier Coudert <coudert@clipper.ens.fr>

From-SVN: r122953
2007-03-15 11:31:49 +01:00
Uros Bizjak 68b8830aa0 re PR target/31167 (ICE wnen using __int128_t on x86_64)
PR target/31167
        * config/i386/i386.md (*addti3_1, *addti3_1 splitter): Use
        x86_64_general_operand as operand[2] predicate.  Remove "iF"
        from operand constraints and use "e" constraint instead.
        (*subti3_1, *subti3_1 splitter): Ditto.
        (*negti2_1, *negti2_1 splitter): Use nonimmediate_operand as
        operand[1] predicate.

testsuite/ChangeLog

       PR target/31167
       * gcc.target/i386/pr31167.c: New test.

From-SVN: r122945
2007-03-15 08:25:22 +01:00
Sebastian Pop c4d8f83b55 tree-loop-linear.c (gather_interchange_stats): For multidimensional arrays...
* tree-loop-linear.c (gather_interchange_stats): For multidimensional
	arrays, multiply the access strides by the size of the sub-array.
	* testsuite/gcc.dg/tree-ssa/ltrans-5.c: New.

From-SVN: r122935
2007-03-14 23:23:24 +00:00
Uros Bizjak 38ca376525 configure.ac (HAVE_AS_IX86_SAHF): On x86 targets check whether the configured assembler supports the sahf mnemonic.
* configure.ac (HAVE_AS_IX86_SAHF): On x86 targets check whether
        the configured assembler supports the sahf mnemonic.
        * configure: Regenerate.
        * config.in: Regenerate.

        * config/i386/i386.md (x86_sahf_1): Depending on HAVE_AS_IX86_SAHF,
        emit "sahf" or ".byte\t0x9e" as asm template.

From-SVN: r122931
2007-03-14 22:03:59 +01:00
Michael Meissner e9f646295d Fix 31018 -- move TARGET_xxx in i386.md to tuning options
From-SVN: r122929
2007-03-14 20:02:03 +00:00
Dirk Mueller 62e00e9474 c-common.h (empty_body_warning): Rename to empty_if_body_warning.
2007-03-14  Dirk Mueller  <dmueller@suse.de>

        * c-common.h (empty_body_warning): Rename to empty_if_body_warning.
        * c-common.c (empty_if_body_warning): Rephrase diagnostic message.
        * c-parser.c (c_parser_if_body): Always add an empty statement in case
        of empty body.
        * c-parser.c (c_parser_do_statement): Warn about empty body in
        do/while statement.
        * c-typeck (c_finish_if_stmt): Call empty_if_body_warning.
        * doc/invoke.texi (-Wempty-body): Update documentation.

        * cp/semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
        (finish_do_body): Warn about empty body in do/while statement.

        * g++.dg/warn/do-empty.C: New.
        * gcc.dg/do-empty.c: New.
        * gcc.dg/if-empty-1.c: Update.
        * gcc.dg/20001116-1.c: Update.
        * gcc.dg/pr23165.c: Update.

From-SVN: r122928
2007-03-14 19:33:17 +00:00
Manuel López-Ibáñez 2e9cb75ef7 re PR c/21438 (Warning about division by zero depends on lexical form)
2007-03-14  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>

	PR c/21438
	* c-common.h (warn_for_div_by_zero): Declare.
	* c-common.c (warn_for_div_by_zero): Define.
	* c-typeck.c (build_binary_op): Call warn_for_div_zero instead of
	warning.
cp/
	* typeck.c (build_binary_op): Call warn_for_div_zero instead of
	warning.

From-SVN: r122925
2007-03-14 18:37:37 +00:00
Richard Sandiford 925af765a6 Makefile.in (PREPROCESSOR_DEFINES): Add directory terminators to PREFIX and STANDARD_PREFIX.
gcc/
	* Makefile.in (PREPROCESSOR_DEFINES): Add directory terminators
	to PREFIX and STANDARD_PREFIX.

From-SVN: r122924
2007-03-14 16:06:36 +00:00
Richard Sandiford ac0d72f6f0 200x-xx-xx Richard Sandiford <richard@codesourcery.com> Phil Edwards <phil@codesourcery.com>
gcc/
200x-xx-xx  Richard Sandiford  <richard@codesourcery.com>
	    Phil Edwards  <phil@codesourcery.com>

	* gthr-vxworks.h: Add an extern "C" wrapper for C++.
	(__gthread_once_t): Remove busy field for RTPs.
	(__GTHREAD_ONCE_INIT): Update accordingly.

Co-Authored-By: Phil Edwards <phil@codesourcery.com>

From-SVN: r122923
2007-03-14 13:58:21 +00:00
Richard Sandiford cd773ac48b invoke.texi: Document VxWorks options.
gcc/
	* doc/invoke.texi: Document VxWorks options.

From-SVN: r122922
2007-03-14 13:58:04 +00:00
Uros Bizjak 8c5fd59f94 invoke.texi (i386 and x86-64 Options): Clarify -msahf option.
* doc/invoke.texi (i386 and x86-64 Options): Clarify -msahf option.

From-SVN: r122910
2007-03-14 08:47:32 +01:00
Seongbae Park e31657e812 re PR tree-optimization/30590 (tree-nrv optimization clobbers return variable)
2007-03-13  Seongbae Park <seongbae.park@gmail.com>

	PR tree-optimization/30590
	* tree-nrv.c (tree_nrv): Check for the partial update of the
	return value.

From-SVN: r122909
2007-03-14 05:48:35 +00:00
Alexandre Oliva 403d485122 flags.h (flag_random_seed): Remove declaration, in favor of...
gcc/ChangeLog:
* flags.h (flag_random_seed): Remove declaration, in favor of...
* toplev.h (get_random_seed, set_random_seed): ... these.
* tree.c (get_file_function_name): Use the former.
* opts.c (common_handle_option): Use the latter.
* toplev.c
gcc/cp/ChangeLog:
* cp/repo.c (init_repo): Initialize random_seed saved options.
(finish_repo): Adjust.

From-SVN: r122901
2007-03-14 01:47:33 +00:00
Alexandre Oliva 481e0a49bb re PR middle-end/31127 (ICE in cse_find_path, at cse.c:5930)
gcc/ChangeLog:
PR middle-end/31127
* cse.c (cse_find_path): Do not bail out if a basic block that
we already visited now becomes part of a path that starts at a
different basic block.  Just disallow this, to make sure we
visit each basic block at most once.
gcc/testsuite/ChangeLog:
PR middle-end/31127
* gcc.dg/pr31127.c: New.

From-SVN: r122900
2007-03-14 01:45:39 +00:00
Jan Hubicka 4cdb798f6c ipa-inline.c (cgraph_maybe_hot_edge_p): Look for hot/cold attributes...
* ipa-inline.c (cgraph_maybe_hot_edge_p): Look for hot/cold attributes,
	when profile esitmate is present, calls with very low frequency are
	cold.

From-SVN: r122898
2007-03-14 01:26:00 +00:00
Zdenek Dvorak b3ce5b6ed7 re PR tree-optimization/30730 (-Wunsafe-loop-optimizations gives too many warnings)
PR tree-optimization/30730
	PR tree-optimization/26900
	* tree-ssa-loop-niter.c: Include gmp.h.
	(bounds): New type.
	(mpz_set_double_int, get_type_bounds, mpz_to_double_int,
	split_to_var_and_offset, determine_value_range,
	bound_difference_of_offsetted_base, refine_bounds_using_guard,
	bound_difference, bounds_add, bounds_negate,
	number_of_iterations_ne_max, dump_affine_iv): New functions.
	(number_of_iterations_ne, number_of_iterations_lt_to_ne,
	assert_loop_rolls_lt, assert_loop_rolls_le): Use bounds on the
	difference of initial and final value of control iv to validate
	results.
	(number_of_iterations_cond): Add loop parameter.  Determine bounds
	on the difference of the extremes of the control iv.  Add dumps.
	(expand_simple_operations): Handle phi nodes.
	(simplify_using_initial_conditions): Do not record used conditions.
	(number_of_iterations_exit): Pass loop to number_of_iterations_cond.
	Do not set additional_info.
	(implies_nonnegative_p, implies_ge_p): Removed.
	(derive_constant_upper_bound): Do not use parameter `additional'.
	(record_estimate): Parameter `additional' removed.  Parameter
	`i_bound' added.  Do not call derive_constant_upper_bound.
	(record_nonwrapping_iv): Use derive_constant_upper_bound to
	bound the number of iterations estimate.
	(estimate_numbers_of_iterations_loop): Pass the estimate from
	the number of iterations analysis to record_estimate.
	* tree.h (multiple_of_p): Declare.
	* tree-scalar-evolution.c (expression_expensive_p): Removed.
	(scev_const_prop): Do not check expression_expensive_p.
	* fold-const.c (multiple_of_p): Exported.
	* double-int.c (double_int_mask): Exported.
	* double-int.h (double_int_mask): Declare.
	* tree-flow.h (struct tree_niter_desc): Removed additional_info
	field.  Added max field.

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

From-SVN: r122896
2007-03-14 00:38:34 +00:00
David Taylor 3dfe046fa7 re PR driver/12448 (-MT / -MQ don't behave as documented.)
2007-03-13  David Taylor  <taylor@candd.org>

	PR driver/12448:
	* gcc.c (cpp_unique_options): If -MT or -MQ is seen, don't pass
	default -MQ.

From-SVN: r122889
2007-03-13 23:50:42 +00:00
John David Anglin dc92acbc66 re PR target/31123 (FAIL: gcc.c-torture/execute/builtin-bitops-1.c compilation, -O3 ...)
PR target/31123
	Fix ChangeLog entry.

From-SVN: r122887
2007-03-13 23:23:54 +00:00
John David Anglin de94a581a9 pa.md (vdepi_ior): Don't allow zero length deposit.
* pa.md (vdepi_ior): Don't allow zero length deposit.  Likewise for
	two unamed patterns.

From-SVN: r122885
2007-03-13 23:09:08 +00:00
Uros Bizjak 5be6cb59b3 i386.opt (mcx16, msahf): New options.
* config/i386/i386.opt (mcx16, msahf): New options.
        * config/i386/i386.c (x86_cmpxchg16b, x86_sahf): Remove.
        (ix86_tune_features) [X86_TUNE_USE_SAHF]: Enable for m_GENERIC.

        * config/i386/driver-i386.c (bit_LAHF_LM): New define.
        (host_detect_local_cpu): Detect cx16 and lahf_lm cpuid bits.
        Output -mcx16 and -msahf options when corresponding bit is set.

        * doc/invoke.texi (i386 and x86-64 Options): Document -mcx16
        and -msahf options.

testsuite/ChangeLog

        * testsuite/gcc.target/i386/cmpxchg16b-1.c: New test.

From-SVN: r122884
2007-03-13 22:18:33 +01:00
Alexandre Oliva 03943c05c1 configure.ac: Test for assembler tolerance to # 0 "".
* configure.ac: Test for assembler tolerance to # 0 "".
* configure, config.in: Rebuilt.
* final.c (final_scan_insn): Emit it if HAVE_AS_LINE_ZERO.

From-SVN: r122879
2007-03-13 07:19:14 +00:00
Geoffrey Keating 98312a9bed * doc/invoke.texi (Spec Files): Update for '%{,' spec.
From-SVN: r122878
2007-03-13 07:15:51 +00:00
Geoffrey Keating 49522de2d2 darwin-fallback.c: Compile file only on powerpc.
* config/rs6000/darwin-fallback.c: Compile file only on powerpc.
	(handle_syscall): Handle direct system calls.
	* config/rs6000/darwin.h (HAS_MD_FALLBACK_FRAME_STATE_FOR): Delete.

From-SVN: r122877
2007-03-13 07:13:16 +00:00
Brooks Moses 7d07e4ea35 invoke.texi: Fix cpp.info cross-reference.
* doc/invoke.texi: Fix cpp.info cross-reference.
* doc/passes.texi: Fix gcc.info cross-reference.

From-SVN: r122869
2007-03-12 15:05:07 -07:00
Zdenek Dvorak fbb0d4f878 re PR middle-end/30835 (ICE with -O2 -ftree-loop-linear)
PR tree-optimization/30835
	* lambda-code.c (can_convert_to_perfect_nest): Check whether
	bb_for_stmt is not NULL before accessing it.

From-SVN: r122866
2007-03-12 21:56:12 +00:00
Joseph Myers dc5bbad332 gcc.c (main): Handle target_sysroot_hdrs_suffix being NULL for some multilibs.
* gcc.c (main): Handle target_sysroot_hdrs_suffix being NULL for
	some multilibs.

From-SVN: r122865
2007-03-12 21:32:41 +00:00
Brooks Moses 80ca80e9cc re PR bootstrap/30635 (--enable-stage1-langauges configure option is not documented.)
PR 30635
* doc/install.texi: Document --enable-stage1-languages

From-SVN: r122861
2007-03-12 13:03:33 -07:00
Steven Bosscher dacb3cda32 tree-pass.h (pass_into_cfg_layout_mode, [...]): Declare.
* tree-pass.h (pass_into_cfg_layout_mode,
	pass_outof_cfg_layout_mode): Declare.
	* cfglayout.c (into_cfg_layout_mode, outof_cfg_layout_mode,
	pass_into_cfg_layout_mode, pass_outof_cfg_layout_mode): New.
	* passes.c (pass_into_cfg_layout_mode): Schedule before jump2.
	(pass_outof_cfg_layout_mode): Schedule after pass_rtl_ifcvt.

From-SVN: r122858
2007-03-12 19:38:06 +00:00
Brooks Moses 6da4bc4e6e Fixed erroneous ChangeLog and gcc/ChangeLog entries.
From-SVN: r122856
2007-03-12 12:00:28 -07:00
Seongbae Park 50d50fc7ee invoke.texi (Wvla): New warning.
ChangeLog:

2007-03-12  Seongbae Park <seongbae.park@gmail.com>

	* gcc/doc/invoke.texi (Wvla): New warning.

gcc/ChangeLog:

2007-03-12  Seongbae Park <seongbae.park@gmail.com>

	* c-decl.c (warn_variable_length_array): New function.
	Refactored from grokdeclarator to handle warn_vla
	and handle unnamed array case.
	(grokdeclarator): Refactored VLA warning case.
	* c.opt (Wvla): New flag.

gcc/cp/ChangeLog:

2007-03-12  Seongbae Park <seongbae.park@gmail.com>

	* decl.c (compute_array_index_type): New warning flag warn_vla.

gcc/testsuite/ChangeLog:

2007-03-12  Seongbae Park <seongbae.park@gmail.com>

 	* gcc.dg/wvla-1.c: New test
 	* gcc.dg/wvla-2.c: New test
 	* gcc.dg/wvla-3.c: New test
 	* gcc.dg/wvla-4.c: New test
 	* gcc.dg/wvla-5.c: New test
 	* gcc.dg/wvla-6.c: New test
 	* gcc.dg/wvla-7.c: New test
	* g++.dg/warn/Wvla-1.C: New test
	* g++.dg/warn/Wvla-2.C: New test
	* g++.dg/warn/Wvla-3.C: New test

From-SVN: r122851
2007-03-12 18:31:39 +00:00
Richard Henderson ae0698035b alpha.c (alpha_elf_section_type_flags): New.
* config/alpha/alpha.c (alpha_elf_section_type_flags): New.
	(TARGET_SECTION_TYPE_FLAGS): New.

From-SVN: r122850
2007-03-12 11:15:51 -07:00
Richard Henderson 24c78b3ac8 darwin.c (machopic_reloc_rw_mask): New.
* config/darwin.c (machopic_reloc_rw_mask): New.
        * config/darwin-protos.h (machopic_reloc_rw_mask): Declare.
        * config/darwin.h (TARGET_ASM_RELOC_RW_MASK): New.

From-SVN: r122846
2007-03-12 10:00:11 -07:00
Mark Mitchell 6d4817e374 cppdefault.c (cpp_EXEC_PREFIX): New variable.
* cppdefault.c (cpp_EXEC_PREFIX): New variable.
	* cppdefault.h (cpp_PREFIX): Document.
	(cpp_PREFIX_len): Likewise.
	(cpp_EXEC_PREFIX): New variable.
	* Makefile.in (PREPROCESSOR_DEFINES): Add STANDARD_EXEC_PREFIX.
	* c-incpath.c (add_standard_paths): Correct logic for relocating
	paths within prefix.

From-SVN: r122843
2007-03-12 15:59:06 +00:00
Uros Bizjak d8e3118a8b i386.md (fixuns_trunc<mode>hi2): Implement from fixuns_truncsfhi2 and fixuns_truncdfhi2 using SSEMODEF mode macro.
* config/i386/i386.md (fixuns_trunc<mode>hi2): Implement from
	fixuns_truncsfhi2 and fixuns_truncdfhi2 using SSEMODEF
	mode macro.
	(fix_trunc<mode>di_sse): Implement from fix_truncsfdi_sse and
	fix_truncdfdi_sse using SSEMODEF mode macro.
	(fix_trunc<mode>si_sse): Implement from fix_truncsfsi_sse and
	fix_truncdfsi_sse using SSEMODEF mode macro.
	(fix_trunc?f?i_sse peephole2): Implement using SSEMODEF mode macro.
	(fix_trunc?f?i_sse K8 peephole2): Fix register constraint.

From-SVN: r122839
2007-03-12 12:32:13 +01:00
Richard Sandiford 8906bbc09c config.gcc (i[4567]86-wrs-vxworks, [...]): Add elfos.h to tm_file.
gcc/
	* config.gcc (i[4567]86-wrs-vxworks, i[4567]86-wrs-vxworksae): Add
	elfos.h to tm_file.

From-SVN: r122837
2007-03-12 09:58:50 +00:00
Olga Golovanevsky d4e702949e ipa-type-escape improvements
From-SVN: r122835
2007-03-12 08:44:48 +00:00
Richard Guenther 13338552e2 re PR middle-end/31115 (libstdc++ 22_locale/num_get/get/char/2.cc 27_io/basic_ostream/inserters_arithmetic/char/6.cc)
2007-03-11  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/31115
	* tree-vrp.c (extract_range_from_binary_expr): Make sure
	the shift count is positive and non-anti-range for RSHIFT_EXPR.
	A shift count of zero is not special as with *_DIV_EXPR.
	(vrp_int_const_binop): Handle RSHIFT_EXPR for determining overflow
	direction.

	* gcc.dg/torture/pr31115.c: New testcase.

From-SVN: r122821
2007-03-11 16:08:35 +00:00
Ian Lance Taylor d7419dec45 tree-vrp.c (vrp_int_const_binop): Handle PLUS_EXPR and the *_DIV_EXPR codes correctly with overflow infinities.
* tree-vrp.c (vrp_int_const_binop): Handle PLUS_EXPR and
	the *_DIV_EXPR codes correctly with overflow infinities.

From-SVN: r122820
2007-03-11 15:53:30 +00:00
Ira Rosen e838422b9e tree-data-ref.c (analyze_offset): Add a return value (bool) to indicate success/failure of the analysis.
* tree-data-ref.c (analyze_offset): Add a return value (bool) to
	indicate success/failure of the analysis. Add negation to subtrahend
	in case of subtraction. Fail if both operands contain constants.
	(create_data_ref): Fail if analyze_offset fails.

From-SVN: r122817
2007-03-11 11:13:34 +00:00
Uros Bizjak acaaf0c621 i386.md (frndintxf2): Rename to ...
* config/i386/i386.md (frndintxf2): Rename to ...
        (rintxf2): ... this. Remove expander having same name.
        (rintsf2, rintdf2): Implement using SSEMODEF macro.
        (roundsf2, rounddf2): Ditto.
        (lrint<mode>di2, lrint<mode>si2): Implement using SSEMODEI24 macro.
        (lround<mode>di2, lround<mode>si2): Ditto.

From-SVN: r122815
2007-03-11 11:27:30 +01:00
Steven Bosscher 7984c78796 lower-subreg.c: Include except.h.
* lower-subreg.c: Include except.h.
	(decompose_multiword_subregs): Verify that the only control flow
	insns we can split are loads to multi-words pseudos.
	Handle breaking such blocks after splitting, instead of calling
	find_many_sub_basic_blocks.

	* loop-unroll.c (split_edge_and_insert): Don't set BB_SUPERBLOCK
	on the new basic block.  Add a lengthy comment explaining why we
	thought this was necessary.
	* cfglayout.c (cfg_layout_finalize): Don't break superblocks.

From-SVN: r122807
2007-03-10 23:33:40 +00:00
Mark Mitchell ed574fe919 Fix PR number.
From-SVN: r122804
2007-03-10 19:48:44 +00:00
Mark Mitchell 222725d08c re PR target/20924 (inline float divide does not set correct fpu status flags)
PR c++/20924
	* tree.c (walk_type_fields): Recurse into the element type of
	ARRAY_TYPEs if there is a pointer set.

	PR c++/20924
	* g++.dg/template/array18.C: New test.

From-SVN: r122801
2007-03-10 19:35:03 +00:00
Dirk Mueller 89132ebc4c c-common.c (warn_logical_operator): Fix condition.
2007-03-10  Dirk Mueller  <dmueller@suse.de>

       * c-common.c (warn_logical_operator): Fix condition.

From-SVN: r122800
2007-03-10 18:49:28 +00:00
Tobias Schlüter df990293b8 Fix typo in ChangeLog entry
From-SVN: r122797
2007-03-10 18:07:41 +01:00
Tobias Schlüter 4f6480020e darwin.h (DARWIN_MINVERSION_SPEC): Add missing quotation mark.
* config/i386/darwin.h (DARWIN_MINVERSION_SPEC): Add missing
quotation mark.
* config/i386/darwin.c (machopic_select_section): Remove
superfluous argument in call to categorize_decl_for_section.
Remove unused variable shlib.

From-SVN: r122796
2007-03-10 18:06:19 +01:00
Joseph Myers c9ecbf8693 configure.ac (glibc_header_dir): Set using with_build_sysroot if defined.
* configure.ac (glibc_header_dir): Set using with_build_sysroot if
	defined.
	* configure: Regenerate.

From-SVN: r122795
2007-03-10 16:43:55 +00:00
Uros Bizjak 79cd820a29 i386.md (UNSPEC_C2_FLAG): New constant.
* config/i386/i386.md (UNSPEC_C2_FLAG): New constant.
        (fpremxf4_i387, fprem1xf4_i387): Use UNSPEC_C2_FLAG.
        (fmodxf3, fmod<mode>3, remainderxf3, remainder<mode>3):
        Add LABEL_NUSES to emmitted label.
        * config/i386/i386.c (ix86_emit_fp_unordered_jump): Add
        branch probability value to emmitted jump insn.
        * reg-stack.c (subst_stack_regs_pat)[UNSPEC]: Handle UNSPEC_C2_FLAG.
        Do not check life information and do not re-arrange input operands
        for UNSPEC_FSCALE_EXP, UNSPEC_FPREM_U and UNSPEC_FPREM1_U.

From-SVN: r122793
2007-03-10 13:52:52 +01:00
Kaz Kojima 343d66ade5 sh.c (sh_insn_length_adjustment): Adjust for the change of decode_asm_operands.
* config/sh/sh.c (sh_insn_length_adjustment): Adjust for
	the change of decode_asm_operands.

From-SVN: r122792
2007-03-10 06:57:16 +00:00
Kaz Kojima 07288ab037 mode-switching.c (create_pre_exit): Skip blockage insn.
* mode-switching.c (create_pre_exit): Skip blockage insn.

From-SVN: r122791
2007-03-10 05:04:10 +00:00
Diego Novillo 706ca88ebb tree-pass.h (TODO_update_smt_usage): Remove.
* tree-pass.h (TODO_update_smt_usage): Remove.
	Update all users.
	* tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Remove
	argument SOME.
	Update all users.

From-SVN: r122787
2007-03-09 20:54:13 -05:00
John David Anglin 751d985534 pa.c (attr_length_call): Revise condition for long pc-relative branch.
* pa.c (attr_length_call): Revise condition for long pc-relative branch.
	(output_call): Use "LONG_PIC_SDIFF" instruction sequence for long local
	calls on the SOM target.  Don't use "LONG_PIC_PCREL" call sequence on
	SOM target.

From-SVN: r122784
2007-03-10 01:34:23 +00:00
Geoffrey Keating 48137d59c3 gcc.c: Document %{, in big comment at top.
* gcc.c: Document %{, in big comment at top.
	(input_suffix_matches): Remove special handling for .s and
	.S.
	(input_spec_matches): New.
	(handle_braces): Handle %{,.
	(validate_switches): ',' indicates a value which is not a switch.
	* config/alpha/osf.h (ASM_FINAL_SPEC): Use %{, rather than %{.
	to detect assembler input.
	* config/i386/sol2.h (CPP_SPEC): Likewise.
	* config/rs6000/sysv4.h (ASM_SPEC): Likewise.
	* config/rs6000/vxworks.h (ASM_SPEC): Likewise.
	* config/rs6000/lynx.h (ASM_SPEC): Likewise.
	* config/rs6000/linux64.h (ASM_SPEC_COMMON): Likewise.
	* config/i386/darwin.h (DARWIN_MINVERSION_SPEC): Objective-C plus
	-m64 causes deployment target to default to 10.5.
	* config/rs6000/darwin.h (DARWIN_MINVERSION_SPEC): Likewise.

From-SVN: r122783
2007-03-10 01:03:36 +00:00
Richard Henderson 9b580a0b53 re PR target/26090 (IA-64 creates DT_TEXTREL binaries)
PR target/26090
	* target.h (targetm.asm.out.reloc_rw_mask): New.
	* target-def.h (TARGET_ASM_RELOC_RW_MASK): New.
	(TARGET_ASM_OUT): Use it.
	* targhooks.c, targhooks.h (default_reloc_rw_mask): New.
	* varasm.c (categorize_decl_for_section): Remove shlib argument;
	use the new reloc_rw_mask target hook instead.
	(default_section_type_flags_1): Merge into...
	(default_section_type_flags): ... here.
	(decl_readonly_section_1): Merge into...
	(decl_readonly_section): ... here.
	(default_elf_select_section_1): Merge into...
	(default_elf_select_section): ... here.
	(default_unique_section_1): Merge into...
	(default_unique_section): ... here.
	(compute_reloc_for_rtx_1, compute_reloc_for_rtx): New.
	(default_select_rtx_section): Use it.
	(default_elf_select_rtx_section): Likewise.
	* output.h: Update to match.
	* doc/tm.texi (TARGET_ASM_RELOC_RW_MASK): New.
	* config/alpha/alpha.c (alpha_elf_reloc_rw_mask): New.
	(TARGET_ASM_RELOC_RW_MASK): New.
	* config/i386/i386.c (x86_64_elf_select_section): Adjust call
	to categorize_decl_for_section.
	(x86_64_elf_unique_section): Likewise.
	* config/ia64/hpux.h (TARGET_ASM_SELECT_SECTION,
	TARGET_ASM_UNIQUE_SECTION, TARGET_ASM_SELECT_RTX_SECTION): Remove.
	(TARGET_ASM_RELOC_RW_MASK): New.
	* config/ia64/ia64.c (ia64_rwreloc_select_section,
	ia64_rwreloc_unique_section, ia64_rwreloc_select_rtx_section): Remove.
	(ia64_hpux_reloc_rw_mask, ia64_reloc_rw_mask): New.
	(TARGET_RWRELOC): Remove.
	(ia64_section_type_flags): Adjust call to default_section_type_flags.
	* config/ia64/sysv4.h (TARGET_ASM_RELOC_RW_MASK): New.
	* config/rs6000/rs6000.c (rs6000_elf_section_type_flags): Remove.
	(rs6000_elf_select_section, rs6000_elf_unique_section): Remove.
	(rs6000_elf_reloc_rw_mask, rs6000_xcoff_reloc_rw_mask): New.
	(rs6000_xcoff_select_section): Use decl_readonly_section.
	(rs6000_xcoff_section_type_flags): Use default_section_type_flags.
	* config/rs6000/sysv4.h (TARGET_ASM_RELOC_RW_MASK): New.
	(TARGET_ASM_SELECT_SECTION, TARGET_ASM_UNIQUE_SECTION): Remove.
	(TARGET_SECTION_TYPE_FLAGS): Remove.
	* config/rs6000/xcoff.h (TARGET_ASM_RELOC_RW_MASK): New.

From-SVN: r122781
2007-03-09 16:53:09 -08:00
Roger Sayle 23b9463ba6 fold-const.c (fold_comparison): Remove compile-time evaluation of complex constant equality/inequality...
* fold-const.c (fold_comparison): Remove compile-time evaluation of
	complex constant equality/inequality comparisons for here.
	(fold_binary) <EQ_EXPR>: Simplify complex comparisons that are
	known at compile-time or can be simplified to a scalar comparison.
	(fold_relational_const): Move compile-time evaluation of complex
	constant equality/inequality comparisons to here.

	* gcc.dg/fold-eqcmplx-1.c: New test case.

From-SVN: r122767
2007-03-09 23:09:10 +00:00
Alexandre Oliva 7cd4f641a0 Add line that went missing in the last ChangeLog entry.
From-SVN: r122761
2007-03-09 20:16:25 +00:00
Alexandre Oliva 7e7e28c7c7 re PR rtl-optimization/30643 (CSE pessimization)
gcc/ChangeLog:
PR rtl-optimization/30643
* cse.c (cse_insn): Recompute dest_hash after insert_regs for
(fold_rtx): Recurse, like before 2006-11-03.
gcc/testsuite/ChangeLog:
PR rtl-optimization/30643
* gcc.dg/pr30643.c: New.

From-SVN: r122760
2007-03-09 20:13:10 +00:00
DJ Delorie a009aafece * config/m32c/t-m32c (m32c-pragma.o): Add TM_H dependency to m32c-pragma.o
From-SVN: r122759
2007-03-09 15:08:13 -05:00
Aldy Hernandez 0f84b06679 re PR tree-optimization/30375 (tree-ssa-dse incorrectly removes struct initialization)
PR tree-optimization/30375
        * tree-ssa-dse.c (dse_possible_dead_store_p): Do not eliminate if
        LHS of statements is not the same.
        * testsuite/gcc.dg/tree-ssa/ssa-dse-10.c: New.

From-SVN: r122758
2007-03-09 20:05:08 +00:00
Chao-ying Fu 3204138527 extend.texi (MIPS DSP Built-in Functions): Document the DSP REV 2.
* doc/extend.texi (MIPS DSP Built-in Functions): Document the DSP
REV 2.
* doc/invoke.texi (-mdspr2): Document new option.
* config/mips/mips.md (UNSPEC_ABSQ_S_QB .. UNSPEC_DPSQX_SA_W_PH):
New unspec for DSP REV 2.
(<u>mulsidi3_32bit_internal): Check if !TARGET_DSPR2, because
these instructions are extended in DSP REV 2.
(mips-dspr2.md): Include.
* config/mips/mips.opt (mdspr2): New option.
* config/mips/mips.c (mips_function_type): Add MIPS_V4QI_FTYPE_V4QI,
MIPS_SI_FTYPE_SI_SI_SI, MIPS_DI_FTYPE_DI_USI_USI, MIPS_DI_FTYPE_SI_SI,
MIPS_DI_FTYPE_USI_USI, MIPS_V2HI_FTYPE_SI_SI_SI.
(override_options): Check TARGET_DSPR2 to enable MASK_DSP.
(CODE_FOR_mips_mul_ph): Define it to CODE_FOR_mulv2hi3.
(dsp_bdesc): Add DSP REV 2 builtins.  Remove 32-bit only DSP builtins.
(dsp_32only_bdesc): New description table for 32-bit only DSP REV 1
and 2 builtins.
(bdesc_map): Add one field of unsupported_target_flags.
(bdesc_arrays):  Update entries to have extra fields.  Add
dsp_32only_bdesc.
(mips_init_builtins): Initialize new function types.
Check unsupported_target_fileds to filter out builtins.
* config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Define __mips_dspr2 if
TARGET_DSPR2.
(ASM_SPEC): Pass mdspr2 to the assembler.
* config/mips/mips-dspr2.md: New file.

From-SVN: r122756
2007-03-09 19:19:44 +00:00
Sa Liu 4a71edd9b8 altivec.md: Fix vcond patterns using if_then_else.
2007-03-09  Sa Liu  <saliu@de.ibm.com>

	* config/rs6000/altivec.md: Fix vcond patterns using if_then_else.

From-SVN: r122755
2007-03-09 18:17:08 +00:00
Ian Lance Taylor 4d4362c8da opts.c (common_handle_option): Treat -Wstrict-overflow (with no argument) like -Wstrict-overflow=2.
* opts.c (common_handle_option): Treat -Wstrict-overflow (with no
	argument) like -Wstrict-overflow=2.
	* doc/invoke.texi (Warning Options): Update documentation.

From-SVN: r122753
2007-03-09 17:59:47 +00:00
Dirk Mueller 63a0874077 re PR c/17946 (wanted: warning for "a && MASK" when "a & MASK" was probably intended)
2007-03-09  Dirk Mueller  <dmueller@suse.de>

       PR c++/17946
       * doc/invoke.texi (-Wlogical-op): Document.
       * common.opt (-Wlogical-op): New.
       * c-common.h (warn_logical_operator): Declare.
       * c-common.c (warn_logical_operator): Define.
       * c-typeck.c (parser_build_binary_op): Call
       warn_logical_operator.

       * cp/call.c (build_new_op): Call warn_logical_operator.

       * testsuite/gcc.dg/Wlogical-op-1.c: New.
       * testsuite/g++.dg/warn/Wlogical-op-1.C: New.

From-SVN: r122751
2007-03-09 16:16:35 +00:00
Alexandre Oliva 0de2ae0273 rtl.h (gen_rtx_ASM_INPUT): Use "" instead of NULL file name.
* rtl.h (gen_rtx_ASM_INPUT): Use "" instead of NULL file name.
* final.c (final_scan_insn): Test for non-"" file name.

From-SVN: r122750
2007-03-09 15:10:33 +00:00
Sebastian Pop 3d8864c06f loop.texi: Document the Omega linear constraints solver.
* doc/loop.texi: Document the Omega linear constraints solver.
	* doc/invoke.texi: Document -fcheck-data-deps, omega-max-vars,
	omega-max-geqs, omega-max-eqs, omega-max-wild-cards, 
	omega-hash-table-size, omega-max-keys, and 
	omega-eliminate-redundant-constraints.
	* tree-pass.h (pass_check_data_deps): Declared.
	* omega.c: New.
	* omega.h: New.
	* timevar.def (TV_CHECK_DATA_DEPS): Declared.
	* tree-ssa-loop.c (check_data_deps, gate_check_data_deps, 
	pass_check_data_deps): New.
	* tree-data-ref.c (init_data_ref): Remove declaration.
	(dump_data_dependence_relation): Dump DDR_INNER_LOOP.
	(analyze_array): Renamed init_array_ref, move up initializations.
	(init_data_ref): Renamed init_pointer_ref.  Moved before its call.
	Removed arguments that are set to NULL.
	(analyze_indirect_ref): Correct indentation, correct call to 
	init_pointer_ref.
	(object_analysis): Call init_array_ref instead of analyze_array.
	(initialize_data_dependence_relation): Initialize DDR_INNER_LOOP.
	(access_functions_are_affine_or_constant_p): Use DR_ACCESS_FNS instead
	of DR_ACCESS_FNS_ADDR.
	(init_omega_eq_with_af, omega_extract_distance_vectors, 
	omega_setup_subscript, init_omega_for_ddr_1, init_omega_for_ddr,
	ddr_consistent_p): New.
	(compute_affine_dependence): Check consistency of ddrs when 
	flag_check_data_deps is passed.
	(analyze_all_data_dependences): Uncomment.
	(tree_check_data_deps): New.
	* tree-data-ref.h: Include omega.h.
	(DR_ACCESS_FNS_ADDR): Removed.
	(data_dependence_relation): Add inner_loop.
	(DDR_INNER_LOOP): New.
	* common.opt (fcheck-data-deps): New.
	* tree-flow.h (tree_check_data_deps): Declare.
	* Makefile.in (TREE_DATA_REF_H): Depend on omega.h.
	(OBJS-common): Depend on omega.o.
	(omega.o): Define.
	* passes.c (pass_check_data_deps): Scheduled.
	* params.def (PARAM_OMEGA_MAX_VARS, PARAM_OMEGA_MAX_GEQS, 
	PARAM_OMEGA_MAX_EQS, PARAM_OMEGA_MAX_WILD_CARDS,
	PARAM_OMEGA_HASH_TABLE_SIZE, PARAM_OMEGA_MAX_KEYS,
	PARAM_VECT_MAX_VERSION_CHECKS,
	PARAM_OMEGA_ELIMINATE_REDUNDANT_CONSTRAINTS): New.

From-SVN: r122749
2007-03-09 12:39:49 +00:00
Richard Guenther 6569e71643 re PR tree-optimization/30904 (VRP does not track values of shifts and/or bitfields?)
2007-03-09  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/30904
	PR middle-end/31058
	* tree-vrp.c (extract_range_from_binary_expr): Handle RSHIFT_EXPR
	the same way as *_DIV_EXPR.

	* gcc.dg/pr30904.c: Remove xfail.

From-SVN: r122748
2007-03-09 12:29:09 +00:00
Alexandre Oliva fb0a24601d * recog.c (decode_asm_operands): No mixed declarations and code.
From-SVN: r122746
2007-03-09 10:39:05 +00:00
Alexandre Oliva bff4b63d31 rtl.def (ASM_INPUT): Add location.
* rtl.def (ASM_INPUT): Add location.
* rtl.h (ASM_INPUT_SOURCE_LOCATION): New.
(ASM_INPUT_SOURCE_FILE, ASM_INPUT_SOURCE_LINE): New.
(decode_asm_operands): Add loc operand.
(gen_rtx_ASM_INPUT, gen_rtx_ASM_INPUT_loc): Define.
* stmt.c (expand_asm): Rename to...
(expand_asm_loc): ... this.  Add locus argument.  Pass it on to
gen_rtx_ASM_INPUT_loc.
(expand_asm_expr): Adjust.
* recog.c (decode_asm_operands): Add loc operand.
(check_asm_operands, extract_insn): Adjust.
* reload1.c (maybe_fix_stack_asms): Likewise.
* final.c (asm_insn_count): Likewise.
(final_scan_insn): Output # line before and after asm.

From-SVN: r122742
2007-03-09 07:36:43 +00:00
Daniel Berlin 1296c31f09 tree-ssa-structalias.c (variable_info): Remove finished_solution.
2007-03-09  Daniel Berlin  <dberlin@dberlin.org>

	* tree-ssa-structalias.c (variable_info): Remove
	finished_solution.
	(new_var_info): Ditto.
	(shared_bitmap_info_t): New structure.
	(shared_bitmap_table): New variable.
	(shared_bitmap_hash): New function.
	(shared_bitmap_eq): Ditto
	(shared_bitmap_lookup): Ditto.
	(shared_bitmap_add): Ditto.
	(merge_smts_into): Change to take bitmap directly.
	(find_what_p_points_to): Rewrite to use shared bitmap hashtable.
	(init_alias_vars): Init shared bitmap hashtable.
	(delete_points_to_sets): Delete shared bitmap hashtable.
	* tree-ssa-operands.c (add_virtual_operand): Partially revert the
	is_aliased removal as a change that was still necessary was
	deleted.

From-SVN: r122741
2007-03-09 07:27:44 +00:00
Uros Bizjak 84ac30cb94 i386.h (override_options): Conditionally disable x86_sahf for 64bit targets only.
* config/i386/i386.h (override_options): Conditionally disable
	x86_sahf for 64bit targets only.

From-SVN: r122740
2007-03-09 08:21:19 +01:00
Andrew Pinski ee9f69b425 re PR c/31072 ([4.2 Rgression] Wrong code for volatile var with initalization and optimization)
2007-03-08  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        PR C/31072
        * c-decl.c (merge_decls): Don't call make_var_volatile.
        * varasm.c (make_var_volatile): Remove.
        * output.h (make_var_volatile): Remove.

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

        PR C/31072
        * gcc.c-torture/execute/pr31072.c: New test.

From-SVN: r122736
2007-03-08 16:32:34 -08:00
Zdenek Dvorak 5f787cbcaf re PR tree-optimization/31085 (internal compiler error: in create_mem_ref, at tree-ssa-address.c:606)
PR tree-optimization/31085
	* tree-ssa-address.c (create_mem_ref): Fix test of type of base.

From-SVN: r122724
2007-03-08 22:36:47 +00:00
Kaveh R. Ghazi aeabd15d45 builtins.def (lceil, [...]): Mark with ATTR_CONST_NOTHROW_LIST.
* builtins.def (lceil, lceilf, lceill, lfloor, lfloorf, lfloorl,
	llceil, llceilf, llceill, llfloor, llfloorf, llfloorl): Mark with
	ATTR_CONST_NOTHROW_LIST.
	
	* fold-const.c (tree_expr_nonnegative_warnv_p): Handle
	FIX_TRUNC_EXPR.

testsuite:
	* gcc.dg/builtins-55.c: Test *lceil* and *lfloor*.
	* gcc.dg/torture/builtin-attr-1.c: Likewise.
	* gcc.dg/torture/builtin-convert-1.c: Likewise.  Also test *lrint* and *lround*.
	* gcc.dg/torture/builtin-convert-2.c: Test ceil->lceil and floor->lfloor.
	* gcc.dg/torture/builtin-convert-3.c: Test *lceil* and *lfloor*.
	* gcc.dg/torture/builtin-integral-1.c: Likewise.
	* gcc.dg/torture/builtin-minmax-1.c: Likewise.  Also test *lrint*
	and *lround*.  Correct macro names.
	* gcc.dg/torture/builtin-nonneg-1.c: Test *lceil* and *lfloor*.
	* gcc.dg/torture/builtin-rounding-1.c: Likewise.

From-SVN: r122713
2007-03-08 21:37:28 +00:00
Diego Novillo e9dc9c4ee6 tree-ssa.texi: Remove documentation for V_MUST_DEF.
* doc/tree-ssa.texi: Remove documentation for V_MUST_DEF.

From-SVN: r122710
2007-03-08 15:51:41 -05:00
Geoffrey Keating d2328a1313 re PR objc/31013 (objc PCH is broken on powerpc-darwin again)
PR 31013
	* gccspec.c (lang_specific_driver): Do nothing when NEXT_OBJC_RUNTIME
	is declared.
	* config/darwin.h (REAL_LIBGCC_SPEC): When -fgnu-runtime is
	passed, use shared libgcc.

From-SVN: r122709
2007-03-08 19:56:37 +00:00
Roger Sayle ebb07520cd tree-eh.c (do_return_redirection): Call build_gimple_modify_stmt instead of calling build2 with a GIMPLE_MODIFY_STMT.
* tree-eh.c (do_return_redirection): Call build_gimple_modify_stmt
	instead of calling build2 with a GIMPLE_MODIFY_STMT.
	(honor_protect_cleanup_actions, lower_try_finally_switch):
	Likewise.
	* tree-if-conv.c (replace_phi_with_cond_gimple_modify_stmt,
	ifc_temp_var): Likewise.
	* tree-inline.c (setup_one_parameter): Likewise.
	* tree-mudflap.c (mf_decl_cache_locals,
	mf_build_check_statement_for): Likewise.
	* tree-nested.c (init_tmp_var, save_tmp_var,
	finalize_nesting_tree_1): Likewise.
	* tree-outof-ssa.c (insert_copy_on_edge,
	insert_backedge_copies): Likewise.
	* tree-profile.c (tree_gen_edge_profiler,
	tree_gen_ic_profiler): Likewise.
	* tree-scalar-evolution.c (scev_const_prop): Likewise.
	* tree-sra.c (sra_build_assignment): Likewise.
	* tree-ssa-loop-im.c (determine_invariantness_stmt): Likewise.
	* tree-ssa-math-opts.c (insert_reciprocals,
	execute_cse_sincos_1): Likewise.
	* tree-tailcall.c (adjust_accumulator_values,
	adjust_return_value): Likewise.
	* tree-vect-patterns.c (vect_pattern_recog_1): Likewise.
	* tree-vect-transform.c (vect_create_data_ref_ptr,
	bump_vector_ptr, vect_init_vector, get_initial_def_for_induction,
	vect_create_epilog_for_reduction, vectorizable_reduction,
	vectorizable_call, vectorizable_conversion,
	vectorizable_assignment, vectorizable_operation,
	vectorizable_type_demotion, vect_gen_widened_results_half,
	vect_permute_store_chain, vectorizable_store,
	vect_setup_realignment, vect_permute_load_chain,
	vectorizable_load, vectorizable_condition,
	vect_create_cond_for_align_checks): Likewise.
	* tree-vrp.c (build_assert_expr_for): Likewise.

From-SVN: r122707
2007-03-08 19:02:51 +00:00
Ian Lance Taylor 0c948c2746 tree-vrp.c: Include "intl.h".
./:	* tree-vrp.c: Include "intl.h".
	(usable_range_p): New static function.
	(compare_values_warnv): Don't test TYPE_OVERFLOW_UNDEFINED for
	overflowed values, juts set *strict_overflow_p.
	(compare_values): Only return -2 if one of the operands is not a
	constant.
	(compare_ranges): Call usable_range_p.
	(compare_range_with_value): Likewise.
	(vrp_evaluate_conditional_warnv): Rename from
	vrp_evaluate_conditional.  Make static.  Change all callers.
	(vrp_evaluate_conditional): New function.
	(simplify_div_or_mod_using_ranges): Issue warning about reliance
	on signed overflow.
	(simplify_abs_using_ranges): Likewise.
	(simplify_stmt_for_jump_threading): Add within_stmt parameter.
	* tree-ssa-dom.c (simplify_stmt_for_jump_threading): Add
	within_stmt parameter.
	* tree-ssa-propagate.c (fold_predicate_in): Update call to
	vrp_evaluate_conditional.
	* tree-ssa-threadedge.c
	(record_temporary_equivalences_from_stmts_at_dest): Change
	simplify parameter to take a second tree parameter.
	(simplify_control_stmt_condition): Likewise.
	(thread_across_edge): Likewise.
	* tree-flow.h (vrp_evaluate_conditional): Update declaration.
	(thread_across_edge): Likewise.
	* gcc/Makefile.in (tree-vrp.o): Depend upon intl.h.
testsuite/:
	* gcc.dg/no-strict-overflow-5.c: New test.
	* gcc.dg/no-strict-overflow-6.c: New test.
	* gcc.dg/Wstrict-overflow-11.c: New test.
	* gcc.dg/Wstrict-overflow-12.c: New test.
	* gcc.dg/Wstrict-overflow-13.c: New test.
	* gcc.dg/Wstrict-overflow-14.c: New test.
	* gcc.dg/Wstrict-overflow-15.c: New test.

From-SVN: r122706
2007-03-08 17:36:05 +00:00
Uros Bizjak 3c2d980c94 i386.h (TARGET_SAHF): New define.
* config/i386/i386.h (TARGET_SAHF): New define.
        * config/i386/i386.c (ix86_tune_features) [X86_TUNE_USE_SAHF]:
        Also enable for m_K8, m_AMDFAM10 and m_CORE2.
        (x86_sahf): New global variable.
        (override_options): Add PTA_NO_SAHF to pta_flags enum.  Recode
        pta_flags masks using shifts.  Add PTA_NO_SAHF to x86_64 and
        nocona processor flags.  Set x86_sahf when PTA_NO_SAHF is not set
        in processor flags.  Do not unconditionally disable TARGET_USE_SAHF
        for 64-bit.
        (ix86_fp_comparison_sahf_cost): Return high value for !TARGET_SAHF.
        (ix86_expand_fp_compare): Check for TARGET_CMOVE or TARGET_SAHF
        when expanding fcomi/sahf based tests.
        (ix86_emit_fp_unordered_jump): Check for TARGET_SAHF when
        expanding sahf based alternative. Emit sahf based sequence when
        optimizing for code size.
        * config/i386/i386.md (x86_sahf_1): Do not disable for
        TARGET_64BIT, enable for TARGET_SAHF.

From-SVN: r122705
2007-03-08 18:21:40 +01:00
Martin Michlmayr 068c623d02 tree-ssa-coalesce.c (fail_abnormal_edge_coalesce): Remove
spurious whitespace from error message.

From-SVN: r122690
2007-03-08 09:40:15 +00:00