Commit Graph

31325 Commits

Author SHA1 Message Date
Bernd Schmidt 96f46444e1 bfin.c (effective_address_32bit_p): Return true for anything involving the GOT.
* config/bfin/bfin.c (effective_address_32bit_p): Return true for
	anything involving the GOT.
	(bfin_adjust_cost): Don't take the REGNO of a MEM.
	(trapping_loads_p): Look inside the pattern of an insn to find the
	SET.
	* config/bfin/bfin.md (attr "type"): Add movcc.
	(insn_reservation "alu"): Likewise.
	(movsicc_insn1, movsicc_insn2): Change type to movcc.

From-SVN: r119655
2006-12-08 12:42:44 +00:00
Andrew Pinski faf8957192 Correctly wrap my changelog entry.
From-SVN: r119650
2006-12-08 00:11:44 -08:00
Andrew Pinski cf71109bd6 Add a PR reference for the patch which fixed PR 27558.
2006-04-20  Jakub Jelinek  <jakub@redhat.com>

        * c-pretty-print.c (pp_c_direct_abstract_declarator): Print
        TYPE_MAX_VALUE (TYPE_DOMAIN (t)) + 1 for ARRAY_TYPE rather
        than plain TYPE_MAX_VALUE (TYPE_DOMAIN (t)).

From-SVN: r119648
2006-12-07 20:50:02 -08:00
Andrew Pinski 9838be08d0 spu-c.c (spu_build_overload_builtin): Delete.
2006-12-07  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        * config/spu/spu-c.c (spu_build_overload_builtin): Delete.
        (spu_resolve_overloaded_builtin): Check for non scalar instead
        of vector type and check the function call argument type also for non scalar.
        Call build_function_call instead of spu_build_overload_builtin.

2006-12-07  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        * gcc.target/spu: New directory.
        * gcc.target/spu/spu.exp: New file.
        * gcc.target/spu/intrinsics-1.c: New test.

From-SVN: r119637
2006-12-07 15:40:46 -08:00
Trevor Smigiel 9dc5f9bad9 spu.c (array_to_constant): Correct the order of arguments to the calls of hwint_to_const_double.
* config/spu/spu.c (array_to_constant): Correct the order of arguments
	to the calls of hwint_to_const_double.

From-SVN: r119635
2006-12-07 22:11:51 +00:00
Nick Clifton f4ab891606 * config/elfos.h (TARGET_ASM_RECORD_GCC_SWITCHES): Set to elf_record_gcc_switches.
From-SVN: r119630
2006-12-07 17:44:10 +00:00
Andrew MacLeod a3de5951ce expr.c (string_constant): Account for non-zero lower bound arrays.
2006-12-07  Andrew Macleod  <amacleod@redhat.com>

	* expr.c (string_constant): Account for non-zero lower bound arrays.

From-SVN: r119623
2006-12-07 14:39:37 +00:00
Richard Guenther 5eab7e7af0 builtins.c (expand_builtin_pow): Adjust predicates for pow to cbrt expansion to unsafe math and !HONOR_NANS for...
2006-12-07  Richard Guenther  <rguenther@suse.de>

	* builtins.c (expand_builtin_pow): Adjust predicates for
	pow to cbrt expansion to unsafe math and !HONOR_NANS for
	negative base.

From-SVN: r119622
2006-12-07 14:24:11 +00:00
Jan Hubicka e850f0281c i386.c (nocona_cost, [...]): Update preffered memcpy/memset codegen.
* i386.c (nocona_cost, pentium4_cost): Update preffered memcpy/memset
	codegen.

From-SVN: r119620
2006-12-07 12:56:02 +00:00
Jan Hubicka 5daffcc76e tree-vrp.c (compare_values): Short circuit INTEGER_CST...
* tree-vrp.c (compare_values): Short circuit INTEGER_CST;
	use fold_constant_to_binary; tolerate wrong type constants.
	(value_intersect_p): Do just two tests.

From-SVN: r119619
2006-12-07 12:54:09 +00:00
Bernd Schmidt 58f7667965 bfin.c (print_operand): New modifier 'N' for constants.
* config/bfin/bfin.c (print_operand): New modifier 'N' for constants.
	* config/bfin/bfin.md (ssashiftv2hi3, ssashifthi3, lshiftv2hi3,
	lshifthi3): Use it, and fix the order of alternatives.

From-SVN: r119616
2006-12-07 11:06:08 +00:00
Nick Clifton e0d9d0ddb6 common.opt (record-gcc-switches): New command line switch.
* common.opt (record-gcc-switches): New command line switch.
* target.h (print_switch_type): New enum.
  (print_switch_fn_type): New typedef for a function pointer.
  (struct gcc_target): Add record_gcc_switches and record_gcc_switches_section fields.
* target-def.h (TARGET_ASM_RECORD_GCC_SWITCHES): Provide a default definition.
  (TARGET_ASM_RECORD_GCC_SWITCHES_SECTION): Provide a default definition.
* toplev.c (print_single_switch): Simplify by providing a pointer to function that will format and output the switch appropriately.
  (print_switch_values): Likewise.
  (print_to_asm_out_file): New function.
  (print_to_stderr): New function.
  (init_asm_output): If flag_record_gcc_switches is set then if the target supports recording the switches then emit them into the assembler output file, otherwise tell the user that the switch is not supported.
* varasm.c (eld_record_gcc_switches): New function.  Example handler for the record_gcc_switches target hook.
* doc/tm.texi (TARGET_ASM_RECORD_GCC_SWITCHES): Document the new target hook.
  (TARGET_ASM_RECORD_GCC_SWITCHES_SECTION): Likewise.
* doc/invoke.texi (-frecord-gcc-switches): Document.

From-SVN: r119615
2006-12-07 10:54:13 +00:00
Maxim Kuvyrkov 1d49ee6a79 re PR target/29794 (cc1 segfaults with -O3 -msched-control-spec)
2006-12-07  Maxim Kuvyrkov  <mkuvyrkov@ispras.ru>

	PR target/29794
	* sched-rgn.c (add_block1): Use correct initializer.

From-SVN: r119613
2006-12-07 10:02:35 +00:00
Richard Guenther 9f9195633a tree-vect-transform.c (vectorizable_call): Fix leftover of TREE_OPERAND to GIMPLE_STMT_OPERAND conversion.
2006-12-07  Richard Guenther  <rguenther@suse.de>

	* tree-vect-transform.c (vectorizable_call): Fix leftover of
	TREE_OPERAND to GIMPLE_STMT_OPERAND conversion.

From-SVN: r119612
2006-12-07 09:38:37 +00:00
Aldy Hernandez 66863d89a1 pa.c (hppa_gimplify_va_arg_expr): Build MODIFY_EXPR not GIMPLE_MODIFY_STMT.
PR/30079
	* config/pa/pa.c (hppa_gimplify_va_arg_expr): Build MODIFY_EXPR
	not GIMPLE_MODIFY_STMT.

From-SVN: r119600
2006-12-06 22:08:49 +00:00
Jan Hubicka 6b3c76a98c tree-vrp.c (operand_less_p): New.
* tree-vrp.c (operand_less_p): New.
	(compare_values, value_inside_range): Rewrite in terms of
	operand_less_p.

From-SVN: r119583
2006-12-06 16:32:17 +00:00
Uros Bizjak 90c56b45eb i386.md (DIRFLAG_REG): Remove constant.
* config/i386/i386.md (DIRFLAG_REG): Remove constant.
	(type): Remove cld.
	(length_immediate): Do not depend on cld type attribute.
	(length_address): Ditto.
	(modrm): Ditto.
	(memory): Ditto.
	(cld): Remove insn pattern.
	(strmov_singleop): Do not use DIRFLAG_REG.
	(*strmovdi_rex_1): Ditto.
	(*strmovsi_1): Ditto.
	(*strmovsi_rex_1): Ditto.
	(*strmovhi_1): Ditto.
	(*strmovhi_rex_1): Ditto.
	(*strmovqi_1): Ditto.
	(*strmovqi_rex_1): Ditto.
	(rep_mov): Ditto.
	(*rep_movdi_rex64): Ditto.
	(*rep_movsi): Ditto.
	(*rep_movsi_rex64): Ditto.
	(*rep_movqi): Ditto.
	(*rep_movqi_rex64): Ditto.
	(strset_singleop): Ditto.
	(*strsetdi_rex_1): Ditto.
	(*strsetsi_1): Ditto.
	(*strsetsi_rex_1): Ditto.
	(*strsethi_1): Ditto.
	(*strsethi_rex_1): Ditto.
	(*strsetqi_1): Ditto.
	(*strsetqi_rex_1): Ditto.
	(rep_stos): Ditto.
	(*rep_stosdi_rex64): Ditto.
	(*rep_stossi): Ditto.
	(*rep_stossi_rex64): Ditto.
	(*rep_stosqi): Ditto.
	(*rep_stosqi_rex64): Ditto.
	(cmpstrnsi): Do not generate cld insn.
	(cmpstrnqi_nz_1): Do not use DIRFLAG_REG.
	(*cmpstrnqi_nz_1): Ditto.
	(*cmpstrnqi_nz_rex_1): Ditto.
	(cmpstrnqi_1): Ditto.
	(*cmpstrnqi_1): Ditto.
	(*cmpstrnqi_rex_1): Ditto.
	(strlenqi_1): Ditto.
	(*strlenqi_1): Ditto.
	(*strlenqi_rex_1): Ditto.

	* config/i386/geode.md (shift): Do not depend on cld type attribute.
	* config/i386/pentium.md (pent_cld): Remove insn reservation.
	* config/i386/athlon.md (athlon_decode): Do not depend on cld
	type attribute.
	* config/i386/ppro.md (ppro_cld): Remove insn reservation.
	* config/i386/k6.md (k6_alux_only): Do not depend on cld type
	attribute.
	(k6_alux_only_load): Ditto.
	(k6_alux_only_store): Ditto.

	* config/i386/i386.c (ix86_expand_movmem): Remove cld_done boolean.
	Do not emit cld instruction.
	(ix86_expand_setmem): Ditto.
	(ix86_expand_strlen): Do not emit cld instruction.

From-SVN: r119581
2006-12-06 15:56:10 +01:00
Bernd Schmidt 4b53c50816 bfin.c (bfin_rtx_costs): Add a number of new cases, tweak old ones.
* config/bfin/bfin.c (bfin_rtx_costs): Add a number of new cases, tweak
	old ones.

From-SVN: r119579
2006-12-06 12:45:36 +00:00
Diego Novillo 3a7f50dc49 gdbinit.in: Set complaints to 0.
* gdbinit.in: Set complaints to 0.

From-SVN: r119578
2006-12-06 06:24:41 -05:00
Uros Bizjak ebb60f41d4 ChangeLog: Use tabs instead of spaces.
* ChangeLog: Use tabs instead of spaces.

From-SVN: r119576
2006-12-06 08:14:23 +01:00
Jan Hubicka f75709c6f8 statistics.h (ALONE_PASS_MEM_STAT, [...]): New macros.
* statistics.h (ALONE_PASS_MEM_STAT, ALONE_MEM_STAT_INFO,
	ALONE_MEM_STAT_DECL): New macros.
	* bitmap.h: Include statistics.h
	(struct bitmap_head_def): Add variant with pointer to bitmap descriptor.
	(bitmap_initialize_stat): Rename from bitmap_initialize; add statistics.
	(bitmap_obstack_alloc_stat, bitmap_gc_alloc_stat): Declare.
	* bitmap.c: Include hashtab.h
	(bitmap_descriptor): New.
	(bitmap_hash): New static variable
	(hash_descriptor, eq_descriptor, bitmap_descriptor, register_overhead):
	New static functions.
	(bitmap_register): New.
	(bitmap_element_free, bitmap_element_allocate, bitmap_elt_clear_from,
	bitmap_obstack_release): Do accounting.
	(bitmap_obstack_alloc_stat): Rename from bitmap_obstack_alloc ; do
	accounting.
	(bitmap_gc_alloc_stat): Likewise.
	(bitmap_obstack_free, bitmap_find_bit): Do statictics.
	(print_statistics, dump_bitmap_statistics): New functions.
	* toplev.c (finalize): Dump bitmap statistics.

From-SVN: r119573
2006-12-06 01:37:38 +00:00
Bernd Schmidt 2372a06257 reload1.c (delete_output_reload): Count occurrences in CALL_INSN_FUNCTION_USAGE.
* reload1.c (delete_output_reload): Count occurrences in
	CALL_INSN_FUNCTION_USAGE.
	* rtlanal.c (count_occurrences): Handle EXPR_LIST nodes without
	crashing at the end of the list.

From-SVN: r119571
2006-12-06 00:25:29 +00:00
Daniel Berlin ff3add8dce tree-ssa-structalias.c (set_used_smts): Re-fix pr29156.
2006-12-05  Daniel Berlin  <dberlin@dberlin.org>

	* tree-ssa-structalias.c (set_used_smts): Re-fix pr29156.
	Optimize to avoid marking more SMT's as used when they aren't.

From-SVN: r119562
2006-12-05 23:46:28 +00:00
Eric Christopher 29c08d7c90 i386.c (x86_output_aligned_bss): Move out of COMMON_ASM_OP ifdef.
2006-12-05  Eric Christopher  <echristo@apple.com>

	* config/i386/i386.c (x86_output_aligned_bss): Move out
	of COMMON_ASM_OP ifdef.

From-SVN: r119560
2006-12-05 22:35:13 +00:00
Eric Christopher 742163c039 darwin.h (DARWIN_EXTRA_SPECS): New.
2006-12-05  Eric Christopher  <echristo@apple.com>

        * config/darwin.h (DARWIN_EXTRA_SPECS): New.
        (STARTFILE_SPEC): Use.
        (DARWIN_DYLIB1_SPEC): New.
        (DARWIN_CRT1_SPEC): New.
        * config/i386/darwin64.h (SUBTARGET_EXTRA_SPECS): Use
        DARWIN_EXTRA_SPECS.
        * config/i386/darwin.h: Ditto.
        * config/rs6000/darwin.h: Ditto.

From-SVN: r119555
2006-12-05 19:40:54 +00:00
Daniel Berlin 66087ed002 Commit missing changelog entry
From-SVN: r119553
2006-12-05 19:31:51 +00:00
Brooks Moses 58660eb32c * doc/include/texinfo.tex: Update to version 2006-11-08.17.
From-SVN: r119551
2006-12-05 10:50:57 -08:00
Zdenek Dvorak c1ac94fbe9 re PR tree-optimization/14784 ([Tree-ssa] alias analysis deficiency)
PR tree-optimization/14784
	* tree-ssa-operands.c (access_can_touch_variable): Unrevert the fix.

From-SVN: r119549
2006-12-05 18:26:20 +00:00
Aldy Hernandez 07beea0df3 Merge gimple-tuples-branch into mainline.
From-SVN: r119546
2006-12-05 17:26:05 +00:00
H.J. Lu 3b8aab767b config.host: Remove extra blank line.
2006-12-05  H.J. Lu  <hongjiu.lu@intel.com>

	* config.host: Remove extra blank line.

From-SVN: r119544
2006-12-05 08:04:35 -08:00
Bernd Schmidt 08bac9d89c config.host (i[34567]86-*-*, x86-64-*-*): Use driver-i386.o only if target is also an x86 variant.
* config.host (i[34567]86-*-*, x86-64-*-*): Use driver-i386.o only if
	target is also an x86 variant.

From-SVN: r119543
2006-12-05 15:45:51 +00:00
Richard Guenther db3cf6bd4c i386.c (ix86_builtin_vectorized_function): Declare.
2006-12-05  Richard Guenther  <rguenther@suse.de>

	* config/i386/i386.c (ix86_builtin_vectorized_function): Declare.
	(TARGET_VECTORIZE_BUILTIN_VECTORIZED_FUNCTION): Define.
	(ix86_builtin_vectorized_function): New function to vectorize
	sqrt.

	* gcc.dg/vect/vect.exp: Add support for -fno-math-errno tests.
	* gcc.dg/vect/vect-pow-2.c: Rename to ...
	* gcc.dg/vect/no-math-errno-vect-pow-1.c: ... this.  Require
	vect_double, xfail for spu*-*-*.

From-SVN: r119542
2006-12-05 15:42:54 +00:00
Bernd Schmidt 708f30d603 bfin.c (output_file_start): Fix comment which referred to ia64_override_options.
* config/bfin/bfin.c (output_file_start): Fix comment which referred to
	ia64_override_options.

From-SVN: r119536
2006-12-05 10:35:36 +00:00
Jan Hubicka bd9f1b4b91 cfgexpand.c (expand_one_var): Guard expand_one_stack_var by really_expand.
* cfgexpand.c (expand_one_var): Guard expand_one_stack_var by
	really_expand.

From-SVN: r119535
2006-12-05 10:15:28 +00:00
Bernd Schmidt bbbc206e9f rtlanal.c (note_uses): Deal with SEQUENCEs.
* rtlanal.c (note_uses): Deal with SEQUENCEs.
	* config/bfin/bfin.c: Include "timevar.h".
	(bfin_flag_schedule_insns2, splitting_for_sched,
	bfin_flag_var_tracking): New variables.
	(print_operand): Handle '%!'.
	(override_options): Disable normal sched2 pass, instead set
	bfin_flag_schedule_insns2 for reorg to handle it.
	(output_file_start): Likewise for var-tracking.
	(bfin_optimize_loop): Take some care not to stumble over SEQUENCEs.
	(gen_one_bundle, bfin_gen_bundles, type_for_anomaly, trapping_loads_p):
	New functions.
	(bfin_reorg): Do second scheduling pass here, and call
	bfin_gen_bundles.  Use type_for_anomaly and trapping_loads_p instead
	of examining insns directly.  If bfin_flag_var_tracking, call
	var-tracking pass when done with everything else.
	* config/bfin/bfin.h (PRINT_OPERAND_PUNCT_VALID_P): '!' is valid.
	* config/bfin/bfin.md (UNSPEC_32BIT): New constant.
	(movsi_insn32): New pattern, with two new splits to create it
	before the final scheduling pass.
	(neghi2): Not a dsp32 insn, rather alu0.
	(movbi, pushsi_insn, popsi_insn, movsi_insn, movv2hi_insn, movhi_insn,
	movqi_insn, movsf_insn, movsi_insv, extendhisi2, zero_extendhisi2,
	extendqihi2, extendqisi2, zero_extendqihi2, zero_extendqisi2,
	mulhisi3, umulhisi3, ssadsi3, sssubsi3, smaxsi3, sminsi3, abssi2,
	ssnegsi2, signbitssi2, smaxhi3, sminhi3, abshi2, ssneghi2, signbitshi2,
	movhi_low2high, movhi_high2high, movhi_low2low, movhi_high2low,
	movhiv2hi_low, movhiv2hi_high, composev2hi, packv2hi, movv2hi_hi,
	ssaddhi3, sssubhi3, addv2hi3, ssaddv2hi3, subv2hi3, sssubv2hi3,
	addsubv2hi3, subaddv2hi3, ssaddsubv2hi3, sssubaddv2hi3, sublohiv2hi3,
	subhilov2hi3, sssublohiv2hi3, sssubhilov2hi3, addlohiv2hi3,
	addhilov2hi3, ssaddlohiv2hi3, ssaddhilov2hi3, sminv2hi3, smaxv2hi3,
	flag_mulhi, flag_mulhisi, flag_mulhisi_parts, flag_machi,
	flag_machi_acconly, flag_macinithi, flag_macinit1hi, mulv2hi3,
	flag_mulv2hi, flag_mulv2hi_parts, flag_macv2hi_parts,
	flag_macv2hi_parts_acconly, flag_macinitv2hi_parts,
	flag_macinit1v2hi_parts, mulhisi_ll, mulhisi_lh, mulhisi_hl,
	mulhisi_hh, ssnegv2hi2, absv2hi2, ssashiftv2hi3, ssashifthi3,
	lshiftv2hi3, lshifthi3): Use '%!' to terminate all dsp32/load/store
	variants instead of ';'.
	(ror_one, rol_one): Likewise.  Make them dsp32 insns.
	(ashlsi3_insn, ashrsi3, lshrsi3): Add dsp32 variants.
	(align8, align16, align24): Now named patterns; also using '%!'.
	(mnop): New insn.

From-SVN: r119534
2006-12-05 08:49:56 +00:00
Kazu Hirata 9fc4da9d86 darwin.h, [...]: Fix comment typos.
* config/i386/darwin.h, config/spu/spu.c, tree-ssa-live.c,
	tree-vect-generic.c, tree-vect-transform.c: Fix comment typos.

From-SVN: r119533
2006-12-05 08:27:27 +00:00
Trevor Smigiel 20e9e7597f spu-protos.c (spu_split_address): Add.
* config/spu/spu-protos.c (spu_split_address): Add.
	* config/spu/spu.c (spu_split_address): Add.
	(print_operand): Handle HIGH.
	(spu_legitimate_address):  Don't test for aligned CONST.
	(spu_expand_mov):  Don't split addresses here.
	* config/spu/constraints.md (A): Don't test legitimate_const.
	* config/spu/spu.md: Add split of movsi patterns for PIC mode.
	(ceq_di): Use correct predicates.

From-SVN: r119532
2006-12-05 03:55:38 +00:00
Eric Christopher 304c85e6f0 darwin.h: Update copyright notice.
2006-12-04  Eric Christopher  <echristo@apple.com>

        * config/darwin.h: Update copyright notice.
        * config/i386/darwin.h: Ditto.

From-SVN: r119531
2006-12-05 02:23:18 +00:00
Daniel Berlin e5ebbea51e tree-ssa-alias.c (compute_flow_sensitive_aliasing): Call set_used_smts.
2006-12-04  Daniel Berlin  <dberlin@dberlin.org>

	* tree-ssa-alias.c (compute_flow_sensitive_aliasing): Call
	set_used_smts.
	* tree-ssa-structalias.c (set_used_smts): Export.
	(find_what_p_points_to): Don't call set_used_smts here.
	* tree-ssa-structalias.h (set_used_smts): Add prototype.

From-SVN: r119528
2006-12-05 00:44:24 +00:00
Jan Hubicka 26979bc292 cp-objcp-common.c (cp_expr_size): Return NULL in the case size is undefined.
* cp-objcp-common.c (cp_expr_size): Return NULL in the case
	size is undefined.

	* builtins.c (fold_builtin_memory_op): Check that expr_size match.
	* explow.c (expr_size, int_expr_size): Assert that size is non_NULL.

From-SVN: r119515
2006-12-04 22:51:42 +00:00
Daniel Berlin c58936b6b7 tree-ssa-alias.c (compute_may_aliases): Compute flow sensitive before flow insensitive.
2006-12-04  Daniel Berlin  <dberlin@dberlin.org>
	
	* tree-ssa-alias.c (compute_may_aliases):
	Compute flow sensitive before flow insensitive.
	(compute_flow_sensitive_aliasing): Don't try to add
	a symbol memory tag to itself.
	
	* alias.h (alias_set_subset_of): New prototype.

	* alias.c (alias_set_subset_of): New function.

	* tree-ssa-structalias.c: Update comments.
	(struct variable_info): Add finished_solution.
	(new_varinfo): Set finished solution to NULL.
	(var_escaped_vars): Remove.
	(escaped_vars_tree): Remove.
	(escaped_vars_id): Remove.
	(nonlocal_vars_id): Remove.
	(constraint_expr_type): Add INCLUDES.
	(graph_size): Removed.
	(dump_constraint): Support INCLUDES.
	(build_constraint_graph): Ditto.
	(collapse_nodes): Add merge_solutions argument.
	Don't merge attributes.
	(process_unification_queue): Just use collapse_nodes.
	(perform_var_substitution): Update call to collapse_nodes.
	(get_constraint_exp_from_ssa_var): Use INCLUDES.
	(process_constraint): Fix non-field sensitive handling
	Handle includes.
	(get_constraint_for): Use INCLUDES.
	(make_constraint_from_anything): Renamed from
	make_constraint_from_escaped.
	(make_constraint_to_escaped): Removed.
	(find_global_initializers): Removed.
	(create_variable_info_for): Do not make constraints to escaped
	vars anymore.
	(dump_solution_for_var): Don't print out the equivalent points-to
	sets, just use the name of the variable it shares it with.
	(intra_create_variable_infos): Use INCLUDES.
	Change nonlocal variable sets to anything sets.
	(init_base_vars): Remove escaped_vars and nonlocal_var
	initialization. 
	(find_escape_constraints): Removed.
	(delete_points_to_sets): Remove dead code.
	(used_smt_calculated): New variable.
	(set_used_smts): New function.
	(merge_smts_into): New function.
	(find_what_p_points_to): Modify to use SMTs.
	(create_nonlocal_var): Remove.
	
	* tree-ssa-operands.c (access_can_touch_variable): Remove
	reference to nonlocal_all. 

	* tree-ssa.c (verify_name_tags): Remove.

From-SVN: r119502
2006-12-04 19:07:05 +00:00
Carlos O'Donell 7f575bf6d4 unwind-arm.c: Adjust __cxa_type_match declaration.
gcc/

2006-12-04  Carlos O'Donell  <carlos@codesourcery.com>

	* config/arm/unwind-arm.c: Adjust __cxa_type_match declaration.
	(__gnu_unwind_pr_common): Pass is_reference to __cxa_type_match.

From-SVN: r119498
2006-12-04 17:25:36 +00:00
Andrew MacLeod 32ace6e2a6 Switch live on entry to a per block basis from per variable.
* tree-outof-ssa.c (coalesce_ssa_name): Use calculate_live_ranges.
	* tree-ssa-live.c (new_tree_live_info, delete_tree_live_info): Update.
	(add_livein_if_notdef): Delete.
	(loe_visit_block): New.  Propogate live on entry info for a block into
	each predecessor.  If it changes, make sure it is visited again.
	(live_worklist): Visit every block and update the live on entry info 
	for preds.  Iterate over any that changed.
	(set_var_live_on_entry): Populate the live on entry blocks with bits
	based on the immediate uses of a var.
	(calculate_live_on_entry): Remove.
	(calculate_live_on_exit): Calculate live on exit based on the newly
	oriented live on entry bits.
	(calculate_live_ranges): Build live on entry and exit vectors.
	(dump_live_info): Use new orientation of live on entry bitmaps.
	(verify_live_on_entry): New.  Split out verification code from old
	calculate_live_on_entry routine.
	* tree-ssa-live.h (struct tree_live_info_d): Add Working stack.
	(live_entry_blocks): Rename to live_on_entry and return bitmap for a
	basic_block instead of for a partition.
	(live_merge_and_clear): Add asserts.
	(make_live_on_entry): Set partition bit in basic block vector.

From-SVN: r119495
2006-12-04 14:26:37 +00:00
Jakub Jelinek 22568cc62c re PR middle-end/29947 (OpenMP parallel for fails for reversed loop range)
PR libgomp/29947
	* omp-low.c (expand_omp_for_static_nochunk,
	expand_omp_for_static_chunk): Do all arithmetics in signed rather than
	unsigned type.

	* loop.c (gomp_loop_init): Make parameters signed.  Set ws->end to
	start if there shouldn't be any loop iterations.
	(gomp_loop_ordered_static_start): Remove start == end test.
	* testsuite/libgomp.c/pr29947-1.c: New test.
	* testsuite/libgomp.c/pr29947-2.c: New test.

From-SVN: r119485
2006-12-04 11:26:00 +01:00
Jakub Jelinek d3c673c74a re PR middle-end/29965 (OpenMP vs always throw in a loop)
PR middle-end/29965
	* omp-low.c (determine_parallel_type): Don't try to optimize combined
	parallels if region->exit or region->inner->exit is NULL.
	(expand_omp_parallel): Handle NULL region->exit even if cfg is already
	built.
	(expand_omp_for_generic): Handle NULL region->cond and region->exit.
	(expand_omp_for): Use expand_omp_for_generic if either region->cond
	or region->exit is NULL.
	(expand_omp_sections): Handle NULL region->cond or region->exit.
	(expand_omp_synch): 

	* gcc.dg/gomp/pr29965-1.c: New test.
	* gcc.dg/gomp/pr29965-2.c: New test.
	* gcc.dg/gomp/pr29965-3.c: New test.
	* gcc.dg/gomp/pr29965-4.c: New test.
	* gcc.dg/gomp/pr29965-5.c: New test.
	* gcc.dg/gomp/pr29965-6.c: New test.
	* g++.dg/gomp/pr29965-1.C: New test.
	* g++.dg/gomp/pr29965-2.C: New test.
	* g++.dg/gomp/pr29965-3.C: New test.
	* g++.dg/gomp/pr29965-4.C: New test.
	* g++.dg/gomp/pr29965-5.C: New test.
	* g++.dg/gomp/pr29965-6.C: New test.
	* g++.dg/gomp/pr29965-7.C: New test.
	* g++.dg/gomp/pr29965-8.C: New test.
	* g++.dg/gomp/pr29965-9.C: New test.
	* g++.dg/gomp/pr29965-10.C: New test.

From-SVN: r119483
2006-12-04 11:20:51 +01:00
Eric Botcazou 94983d3065 sp64-elf.h (JUMP_TABLES_IN_TEXT_SECTION): Delete.
* config/sparc/sp64-elf.h (JUMP_TABLES_IN_TEXT_SECTION): Delete.
	* config/sparc/sysv4.h (JUMP_TABLES_IN_TEXT_SECTION): Likewise.

From-SVN: r119482
2006-12-04 09:31:48 +00:00
Eric Botcazou 8f6e6bf375 tree.c (walk_type_fields): Do not handle TYPE_MIN_VALUE and TYPE_MAX_VALUE for scalar types here but...
* tree.c (walk_type_fields): Do not handle TYPE_MIN_VALUE and
	TYPE_MAX_VALUE for scalar types here but...
	(walk_tree): ...there instead.  Return NULL_TREE if the TYPE_DECL
	is attached an error mark, and the return value of the callback
	if it is not NULL_TREE.

cp/
	* pt.c (for_each_template_parm_r) <INTEGER_TYPE>: New case.
	Call for_each_template_parm on TYPE_MIN_VALUE and TYPE_MAX_VALUE.

testsuite/
	* gnat.dg/pointer_variable_bounds.adb: New test.
	* gnat.dg/pointer_variable_bounds.ads: Likewise.
	* gnat.dg/pointer_variable_bounds_q.ads: Likewise.

From-SVN: r119481
2006-12-04 07:47:32 +00:00
Ben Elliston ceebb5f568 * config/spu/spu.md (_mulv4si3): Remove unused local variables.
From-SVN: r119479
2006-12-04 16:38:21 +11:00
Eric Christopher bd6a088940 re PR target/24598 (Need to support odcctools and its ablity to use --prefix and libtool)
2006-12-03  Eric Christopher  <echristo@apple.com>

        PR target/24598
        * config/t-slibgcc-darwin: Pass -install_name.
        * config/darwin.h (LINK_COMMAND_SPEC): Remove use of
        libtool. Only pass through options that the linker recognizes.
        (LINK_SPEC): Update comment. Translate options.
        (STARTFILE_SPEC): Add dylib1.o for shared libraries.
        * config/darwin9.h (LINK_COMMAND_SPEC): Ditto above.

From-SVN: r119477
2006-12-04 02:10:10 +00:00
Dorit Nuzman 0f6909b963 vect.exp: Enable tests to run on spu.
* g++.dg/vect/vect.exp: Enable tests to run on spu.
        * gcc.dg/vect/vect.exp: Enable tests to run on spu.
        * gcc.dg/vect/no-section-anchors-vect-69.c: Reduce array size.
        * gcc.dg/vect/vect-70.c: Reduce array size.
        * gcc.dg/vect/fast-math-vect-reduc-7.c: Xfail for
        vect_no_compaer_double targets.
        * lib/target-supports.exp: Add spu to vect_no_align, no_vect_int_max,
        vect_float, vect_double, and vect_int.

	* config/spu/spu.md (smaxv4sf3, sminv4sf3): New.

From-SVN: r119469
2006-12-03 20:05:31 +00:00
Uros Bizjak 7372c0a430 re PR target/30041 (FAIL: gcc.target/i386/sse3-movddup.c (internal compiler error))
PR target/30041
        * config/i386/sse.md ("*sse3_movddup"): Use operands[0] and
        operands[1] in insn constraint.  Correct type attribute to sselog1.

From-SVN: r119468
2006-12-03 20:40:06 +01:00
H.J. Lu edccdcb198 re PR target/30040 (-mtune=native is wrong for Core 2 Duo and Core Duo)
2006-12-02  H.J. Lu  <hongjiu.lu@intel.com>

	PR target/30040
	* config/i386/driver-i386.c: Include "coretypes.h" and "tm.h".
	(bit_SSSE3): New.
	(host_detect_local_cpu): Check -mtune= vs. -march=. Rewrite
	processor detection.

	* config/i386/i386.h (CC1_CPU_SPEC): Add -mtune=native for
	-march=native if there is no -mtune=*.

	* config/i386/x-i386 (driver-i386.o): Also depend on $(TM_H)
	coretypes.h.

From-SVN: r119454
2006-12-02 14:18:25 -08:00
Kaveh R. Ghazi b5147de7c1 configure.in: Update MPFR version in error message.
* configure.in: Update MPFR version in error message.

	* configure: Regenerate.

gcc:
	* doc/install.texi: Update recommended MPFR version.  Remove
	obsolete reference to cumulative patch.

gcc/testsuite:
	* gcc.dg/torture/builtin-sin-mpfr-1.c: Update MPFR comment.

From-SVN: r119447
2006-12-02 16:52:15 +00:00
Lee Millward f1f66b423f re PR c/27953 (ICE with invalid function definitions)
PR c/27953
	* c-decl.c (store_parm_decls_oldstyle): Robustify
        * gcc.dg/pr27953.c: New test.

From-SVN: r119446
2006-12-02 16:34:26 +00:00
Jan Hubicka cc0faf9dc9 i386.c (pentium4_cost, [...]): Update 32bit memcpy/memset decriptors.
* config/i386/i386.c (pentium4_cost, nocona_cost): Update
	32bit memcpy/memset decriptors.
	(decide_alg): With -minline-all-stringops and sizes that are best
	to be copied via libcall still work hard enough to pick non-libcall
	strategy.

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

From-SVN: r119445
2006-12-02 13:16:27 +00:00
Kazu Hirata 9c134b65cd * config/i386/i386.c: Fix a comment typo.
From-SVN: r119443
2006-12-02 02:47:07 +00:00
Kazu Hirata 2f8e468bf3 builtins.c, [...]: Fix comment typos.
* builtins.c, cfgloop.h, cgraph.h, config/arm/arm.c,
	config/i386/i386.c, config/i386/i386.h, config/mips/mips.h,
	config/rs6000/cell.md, config/rs6000/rs6000.c, config/sh/sh.c,
	config/sh/sh4-300.md, config/spu/spu-builtins.def,
	config/spu/spu-c.c, config/spu/spu-modes.def,
	config/spu/spu.c, config/spu/spu.md,
	config/spu/spu_internals.h, config/spu/vmx2spu.h,
	fold-const.c, fwprop.c, predict.c, tree-data-ref.h,
	tree-flow.h, tree-ssa-loop-manip.c, tree-ssa-loop-niter.c,
	tree-ssa-pre.c, tree-vect-analyze.c, tree-vect-transform.c,
	tree-vectorizer.c, tree-vrp.c: Fix comment typos.  Follow
	spelling conventions.

From-SVN: r119442
2006-12-02 02:26:04 +00:00
Kazu Hirata 5681c208fa * doc/extend.texi, doc/invoke.texi, doc/md.texi: Fix typos.
From-SVN: r119441
2006-12-02 02:06:52 +00:00
Trevor Smigiel 01975fc73d spu.c (spu_immediate): Remove trailing comma.
* config/spu/spu.c (spu_immediate): Remove trailing comma.
	(reloc_diagnostic): Call warning when -mwarn-reloc is specified.
	* config/spu/spu.md: (zero_extendhisi2): Expand instead of split for
	better optimization.
	(floatv4siv4sf2): New.
	(fix_truncv4sfv4si2): New.
	(floatunsv4siv4sf2): New.
	(fixuns_truncv4sfv4si2): New.
	(addv16qi3): New.
	(subv16qi3): New.
	(negv16qi2): New.
	(mulv8hi3): New.
	(mulsi3): Remove.
	(mul<mode>3): New.
	(_mulv4si3): New.
	(cmp<mode>): Don't accept constant arguments for DI, TI and SF.
	* config/spu/spu_internals.h: Handle overloaded intrinsics in C++ with
	spu_resolve_overloaded_builtin instead of static inline functions.

From-SVN: r119424
2006-12-01 22:51:06 +00:00
Eric Botcazou f0dbdfbb4d fold-const.c (fold_binary): Use the precision of the type instead of the size of its mode to compute the...
* fold-const.c (fold_binary) <LT_EXPR>: Use the precision of the
	type instead of the size of its mode to compute the highest and
	lowest possible values.  Still check the size of the mode before
	flipping the signedness of the comparison.

From-SVN: r119422
2006-12-01 22:46:45 +00:00
Trevor Smigiel 09aad82b44 predicates.md (spu_mov_operand): Add.
* config/spu/predicates.md (spu_mov_operand): Add.
        * config/spu/spu.c (spu_expand_extv): Remove unused code.
        (print_operand_address, print_operand): Handle addresses containing AND.
        (spu_split_load, spu_split_store): Use updated movti pattern.
        * config/spu/spu.md: (_mov<mode>, _movdi, _movti): Handle loads and
        stores in mov patterns for correct operation of reload.
        (lq, lq_<mode>, stq, stq_<mode>): Remove.

From-SVN: r119421
2006-12-01 22:43:18 +00:00
Volker Reichelt d8e1d61976 re PR c++/30021 (ICE on invalid parameter for main)
PR c++/30021
	* c-common.c (check_main_parameter_types): Check for error_mark_node.

	* g++.dg/other/main1.C: New test.

From-SVN: r119415
2006-12-01 21:28:35 +00:00
Andrew MacLeod 7c6a62dd39 common.opt (ftree-combine-temps): Remove.
* common.opt (ftree-combine-temps): Remove.
	* tree-outof-ssa.c (SSANORM_COMBINE_TEMPS): Remove.
	(coalesce_ssa_name): Don't check for combine-temps.
	(coalesce_vars): Remove.
	(check_replaceable): Use num_imm_uses.
	(remove_ssa_form, insert_backedge_copies, rewrite_out_of_ssa): Don't 
	check for combine-temps.
	(rewrite_out_of_ssa): Never create a ref_count in the var_map.
	* tree-ssa-copyrename.c (copy_rename_partition_coalesce): Change parms
	to register_ssa_partition calls.
	* tree-ssa-live.c (register_ssa_partition): Remove prototype.
	(init_var_map, delete_var_map): remove refernces to ref_count.
	(create_ssa_var_map): Never calculate a ref count.
	(type_var_init): Remove.
	* tree-ssa-live.h (typedef struct _var_map): Remove ref_count.
	(SSA_VAR_MAP_REF_COUNT): Delete.
	(create_ssa_var_map): Change Prototype to have no parameters.
	(version_ref_count): Delete.
	(register_ssa_partition): Remove 'is_use' paramater and don't set the
	ref_count vector.
	(type_var_num, type_var, type_var_first_partition,
	type_var_next_partition, type_var_dump, type_var_delete,
	type_var_remove_partition, type_var_find, type_var_compact,
	type_var_decompact): Remove.

	* gcc.dg/max-1.c: Remove reference to -fno-tree-lrs option.

From-SVN: r119409
2006-12-01 19:53:29 +00:00
Bernd Schmidt 35e3ced91a bfin.md (pushsi_insn, popsi_insn): Set correct addrtype attribute.
* config/bfin/bfin.md (pushsi_insn, popsi_insn): Set correct addrtype
	attribute.

From-SVN: r119408
2006-12-01 17:53:42 +00:00
Richard Guenther e01e02016b re PR c++/29433 (using boost::MPL requires lots of memory)
2006-12-01  Richard Guenther  <rguenther@suse.de>

	PR c++/29433
	* dwarf2out.c (struct pubname_struct): Make name const.
	(add_pubtype): Do not xstrdup identifiers.

From-SVN: r119404
2006-12-01 16:37:38 +00:00
Bernd Schmidt 5308e94309 bfin.c (bfin_valid_add): Fix the logic that ensures multiword accesses are in range.
* config/bfin/bfin.c (bfin_valid_add): Fix the logic that ensures
	multiword accesses are in range.

From-SVN: r119402
2006-12-01 15:49:55 +00:00
H.J. Lu fbb5445b5d [multiple changes]
2006-12-01  Zdenek Dvorak <dvorakz@suse.cz>

	PR tree-optimization/29921
	* tree-ssa-ccp.c (canonicalize_float_value): New function.
	(set_lattice_value): Use canonicalize_float_value.

2006-12-01  H.J. Lu  <hongjiu.lu@intel.com>
	    Zdenek Dvorak <dvorakz@suse.cz>

	PR tree-optimization/29921
	* gcc.dg/pr29921-2.c: New test.

From-SVN: r119401
2006-12-01 06:49:15 -08:00
Andrew Pinski b66b813d47 spu.c (spu_builtin_range): Move from spu-c.c
2006-11-30  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        * config/spu/spu.c (spu_builtin_range): Move from spu-c.c
        (TARGET_RESOLVE_OVERLOADED_BUILTIN): Delete.
        (spu_cpu_cpp_builtins): Remove.
        (spu_override_options): Don't set warn_main.
        (spu_force_reg): Move from spu-c.c.
        (spu_check_builtin_parm): Likewise.
        (expand_builtin_args): Likewise.
        (spu_expand_builtin_1): Likewise.
        (spu_expand_builtin): Likewise.
        * config/spu/spu.h (REGISTER_TARGET_PRAGMAS): Define, set
        warn_main and targetm.resolve_overloaded_builtin.
        * config/spu/spu-c.c (spu_builtin_range): Remove.
        (spu_check_builtin_parm): Remove.
        (expand_builtin_args): Remove.
        (spu_expand_builtin_1): Remove.
        (spu_expand_builtin): Remove.
        (spu_cpu_cpp_builtins): Moved from spu.c
        (spu_force_reg): Remove.

From-SVN: r119397
2006-11-30 18:38:47 -08:00
Joseph Myers 8521c41417 re PR target/24036 ([e500] ICE in subreg_offset_representable_p, at rtlanal.c:3143)
2006-12-01  Joseph Myers  <joseph@codesourcery.com>
            David Edelsohn  <edelsohn@gnu.org>

	PR target/24036
	* doc/tm.texi (HARD_REGNO_NREGS_HAS_PADDING,
	HARD_REGNO_NREGS_WITH_PADDING): Document new target macros.
	* defaults.h (HARD_REGNO_NREGS_HAS_PADDING,
	HARD_REGNO_NREGS_WITH_PADDING): Define.
	* config/i386/i386.h (HARD_REGNO_NREGS_HAS_PADDING,
	HARD_REGNO_NREGS_WITH_PADDING): Define.
	* rtlanal.c (subreg_regno_offset, subreg_offset_representable_p):
	Use new macros to detect modes with holes; do not look at integer
	units.
	(subreg_offset_representable_p): Check for and disallow cases
	where the modes use different numbers of bits from registers.
	* config/rs6000/rs6000.c (rs6000_emit_move): Handle TFmode
	constant for soft-float.
	(rs6000_hard_regno_nregs): Use UNITS_PER_FP_WORD for e500 GPRs
	containing doubles.
	(rs6000_split_multireg_move): Use DFmode reg_mode for TFmode moves
	in E500 double case.
	* config/rs6000/rs6000.md (movtf): Allow soft-float.
	(movtf_softfloat): New.

Co-Authored-By: David Edelsohn <edelsohn@gnu.org>

From-SVN: r119395
2006-12-01 02:25:22 +00:00
Richard Sandiford e25615581d simplify-rtx.c (simplify_rtx): Use simplify_subreg rather than simplify_gen_subreg.
gcc/
	* simplify-rtx.c (simplify_rtx): Use simplify_subreg rather than
	simplify_gen_subreg.

From-SVN: r119380
2006-11-30 21:54:20 +00:00
Andrew MacLeod 9fa2efcd3d Implement coalesce list with hash table instead of linked list.
* tree-ssa-live.c (create_coalesce_list): Create a hash table.
	(COALESCE_HASH_FN): New.  Define hash function.
	(partition_pair_map_hash): New.  Hash value for a partition pair.
	(partition_pair_map_eq): New.  Equality for hash pairs.
	(create_coalesce_list): Create hash table.
	(delete_coalesce_list): Free hash table.
	(find_partition_pair): Find/create pairs in hash table.
	(compare_pairs):  Sort pairs in ascending order now.
	(num_coalesce_pairs): New.  Number of pairs in hash table.
	(struct partition_pair_iterator): Iterator struct for pair table.
	(first_partition_pair): Iterator function for first pair.
	(end_partition_pair_p): Iterator function for end of iteration.
	(next_partition_pair): Iterator function for next pair.
	(FOR_EACH_PARTITION_PAIR): Macro for iterating over pairs.
	(sort_coalesce_list): Sort pairs from hash table into an array.
	(pop_best_coalesce): Take pairs from the array.
	(dump_coalesce_list): Update to use hash table or sorted array.
	* tree-ssa-live.h (struct partition_pair_d): Remove next field.
	(struct coalesce_list_d): Add hash table related fields.

From-SVN: r119378
2006-11-30 21:36:32 +00:00
Jan Hubicka f7b410e0fb re PR middle-end/30028 (bcopy is wrongly converted to memcpy)
PR middle-end/30028
	* builtins.c (fold_builtin_memory_op): Fix typo in the check for
	memmove/bcopy->memcpy conversion.

From-SVN: r119375
2006-11-30 19:36:02 +00:00
Carlos O'Donell 11d90e2dd0 tm.texi (MAX_OFILE_ALIGNMENT): Document default.
gcc/

2006-11-30  Carlos O'Donell  <carlos@codesourcery.com>

	* doc/tm.texi (MAX_OFILE_ALIGNMENT): Document default.
	* config/elfos.h [!MAX_OFILE_ALIGNMENT] (MAX_OFILE_ALIGNMENT): 
	Default is the largest alignment supported for 32-bit ELF and 
	representable on a 32-bit host.

From-SVN: r119374
2006-11-30 19:25:08 +00:00
Janis Johnson 2a061db501 dfp-bit.c (DFP_TO_INT): Use wider precision.
gcc/
	* config/dfp-bit.c (DFP_TO_INT): Use wider precision.
testsuite/
	* gcc.dg/dfp/convert-int-max.c: New test.
	* gcc.dg/dfp/convert-int-max-fold.c: New test.

From-SVN: r119368
2006-11-30 17:58:03 +00:00
Jan Hubicka 456cde3030 tree-ssa-operands.h (struct ssa_operands): New.
* tree-ssa-operands.h (struct ssa_operands): New.
	* tree-flow-inline.h (gimple_ssa_operands): New function.
	* tree-flow.h: (struct gimple_df): Add ssa_operands.
	* Makefile.in: Remove gt-tree-ssa-operands.h
	* tree-ssa-operands.c: Do not include gt-tree-ssa-operands.h
	(free_defs, free_uses, free_vuses, free_maydefs, free_mustdefs,
	operand_memory, operand_memory_index, ops_active): Remove statics.
	(ALLOC_OPTYPE): Update.
	(operand_build_sort_virtual): Update.
	(ssa_operands_active): Update.
	(init_ssa_operands): Update.
	(fini_ssa_operands): Update.
	(ssa_operand_alloc): Update.
	(INITIALIZE_USE): Update.
	(finalize_ssa_use_ops): Update.
	(finalize_ssa_v_may_def_ops): Update.
	(finalize_ssa_vuse_ops): Update.
	(finalize_ssa_v_must_def_ops): Update.

From-SVN: r119363
2006-11-30 15:30:01 +00:00
Richard Guenther c6b1b49b1e tree-vectorizer.h (vectorizable_function): Export.
2006-11-30  Richard Guenther  <rguenther@suse.de>

	* tree-vectorizer.h (vectorizable_function): Export.
	* tree-vect-transform.c (vectorizable_function): Likewise.
        * tree-vect-patterns.c (vect_recog_pow_pattern): Set
        type_in to scalar type in recognition of squaring.
	Make sure the target can vectorize sqrt in recognition
	of sqrt, set type_in to vector type in this case.

	* gcc.dg/vect/vect-pow-1.c: Rename ...
	* gcc.dg/vect/fast-math-vect-pow-1.c: ... to this.  Use
	floats instead of doubles, check successful vectorization.

From-SVN: r119362
2006-11-30 14:30:00 +00:00
Uros Bizjak 3c4ace25d7 i386.md (R10_REG): New constant.
* config/i386/i386.md (R10_REG): New constant.
	* config/i386/i386.c (pro_epilogue_adjust_stack): Use R11_REG.
	(ix86_emit_restore_regs_using_mov): Ditto.
	(ix86_expand_call): Ditto.
	(x86_output_mi_thunk): Ditto. Also use R10_REG.

From-SVN: r119360
2006-11-30 11:57:34 +01:00
Steven Bosscher ac3768f69a cselib.c (cselib_init): Use special MEM rtx form for callmem.
* cselib.c (cselib_init): Use special MEM rtx form for callmem.
	* alias.c (canon_true_dependence): Update comment.

From-SVN: r119358
2006-11-30 07:24:03 +00:00
Steven Bosscher e9ec5c6b5e cgraphunit.c (cgraph_finalize_compilation_unit): Add a newline at the end of a diagnostics message.
* cgraphunit.c (cgraph_finalize_compilation_unit): Add a newline
	at the end of a diagnostics message.

	* alloc-pool.c (pool_free): Postpone clearing the pool entry
	until after asserting that it was allocated in the right pool.

	* cfgrtl.c (print_rtl_with_bb): Print predecessor and
	successor edge information as well.  Make output of live regs
	on exit consistent with live regs on entry.

From-SVN: r119357
2006-11-30 07:22:04 +00:00
Uros Bizjak e26feb2c60 re PR target/29852 (x86_64: SSE version missing for fmod{d,s,x}f3)
PR target/29852
	* config/i386/i386.md (*truncxfsf2_mixed, *truncxfdf2_mixed): Enable
	insn patterns for TARGET_80387.
	(*truncxfsf2_i387, *truncxfdf2_i387): Remove.
	(*truncxfsf2_i387_1): Rename to *truncxfsf2_i387.
	(*truncxfdf2_i387_1): Rename to *truncxfdf2_i387.
	(fmod<mode>3, remainder<mode>3): Enable expaders for SSE math.
	Generate truncxf<mode>2 insn patterns for strict SSE math.

From-SVN: r119356
2006-11-30 07:54:47 +01:00
Uros Bizjak 8002331ec5 i386.md (movsf_1): Enable pattern for standard 80387 constants before reload when optimizing for size.
* config/i386/i386.md (movsf_1): Enable pattern for standard
	80387 constants before reload when optimizing for size.
	(*movdf_nointeger, *movdf_integer): Ditto.
	(*movxf_nointeger, *movxf_integer): Disable patterns for standard
	80387 constants before reload when not optimizing for size.

	(*fop_xf_4_i387, *fop_xf_5_i387, *fop_xf_6_i387): Avoid float
	extension of XFmode input operands.

From-SVN: r119355
2006-11-30 07:47:24 +01:00
Andrew Pinski 8fdb55720f crt0.c (__dso_handle): Define.
2006-11-29  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        * config/spu/crt0.c (__dso_handle): Define.

From-SVN: r119354
2006-11-29 19:37:34 -08:00
Kaz Kojima 2954a81343 emit-rtl.c (verify_rtl_sharing): Handle SEQUENCE specially when clearing the used flags.
* emit-rtl.c (verify_rtl_sharing): Handle SEQUENCE specially
	when clearing the used flags.

From-SVN: r119353
2006-11-30 03:13:29 +00:00
Andrew Pinski f21840c3c7 spu.md (extend_compare): Fix whitespace formatting.
2006-11-29  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        * config/spu/spu.md (extend_compare): Fix whitespace formatting.

From-SVN: r119350
2006-11-29 17:19:00 -08:00
Andrew Pinski 357f76d7f0 re PR target/29945 (ICE in simplify_subreg with simple code in libgfortran)
2006-11-29  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        PR target/29945
        * config/spu/spu.md  (extend_compare<mode>): New pattern.
        (extend_compare): Change to expand and use the above pattern.

2006-11-29  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        PR target/29945
        * gcc.c-torture/compile/pr29945.c: New testcase.

From-SVN: r119348
2006-11-29 17:05:58 -08:00
Janis Johnson 2d42636d4d * dfp-bit.c (DFP_TO_INT): Fix rounding mode.
From-SVN: r119335
2006-11-29 23:11:01 +00:00
Janis Johnson 240e6b6bd0 decRound.c: Move declarations to new file, update comments.
libdecnumber/
	* decRound.c: Move declarations to new file, update comments.
	* decRound.h: New file.
gcc/
	* mklibgcc.in: Fix dependencies for dfp-bit.c.
	* config/dfp-bit.h (CONTEXT_ROUND): Delete.
	(DFP_INIT_ROUNDMODE): Define.
	* config/dfp-bit.c: Replace CONTEXT_ROUND with DFP_INIT_ROUNDMODE.

From-SVN: r119329
2006-11-29 18:34:56 +00:00
Tehila Meyzels 07c0282832 haifa-sched.c: Remove define LINE_NOTE(INSN).
2006-11-29  Tehila Meyzels  <tehila@il.ibm.com>

      * haifa-sched.c: Remove define LINE_NOTE(INSN).
      Remove line_note_head.
      Update documentation.
      (associate_line_notes_with_blocks): Kill.
      (extend_bb): Remove basic block argument, put void instead.
      Remove line number handling for each bb.
      (save_line_notes): Kill.
      (restore_line_notes): Kill.
      (sched_init): Remove line_note_head initialization.
      Change extend_bb call.
      (sched_finish): Remove free of line_note_head.
      (add_block): Change extend_bb call.
      * sched-ebb.c (schedule_ebb): Remove save_line_notes,
      rm_line_notes and restore_line_notes calls.
      (schedule_ebbs): Remove rm_redundant_line_notes.
      * sched-int.h (struct haifa_insn_data): Remove line_note.
      (save_line_notes): Remove declaration.
      (restore_line_notes): Remove declaration.
      * modulo-sched.c (loop_canon_p): Update debug info printing
      by using insn locators instead of line note.
      (sms_schedule): Update debug info printing, by using insn
      locators instead of line note.
      * sched-rgn.c (debug_dependencies): Remove handling of case
      n>0 (line number), since it's a dead code.
      (schedule_region): Remove save_line_notes and
      restore_line_notes calls.

From-SVN: r119328
2006-11-29 18:24:14 +00:00
Joseph Myers 14502dad06 predicates.md (gpc_reg_operand): Check invalid_e500_subreg.
* config/rs6000/predicates.md (gpc_reg_operand): Check
	invalid_e500_subreg.
	* config/rs6000/rs6000.c (invalid_e500_subreg): Don't allow any
	SImode subregs of SPE vectors.
	* config/rs6000/rs6000.md (insv): Fail for invalid E500 subregs.
	* jump.c (true_regnum): Require subregs to satisfy
	subreg_offset_representable_p.

From-SVN: r119324
2006-11-29 17:33:59 +00:00
Daniel Berlin d315c4a9f8 Makefile.in (tree-ssanames.o): Remove gt-tree-ssanames.h, since it no longer exists.
2006-11-29  Daniel Berlin  <dberlin@dberlin.org>
	    Steven Bosscher <stevenb.gcc@gmail.com>

	* Makefile.in (tree-ssanames.o): Remove gt-tree-ssanames.h,
	since it no longer exists.


Co-Authored-By: Steven Bosscher <stevenb.gcc@gmail.com>

From-SVN: r119323
2006-11-29 17:17:56 +00:00
Duncan Sands 32c8bce718 re PR tree-optimization/23744 (VRP does not merge discontinuous ranges of PHIs)
PR tree-optimization/23744
	* tree-vrp.c (vrp_meet): do not require ranges to intersect.
	* testsuite/gcc.dg/tree-ssa/pr23744.c: new test.
	* testsuite/gcc.dg/tree-ssa/update-threading.c: xfail.

From-SVN: r119320
2006-11-29 16:00:07 +00:00
Jie Zhang 8b65a354f0 * doc/tm.texi (NO_PROFILE_COUNTERS): Document more accurately.
From-SVN: r119315
2006-11-29 14:52:31 +00:00
J"orn Rennecke dc557046cf sh.opt (minline-ic_invalidate): New option.
* sh.opt (minline-ic_invalidate): New option.
	(musermode): Adjust comment.
	* sh.c (sh_initialize_trampoline): Emit library call unless
	is set; if it is set, don't emit library call if we can use icbi
	instead.
	* sh.md (ic_invalidate_line, ic_invalidate_line_sh4a): Also use
	icbi for TARGET_SH4_300.
	* t-sh (LIB1ASMFUNCS_CACHE): Set.
	* doc/invoke.texi: Document -minline-ic_invalidate; Update
	-musermode documentation.

From-SVN: r119314
2006-11-29 14:35:38 +00:00
Jim Tison 6db2889286 gthr-tpf.h (__GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION, [...]): Define.
2006-11-29  Jim Tison  <jtison@us.ibm.com>

	* gthr-tpf.h (__GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION,
	__gthread_recursive_mutex_init): Define.

From-SVN: r119311
2006-11-29 13:00:12 +00:00
Joseph Myers 0cfbc62b0b rs6000.c (rs6000_gimplify_va_arg): If STRICT_ALIGNMENT and the type is more aligned than the saved registers...
* config/rs6000/rs6000.c (rs6000_gimplify_va_arg): If
	STRICT_ALIGNMENT and the type is more aligned than the saved
	registers, copy via a temporary.

From-SVN: r119307
2006-11-29 12:49:06 +00:00
Andrew Pinski e969dbde29 re PR tree-optimization/29984 (SPE GCC segfaults with MAX_EXPR <a, a>)
2006-11-28  Andrew Pinski  <pinskia@gmail.com>

        PR tree-opt/29984
        * gcc.dg/tree-ssa/reassoc-12.c: New test.

2006-11-28  Andrew Pinski  <pinskia@gmail.com>

        PR tree-opt/29984
        * tree-ssa-reassoc.c (eliminate_duplicate_pair): Handle MAX_EXPR
        and MIN_EXRP.

From-SVN: r119303
2006-11-28 23:23:11 -08:00
Bob Wilson f8383f28e2 * config/xtensa/lib1funcs.asm (__umulsidi3): Restore a12-a15 on exit.
From-SVN: r119296
2006-11-28 21:22:14 +00:00
Jan Hubicka 5cd4ec7f24 Privatize SSA variables into gimple_df.
* tree-flow-inline.h
	(gimple_in_ssa_p, gimple_aliases_computed_p, gimple_addressable_vars,
	gimple_call_clobbered_vars, gimple_referenced_vars, gimple_global_var,
	gimple_nonlocal_all): New accessors.
	(first_referenced_var): Update.
	(mark_stmt_modified): Update.
	(is_call_clobbered): Update.
	(mark_call_clobbered): Update.
	(clear_call_clobbered): Update.
	(mark_non_addressable): Update.
	* tree-vrp.c (get_value_range): Update.
	* tree-into-ssa.c (in_ssa_p): Kill.
	(get_default_def_for): Update.
	(rewrite_into_ssa): Update.
	* tree-complex.c (init_parameter_lattice_values): Update.
	(update_complex_assignment): Update.
	(update_parameter_components): Update.
	(expand_complex_libcall): Update.
	(expand_complex_operations_1): Update.
	* tree-tailcall.c (arg_needs_copy_p): Update.
	(add_virtual_phis): Update.
	(tree_optimize_tail_calls_1): Update.
	* tree-ssa-dse.c (memory_ssa_name_same): Update.
	* tree-ssa-copyrename.c
	(copy_rename_partition_coalesce): Update.
	* tree-ssa-math-opts.c (execute_cse_reciprocals): Update.
	* tree-ssa-propagate.c (set_rhs): Update.
	* tree-ssa-alias.c (aliases_computed_p, call_clobbered_vars,
	addressable_vars, global_var):Kill.
	(set_initial_properties): Update.
	(init_alias_info): Update.
	(finalize_ref_all_pointers): Update.
	(setup_pointers_and_addressables): Update.
	(maybe_create_global_var): Update.
	(create_global_var): Update.
	(dump_points_to_info): Update.
	* function.h (struct gimple_df): Forward declare.
	(struct function): Add GIMPLE_DF field.
	* gimplify.c (force_gimple_operand): Update.
	* tree-dfa.c (referenced_vars, default_defs): KIll.
	(make_rename_temp): Update.
	(dump_variable): Update.
	(referenced_var_lookup): Update.
	(referenced_var_check_and_insert): Update.
	(default_def): Rename to ...
	(gimple_default_def): ... this one; accept cfun argument.
	(set_default_def): Update.
	* tree-cfgcleanup.c (modified_noreturn_calls): Kill.
	(cleanup_control_flow): Update.
	* tree-ssa-pre.c (compute_avail): Update
	* tree-ssa-live.c (calculate_live_on_entry): Update.
	* tree-ssa.c (verify_use): Update.
	(verify_call_clobbering): Update.
	(verify_call_clobbering): Update.
	(init_tree_ssa): Update.
	(delete_tree_ssa): Update.
	* tree-outof-ssa.c (coalesce_ssa_name): Update.
	(rewrite_out_of_ssa): Update.
	* tree-flow.h (gimple_df): New structure collecting dataflow variables.
	(FREE_SSANAMES, SSANAMES, MODIFIED_NORETURN_CALLS, DEFAULT_DEFS): New
	private accessors.
	(in_ssa_p, modified_noreturn_calls, referenced_vars, default_defs,
	ssa_names, global_var, nonlocal_all, call_clobbered_vars,
	addressable_vars, aliases_computed_p): Kill.
	(default_def): Rename to...
	(gimple_default_def): ... this one.
	(defaule_def_fn): Kill.
	(num_referenced_vars, ssa_names, num_ssa_names): Update.
	* tree-ssa-structalias.c (nonlocal_all): Kill.
	(get_constraint_exp_from_ssa_var): Update.
	(create_nonlocal_var): Update.
	(get_constraint_for): Update.
	(update_alias_info): Update.
	(find_global_initializers): Update.
	(intra_create_variable_infos): Update.
	(intra_create_variable_infos):
	(find_what_p_points_to): Update.
	(init_alias_heapvars): Update.
	* tree-cfg.c (remove_bb): Update.
	(gimplify_val): Update.
	* tree-ssa-reassoc.c (get_rank): Update.
	(init_reassoc): Update.
	* tree-ssanames.c: Do not include gt-tree-ssanames.h
	(ssa_names, free_ssanames): Kill.
	(init_ssanames): Update.
	(make_ssa_name): Update.
	(release_ssa_name): Update.
	(release_defs): Update.
	(replace_ssa_name_symbol): Update.
	* tree-ssa-operands.c (access_can_touch_variable): Update.
	(add_virtual_operand): Update.
	(add_call_clobber_ops): Update.
	(add_call_read_ops): Update.
	(get_call_expr_operands): Update.
	(get_asm_expr_operands): Update.

From-SVN: r119294
2006-11-28 14:42:37 +00:00
Jan Hubicka a1da787df3 builtins.c: Include tree-flow.h.
* builtins.c: Include tree-flow.h.
	(fold_builtin_memory_op): Be more aggressive on converting memcpy to
	assignment; convert memmove to memcpy for sizes greater than 1 where
	alignment of operands prohibit the partial overlap.

From-SVN: r119292
2006-11-28 14:20:04 +00:00
Jan Hubicka ff28a94d32 invoke.texi (large-stack-frame, [...]): New params.
* invoke.texi (large-stack-frame, large-stack-frame-growth): New params.
	* cgraph.c (dump_cgraph_node): Dump stack usage.
	* cgraph.h (cgraph_local_info): Add estimated_self_stack_size.
	(cgraph_global_info): Add estimated_stack_size and stack_frame_offset.
	* cgraphunit.c (cgraph_analyze_function): Analyze stack sizes.
	* ipa-inline.c (cgraph_clone_inlined_nodes): Propagate stack usage.
	(cgraph_check_inline_limits): Limit stack growth.
	* cfgexpand.c: Include tree-inline.h.
	(account_stack_vars): New function.
	(expand_one_var): New param to just account the stack; return estimated
	size.
	(expand_used_vars_for_block): Update call of expand_one_var.
	(account_used_vars_for_block): New function.
	(estimated_stack_frame_size): Likewise.
	(init_vars_expansion, fini_vars_expansion): Break out from..
	(expand_used_vars): ... here.
	* tree-inline.h (estimated_stack_frame_size): Declare.
	* params.def (PARAM_LARGE_STACK_FRAME, PARAM_STACK_FRAME_GROWTH): New.

From-SVN: r119281
2006-11-28 10:53:16 +00:00
Richard Guenther 00df958942 ggc-page.c (ggc_print_statistics): Use %ul and a cast to unsigned long for printing OBJECT_SIZE.
2006-11-28  Richard Guenther  <rguenther@suse.de>

	* ggc-page.c (ggc_print_statistics): Use %ul and a cast to
	unsigned long for printing OBJECT_SIZE.

From-SVN: r119280
2006-11-28 10:03:49 +00:00
Steven Bosscher 4a25ff8383 alias.c (init_alias_analysis): Remove simplification loop after propagating pointers.
* alias.c (init_alias_analysis): Remove simplification loop
        after propagating pointers.

From-SVN: r119262
2006-11-27 23:15:38 +00:00
Uros Bizjak 71615adf0c i386.c (x86_ext_80387_constants): Add m_K8, m_CORE2 and m_GENERIC64.
* config/i386/i386.c (x86_ext_80387_constants): Add m_K8, m_CORE2
        and m_GENERIC64.

From-SVN: r119260
2006-11-27 20:50:40 +01:00
Bob Wilson 327e3a0331 * config/xtensa/xtensa.h (XCHAL_HAVE_MUL32_HIGH): Provide default.
From-SVN: r119259
2006-11-27 18:48:57 +00:00
Roger Sayle 91c41804cb c-common.c (constant_fits_type_p): Delete.
2006-11-27  Roger Sayle  <roger@eyesopen.com>
	    Manuel Lopez-Ibanez <manu@gcc.gnu.org>
	    
	* c-common.c (constant_fits_type_p): Delete.
	(unsigned_conversion_warning): Delete.
	(conversion_warning): Integrate Wconversion warning from
	unsigned_conversion_warning.
	(convert_and_check): Integrate Woverflow warning from
	unsigned_conversion_warning.  Reorganize and simplify to avoid
	dependence upon the middle-end setting TREE_OVERFLOW on integral
	conversions, by using int_fits_type_p directly.

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

From-SVN: r119258
2006-11-27 18:47:41 +00:00
Tobias Burnus dbdbfff135 invoke.texi: Fixed typo.
2006-11-27  Tobias Burnus  <burnus@net-b.de>

       * doc/invoke.texi: Fixed typo.

From-SVN: r119257
2006-11-27 17:43:12 +01:00
Michael Matz e064939e4a re PR target/29319 (ICE unrecognizable insn: offset too large for larl (breaks glibc))
2006-11-27  Michael Matz  <matz@suse.de>
            Andreas Krebbel  <krebbel1@de.ibm.com>

	PR target/29319
	* config/s390/predicates.md (larl_operand): Check addend of larl
	operand to be in range of -/+2GB.
	* config/s390/s390.c (legitimize_pic_address): Likewise.  
	Changed type of variable even to HOST_WIDE_INT.

2006-11-27  Michael Matz  <matz@suse.de>
            Andreas Krebbel  <krebbel1@de.ibm.com>

	PR target/29319
	* gcc.dg/20061127-1.c: New testcase.


Co-Authored-By: Andreas Krebbel <krebbel1@de.ibm.com>

From-SVN: r119256
2006-11-27 16:34:19 +00:00
Jan Hubicka 8c99651385 expr.c (emit_block_move_via_libcall): Export.
* expr.c (emit_block_move_via_libcall): Export.
	(clear_storage_via_libcall): Rename to ...
	(set_storage_via_libcall): ... this one; handle arbitrary value to set.
	(clear_storage): Update to set_storage_via_libcall.
	* expr.h (emit_block_move_via_libcall): Declare
	* config/i386/i386.h (stringop_alg): New enum.
	(MAX_STRINGOP_ALGS): New constant.
	(stringop_algs): New struct.
	(processor_costs): Add memcpy/memset descriptors.
	(TARGET_REP_MOVEL_OPTIMAL): Remove.
	* config/i386/i386.md (movsi_insv_1_rex64): New pattern.
	(strmovsi, strmovdi, strsetsi, strsetdi): Update; accept all operands
	for memset.
	* config/i386/i386.opt (minline-stringops-dynamically,
	mstringop-strategy): New
	parameters.
	* config/i386/i386-prostos.h (ix86_expand_movmem): Update prototype.
	(ix86_expand-clrmem): Rename to ...
	(ix86_expand_setmem): ... this one; update prototype.
	* config/i386/i386.c (DUMMY_STRINGOP_ALGS): New constant.
	(size_cost, i386_cost, i486_cost, pentium_cost, pentiumpro_cost,
	geode_cost, k6_cost, athlon_cost, k8_cost, pentium4_cost,
	nocona_cost, core2_cost, generic_cost, generic64_cost,
	generic32_cost): Add memcpy/memset descriptors.
	(x86_rep_movl_optimal): Remove.
	(stringop_alg): New static variable.
	(ix86_expand_aligntest): Handle predictions.
	(override_options): Add strgop_alg handling.
	(predict_jump): New function.
	(scale_counter): New function.
	(expand_set_or_movmem_via_loop): New function.
	(expand_movmem_via_rep_mov): New function.
	(expand_setmem_via_rep_stots): New function.
	(emit_strmov): New function.
	(expand_movmem_epilogue): New function.
	(expand_setmem_epilogue_via_loop): New function.
	(expand_setmem_epilogue): New function.
	(expand_movmem_prologue): New function.
	(expand_setmem_prologue): New function.
	(decide_alg): New function.
	(decide_alignment): New function.
	(ix86_exand_movmem): Rewrite.
	(promote_duplicated_reg): New function.
	(ix86_expand_clrmem): Rename to ...
	(ix86_expand_setmem): ... this one. Rewrite.

	* invoke.texi (minline-stringops-dynamically): New command line option.
	(mstringop-strategy): Likewise.

From-SVN: r119252
2006-11-27 16:00:26 +00:00
Jan Hubicka 071a42f958 cfgexpand.c (construct_exit_block): Don't disturb end of last BB.
* cfgexpand.c (construct_exit_block): Don't disturb end of last BB.
	* rtl.texi (NOTE_INSN_FUNCTION_END): Remove.
	* final.c (final_scan_insn): Don't scan NOTE_INSN_FUNCTION_END.
	* insn-notes.def (FUNCTION_END): Remove.
	* jump.c (delete_related_insns): Don't worry about FUNCTION_END.
	(redicect_jump_2): Don't accept -1 parameter to remove FUNCTION_END
	note.
	* ifcvt.c (dead_or_predictable): Update call of redirect_jump_2.
	* function.c (expand_function_end): Don't emit NOTE_INSN_FUNCTION_END
	* cfglayout.c (duplicate_insn_chain): Don't worry about
	NOTE_FUNCTION_END.

From-SVN: r119250
2006-11-27 15:07:10 +00:00
Richard Guenther 2505a3f233 target.h (struct gcc_target): Add builtin_vectorized_function target hook.
2006-11-27  Richard Guenther  <rguenther@suse.de>
	Zdenek Dvorak <dvorakz@suse.cz>

	* target.h (struct gcc_target): Add builtin_vectorized_function
	target hook.
	* target-def.h (TARGET_VECTORIZE): Likewise.
	* doc/tm.texi (TARGET_VECTORIZE_BUILTIN_VECTORIZED_FUNCTION):
	Document new target hook.
	* targhooks.h (default_builtin_vectorized_function): Declare.
	* targhooks.c (default_builtin_vectorized_function): Define.
	* tree-vectorizer.h (stmt_vec_info_type): Add call_vec_info_type.
	(vectorizable_call): Declare.
	* tree-vect-analyze.c (vect_analyze_operations): Call
	vectorizable_call.
	* tree-vect-transform.c (vectorizable_function): New static function.
	(build_vectorized_function_call): Likewise.
	(vectorizable_call): New function.
	(vect_transform_stmt): Handle vectorizable calls.

Co-Authored-By: Zdenek Dvorak <dvorakz@suse.cz>

From-SVN: r119249
2006-11-27 12:41:51 +00:00
Richard Guenther 9fca6f972d re PR fortran/25620 (Missed optimization with power)
2006-11-27  Richard Guenther  <rguenther@suse.de>

	PR middle-end/25620
	* builtins.c (expand_builtin_pow): Optimize non integer valued
	constant exponents using sqrt or cbrt if possible.  Always fall back
	to expanding via optabs.

	* gcc.target/i386/pow-1.c: New testcase.
	* gcc.dg/builtins-58.c: Likewise.

From-SVN: r119248
2006-11-27 11:38:42 +00:00
Ira Rosen 4090db01e8 re PR tree-optimization/22372 (Vectorizer produces mis-match types)
PR tree-optimization/22372
	* tree-vect-transform.c (vect_create_addr_base_for_vector_ref): Convert
	the type of the base address.
	(vect_create_data_ref_ptr): Add an argument, type of the data-ref. Use
	it in the data-ref pointer creation.
	(vect_init_vector): Add an argument, type of the init vector. Use it in
	the stmt creation.
	(vect_get_vec_def_for_operand): Fix calls to vect_init_vector.
	(get_initial_def_for_reduction): Likewise.
	(vect_create_epilog_for_reduction): Change type of MODIFY_EXPR to
	void_type_node.
	(vectorizable_assignment, vect_permute_store_chain): Likewise.
	(vectorizable_store): Fix call to vect_create_data_ref_ptr. Use the
	correct type in stmt creation.
	(vect_setup_realignment): Use the correct type in stmt creation.
	(vect_permute_load_chain): Change type of MODIFY_EXPR to
	void_type_node.
	(vectorizable_load): Fix calls to vect_create_data_ref_ptr. Change type
	of MODIFY_EXPR to void_type_node.
	(vectorizable_condition): Change type of MODIFY_EXPR to
	void_type_node.
	(vect_update_ivs_after_vectorizer): Use the correct type in stmt
	creation.

From-SVN: r119247
2006-11-27 08:10:23 +00:00
Uros Bizjak ce7d4645bb revert: i386.c (ix86_rtx_costs): For standard 80387 constants...
Revert:
        2006-05-08  Uros Bizjak  <uros@kss-loka.si>
        * config/i386/i386.c (ix86_rtx_costs) [FLOAT_EXTEND]: For
        standard 80387 constants, raise the cost to prevent
        compress_float_constant() to generate load from memory.

        * config/i386/i386.md: Add new splitter pattern to split
        float_extended load of constant from constant pool into
        pure constant load.

From-SVN: r119246
2006-11-27 09:03:45 +01:00
Kaveh Ghazi f019376cf5 Checkin ChangeLogs from previous checkin.
* configure.in (--with-mpfr-dir, --with-gmp-dir): Remove flags.
        (--with-mpfr-include, --with-mpfr-lib, --with-gmp-include,
        --with-gmp-lib): New flags.

        * configure: Regenerate.

gcc:
        * doc/install.texi: Move GMP/MPFR configure options from Fortran
        section to general section.  Remove documentation for
        --with-mpfr-dir and --with-gmp-dir, add documentation for
        --with-mpfr-include, --with-mpfr-lib, --with-gmp-include and
        --with-gmp-lib.

From-SVN: r119240
2006-11-27 00:23:24 +00:00
Eric Botcazou ba4ac68280 Fix oversight.
From-SVN: r119228
2006-11-26 18:27:19 +00:00
Kaveh R. Ghazi a8e3bad42b builtins.c (fold_builtin_fmin_fmax): Handle NaN arguments.
* builtins.c (fold_builtin_fmin_fmax): Handle NaN arguments.

testsuite:
	* gcc.dg/torture/builtin-minmax-1.c: Test NaN in fmin/fmax.
	Don't ever inline the testcase.

From-SVN: r119224
2006-11-26 14:35:54 +00:00
Razya Ladelsky 9dedcfe16a ipa-6.c: New.
2006-11-26  Razya Ladklesky  <razya@il.ibm.com>

        * testsuite/gcc.dg/ipa/ipa-6.c: New.

From-SVN: r119222
2006-11-26 10:29:28 +00:00
Razya Ladelsky 95c8e17296 re PR tree-optimization/29122 (ICE with -ipa-cp and -m64 (tail calls))
2006-11-26  Razya Ladklesky  <razya@il.ibm.com>

        PR tree-optimization/29122
        * tree-inline.c (tree_function_versioning): Update DECL_ASSEMBLER_NAME
        for the new version.  Assign NULL to DECL_RTL of the new version.

From-SVN: r119220
2006-11-26 10:00:18 +00:00
Uros Bizjak 56d8eb6260 reg-stack.c (get_true_reg): Fix UNSPEC_TRUNC_NOOP handling.
* reg-stack.c (get_true_reg): Fix UNSPEC_TRUNC_NOOP handling.

From-SVN: r119210
2006-11-25 22:40:53 +01:00
Steven Bosscher 0129d079d0 cse.c (cse_altered): Remove.
* cse.c (cse_altered): Remove.
	(record_jump_equiv): Make true/false argument a bool instead
	of an int.
	(cse_insn): Don't set cse_altered.  Use delete_insn_and_edges
	where appropriate.  Emit a new jump before the existing one
	instead of after so that delete_insn_and_edges removes the
	dead edges properly.  Check any_condjump_p before calling
	record_jump_equiv.
	(cse_basic_block): Check any_condjump_p before calling
	record_jump_equiv.
	(cse_main): Don't set/check cse_altered.  Remove USE_C_ALLOCA.

From-SVN: r119209
2006-11-25 21:23:27 +00:00
Brooks Moses bbe7da4a15 c.opt: Remove -ffixed-form, -ffixed-line-length-none, and -ffixed-line-length-* options.
* c.opt: Remove -ffixed-form, -ffixed-line-length-none, and
-ffixed-line-length-* options.

From-SVN: r119206
2006-11-25 11:15:29 -08:00
Uros Bizjak 786f159e27 config/i386/i386.md (fpremxf4): Rename to fpremxf4_i387.
(fprem1xf4): Rename to fprem1xf4_i387.

        (fmodsf3, fmoddf3): Macroize patterns using X87MODEF12 mode macro.
        Rename patterns to fmod<mode>3.  Use general_operand operand
        constraint for operands 1 and 2.  Use SSE_FLOAT_MODE_P to disable
        patterns for SSE math.
        (remaindersf3, remainderdf3): Ditto.

From-SVN: r119199
2006-11-25 16:05:53 +01:00
Joseph Myers 6ba1bd3699 function.c (instantiate_virtual_regs_in_insn): Call force_reg inside start_sequence / end_sequence pair.
* function.c (instantiate_virtual_regs_in_insn): Call force_reg
	inside start_sequence / end_sequence pair.

From-SVN: r119192
2006-11-25 13:21:43 +00:00
Steven Bosscher 05549c9604 jump.c (mark_all_labels): Work in cfglayout mode.
* jump.c (mark_all_labels): Work in cfglayout mode.
	* cfgcleanup.c (cleanup_cfg): Do not call delete_dead_jumptables
	when in cfglayout mode, because there are no dead jumptables
	visible.
	* cfgrtl.c (commit_one_edge_insertion): Don't set bb->aux when
	in cfglayout mode.
	(commit_edge_insertions): Do not allow insertion of instructions
	with control flow insns when in cfglayout mode.

From-SVN: r119191
2006-11-25 10:53:06 +00:00
Zdenek Dvorak d73be2683d tree-vrp.c (execute_vrp): Do not pass loops structure through arguments.
* tree-vrp.c (execute_vrp): Do not pass loops structure through
	arguments.
	* loop-unswitch.c (unswitch_loops, unswitch_single_loop,
	unswitch_loop): Ditto.
	* tree-loop-linear.c (linear_transform_loops): Ditto.
	* tree-ssa-loop-im.c (determine_lsm, tree_ssa_lim_initialize,
	tree_ssa_lim): Ditto.
	* tree-ssa-loop-niter.c (estimate_numbers_of_iterations,
	free_numbers_of_iterations_estimates): Ditto.
	* tree-ssa-loop-unswitch.c (tree_ssa_unswitch_loops,
	tree_unswitch_single_loop, tree_unswitch_loop): Ditto.
	* cfgloopmanip.c (fix_bb_placement, fix_bb_placements,
	remove_path, add_loop, loopify, unloop, fix_loop_placements,
	place_new_loop, duplicate_loop, duplicate_subloops,
	update_single_exit_for_duplicated_loops, copy_loops_to,
	duplicate_loop_to_header_edge, create_preheaders,
	force_single_succ_latches, loop_version, fix_loop_structure):
	Ditto.
	* tree-ssa-loop-manip.c (tree_duplicate_loop_to_header_edge,
	tree_unroll_loop): Ditto.
	* tree-ssa-loop-ch.c (copy_loop_headers): Ditto.
	* tree-scalar-evolution.c (select_loops_exit_conditions,
	scev_initialize, scev_analysis): Ditto.
	* tree-scalar-evolution.h (scev_initialize): Ditto.
	* cfghooks.c (cfg_hook_duplicate_loop_to_header_edge): Ditto.
	* cfgloopanal.c (mark_irreducible_loops, mark_loop_exit_edges): Ditto.
	* tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize): Ditto.
	* modulo-sched.c (sms_schedule): Ditto.
	* tree-ssa-dom.c (tree_ssa_dominator_optimize): Ditto.
	* loop-init.c (loop_optimizer_init, rtl_move_loop_invariants,
	rtl_unswitch, rtl_unroll_and_peel_loops, rtl_doloop): Ditto.
	* ifcvt.c (if_convert): Ditto.
	* tree-ssa-loop-ivcanon.c (try_unroll_loop_completely,
	canonicalize_loop_induction_variables,
	canonicalize_induction_variables,
	tree_unroll_loops_completely, remove_empty_loops): Ditto.
	* tree-ssa-loop.c (tree_ssa_loop_init, tree_ssa_loop_im,
	tree_ssa_loop_unswitch, tree_vectorize, tree_linear_transform,
	tree_ssa_loop_ivcanon, tree_ssa_empty_loop, tree_ssa_loop_bounds,
	tree_complete_unroll, tree_ssa_loop_prefetch, tree_ssa_loop_ivopts,
	tree_ssa_loop_done): Ditto.
	* predict.c (predict_loops, tree_estimate_probability, estimate_loops,
	estimate_bb_frequencies): Ditto.
	* tree-vectorizer.c (slpeel_tree_duplicate_loop_to_edge_cfg,
	slpeel_tree_peel_loop_to_edge, vectorize_loops): Ditto.
	* loop-unroll.c (unroll_and_peel_loops, peel_loops_completely,
	decide_unrolling_and_peeling, peel_loop_completely,
	unroll_loop_constant_iterations, unroll_loop_runtime_iterations,
	peel_loop_simple, unroll_loop_stupid): Ditto.
	* loop-doloop.c (doloop_optimize_loops): Ditto.
	* tree-cfgcleanup.c (cleanup_tree_cfg_loop): Ditto.
	* loop-invariant.c (move_loop_invariants): Ditto.
	* tree-ssa-dce.c (tree_ssa_dce_loop): Ditto.
	* tree-ssa-loop-prefetch.c (loop_prefetch_arrays,
	tree_ssa_prefetch_arrays): Ditto.
	* lambda-code.c (gcc_loopnest_to_lambda_loopnest, perfect_nestify):
	Ditto.
	* tree-vect-transform.c (vect_do_peeling_for_loop_bound,
	vect_do_peeling_for_alignment, vect_transform_loop): Ditto.
	* cfgloop.c (flow_loops_cfg_dump, flow_loops_dump,
	mark_single_exit_loops, cancel_loop, cancel_loop_tree,
	verify_loop_structure): Ditto.
	* tree-flow.h (vectorize_loops, tree_ssa_lim, tree_ssa_unswitch_loops,
	canonicalize_induction_variables, tree_unroll_loops_completely,
	tree_ssa_prefetch_arrays, remove_empty_loops, tree_ssa_iv_optimize,
	estimate_numbers_of_iterations, free_numbers_of_iterations_estimates,
	tree_duplicate_loop_to_header_edge, tree_ssa_loop_version,
	tree_unroll_loop, linear_transform_loops): Declaration changed.
	* basic-block.h: Remove declaration of struct loops.
	* cfghooks.h (struct cfg_hooks): Change type of
	cfg_hook_duplicate_loop_to_header_edge.
	(cfg_hook_duplicate_loop_to_header_edge): Declaration changed.
	* tree-vectorizer.h (slpeel_tree_peel_loop_to_edge,
	vect_transform_loop): Declaration changed.
	* lambda.h (gcc_loopnest_to_lambda_loopnest): Declaration changed.
	* cfgloop.h (flow_loops_dump, fix_loop_structure,
	mark_irreducible_loops, mark_single_exit_loops, mark_loop_exit_edges,
	cancel_loop_tree, create_preheaders, force_single_succ_latches,
	verify_loop_structure, duplicate_loop, duplicate_loop_to_header_edge,
	loopify, loop_version, remove_path, unswitch_loops,
	unroll_and_peel_loops, doloop_optimize_loops, move_loop_invariants):
	Declaration changed.

From-SVN: r119189
2006-11-25 10:34:13 +00:00
Uros Bizjak 013021041a config/i386/i386.md (UNSPEC_TRUNC_NOOP): New unspec definition.
(X87MODEF): New mode macro.
        (ssemodefsuffix): New mode attribute.
        (truncxf<mode>2_i387_noop_unspec): New insn pattern.
        (sqrt_extend<mode>xf2_i387): New insn pattern.
        (sqrt<mode>2): For non-SSE sqrt, emit sqrt_extend<mode>xf2_i387
        insn and truncate result back to original mode using
        UNSPEC_TRUNC_NOOP truncation.
        (*sqrt<mode>2_sse): Implement using SSEMODEF mode macro and
        ssemodefsuffix mode attribute.
        (*sqrtsf2_mixed, *sqrtsf2_i387, *sqrtdf2_mixed, *sqrtdf2_i387)
        (*sqrtextendsfdf2_i387, *sqrtextendsfxf2_i387)
        (*sqrtextenddfxf2_i387): Remove insn patterns.

        (fmodsf3, fmoddf3, remaindersf3, remainderdf3): Use noop
        truncation patterns.

        reg-stack.c (get_true_reg): Handle UNSPEC_TRUNC_NOOP.

From-SVN: r119188
2006-11-25 10:17:57 +01:00
Jakub Jelinek 5c386a95ee re PR c/29955 (ICE with -fopenmp -fexceptions)
PR c/29955
	* c-tree.h (c_maybe_initialize_eh): New prototype.
	* c-decl.c (finish_decl): Move EH initialization...
	(c_maybe_initialize_eh): ... here.  New function.
	* c-parser.c (c_parser_omp_construct): Call c_maybe_initialize_eh
	if not #pragma omp atomic.

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

From-SVN: r119168
2006-11-24 22:28:38 +01:00
Jakub Jelinek 238564598b re PR c/29736 (ICE on duplicate vector attribute)
PR c/29736
	* c-common.c (handle_vector_size_attribute): Disallow VECTOR_TYPE
	or UNION_TYPE inner types.

	* gcc.dg/pr29736.c: New test.

From-SVN: r119165
2006-11-24 22:23:23 +01:00
Andrew Pinski 13335ae664 re PR tree-optimization/29964 (function with volatile operators still found to be pure)
2006-11-24  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        PR tree-opt/29964
        * ipa-pure-const.c (check_tree): If the original tree
        is volatile return early and say the function is not pure
        nor const.  Remove the volatile check for writes.
        (analyze_function): Print out the result of the local
        analysis pass.

2006-11-24  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        PR tree-opt/29964
        * gcc.dg/pure-1.c: New test.

From-SVN: r119162
2006-11-24 10:32:14 -08:00
Joseph Myers db2675d3c0 eabispe.h (TARGET_DEFAULT): Include MASK_STRICT_ALIGN.
* config/rs6000/eabispe.h (TARGET_DEFAULT): Include
	MASK_STRICT_ALIGN.
	* config/rs6000/linuxspe.h (TARGET_DEFAULT): Likewise.
	* config/rs6000/rs6000.c (rs6000_override_options): Use
	MASK_STRICT_ALIGN for 8540 and 8548.  Add MASK_STRICT_ALIGN to
	POWERPC_MASKS.

From-SVN: r119156
2006-11-24 16:25:25 +00:00
Andreas Krebbel 8bb501bb10 s390.c (s390_emit_compare_and_swap): New function.
2006-11-24  Andreas Krebbel  <krebbel1@de.ibm.com>

	* config/s390.c (s390_emit_compare_and_swap): New function.
	(s390_expand_cs_hqi, s390_expand_atomic): Call 
	s390_emit_compare_and_swap.

2006-11-24  Andreas Krebbel  <krebbel1@de.ibm.com>

	* gcc.dg/20061124-1.c: New testcase.

From-SVN: r119151
2006-11-24 13:30:59 +00:00
John David Anglin af1e323e93 pa.c (return_addr_rtx): Change 0xe0400002 to -532676606.
* pa.c (return_addr_rtx): Change 0xe0400002 to -532676606.

From-SVN: r119145
2006-11-24 04:30:57 +00:00
Manuel López-Ibáñez 422c3a54ea re PR c/2707 (gcc does not warn on truncate)
2006-11-24  Manuel Lopez-Ibanez <manu@gcc.gnu.org>

	PR c/2707
	PR c++/26167
	* c-common.c (conversion_warning): New.
	(convert_and_check): Call conversion_warning unless there is an
	overflow warning.
	* doc/invoke.texi (-Wconversion): Update description.

testsuite/

	* gcc.dg/Wconversion-integer.c: New. Supersedes	
	Wconversion-negative-constants.c 
	* gcc.dg/Wconversion-real.c: New.
	* gcc.dg/Wconversion-real-integer.c: New.
	* gcc.dg/Wconversion-negative-constants.c: Deleted.
	* g++.dg/warn/Wconversion1.C: Modified.

From-SVN: r119143
2006-11-24 01:50:33 +00:00
Daniel Berlin 2941f691d9 tree-ssa-alias.c (tree_pointer_compare): New function.
2006-11-23  Daniel Berlin  <dberlin@dberlin.org>

	* tree-ssa-alias.c (tree_pointer_compare): New function.
	(compact_name_tags): New function.
	(group_aliases): Call compact_name_tags.

From-SVN: r119142
2006-11-24 01:26:26 +00:00
Manuel López-Ibáñez 313f234ba1 real.h (real_isinteger): Declare.
2006-11-23  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>

	* real.h (real_isinteger): Declare.
	* real.c (real_isinteger): Define.
	* builtins.c (integer_valued_real_p): Use it.

From-SVN: r119130
2006-11-23 18:49:22 +00:00
Manuel López-Ibáñez 05170031ab re PR c/9072 (-Wconversion should be split into two distinct flags)
2006-11-23  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>

	PR c/9072 
	* c.opt (Wtraditional-conversion): New.
	(Wconversion): Update description.
	* c-typeck.c (convert_arguments): Warnings for prototypes causing
	type conversions different from what would happen in the absence
	of prototype are now handled by Wtraditional-conversion.
	* doc/invoke.texi (Wtraditional-conversion): New.
	(Wconversion): Update description.
	* doc/trouble.texi (Wconversion): Replace Wconversion by
	Wtraditional-conversion.

testsuite/

	PR c/9072 
	* gcc.dg/builtin-protos-1.c: Replace Wconversion by
	Wtraditional-conversion.
	* gcc.dg/overflow-warn-2.c: Likewise.
	* gcc.dg/Wconversion.c: Likewise. Renamed as
	Wtraditional-conversion.c .
	* gcc.dg/Wconversion-2.c: Likewise. Renamed as
	Wtraditional-conversion-2.c .
	* gcc.dg/dfp/Wconversion-2.c: Likewise. Renamed as
	Wtraditional-conversion-2.c 
	* gcc.dg/Wconversion-negative-constants.c: New.

From-SVN: r119129
2006-11-23 18:39:32 +00:00
Andrew Pinski 61968738d5 predict.c (tree_estimate_probability): Check to make sure current_loops is non null before calling flow_loops_dump.
2006-11-23  Andrew Pinski  <pinskia@gmail.com>

        * predict.c (tree_estimate_probability): Check to make
        sure current_loops is non null before calling flow_loops_dump.
2006-11-23  Andrew Pinski  <pinskia@gmail.com>

        * gcc.dg/tree-ssa/dump-1.c: New test.

From-SVN: r119128
2006-11-23 09:59:53 -08:00
Bernd Schmidt b33614eef2 var-tracking.c (emit_note_insn_var_location): Revert previous patch.
* var-tracking.c (emit_note_insn_var_location): Revert previous patch.

From-SVN: r119127
2006-11-23 17:50:52 +00:00
David Ung 6f42806295 mips.h (ISA_HAS_FP4): Add MIPS32R2 + 64bit fpu combination.
gcc:
	* config/mips/mips.h (ISA_HAS_FP4): Add MIPS32R2 + 64bit fpu
	combination.
	(ISA_HAS_MXHC1): True if ISA supports mfhc1 and mthc1 opcodes.
	(ASM_SPEC): Pass along -mfp32 and -mfp64.
	* config/mips/mips.c (mips_split_64bit_move): Use gen_mthc1 to set
	high part of FP register when in 64-bit FP register mode.  Similarly
	use gen_mfhc1 to load high part of FP register.
	(override_options): Allow -mgp32 and -mfp64 combination if
	ISA_HAS_MXHC1 (currently for O32 only).
	(mips_cannot_change_mode_class): If floating-point registers are
	bigger than word size. disallow conversion of float register from a
	large integer mode to a float mode smaller than the float register
	size.
	(mips_class_max_nregs): Handle float registers case seperately.
	* config/mips/mips.md (define_constants): Add UNSPEC_MFHC1,
	UNSPEC_MTHC1.
	(movdi_32bit): Use !TARGET_FLOAT64 in condition pattern.
	(movdf_hardfloat_32bit): Similarly.
	(movdi_gp32_fp64): New DImode pattern for MIPS32R2 which optionally
	support a full 64-bit fpu.
	(mthc1): New pattern to generate MTHC1 instruction.
	(mfhc1): New pattern to generate MFHC1 instruction.
	* doc/invoke.texi (MIPS Options): Document the -mgp32 -mfp64
	option for the MIPS32R2 and mention its use under O32 ABI.

gcc/testsuite:
	* gcc.target/mips/mips.exp (dg-mips-options): Handle parsing of
	-mfp64, allowable when ISA >= 33 and float is enabled.
	* gcc.target/mips/mips32r2-mxhc1.c: New test for checking the use
	of mthc1 and mfhc1 patterns.

From-SVN: r119124
2006-11-23 16:13:46 +00:00
Bernd Schmidt 49bcb41649 var-tracking.c (emit_note_insn_var_location): Take care not to cause verify_flow_info failures.
* var-tracking.c (emit_note_insn_var_location): Take care not to
	cause verify_flow_info failures.

From-SVN: r119116
2006-11-23 12:53:15 +00:00
Daniel Berlin 57250223c0 tree-ssa-structalias.c: Remove edge weights in favor of just processing them as complex constraints.
2006-11-22  Daniel Berlin  <dberlin@dberlin.org>

	* tree-ssa-structalias.c: Remove edge weights in favor of just
	processing them as complex constraints.
	(struct constraint_graph): Remove weighted succs and preds. Rename
	nonweighted succs and preds.
	(constraint_edge): Removed.
	(constraint_edge_t): Ditto.
	(constraint_edge_pool): Ditto.
	(new_constraint_edge): Ditto.
	(constraint_edge_equal): Ditto.
	(constraint_edge_less): Ditto.
	(constraint_edge_vec_find): Ditto.
	(erase_self_graph_edge): Ditto.
	(add_graph_edge): Removed.
	(get_graph_weights): Ditto.
	(allocate_graph_weights): Ditto.	(
	(valid_weighted_graph_edge): Ditto
	(bitmap_other_than_zero_bit_set): Ditto.
	(int_add_graph_edge): Renamed to add_graph_edge.
	(clear_edges_for_node): Remove support for weighted edges.
	(merge_graph_nodes): Ditto.
	(valid_graph_edge): Ditto.
	(build_constraint_graph): Ditto.
	(scc_visit): Ditto.
	(collapse_nodes): Ditto.
	(process_unification_queue): Ditto.
	(topo_visit): Ditto.
	(do_ds_constraint): Ditto.
	(perform_var_subsitution): Ditto.
	(solve_graph): Ditto.
	(init_alias_vars): Ditto.
	(delete_points_to_sets): Ditto.
	(do_complex_constraint): Support offsetted copies here.

From-SVN: r119114
2006-11-23 03:37:56 +00:00
Ben Elliston dc6ba965fe spu_intrinsics.h (SPU_RdEventStatMask): Rename to SPU_RdEventMask.
* config/spu/spu_intrinsics.h (SPU_RdEventStatMask): Rename to
	SPU_RdEventMask.
	* config/spu/spu_mfcio.h (spu_read_event_mask): Update.

From-SVN: r119111
2006-11-23 12:58:15 +11:00
Ben Elliston a991f101ae spu_mfcio.h (struct mfc_list_element): Change width of size bitfield.
* config/spu/spu_mfcio.h (struct mfc_list_element): Change width
	of size bitfield.

From-SVN: r119110
2006-11-23 12:23:42 +11:00
Ben Elliston 6db20516db * config/spu/spu-elf.h (LIB_SPEC): Do not link with -lc_p.
From-SVN: r119103
2006-11-23 10:46:27 +11:00
Zdenek Dvorak 0446c9f3a7 re PR tree-optimization/29921 (internal compiler error: in set_lattice_value, at tree-ssa-ccp.c:437)
PR tree-optimization/29921
	* fold-const.c (operand_equal_p): Without HONOR_SIGNED_ZEROS, consider
	signed and unsigned zero equal.

	* gcc.dg/pr29921.c: New test.

From-SVN: r119102
2006-11-22 23:11:15 +00:00
Peter Bergner e3a0e20064 rs6000.c (get_store_dest): New.
* config/rs6000/rs6000.c (get_store_dest): New.
	(adjacent_mem_locations): Use get_store_dest() to get
	the rtl of the store destination.

From-SVN: r119099
2006-11-22 13:06:41 -06:00
Joseph Myers 61c7623949 spe.md (SPE64): New mode macro.
* config/rs6000/spe.md (SPE64): New mode macro.
	(mov_sidf_e500_subreg0): Change to mov_si<mode>_e500_subreg0.  Add
	memory load.
	(mov_si<mode>_e500_subreg0_2): New.
	(mov_sidf_e500_subreg4): Change to mov_si<mode>_e500_subreg4.  Add
	memory load.
	(mov_si<mode>_e500_subreg4_2): New.
	* config/rs6000/predicates.md (input_operand): Do not allow
	invalid E500 subregs.
	(rs6000_nonimmediate_operand): Check for invalid E500 subregs also
	if TARGET_SPE.
	* config/rs6000/rs6000.c (invalid_e500_subreg): Check for subregs
	involving DFmode if TARGET_E500_DOUBLE.  Check for subregs
	involving vector modes if TARGET_SPE.

From-SVN: r119094
2006-11-22 16:41:29 +00:00
Kaz Kojima 7c21975d47 revert: reorg.c (emit_delay_sequence): Copy the delay slot insn.
Revert
	2006-11-12  Kaz Kojima  <kkojima@gcc.gnu.org>
	* reorg.c (emit_delay_sequence): Copy the delay slot insn.

From-SVN: r119093
2006-11-22 15:29:02 +00:00
Bernd Schmidt 36662eb11d predicates.md (d_register_operand, [...]): New predicates.
* config/bfin/predicates.md (d_register_operand, mem_p_address_operand,
	mem_i_address_operand): New predicates.
	* config/bfin/bfin.c (bfin_issue_rate): New function.
	(TARGET_SCHED_ISSUE_RATE): New macro.
	* config/bfin/bfin.md (addrtype): New attribute.
	(slot0, slot1, slot2, store, pregs): New cpu_units.
	(core): Now a define_reservation.
	(alu): Remove some insn types from this reservation.
	(dsp32, load32, loadp, loadi, store32, storep, storei, multi): New
	insn reservations.
	(dummy reservation): Don't trigger for mcld insns.
	(absence_sets): Two new absence sets to enforce slot ordering.
	(popsi_insn): Set addrtype.

From-SVN: r119090
2006-11-22 14:12:46 +00:00
Ira Rosen 98b44b0eea c-tree.texi: Document new tree codes.
* doc/c-tree.texi: Document new tree codes.
        * doc/md.texi: Document new optabs.
        * tree-pretty-print.c (dump_generic_node): Handle print of new tree
        codes.
        * optabs.c (optab_for_tree_code, init_optabs): Handle new optabs.
        * optabs.h (optab_index): Add new.
        (vec_extract_even_optab, vec_extract_odd_optab,
        vec_interleave_high_optab, vec_interleave_low_optab): New optabs.
        * genopinit.c (vec_extract_even_optab, vec_extract_odd_optab,
        vec_interleave_high_optab, vec_interleave_low_optab): Initialize
        new optabs.
        * expr.c (expand_expr_real_1): Add implementation for new tree codes.
        * tree-vectorizer.c (new_stmt_vec_info): Initialize new fields.
        * tree-vectorizer.h (stmt_vec_info): Add new fields for interleaving
        along with macros for their access.
        * tree-data-ref.h (first_location_in_loop, data_reference): Update
        comment.
        * tree-vect-analyze.c (toplev.h): Include.
        (vect_determine_vectorization_factor): Fix indentation.
        (vect_insert_into_interleaving_chain,
        vect_update_interleaving_chain, vect_equal_offsets): New functions.
        (vect_analyze_data_ref_dependence): Add argument for interleaving
        check. Check for interleaving if it's true.
        (vect_check_dependences): New function.
        (vect_analyze_data_ref_dependences): Call vect_check_dependences for
        every ddr. Call vect_analyze_data_ref_dependence with new argument.
        (vect_update_misalignment_for_peel): Update for interleaving.
        (vect_verify_datarefs_alignment): Check only first data-ref for
        interleaving.
        (vect_enhance_data_refs_alignment): Update for interleaving. Check
        only first data-ref for interleaving.
        (vect_analyze_data_ref_access): Check interleaving, update
        interleaving data.
        (vect_analyze_data_refs): Call compute_data_dependences_for_loop
        with different parameters.
        * tree.def (VEC_EXTRACT_EVEN_EXPR, VEC_EXTRACT_ODD_EXPR,
        VEC_INTERLEAVE_HIGH_EXPR, VEC_INTERLEAVE_LOW_EXPR): New tree codes.
        * tree-inline.c (estimate_num_insns_1): Add cases for new codes.
        * tree-vect-transform.c (vect_create_addr_base_for_vector_ref):
        Update step in case of interleaving.
        (vect_strided_store_supported, vect_permute_store_chain): New
        functions.
        (vectorizable_store): Handle strided stores.
        (vect_strided_load_supported, vect_permute_load_chain,
        vect_transform_strided_load): New functions.
        (vectorizable_load): Handle strided loads.
        (vect_transform_stmt): Add argument. Handle strided stores. Check
        that vectorized stmt exists for patterns.
        (vect_gen_niters_for_prolog_loop): Update calculation for
        interleaving.
        (vect_transform_loop): Remove stmt_vec_info for strided stores after
        whole chain vectorization.
        * config/rs6000/altivec.md (UNSPEC_EXTEVEN, UNSPEC_EXTODD,
        UNSPEC_INTERHI, UNSPEC_INTERLO): New constants.
        (vpkuhum_nomode, vpkuwum_nomode, vec_extract_even<mode>,
        vec_extract_odd<mode>, altivec_vmrghsf, altivec_vmrglsf,
        vec_interleave_high<mode>, vec_interleave_low<mode>): Implement.

From-SVN: r119088
2006-11-22 08:46:03 +00:00
Steven Bosscher 7dad9fb498 cse.c (enum taken): Remove PATH_AROUND.
* cse.c (enum taken): Remove PATH_AROUND.
	(addr_affects_sp_p, invalidate_skipped_set,
	invalidate_skipped_block): Remove.
	(cse_end_of_basic_block): Remove skip_blocks and related code.
	(cse_main): Don't test for flag_cse_skip_blocks.
	Update cse_end_of_basic_block call.
	(cse_basic_block): Likewise.  Remove PATH_AROUND case.  Remove
	code to lengthen the path if a jump was simplified.

From-SVN: r119079
2006-11-22 00:13:42 +00:00
Zdenek Dvorak 7d93d98774 re PR rtl-optimization/29924 (pr24626-4.c fails on powerpc-aix and others)
PR rtl-optimization/29924
	* loop-unroll.c (split_edge_and_insert): Handle the case insns is NULL.
	(unroll_loop_runtime_iterations): Assert that the argument passed to
	split_edge_and_insert is not NULL.
	* loop-doloop.c (add_test): Ditto.

From-SVN: r119078
2006-11-22 00:12:52 +00:00
Zdenek Dvorak ac8f6c6903 tree-loop-linear.c (linear_transform_loops): Use single_exit accessor functions.
* tree-loop-linear.c (linear_transform_loops): Use single_exit accessor
	functions.
	* tree-ssa-loop-niter.c (loop_only_exit_p): Ditto.
	* cfgloopmanip.c (update_single_exits_after_duplication,
	update_single_exit_for_duplicated_loop, loop_version): Ditto.
	* tree-scalar-evolution.c (get_loop_exit_condition,
	get_exit_conditions_rec, loop_closed_phi_def,
	number_of_iterations_in_loop, scev_const_prop): Ditto.
	* tree-ssa-loop-ivopts.c (single_dom_exit): Ditto.
	* modulo-sched.c (generate_prolog_epilog, loop_canon_p, sms_schedule):
	Ditto.
	* tree-ssa-loop-ivcanon.c (canonicalize_loop_induction_variables):
	Ditto.
	* tree-vectorizer.c (slpeel_update_phis_for_duplicate_loop,
	slpeel_update_phi_nodes_for_guard1, slpeel_update_phi_nodes_for_guard2,
	slpeel_make_loop_iterate_ntimes,
	slpeel_tree_duplicate_loop_to_edge_cfg, slpeel_can_duplicate_loop_p,
	slpeel_verify_cfg_after_peeling, slpeel_tree_peel_loop_to_edge):
	Ditto.
	* tree-if-conv.c (if_convertible_loop_p): Ditto.
	* tree-vect-analyze.c (vect_analyze_operations, vect_stmt_relevant_p,
	vect_analyze_loop_form): Ditto.
	* lambda-code.c (lambda_loopnest_to_gcc_loopnest, exit_phi_for_loop_p,
	can_convert_to_perfect_nest, perfect_nestify): Ditto.
	* tree-vect-transform.c (vect_create_epilog_for_reduction,
	vect_update_ivs_after_vectorizer, vect_do_peeling_for_loop_bound,
	vect_transform_loop): Ditto.
	* cfgloop.c (mark_single_exit_loops, verify_loop_structure): Ditto.
	(single_exit, set_single_exit): New functions.
	* cfgloop.h (struct loop): Rename single_exit field to single_exit_.
	(single_exit, set_single_exit): Declare.
	* doc/loop.texi: Undocument single_exit field.  Document single_exit
	accessor function.

From-SVN: r119075
2006-11-21 23:54:16 +00:00
Zdenek Dvorak bf8dbe3863 re PR tree-optimization/29902 (ICE in coalesce_abnormal_edges, at tree-outof-ssa.c:644)
PR tree-optimization/29902
	* tree-ssa-loop-manip.c (can_unroll_loop_p): Return false if
	any involved ssa name appears in abnormal phi node.

	* g++.dg/tree-ssa/pr29902.C: New test.

From-SVN: r119074
2006-11-21 23:45:21 +00:00
Bob Wilson 887af464cd xtensa.c (xtensa_char_to_class): Delete.
* config/xtensa/xtensa.c (xtensa_char_to_class): Delete.
	(xtensa_const_ok_for_letter_p): Delete.
	(xtensa_extra_constraint): Delete.
	(override_options): Delete xtensa_char_to_class initialization.
	* config/xtensa/xtensa.h (REG_CLASS_FROM_LETTER): Delete.
	(CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P): Delete.
	(EXTRA_CONSTRAINT): Delete.
	* config/xtensa/xtensa.md: Include constraints.md.
	(call_internal): Combine alternatives.
	(call_value_internal): Likewise, and remove invalid constraints.
	* config/xtensa/constraints.md: New file.
	* config/xtensa/xtensa-protos.h (xtensa_const_ok_for_letter_p): Delete.
	(xtensa_extra_constraint): Delete.
	* doc/md.texi (Machine Constraints): Refer to constraints.md for
	Xtensa constraints.
--Ths line, and those below, will be ignored--

M    gcc/doc/md.texi
M    gcc/ChangeLog
M    gcc/config/xtensa/xtensa.c
M    gcc/config/xtensa/xtensa.h
M    gcc/config/xtensa/xtensa.md
A    gcc/config/xtensa/constraints.md
M    gcc/config/xtensa/xtensa-protos.h

From-SVN: r119072
2006-11-21 21:49:26 +00:00
Janis Johnson cab82f5c37 dfp-bits.c (DFP_TO_INT): Remove code to saturate result of conversion that doesn't fit.
* config/dfp-bits.c (DFP_TO_INT): Remove code to saturate result
 	of conversion that doesn't fit.

From-SVN: r119069
2006-11-21 20:40:26 +00:00
Janis Johnson d44963af3c decLibrary.c (__dec_type_swap): Add prototype.
decnumber/
	* decLibrary.c (__dec_type_swap): Add prototype.
	(__dfp_enable_traps, dfp_raise): Delete.
gcc/
	* config/dfp-bit.h (CONTEXT_TRAPS, CONTEXT_ERRORS, DFP_RAISE): Delete.
	* config/dfp-bit.c (dfp_unary_op, dfp_binary_op, dfp_compare_op,
	DFP_TO_DFP, INT_TO_DFP, BFP_TO_DFP): Remove calls to DFP_RAISE.
testsuite/
	* gcc.dg/dfp/snan.c: Delete.

From-SVN: r119068
2006-11-21 20:35:57 +00:00
Janis Johnson 0e07f2003e * config/dfp-bit.c (dfp_binary_func): Fix typedef.
From-SVN: r119067
2006-11-21 20:28:27 +00:00
Douglas Gregor 218f00156c c-common.h (enum rid): Add RID_STATIC_ASSERT.
2006-11-21      Douglas Gregor <doug.gregor@gmail.com>

        * c-common.h (enum rid): Add RID_STATIC_ASSERT.

From-SVN: r119065
2006-11-21 20:22:30 +00:00
Richard Guenther 0b2229b0b0 tree-vectorizer.h (NUM_PATTERNS): Increase.
2006-11-21  Richard Guenther  <rguenther@suse.de>

	* tree-vectorizer.h (NUM_PATTERNS): Increase.
	* tree-vect-patterns.c (vect_vect_recog_func_ptrs): Add
	vect_recog_pow_pattern.
	(vect_recog_pow_pattern): New function.

	* gcc.dg/vect/vect-pow-1.c: New testcase.
	* gcc.dg/vect/vect-pow-2.c: Likewise.

From-SVN: r119056
2006-11-21 14:29:53 +00:00
Bernd Schmidt 84e32cbb1f bfin.c (hard_regno_mode_ok): Only allow first 31 regs for DImode.
* config/bfin/bfin.c (hard_regno_mode_ok): Only allow first 31
	regs for DImode.
	(bfin_register_move_cost): Bump costs if trying to move plain
	integer values through accumulators.

From-SVN: r119055
2006-11-21 12:07:39 +00:00
Bernd Schmidt d6eb07dc7c bfin.opt (mstack-check-l1): New.
* config/bfin/bfin.opt (mstack-check-l1): New.
	* doc/invoke.texi (Blackfin Options): Document it.
	* config/bfin/bfin.c (bfin_expand_prologue): Generate code to use
	stack bounds in L1 memory if the new option is enabled.
	(override_options): Don't allow combinations of -fstack-limit and
	-mstack-check-l1.
	(add_to_reg): Renamed from add_to_sp.  All callers changed.  Lose some
	dead code.

From-SVN: r119049
2006-11-21 10:07:38 +00:00
Ben Elliston b509487e88 * config/spu/spu.c (spu_expand_vector_init): Initialise x.
From-SVN: r119043
2006-11-21 14:30:34 +11:00
Ben Elliston 83cc06b2b8 Formatting fixes.
From-SVN: r119042
2006-11-21 13:22:40 +11:00
Trevor Smigiel 85d9c13c20 configure.in (skipdirs): Don't build target-libiberty for SPU.
ChangeLog

	* configure.in (skipdirs) : Don't build target-libiberty for SPU.
	* configure : Rebuilt.

gcc/ChangeLog

	* config.gcc : Add target for SPU.
	* config/spu/constraints.md : New file.
	* config/spu/crt0.c : New file.
	* config/spu/crtend.c : New file.
	* config/spu/crti.asm : New file.
	* config/spu/crtn.asm : New file.
	* config/spu/float_unsdidf.c : New file.
	* config/spu/float_unssidf.c : New file.
	* config/spu/predicates.md : New file.
	* config/spu/spu-builtins.def : New file.
	* config/spu/spu-builtins.h : New file.
	* config/spu/spu-builtins.md : New file.
	* config/spu/spu-c.c : New file.
	* config/spu/spu-elf.h : New file.
	* config/spu/spu-modes.def : New file.
	* config/spu/spu-protos.h : New file.
	* config/spu/spu.c : New file.
	* config/spu/spu.h : New file.
	* config/spu/spu.md : New file.
	* config/spu/spu.opt : New file.
	* config/spu/spu_internals.h : New file.
	* config/spu/spu_intrinsics.h : New file.
	* config/spu/spu_mfcio.h : New file.
	* config/spu/t-spu-elf : New file.
	* config/spu/vec_types.h : New file.
	* config/spu/vmx2spu.h : New file.
	* doc/contrib.texi : Document SPU contributor.
	* doc/extend.texi : Document SPU extensions.
	* doc/invoke.texi : Document SPU options.
	* doc/md.texi : Document SPU constraints.

libcpp/ChangeLog

	* configure.ac (need_64bit_hwint): Need 64bit hwint for SPU.
	* configure : Rebuilt.

From-SVN: r119041
2006-11-21 01:35:42 +00:00
Zdenek Dvorak 99f8a411dc cfgloopmanip.c (add_loop, [...]): Do not set level of the loop.
* cfgloopmanip.c (add_loop, duplicate_loop): Do not set level
	of the loop.
	* cfgloop.c (flow_loop_level_compute, flow_loops_level_compute):
	Removed.
	(flow_loop_dump): Do not dump loop level.
	(flow_loops_find): Do not call flow_loops_level_compute.
	* cfgloop.h (struct loop): Remove level field.

From-SVN: r119040
2006-11-21 01:08:40 +00:00
Zdenek Dvorak ca83d38556 tree-ssa-loop-im.c (schedule_sm, [...]): Use vector of edges instead of array.
* tree-ssa-loop-im.c (schedule_sm, determine_lsm_ref,
	hoist_memory_references, loop_suitable_for_sm, determine_lsm_loop):
	Use vector of edges instead of array.
	* tree-ssa-loop-niter.c (find_loop_niter, find_loop_niter_by_eval,
	estimate_numbers_of_iterations_loop): Ditto.
	* predict.c (predict_loops): Ditto.
	* loop-unroll.c (analyze_insns_in_loop): Ditto.
	* tree-ssa-threadupdate.c: Remove declaration of heap allocation for
	edge vectors.
	* basic-block.h: Declare heap allocation for edge vectors.
	* tree-outof-ssa.c: Ditto.
	* cfgloop.c (get_loop_exit_edges): Return vector of edges.
	* cfgloop.h (get_loop_exit_edges): Declaration changed.

From-SVN: r119039
2006-11-21 00:20:02 +00:00
Zack Weinberg 5932ca9d11 gengtype.c (process_gc_options): Remove unnecessary forward decl.
* gengtype.c (process_gc_options): Remove unnecessary forward decl.
	Add another out parameter, "skip".
	(set_gc_used_type): Adjust calls to process_gc_options.  If a field
	is tagged "skip", do not mark its type used.

From-SVN: r119034
2006-11-21 00:16:45 +00:00
Andrew Pinski 903ff2758b re PR target/25500 (SSE2 vectorized code is slower on 4.x.x than previous)
2006-11-20  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        PR tree-opt/25500
        * tree-sra.c (single_scalar_field_in_record_p): New function.
        (decide_block_copy): Use it.

2006-11-20  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        PR tree-opt/25500
        * gcc.dg/tree-ssa/sra-4.c: New testcase.

From-SVN: r119026
2006-11-20 12:29:10 -08:00
David Daney 9e08816049 mips-signal.h (sys/syscall.h): Do not include.
2006-11-20  David Daney  <ddaney@avtrex.com>

	* include/mips-signal.h (sys/syscall.h): Do not include.
	(sig_ucontext_t): Removed.
	(MAKE_THROW_FRAME): Changed to be a nop.
	(_INIT_SIG_HANDLER): New macro.
	(INIT_SEGV): Rewrote to use _INIT_SIG_HANDLER.
	(INIT_FPE): Same.

2006-11-20  David Daney  <ddaney@avtrex.com>

	* config/mips/linux-unwind.h (mips_fallback_frame_state): Adjust
	PC to point to following instruction.

From-SVN: r119024
2006-11-20 19:49:08 +00:00
Anatoly Sokolov d5b1188567 re PR target/18553 (Annoying warning with -ffunction-sections -g)
PR target/18553
	PR target/29449
	* config/avr/avr.h (OBJECT_FORMAT_ELF): Define.

	* config/avr/avr.h (DWARF2_DEBUGGING_INFO): Define.

From-SVN: r119019
2006-11-20 21:16:21 +03:00
J"orn Rennecke 8999fdc7c2 config.gcc (sh*-superh-elf): Add t-superh to tmake_file.
* config.gcc (sh*-superh-elf): Add t-superh to tmake_file.
	Add sh/superh.h to tm_file.

From-SVN: r119018
2006-11-20 17:37:50 +00:00
Carlos O'Donell 76642aabbd cppdefault.c: Define cpp_PREFIX, cpp_PREFIX_len, and gcc_exec_prefix.
gcc/

2006-11-20  Carlos O'Donell  <carlos@codesourcery.com>
	    Mark Mitchell  <mark@codesourcery.com>

	* cppdefault.c: Define cpp_PREFIX, cpp_PREFIX_len, and 
	gcc_exec_prefix.
	(cpp_relocated): New function.
	* cppdefault.h: Declare cpp_PREFIX, cpp_PREFIX_len, gcc_exec_prefix 
	and cpp_relocated. 
	* Makefile.in (PREPROCESSOR_DEFINES): Add -DPREFIX option.
	* c-incpath.c (add_standard_paths): Call cpp_relocated. If relocated,
	replace configured prefix with gcc_exec_prefix. 


Co-Authored-By: Mark Mitchell <mark@codesourcery.com>

From-SVN: r119017
2006-11-20 17:15:27 +00:00
Bernd Schmidt b9b36edd96 tree-ssa-loop-ivopts.c (get_address_cost): Do not artificially inflate costs for addresses with an out-of-bounds address.
* tree-ssa-loop-ivopts.c (get_address_cost): Do not artificially
	inflate costs for addresses with an out-of-bounds address.

From-SVN: r119014
2006-11-20 13:06:13 +00:00
Bernd Schmidt bcbb974df4 bfin.c (bfin_function_ok_for_sibcall): Handle some edge cases with local functions and TARGET_ID_SHARED_LIBRARY.
* config/bfin/bfin.c (bfin_function_ok_for_sibcall): Handle some
	edge cases with local functions and TARGET_ID_SHARED_LIBRARY.

From-SVN: r119013
2006-11-20 12:40:57 +00:00
Bernd Schmidt 9314711904 bfin.md (call_symbol, [...]): Allow these patterns if TARGET_LEAF_ID_SHARED_LIBRARY.
* config/bfin/bfin.md (call_symbol, call_value_symbol, sibcall_symbol,
	sibcall_value_symbol): Allow these patterns if
	TARGET_LEAF_ID_SHARED_LIBRARY.
	* config/bfin/bfin.c (bfin_expand_call): Allow them here as well.
	(override_options): Turn on id shared library flags if -msep-data,
	but disallow the combination of these options on the command line.
	* config/bfin/bfin.h (TARGET_LEAF_ID_SHARED_LIBRARY, MASK_SEP_DATA
	MASK_LEAF_ID_SHARED_LIBRARY, TARGET_SEP_DATA): New macros.
	(DRIVER_SELF_SPECS): -mleaf-id-shared-library implies
	-mid-shared-library.
	(TARGET_SWITCHES): Add -mleaf-id-shared-library and -msep-data.
	* doc/invoke.texi (Blackfin Options): Document new switches.

From-SVN: r119012
2006-11-20 12:35:47 +00:00
Bernd Schmidt d6f6753efe bfin.h (LEGITIMATE_CONSTANT_P): Call bfin_legitimate_constant_p.
* config/bfin/bfin.h (LEGITIMATE_CONSTANT_P): Call
	bfin_legitimate_constant_p.
	* config/bfin/bfin.md (movsi expander): Check return value of
	expand_mvoe.
	* config/bfin/bfin-protos.h (bfin_legitimate_constant_p): Declare.
	(expand_move): Adjust prototype.
	* config/bfin/bfin.c (expand_move): Now returns bool.  Handle
	invalid constants specially.
	(bfin_cannot_force_const_mem, bfin_legitimate_constant_p): New
	functions.
	(TARGET_CANNOT_FORCE_CONST_MEM): New macro.

From-SVN: r119011
2006-11-20 12:22:25 +00:00
Andrew Pinski f81c1b60f2 re PR rtl-optimization/29879 (ICE: verify_flow_info: loop_father but no loops)
2006-11-19  Andrew Pinski  <pinskia@gmail.com>

        PR rtl-opt/29879
        * fwprop.c (loops): Remove.
        (forward_propagate_into): Use current_loops instead of
        loops.
        (fwprop_init): Call loop_optimizer_init instead of
        flow_loops_find.
        (fwprop_done): Call loop_optimizer_finalize instead of
        flow_loops_free.
        (fwprop): Use current_loops instead of loo

From-SVN: r119010
2006-11-19 20:51:47 -08:00
Gabriel Dos Reis 7f420d0d64 re PR c++/8586 (-Wwrite-strings should be included in -Wall)
2006-11-19  Gabriel Dos Reis  <gdr@integrable-solutions.net>

        PR c++/8586
        * c-opts.c (c_common_handle_option): Enable -Wwrite-strings if
        -Wall.

testsuite/
2006-11-19  Gabriel Dos Reis  <gdr@integrable-solutions.net>

        PR c++/8586
        * g++.dg/warn/Wall-write-strings.C: New.

From-SVN: r119009
2006-11-20 01:03:49 +00:00
John David Anglin 0eab781508 re PR target/29114 (ICE when cross-compiling glibc for hppa on a 64bit host)
PR target/29114
	* pa.c (emit_move_sequence): Don't split constants with PLUS for modes
	larger than BITS_PER_WORD.

From-SVN: r118993
2006-11-19 18:24:21 +00:00
John David Anglin 30f421e5a5 re PR fortran/27885 (FAIL: libgomp.fortran/vla[1-7].f90 -O0 (test for excess errors))
PR fortran/27885
	PR middle-end/28176
	* stor-layout.c (set_sizetype): Limit precision of *bitsizetypes types
	to MAX_FIXED_MODE_SIZE.

From-SVN: r118977
2006-11-18 23:17:33 +00:00
Kaveh R. Ghazi b64d949c61 builtins.c (integer_valued_real_p): Handle fmin/fmax.
* builtins.c (integer_valued_real_p): Handle fmin/fmax.
	(fold_builtin_fmin_fmax): New.
	(fold_builtin_1): Use it.

testsuite:
	* gcc.dg/builtins-20.c: Add fmin/fmax cases.
	* gcc.dg/torture/builtin-minmax-1.c: New.

From-SVN: r118976
2006-11-18 20:38:40 +00:00
Kaveh R. Ghazi 6af46feb6b fold-const.c (fold_strip_sign_ops): Handle copysign.
* fold-const.c (fold_strip_sign_ops): Handle copysign.

testsuite:
	* gcc.dg/builtins-20.c: Add cases for copysign.

From-SVN: r118975
2006-11-18 20:29:22 +00:00
Richard Guenther 4f7d854795 i386.c (ix86_builtins): New array for ix86 builtin function decls.
2006-11-18  Richard Guenther  <rguenther@suse.de>

	* config/i386/i386.c (ix86_builtins): New array for ix86
	builtin function decls.
	(def_builtin): New function.
	(def_builtin_const): Likewise.
	(ix86_init_mmx_sse_builtins): Mark sqrt and cvt builtins const.

From-SVN: r118974
2006-11-18 20:03:52 +00:00
Vladimir Makarov 05f85dbb6d invoke.texi (core2): Add item.
2006-11-18  Vladimir Makarov  <vmakarov@redhat.com>

	* doc/invoke.texi (core2): Add item.

	* config/i386/i386.h (TARGET_CORE2, TARGET_CPU_DEFAULT_core2): New
	macros.
	(TARGET_CPU_CPP_BUILTINS): Add code for core2.
	(TARGET_CPU_DEFAULT_generic): Change value.
	(TARGET_CPU_DEFAULT_NAMES): Add core2.
	(processor_type): Add new constant PROCESSOR_CORE2.

	* config/i386/i386.md (cpu): Add core2.

	* config/i386/i386.c (core2_cost): New initialized variable.
	(m_CORE2): New macro.
	(x86_use_leave, x86_push_memory, x86_movx, x86_unroll_strlen,
	x86_deep_branch, x86_partial_reg_stall, x86_use_simode_fiop,
	x86_use_cltd, x86_promote_QImode, x86_sub_esp_4, x86_sub_esp_8,
	x86_add_esp_4, x86_add_esp_8, x86_integer_DFmode_moves,
	x86_partial_reg_dependency, x86_memory_mismatch_stall,
	x86_accumulate_outgoing_args, x86_prologue_using_move,
	x86_epilogue_using_move, x86_arch_always_fancy_math_387,
	x86_sse_partial_reg_dependency, x86_rep_movl_optimal,
	x86_use_incdec, x86_four_jump_limit, x86_schedule,
	x86_pad_returns): Add m_CORE2.
	(override_options): Add entries for Core2.
	(ix86_issue_rate): Add case for Core2.

From-SVN: r118973
2006-11-18 18:43:19 +00:00
Aldy Hernandez ea57490067 invoke.texi: Fix mno-isel typo.
* doc/invoke.texi: Fix mno-isel typo.

From-SVN: r118969
2006-11-18 10:55:38 +00:00
Joseph Myers b9bb3235fe spe.md (movv4hi_internal): Add alternative for easy vector constant loads.
* config/rs6000/spe.md (movv4hi_internal): Add alternative for
	easy vector constant loads.

From-SVN: r118964
2006-11-18 00:27:03 +00:00
Joseph Myers 8609875306 rs6000.h (TARGET_NO_LWSYNC): Define.
gcc:
	* config/rs6000/rs6000.h (TARGET_NO_LWSYNC): Define.
	* config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Define
	__NO_LWSYNC__ if TARGET_NO_LWSYNC.
	* config/rs6000/sync.md (lwsync): Emit plain sync if
	TARGET_NO_LWSYNC.

libstdc++-v3:
	* config/cpu/powerpc/atomic_word.h (_GLIBCXX_WRITE_MEM_BARRIER):
	Use plain sync if __NO_LWSYNC__.

From-SVN: r118961
2006-11-18 00:22:45 +00:00
DJ Delorie d2c9375a6d reload1.c (reloads_unique_chain): New.
* reload1.c (reloads_unique_chain): New.
(reloads_conflict): Call it.

From-SVN: r118953
2006-11-17 18:15:29 -05:00
Bob Wilson 036a2b7a60 predicates.md (addsubx_operand): New.
* config/xtensa/predicates.md (addsubx_operand): New.
	* config/xtensa/xtensa.c (xtensa_emit_branch): New.
	(xtensa_emit_bit_branch): New.
	(xtensa_emit_movcc): New.
	* config/xtensa/xtensa.md (any_minmax): New code macro.
	(minmax): New code attribute.
	(any_cond, any_scc, any_scc_sf): New code macros.
	(*addx2, *addx4, *addx8): Delete.
	(*addx): New.
	(*subx2, *subx4, *subx8): Delete.
	(*subx): New.
	(sminsi3, uminsi3, smaxsi3, umaxsi3): Use any_minmax macro.
	(beq, bne, bgt, bge, blt, ble, bgtu, bgeu, bltu, bleu): Use any_cond.
	(*btrue, *bfalse, *ubtrue, *ubfalse): Use xtensa_emit_branch.
	(*bittrue, *bitfalse): Use xtensa_emit_bit_branch.
	(seq, sne, sgt, sge, slt, sle): Use any_scc macro.
	(movsicc_internal0, movsicc_internal1): Use xtensa_emit_movcc.
	(movsfcc_internal0, movsfcc_internal1): Likewise.
	(seq_sf, slt_sf, sle_sf): Use any_scc_sf macro.
	* config/xtensa/xtensa-protos.h: (xtensa_emit_branch): New.
	(xtensa_emit_bit_branch): New.
	(xtensa_emit_movcc): New.
	(function_arg_boundary): Add missing prototype.

From-SVN: r118952
2006-11-17 23:10:48 +00:00
Bob Wilson 3e98014384 * config/xtensa/xtensa.md (tstsi): Delete
From-SVN: r118949
2006-11-17 22:59:50 +00:00
Bob Wilson a81126a540 * config/xtensa/xtensa.md (entry): Do not emit .frame directive.
From-SVN: r118948
2006-11-17 22:55:13 +00:00
Bob Wilson 44a69b3186 * config/xtensa/elf.h (HANDLE_PRAGMA_PACK_PUSH_POP): Define.
From-SVN: r118947
2006-11-17 22:46:57 +00:00
Bob Wilson 05dcbf00e1 * config/xtensa/lib1funcs.asm (__umulsidi3): Restore a0 on exit.
From-SVN: r118946
2006-11-17 22:40:02 +00:00
Zdenek Dvorak 598ec7bdbe tree-vrp.c (execute_vrp): Do not update current_loops.
* tree-vrp.c (execute_vrp): Do not update current_loops.
	* loop-unswitch.c (unswitch_loop): Do not use loop_split_edge_with.
	* doc/loop.texi: Remove documentation for cancelled functions.
	* tree-ssa-loop-im.c (loop_commit_inserts): Removed.
	(move_computations, determine_lsm): Use bsi_commit_edge_inserts
	instead.
	* cfgloopmanip.c (remove_bbs): Do not update loops explicitly.
	(remove_path): Ensure that in delete_basic_blocks, the loops
	are still allocated.
	(add_loop): Work on valid loop structures.
	(loopify): Modify call of add_loop.
	(mfb_update_loops): Removed.
	(create_preheader): Do not update loops explicitly.
	(force_single_succ_latches, loop_version): Do not use
	loop_split_edge_with.
	(loop_split_edge_with): Removed.
	* tree-ssa-loop-manip.c (create_iv, determine_exit_conditions):
	Do not use bsi_insert_on_edge_immediate_loop.
	(split_loop_exit_edge, tree_unroll_loop): Do not use
	loop_split_edge_with.
	(bsi_insert_on_edge_immediate_loop): Removed.
	* tree-ssa-loop-ch.c (copy_loop_headers): Use current_loops.  Do not
	use loop_split_edge_with.
	* cfghooks.c: Include cfgloop.h.
	(verify_flow_info): Verify that loop_father is filled iff current_loops
	are available.
	(redirect_edge_and_branch_force, split_block, delete_basic_block,
	split_edge, merge_blocks, make_forwarder_block, duplicate_block):
	Update cfg.
	* cfgloopanal.c (mark_irreducible_loops): Work if the function contains
	no loops.
	* modulo-sched.c (generate_prolog_epilog, canon_loop): Do not use
	loop_split_edge_with.
	(sms_schedule): Use current_loops.
	* tree-ssa-dom.c (tree_ssa_dominator_optimize): Use current_loops.
	* loop-init.c (loop_optimizer_init, loop_optimizer_finalize): Set
	current_loops.
	(rtl_loop_init, rtl_loop_done): Do not set current_loops.
	* tree-ssa-sink.c (execute_sink_code): Use current_loops.
	* ifcvt.c (if_convert): Ditto.
	* predict.c (predict_loops): Do not clear current_loops.
	(tree_estimate_probability): Use current_loops.
	(propagate_freq): Receive head of the region to propagate instead of
	loop.
	(estimate_loops_at_level): Do not use shared to_visit bitmap.
	(estimate_loops): New function.  Handle case current_loops == NULL.
	(estimate_bb_frequencies): Do not allocate tovisit.  Use
	estimate_loops.
	* tree-ssa-loop.c (current_loops): Removed.
	(tree_loop_optimizer_init): Do not return loops.
	(tree_ssa_loop_init, tree_ssa_loop_done): Do not set current_loops.
	* tree-vectorizer.c (slpeel_update_phi_nodes_for_guard1,
	slpeel_update_phi_nodes_for_guard2, slpeel_tree_peel_loop_to_edge):
	Do not update loops explicitly.
	* function.h (struct function): Add x_current_loops field.
	(current_loops): New macro.
	* tree-if-conv.c (combine_blocks): Do not update loops explicitly.
	* loop-unroll.c (split_edge_and_insert): New function.
	(unroll_loop_runtime_iterations, analyze_insns_in_loop): Do not
	use loop_split_edge_with.
	* loop-doloop.c (add_test, doloop_modify): Ditto.
	* tree-ssa-pre.c (init_pre, fini_pre): Do not set current_loops.
	* cfglayout.c (copy_bbs): Do not update loops explicitly.
	* lambda-code.c (perfect_nestify): Do not use loop_split_edge_with.
	* tree-vect-transform.c (vect_transform_loop): Do not update loops
	explicitly.
	* cfgloop.c (flow_loops_cfg_dump): Do not dump dfs_order and rc_order.
	(flow_loops_free): Do not free dfs_order and rc_order.
	(flow_loops_find): Do not set dfs_order and rc_order in loops
	structure.  Do not call loops and flow info verification.
	(add_bb_to_loop, remove_bb_from_loops): Check whether the block
	already belongs to some loop.
	* cfgloop.h (struct loops): Remove struct cfg.
	(current_loops, loop_split_edge_with): Declaration removed.
	(loop_optimizer_init, loop_optimizer_finalize): Declaration changed.
	* tree-flow.h (loop_commit_inserts, bsi_insert_on_edge_immediate_loop):
	Declaration removed.
	* Makefile.in (cfghooks.o): Add CFGLOOP_H dependency.
	* basic-block.h (split_edge_and_insert): Declare.
	* tree-cfg.c (remove_bb): Do not update loops explicitly.

From-SVN: r118931
2006-11-17 11:29:17 +00:00
Zdenek Dvorak fc9962ee12 re PR tree-optimization/29801 (ICE in set_lattice_value (tree-ssa-ccp.c))
PR tree-optimization/29801
	* tree-ssa-ccp.c (get_symbol_constant_value): New function.
	(get_default_value): Use get_symbol_constant_value.
	(set_lattice_value): ICE when the value of the constant is
	changed.
	(visit_assignment): Ignore VDEFs of read-only variables.

	* gcc.dg/pr29801.c: New test.

From-SVN: r118926
2006-11-17 10:29:07 +00:00
Zdenek Dvorak 80b4a8d94f tree-vect-transform.c (vect_create_epilog_for_reduction): Fix formating.
2006-11-17  Zdenek Dvorak <dvorakz@suse.cz>

	* tree-vect-transform.c (vect_create_epilog_for_reduction): Fix
	formating.
	(vect_generate_tmps_on_preheader, vect_update_ivs_after_vectorizer,
	vect_gen_niters_for_prolog_loop): Fold the emited expressions.

From-SVN: r118925
2006-11-17 09:34:08 +00:00
Zdenek Dvorak d092f0f605 tree-ssa-alias.c (new_type_alias): Do not use offset of expr to select subvars of var.
* tree-ssa-alias.c (new_type_alias): Do not use offset of expr to
	select subvars of var.

From-SVN: r118924
2006-11-17 09:24:01 +00:00
Jakub Jelinek c7b38a8574 re PR middle-end/29584 (internal compiler error on optimization)
PR middle-end/29584
	* tree-ssa-forwprop.c (simplify_switch_expr): Don't
	optimize if DEF doesn't have integral type.

	* gcc.dg/torture/pr29584.c: New test.

From-SVN: r118921
2006-11-17 09:57:45 +01:00
Mike Stump 80c85ca287 darwin.h (LINK_COMMAND_SPEC): Don't do dwarf stuff on pre-darwin9 system, unless the user asks for it directly.
* config/darwin.h (LINK_COMMAND_SPEC): Don't do dwarf stuff on
	pre-darwin9 system, unless the user asks for it directly.
	(PREFERRED_DEBUGGING_TYPE): Likewise.
	* config/i386/darwin.h (PREFERRED_DEBUGGING_TYPE): Likewise.
	* config.gcc: Add suppport for darwin9.h.
	* config/darwin9.h: Add.
	* doc/install.texi (Specific): Clarify darwin documentation.

From-SVN: r118917
2006-11-17 06:48:01 +00:00
Richard Earnshaw 36b15ad0dc arm.h (CONSTANT_ALIGNMENT): Don't over-align strings when optimizing for size.
* arm.h (CONSTANT_ALIGNMENT): Don't over-align strings when
	optimizing for size.

From-SVN: r118914
2006-11-17 00:27:18 +00:00
Mike Stump b8835a420c * Makefile.in (targhooks.o): Add $(OPTABS_H).
From-SVN: r118904
2006-11-16 22:26:09 +00:00
Dirk Mueller b9eae1a974 tree-vrp.c (get_value_range): Use XCNEW instead of XNEW and memset.
2006-11-16  Dirk Mueller  <dmueller@suse.de>

       * tree-vrp.c (get_value_range): Use XCNEW instead
       of XNEW and memset.
       (insert_range_assertions): Use XCNEWVEC instead
       of XNEWVEC and memset.
       (vrp_initialize): Same.
       (vrp_finalize): Same.
       * tree-ssa-ccp.c (ccp_initialize): Same.
       * predict.c (tree_bb_level_predictions): Same.
       * calls.c (expand_call): Same.
       * tree-ssa-copy.c (init_copy_prop): Same.
       (fini_copy_prop): Same.
       * tree-ssa-alias.c (get_ptr_info): Use GGC_CNEW instead
       of GGC_NEW and memset.

       * name-lookup.c (begin_scope): Use GGC_CNEW instead of
       GGC_NEW and memset.

From-SVN: r118903
2006-11-16 22:07:30 +00:00
Eric Botcazou a9e64c639e re PR middle-end/26306 (ICE on volatile array with non-constant bounds)
PR middle-end/26306
	* gimplify.c (gimplify_expr): Only force a load for references to
	non-BLKmode volatile values.
	* doc/implement-c.texi (Qualifiers implementation): Document the
	interpretation of what a volatile access is.
	* doc/extend.texi (C++ Extensions): Rework same documentation.

From-SVN: r118900
2006-11-16 21:25:16 +00:00
Joseph Myers 198bc7873d spe.md (frob_di_df_2): Handle non-offsettable memory operand.
* config/rs6000/spe.md (frob_di_df_2): Handle non-offsettable
	memory operand.

From-SVN: r118889
2006-11-16 13:36:23 +00:00
Richard Earnshaw ecaf6f0780 arm.md (abssi2): Allow Thumb as well.
* arm.md (abssi2): Allow Thumb as well.	 Use an SImode scratch for
	Thumb.
	(arm_neg_abssi2): Renamed from neg_abssi2.
	(thumb_abssi2, thumb_neg_abssi2): New patterns with splitters.

From-SVN: r118884
2006-11-16 08:57:50 +00:00
Uros Bizjak 56829cae9c i386.c (ix86_function_sseregparm): Fix comment: number of arguments passed to local functions in SSE registers is 3.
* config/i386/i386.c (ix86_function_sseregparm): Fix comment:
	number of arguments passed to local functions in SSE registers is 3.

	* doc/invoke.texi (Function Attributes) [sseregparm]: Correct
	number of arguments passed in SSE registers to 3.

From-SVN: r118883
2006-11-16 08:30:18 +01:00
Maxim Kuvyrkov 96370780ab re PR target/29201 (ICE in create_recovery_block, at haifa-sched.c:3692 at -O3)
2006-11-16  Maxim Kuvyrkov  <mkuvyrkov@ispras.ru>

	PR target/29201
	* cfgrtl.c (rtl_delete_block): Move the code for getting last insn of
	bb to ...
	(get_last_bb_insn): ... new global function.
	(basic_block.h): Declare it.
	* haifa-sched.c (create_recovery_block): Use it.

2006-11-16  Maxim Kuvyrkov  <mkuvyrkov@ispras.ru>

	PR target/29201
	* gcc.c-torture/compile/pr29201.c: New test for ia64 target.

From-SVN: r118882
2006-11-16 06:57:59 +00:00
H.J. Lu db21bbf90c re PR middle-end/29862 (Calling a function with gcc_assert)
2006-11-15  H.J. Lu  <hongjiu.lu@intel.com>

	PR middle-end/29862
	* real.c (mpfr_from_real): Call mpfr_set_str before gcc_assert.

From-SVN: r118881
2006-11-15 19:50:16 -08:00
Paul Brook 66403286e3 unwind-arm.c (_Unwind_GetDataRelBase, [...]): Move from here ...
2006-11-15  Paul Brook  <paul@codesourcery.com>

	gcc/
	* config/arm/unwind-arm.c (_Unwind_GetDataRelBase,
	_Unwind_GetTextRelBase): Move from here ...
	* config/arm/pr-support.c (_Unwind_GetDataRelBase,
	_Unwind_GetTextRelBase): ... To here.

From-SVN: r118864
2006-11-15 18:12:17 +00:00
Bernd Schmidt b1dd92fd59 tree-ssa-loop-ivopts.c (get_address_cost): Make sure memory addresses we generate for testing are aligned.
* tree-ssa-loop-ivopts.c (get_address_cost): Make sure memory
	addresses we generate for testing are aligned.

From-SVN: r118863
2006-11-15 17:54:55 +00:00
Andrew Pinski f9f63ff215 re PR tree-optimization/29788 (ICE in var_ann, at tree-flow-inline.h:130)
2006-11-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        PR tree-opt/29788
        * fold-const.c (fold_indirect_ref_1): Fold *&CONST_DECL down
        to what is the const decl is a place holder for.

2006-11-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        PR tree-opt/29788
        * gfortran.fortran-torture/compile/inline_1.f90:
        New testcase.

From-SVN: r118861
2006-11-15 09:04:56 -08:00
Uros Bizjak 47a37ce45e i386.opt: New target option -mx87regparm.
* config/i386/i386.opt: New target option -mx87regparm.

	* config/i386/i386.h (struct ix86_args): Add x87_nregs, x87_regno,
	float_in_x87: Add new variables. mmx_words, sse_words: Remove.
	(X87_REGPARM_MAX): Define.

	* config/i386/i386.c (override_options): Error out for
	-mx87regparm but no 80387 support.
	(ix86_attribute_table): Add x87regparm.
	(ix86_handle_cconv_attribute): Update comments for x87regparm.
	(ix86_comp_type_attributes): Check for mismatched x87regparm types.
	(ix86_function_x87regparm): New function.
	(ix86_function_arg_regno_p): Add X87_REGPARM_MAX 80387 floating
	point registers.
	(init_cumulative_args): Initialize x87_nregs and float_in_x87
	variables.
	(function_arg_advance): Process x87_nregs and x87_regno when
	floating point argument is to be passed in 80387 register.
	(function_arg): Pass XFmode arguments in 80387 registers for local
	functions.  Pass SFmode and DFmode arguments to local functions
	in 80387 registers when flag_unsafe_math_optimizations is set.

	* reg-stack.c (convert_regs_entry): Disable NaN load for
	stack registers that are used for argument passing.

	* doc/extend.texi: Document x87regparm function attribute.
	* doc/invoke.texi: Document -mx87regparm.

testsuite/ChangeLog:

	* gcc.target/i386/x87regparm-1.c: New test.
	* gcc.target/i386/x87regparm-2.c: New test.
	* gcc.target/i386/x87regparm-3.c: New test.
	* gcc.target/i386/x87regparm-4.c: New test.

From-SVN: r118859
2006-11-15 17:21:58 +01:00
Bernd Schmidt dd5f63f83e tree-flow.h (multiplier_allowed_in_address_p): Adjust prototype.
* tree-flow.h (multiplier_allowed_in_address_p): Adjust prototype.
	* tree-ssa-loop-ivopts.c (multiplier_allowed_in_address_p): New
	arg MODE; all callers changed.  Use it to determine validity per
	machine mode instead of using Pmode for all memory references.
	(get_address_cost): Likewise add and use new arg MEM_MODE.

From-SVN: r118856
2006-11-15 14:29:10 +00:00
Rask Ingemann Lambertsen c78ba53a65 combine.c (likely_spilled_retval_1): Fix masking operation.
2006-11-15  Rask Ingemann Lambertsen <rask@sygehus.dk>
	    J"orn Rennecke <joern.rennecke@st.com>

	* combine.c (likely_spilled_retval_1): Fix masking operation.
	(likely_spilled_retval_p): Use proper pattern for call to
	likely_spilled_retval_1.

Co-Authored-By: J"orn Rennecke <joern.rennecke@st.com>

From-SVN: r118855
2006-11-15 13:16:41 +00:00
Bernd Schmidt 6b97a43964 bfin.c (legitimize_pic_address): Lose dead code that tests for CONSTANT_POOL_ADDRESS_P.
* config/bfin/bfin.c (legitimize_pic_address): Lose dead code
	that tests for CONSTANT_POOL_ADDRESS_P.

From-SVN: r118854
2006-11-15 12:27:32 +00:00
Bernd Schmidt 0f14009a1e tree-ssa-loop-ivopts.c (determine_iv_costs): Fix formatting.
* tree-ssa-loop-ivopts.c (determine_iv_costs): Fix formatting.

From-SVN: r118853
2006-11-15 12:23:09 +00:00
Jakub Jelinek 08700251e5 re PR tree-optimization/29581 (Latent bug in 4.1/4.2/4.3 lambda-code.c)
PR tree-optimization/29581
	* lambda-code.c (replace_uses_equiv_to_x_with_y): Add YINIT,
	REPLACEMENTS, FIRSTBSI arguments.  If initial condition or
	type is different between Y and USE, create a temporary
	variable, initialize it at the beginning of the body bb
	and use it as replacement instead of Y.

	* gcc.dg/pr29581-1.c: New test.
	* gcc.dg/pr29581-2.c: New test.
	* gcc.dg/pr29581-3.c: New test.
	* gcc.dg/pr29581-4.c: New test.
	* gfortran.dg/pr29581.f90: New test.

From-SVN: r118848
2006-11-15 10:35:34 +01:00
Paolo Bonzini d6cfd93133 re PR tree-optimization/29753 (Volatile semantics ignored in some cases)
2006-11-15  Paolo Bonzini  <bonzini@gnu.org>

	PR middle-end/29753
	* gimplify.c (fold_indirect_ref_rhs): Use
	STRIP_USELESS_TYPE_CONVERSION rather than STRIP_NOPS.

From-SVN: r118845
2006-11-15 08:07:03 +00:00
Richard Earnshaw a41a56b62d expmed.c (emit_store_flag_1): New function.
* expmed.c (emit_store_flag_1): New function.
	(emit_store_flag): Call it.  If we can't find a suitable scc insn,
	try a cstore insn.
	* expr.c (do_store_flag): If we can't find a scc insn, try cstore.
	Use do_compare_rtx_and_jump.
	* arm.h (BRANCH_COST): Increase to 2 on Thumb.
	* arm.md (cstoresi4): New define_expand.
	(cstoresi_eq0_thumb, cstoresi_ne0_thumb): Likewise.
	(cstoresi_eq0_thumb_insn, cstore_ne0_thumb_insn): New patterns.
	(cstoresi_nltu_thumb, thumb_addsi3_addgeu): New patterns.

From-SVN: r118829
2006-11-14 23:25:43 +00:00
Caroline Tice 8970859455 Add ability to generate DWARF pubtypes section if DEBUG_PUBTYPES_SECTION is defined.
Add ability to generate DWARF pubtypes section if DEBUG_PUBTYPES_SECTION
is defined.  Also add dejagnu testcases for pubtypes.

From-SVN: r118826
2006-11-14 12:55:56 -08:00
Joseph Myers f0c1ebb734 arm.h (FUNCTION_ARG_ADVANCE): Only adjust iwmmxt_nregs if TARGET_IWMMXT_ABI.
* config/arm/arm.h (FUNCTION_ARG_ADVANCE): Only adjust
	iwmmxt_nregs if TARGET_IWMMXT_ABI.
	* config/arm/iwmmxt.md (movv8qi_internal, movv4hi_internal,
	movv2si_internal): Support moves between core registers.

From-SVN: r118825
2006-11-14 20:36:28 +00:00
Eric Christopher dd7f7a6ea4 configure: Regenerate with autoconf 2.59.
2006-11-14  Eric Christopher  <echristo@apple.com>

        * configure: Regenerate with autoconf 2.59.

From-SVN: r118823
2006-11-14 19:42:51 +00:00
Daniel Berlin d75dbccd3c re PR tree-optimization/27755 (PRE confused by control flow)
2006-11-14  Daniel Berlin  <dberlin@dberlin.org>

	Fix PR tree-optimization/27755

	* tree-ssa-pre.c: Update comments.
	(bb_bitmap_sets): Add pa_in and  deferred member.
	(BB_DEFERRED): New macro.
	(maximal_set): New variable.
	(pre_stats): Add pa_insert member.
	(bitmap_set_and): Short circuit orig == dest.
	(bitmap_set_subtract_values): New function.
	(bitmap_set_contains_expr): Ditto.
	(translate_vuses_through_block): Add phiblock argument.
	(dependent_clean): New function.
	(compute_antic_aux): Update for maximal_set changes.
	(compute_partial_antic_aux): New function.
	(compute_antic): Handle partial anticipation.
	(do_partial_partial_insertion): New function.
	(insert_aux): Handle partial anticipation.
	(add_to_sets): Add to maximal set.
	(compute_avail): Ditto.
	(init_pre): Initialize maximal_set.
	(execute_pre): Do partial anticipation if -O3+.

From-SVN: r118821
2006-11-14 18:12:20 +00:00
Paolo Bonzini 6e0b633f6c re PR rtl-optimization/29798 (-O2 gives wrong results)
2006-11-14  Paolo Bonzini  <bonzini@gnu.org>

	PR rtl-optimization/29798

	* fwprop.c (use_killed_between): Check that DEF_INSN dominates
	TARGET_INSN before any other check.
	(fwprop_init): Always calculate dominators.
	(fwprop_done): Always free them.

2006-11-14  Paolo Bonzini  <bonzini@gnu.org>

	PR rtl-optimization/29798

	* gcc.c-torture/execute/pr29798.c: New.

From-SVN: r118808
2006-11-14 08:46:26 +00:00
Kaveh R. Ghazi b7e85170cf fold-const.c (fold_strip_sign_ops): Handle COMPOUND_EXPR and COND_EXPR.
* fold-const.c (fold_strip_sign_ops): Handle COMPOUND_EXPR and
	COND_EXPR.

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

From-SVN: r118802
2006-11-14 05:08:46 +00:00
DJ Delorie 833bf445b0 m32c.c (m32c_prepare_shift): Use a separate temporary for intermediates.
* config/m32c/m32c.c (m32c_prepare_shift): Use a separate
temporary for intermediates.

From-SVN: r118798
2006-11-13 21:29:46 -05:00
Kaz Kojima cb3d3842bb sh.c (expand_cbranchdi4): Initialize skip_label.
* config/sh/sh.c (expand_cbranchdi4): Initialize skip_label.
	(sh_optimize_target_register_callee_saved): #if 0 the code
	using NOTE_INSN_LOOP_{BEG,END}.

From-SVN: r118784
2006-11-13 23:08:24 +00:00
Roger Sayle 7c06f56575 fold-const.c (optimize_bit_field_compare): Recursively call fold when simplifying non-constant comparisons between bit-fields.
* fold-const.c (optimize_bit_field_compare): Recursively call
	fold when simplifying non-constant comparisons between bit-fields.

From-SVN: r118783
2006-11-13 23:02:41 +00:00
Jakub Jelinek 65280f6ca6 configure.ac: Add changequote around __LONG_DOUBLE_MATH_OPTIONAL test.
* configure.ac: Add changequote around __LONG_DOUBLE_MATH_OPTIONAL
	test.
	* configure: Rebuilt.

From-SVN: r118780
2006-11-13 23:38:21 +01:00
Andrew Pinski d296e02ef8 cell.md: New file.
2006-11-13  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        * config/rs6000/cell.md: New file.
        * config/rs6000/rs6000.c (rs6000_cell_dont_microcode): New
        variable.
        (ppccell_cost): New cost matrix.
        (TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD_GUARD): Define.
        (rs6000_override_options): Set rs6000_always_hint to false
        for cell. Also align functions/lables/loops to 8byte
        for the Cell. Use PROCESSOR_CELL.
        (rs6000_emit_epilogue): Rename using_mfcr_multiple to
        using_mtcr_multiple.
        (rs6000_variable_issue): If the insn is a nonpipelined instruction
        on the Cell, return 0.
        (rs6000_adjust_cost): Add Cell cost adjustments.
        (is_microcoded_insn): Return true for Cell microcoded
        instructions.
        (is_nonpipeline_insn): New function.
        (rs6000_issue_rate): Add PROCESSOR_CELL.
        (rs6000_use_sched_lookahead): If Cell, then we should look ahead 8
        instructions.
        (rs6000_use_sched_lookahead_guard): New function.
        (rs6000_sched_reorder):  Reorder the ready list, if the second
        to last ready insn is a nonepipeline insn on the Cell.
        * config/rs6000/rs6000.h (processor_type): Add PROCESSOR_CELL.
        (ASM_CPU_SPEC): Add Cell.
        * config/rs6000/rs6000.md (cpu): Add Cell.
        (cell_micro): New Attr.
        Include cell.md

From-SVN: r118776
2006-11-13 12:14:35 -08:00
Jakub Jelinek e8116f4026 configure.ac (ld_vers): Parse GNU ld version 2.17.50.0.3-6 20060715 style versions.
* configure.ac (ld_vers): Parse GNU ld version 2.17.50.0.3-6 20060715
	style versions.
	* configure: Rebuilt.

From-SVN: r118775
2006-11-13 20:47:06 +01:00
Richard Guenther 63be4b32d1 i386.c (ix86_expand_lround): Handle expand_simple_binop return value.
2006-11-13  Richard Guenther  <rguenther@suse.de>

	* config/i386/i386.c (ix86_expand_lround): Handle expand_simple_binop
	return value.
	(ix86_expand_lfloorceil): Likewise.
	(ix86_expand_rint): Likewise.
	(ix86_expand_floorceildf_32): Likewise.
	(ix86_expand_floorceil): Likewise.
	(ix86_expand_rounddf_32): Likewise.
	(ix86_expand_truncdf_32): Likewise.
	(ix86_expand_round): Likewise.

From-SVN: r118769
2006-11-13 18:20:13 +00:00
Carlos O'Donell f4c0a30368 gcc.c: Organize search path variables into $prefix relative, and well-known native.
gcc/

2006-11-13  Carlos O'Donell  <carlos@codesourcery.com>
	    Mark Mitchell  <mark@codesourcery.com>

	* gcc.c: Organize search path variables into $prefix relative,
	and well-known native. Add comments.
	(add_sysrooted_prefix): Add comment.
	(process_command): If !gcc_exec_prefix add $prefix based paths.
	If *cross_compile == '0', add native well-known paths.
	Assert tooldir_base_prefix is always relative.
	(main): If print_search_dirs, and if gcc_exec_prefix is set,
	use this value for 'install:' path.
	* Makefile.in: Add GCC_EXEC_PREFIX to generated site.exp.

gcc/testsuite/

2006-11-13  Carlos O'Donell  <carlos@codesourcery.com>

	* lib/c-torture.exp: Use target-libpath.exp.
	* lib/target-libpath.exp (set_ld_library_path_env_vars): If present,
	set GCC_EXEC_PREFIX env var from global variable of same name.


Co-Authored-By: Mark Mitchell <mark@codesourcery.com>

From-SVN: r118765
2006-11-13 17:25:59 +00:00
H.J. Lu 8fbbf354fc i386.c: Fix a typo in comment.
2006-11-13  H.J. Lu  <hongjiu.lu@intel.com>

	* config/i386/i386.c: Fix a typo in comment.

From-SVN: r118764
2006-11-13 07:29:21 -08:00
Michael Matz 7180bcb13f * genemit.c (gen_expand): Allocate enough memory.
From-SVN: r118762
2006-11-13 14:36:47 +00:00
Joseph Myers b54c93b7b8 bpapi.h (TARGET_BPABI_CPP_BUILTINS): Define __GXX_TYPEINFO_EQUALITY_INLINE but not __GXX_MERGED_TYPEINFO_NAMES.
gcc:
	* config/arm/bpapi.h (TARGET_BPABI_CPP_BUILTINS): Define
	__GXX_TYPEINFO_EQUALITY_INLINE but not
	__GXX_MERGED_TYPEINFO_NAMES.
	* config/arm/symbian.h (TARGET_OS_CPP_BUILTINS): Define
	__GXX_MERGED_TYPEINFO_NAMES.
	* config/i386/cygming.h (TARGET_OS_CPP_BUILTINS): Define
	__GXX_TYPEINFO_EQUALITY_INLINE.

libstdc++-v3:
	* libsupc++/typeinfo (__GXX_TYPEINFO_EQUALITY_INLINE): Define.
	Use instead of __GXX_MERGED_TYPEINFO_NAMES to condition inline
	definitions.
	* libsupc++/tinfo.cc (operator==): Condition on
	__GXX_TYPEINFO_EQUALITY_INLINE; check __GXX_MERGED_TYPEINFO_NAMES
	to determine algorithm.
	* libsupc++/tinfo2.cc (type_info::before): Likewise.

From-SVN: r118755
2006-11-13 13:10:17 +00:00
H.J. Lu 5da10ac71f re PR tree-optimization/29680 (Misscompilation of spec2006 gcc)
PR tree-optimization/29680
	* tree-ssa-operands.c (access_can_touch_variable): Revert fix for
	PR 14784.

	* gcc.dg/alias-11.c: New test.


Co-Authored-By: Zdenek Dvorak <dvorakz@suse.cz>

From-SVN: r118754
2006-11-13 12:37:29 +00:00
Jason Merrill 84816907e4 re PR middle-end/28915 (ICE: tree check: expected class 'constant', have 'declaration' (var_decl) in build_vector, at tree.c:973)
PR middle-end/28915
        * gimplify.c (gimplify_init_constructor): Don't reduce TREE_CONSTANT
        vector ctors.
        * tree-cfg.c (verify_expr): Don't look into TREE_CONSTANT
        vector ctors.
        * expmed.c (make_tree): Handle CONST, SYMBOL_REF.
        * tree.c (build_vector): Handle non-_CST elements.

Co-Authored-By: Andrew Pinski <pinskia@physics.uc.edu>

From-SVN: r118747
2006-11-13 03:16:11 -05:00
Kaz Kojima 329b3cc384 genemit.c (gen_insn): Call gen_exp with a non-null used when handling multiple insns.
* genemit.c (gen_insn): Call gen_exp with a non-null used
	when handling multiple insns.
	(gen_expand): Likewise.
	* reorg.c (emit_delay_sequence): Copy the delay slot insn.
	* config/sh/sh.md (ashrsi2_31+1): Copy operands[0].
	(movsi_const_16bit+1): Copy operands[1].
	(call_pcrel): Copy the call_site pattern.
	(call_value_pcrel, sibcall_pcrel, GOTaddr2picreg): Likewise.

From-SVN: r118746
2006-11-13 03:28:13 +00:00
Kaveh Ghazi 6d55dfe3a3 Add PR number to ChangeLog from a previous commit.
From-SVN: r118745
2006-11-13 03:02:14 +00:00
Roger Sayle 1b43b96773 fold-const.c (negate_expr_p): Correct/refine condition for transformations.
* fold-const.c (negate_expr_p) <PLUS_EXPR, MINUS_EXPR>: Correct/refine
	condition for transformations.  Use !HONOR_SIGN_DEPENDENT_ROUNDING
	&& !HONOR_SIGNED_ZEROS instead of flag_unsafe_math_optimizations.
	(fold_negate_expr) <PLUS_EXPR, MINUS_EXPR>: Likewise.

From-SVN: r118744
2006-11-13 02:55:22 +00:00
Daniel Berlin 163b858186 re PR java/29587 (jc1: out of memory allocating 4072 bytes after a total of 708630224 bytes)
2006-11-12  Daniel Berlin  <dberlin@dberlin.org>

	Fix PR tree-optimization/29587
	* tree-ssa-structalias.c (process_constraint): Don't
	mark address taken due only to escaped vars constraint.

From-SVN: r118742
2006-11-13 02:18:07 +00:00
Roger Sayle 3b279c7ae7 re PR rtl-optimization/29797 (Miscompiles bit test / set in OpenOffice)
2006-11-12  Michael Matz  <matz@suse.de>
	    Roger Sayle  <roger@eyesopen.com>

	PR rtl-optimization/29797
	* ifcvt.c (noce_try_bitop): Correct calculation of bitnum on
	BITS_BIG_ENDIAN targets.

	* gcc.c-torture/execute/pr29797-1.c: New test case.

From-SVN: r118740
2006-11-13 00:41:53 +00:00
Kaveh R. Ghazi 5c5b21550c builtins.c (fold_builtin_cosh): New.
* builtins.c (fold_builtin_cosh): New.
	(fold_builtin_1): Use it.
	* fold-const.c (negate_mathfn_p): Add llround, lround, round,
	trunc to the list of "odd" functions.  Also add llrint, lrint,
	rint and nearbyint when flag_rounding_math is false.

testsuite:
	* gcc.dg/torture/builtin-symmetric-1.c: Add more cases.

From-SVN: r118733
2006-11-12 23:51:36 +00:00
Zdenek Dvorak 8f8bb1d200 tree-flow.h (name_mappings_registered_p): Declare.
* tree-flow.h (name_mappings_registered_p): Declare.
	* tree-into-ssa.c (name_mappings_registered_p): New function.
	* tree-cfg.c (tree_can_merge_blocks_p): Check
	name_mappings_registered_p instead of need_ssa_update_p.

From-SVN: r118732
2006-11-12 20:59:28 +00:00
Zdenek Dvorak 4d2280f60d tree-ssa-loop.c (tree_vectorize): Return the result of vectorize_loops.
* tree-ssa-loop.c (tree_vectorize): Return the result of
	vectorize_loops.
	* tree-vectorizer.c (vectorize_loops): Return TODO_cleanup_cfg
	if anything changed.
	* tree-vectorizer.h (vectorize_loops): Declaration removed.
	* tree-flow.h (vectorize_loops): Declaration changed.

From-SVN: r118731
2006-11-12 20:11:53 +00:00
Zdenek Dvorak 911b3fdbe3 tree-ssa-loop-prefetch.c (schedule_prefetches): Cleanup and improve comments.
* tree-ssa-loop-prefetch.c (schedule_prefetches): Cleanup and improve
	comments.
	(issue_prefetch_ref): Move assignment to write_p out of loop.
	(determine_unroll_factor): Do not take PARAM_MAX_UNROLL_TIMES and
	SIMULTANEOUS_PREFETCHES into account.
	(loop_prefetch_arrays): Do not pass ahead to determine_unroll_factor.
	* lambda-code.c (lcm): Renamed to ...
	(least_common_multiple): ... and exported.
	* tree-flow.h (least_common_multiple): Declare.

From-SVN: r118730
2006-11-12 20:05:49 +00:00
Zdenek Dvorak 946e1bc757 Makefile.in (tree-data-ref.o): Add langhooks.h dependency.
* Makefile.in (tree-data-ref.o): Add langhooks.h dependency.
	* tree-ssa-loop-niter.c (derive_constant_upper_bound):  Follow
	ud-chains.  Handle AND_EXPR.
	(record_estimate): Record whether the estimate is realistic
	and whether it is derived from a loop exit.
	(record_nonwrapping_iv, idx_infer_loop_bounds, infer_loop_bounds_from_ref,
	infer_loop_bounds_from_array, infer_loop_bounds_from_signedness): New
	functions.
	(compute_estimated_nb_iterations): Take only realistic bounds into
	account.  Set estimate_state.  Use double_ints.
	(infer_loop_bounds_from_undefined): Call infer_loop_bounds_from_array
	and infer_loop_bounds_from_signedness.  Do not consider basic blocks
	that do not have to be always executed.
	(estimate_numbers_of_iterations_loop): Set estimate_state, and use it
	to determine whether to call infer_loop_bounds_from_undefined
	and compute_estimated_nb_iterations.
	(n_of_executions_at_most): Use double_ints.
	(free_numbers_of_iterations_estimates_loop): Set estimate_state.
	(substitute_in_loop_info): Do not replace in estimated_nb_iterations.
	* double-int.c (double_int_to_tree): Improve comment.
	(double_int_fits_to_tree_p): New function.
	* double-int.h (double_int_fits_to_tree_p): Declare.
	* tree-data-ref.c: Include langhooks.h.
	(estimate_niter_from_size_of_data, estimate_iters_using_array): Removed.
	(analyze_array_indexes): Do not call estimate_niter_from_size_of_data.
	(analyze_array): Do not pass estimate_only argument to
	analyze_array_indexes.
	(get_number_of_iters_for_loop): Build tree from the stored double_int
	value.
	(get_references_in_stmt, find_data_references_in_stmt): New functions.
	(find_data_references_in_loop): Use find_data_references_in_stmt.
	* tree-data-ref.h (struct data_ref_loc_d): New.
	(get_references_in_stmt): Declare.
	(estimate_iters_using_array): Declaration removed.
	* cfgloop.h (struct nb_iter_bound): Change type of bound to
	double_int.  Improve comments.  Add is_exit and realistic
	fields.
	(struct loop): Changed type of estimated_nb_iterations to double_int.
	Added estimate_state field.
	(record_estimate): Declaration removed.

From-SVN: r118729
2006-11-12 19:58:05 +00:00
Zdenek Dvorak 47eb5b329b params.c (set_param_value): Initialize the "set" field.
* params.c (set_param_value): Initialize the "set" field.
	* params.h (struct param_info): Add "set" field.
	(PARAM_SET_P): New macro.
	(PREFETCH_LATENCY, SIMULTANEOUS_PREFETCHES, L1_CACHE_SIZE,
	L1_CACHE_LINE_SIZE): New macros.
	* toplev.c (DEFPARAM): Initialize the "set" field.
	* tree-ssa-loop-prefetch.c (PREFETCH_LATENCY,
	SIMULTANEOUS_PREFETCHES): Removed.
	(PREFETCH_BLOCK): Use L1_CACHE_LINE_SIZE.
	(tree_ssa_prefetch_arrays): Dump the values of the parameters.
	* config/sparc/sparc.c: Include params.h.
	(sparc_override_options): Set SIMULTANEOUS_PREFETCHES and
	L1_CACHE_LINE_SIZE parameters.
	* config/sparc/sparc.h (PREFETCH_BLOCK, SIMULTANEOUS_PREFETCHES):
	Removed.
	* config/i386/i386.h (PREFETCH_BLOCK, SIMULTANEOUS_PREFETCHES):
	Removed.
	* config/i386/i386.c: Include params.h.
	(k8_cost): Change default value for SIMULTANEOUS_PREFETCHES.
	(override_options): Set SIMULTANEOUS_PREFETCHES and
	L1_CACHE_LINE_SIZE parameters.
	* config/sh/sh.h (SIMULTANEOUS_PREFETCHES): Removed.
	(OPTIMIZATION_OPTIONS): Set SIMULTANEOUS_PREFETCHES and
	L1_CACHE_LINE_SIZE parameters.
	* config/ia64/ia64.c (ia64_optimization_options): Set
	SIMULTANEOUS_PREFETCHES and L1_CACHE_LINE_SIZE parameters.
	* config/ia64/ia64.h (SIMULTANEOUS_PREFETCHES, PREFETCH_BLOCK):
	Removed.
	* params.def (PARAM_PREFETCH_LATENCY, PARAM_SIMULTANEOUS_PREFETCHES,
	PARAM_L1_CACHE_SIZE, PARAM_L1_CACHE_LINE_SIZE): New params.
	* doc/invoke.texi: Document new params.

From-SVN: r118728
2006-11-12 19:17:02 +00:00