Commit Graph

29411 Commits

Author SHA1 Message Date
Joseph Myers 7bd85ce0da re PR target/24837 (move dynamic linker names out of LINK_SPEC and into new DYNAMIC_LINKER)
PR target/24837
	* config.gcc: Define UCLIBC_DEFAULT to 0 or 1.
	* opth-gen.awk: Handle Var and InverseMask together.
	* config/linux.opt (muclibc, mglibc): Use Var(linux_uclibc).
	* config/linux.h: Use #if not #ifdef for testing UCLIBC_DEFAULT.
	(TARGET_C99_FUNCTIONS): Test OPTION_GLIBC not TARGET_GLIBC.
	(CHOOSE_DYNAMIC_LINKER): Give an error for -mglibc and -muclibc
	used together.
	(UCLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER64,
	LINUX_DYNAMIC_LINKER32, LINUX_DYNAMIC_LINKER64): Define.
	* config/alpha/linux-elf.h (GLIBC_DYNAMIC_LINKER,
	UCLIBC_DYNAMIC_LINKER, CHOOSE_DYNAMIC_LINKER,
	LINUX_DYNAMIC_LINKER): Define.
	(ELF_DYNAMIC_LINKER): Define to LINUX_DYNAMIC_LINKER.
	* config/alpha/linux.h (TARGET_C99_FUNCTIONS): Define to
	TARGET_GLIBC.
	* config/cris/linux.h (GLIBC_DYNAMIC_LINKER): Define.
	(CRIS_LINK_SUBTARGET_SPEC): Pass a -dynamic-linker option.
	* config/frv/linux.h (GLIBC_DYNAMIC_LINKER): Define.
	(LINK_SPEC): Use LINUX_DYNAMIC_LINKER.
	(TARGET_C99_FUNCTIONS): Don't define.
	* config/i386/linux.h (DYNAMIC_LINKER): Rename to
	GLIBC_DYNAMIC_LINKER.
	(SUBTARGET_EXTRA_SPECS): Use LINUX_DYNAMIC_LINKER.
	* config/i386/linux64.h (GLIBC_DYNAMIC_LINKER32,
	GLIBC_DYNAMIC_LINKER64): Define.
	(LINK_SPEC): Use LINUX_DYNAMIC_LINKER32 and
	LINUX_DYNAMIC_LINKER64.
	* config/ia64/linux.h (GLIBC_DYNAMIC_LINKER): Define.
	(LINK_SPEC): Use LINUX_DYNAMIC_LINKER.
	* config/m32r/linux.h (GLIBC_DYNAMIC_LINKE): Define.
	(LINK_SPEC): Use LINUX_DYNAMIC_LINKER.
	* config/m68k/linux.h (GLIBC_DYNAMIC_LINKER): Define.
	(LINK_SPEC): Use LINUX_DYNAMIC_LINKER.
	* config/mips/linux64.h (GLIBC_DYNAMIC_LINKER32,
	GLIBC_DYNAMIC_LINKER64, GLIBC_DYNAMIC_LINKERN32,
	UCLIBC_DYNAMIC_LINKERN32, LINUX_DYNAMIC_LINKERN32): Define.
	(LINK_SPEC): Use LINUX_DYNAMIC_LINKERN32, LINUX_DYNAMIC_LINKER64
	and LINUX_DYNAMIC_LINKER32.
	* config/mn10300/linux.h (GLIBC_DYNAMIC_LINKER): Define.
	(LINK_SPEC): Use LINUX_DYNAMIC_LINKER.
	* config/pa/pa-linux.h (GLIBC_DYNAMIC_LINKER): Define.
	(LINK_SPEC): Use LINUX_DYNAMIC_LINKER.
	* config/rs6000/linux.h (TARGET_C99_FUNCTIONS): Define to
	TARGET_GLIBC.
	* config/rs6000/linux64.h (TARGET_C99_FUNCTIONS): Likewise.
	(GLIBC_DYNAMIC_LINKER32, GLIBC_DYNAMIC_LINKER64,
	UCLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER64,
	CHOOSE_DYNAMIC_LINKER, CHOOSE_DYNAMIC_LINKER,
	LINUX_DYNAMIC_LINKER32, LINUX_DYNAMIC_LINKER64): Define.
	(LINK_OS_LINUX_SPEC32): Use LINUX_DYNAMIC_LINKER32.
	(LINK_OS_LINUX_SPEC64): Use LINUX_DYNAMIC_LINKER64.
	* config/rs6000/sysv4.h (GLIBC_DYNAMIC_LINKER,
	UCLIBC_DYNAMIC_LINKER, CHOOSE_DYNAMIC_LINKER,
	LINUX_DYNAMIC_LINKER): Define.
	(LINK_OS_LINUX_SPEC): Use LINUX_DYNAMIC_LINKE.
	* config/s390/linux.h (GLIBC_DYNAMIC_LINKER32,
	GLIBC_DYNAMIC_LINKER64): Define.
	(LINK_SPEC): Use LINUX_DYNAMIC_LINKER32 and
	LINUX_DYNAMIC_LINKER64.
	* config/sh/linux.h (GLIBC_DYNAMIC_LINKER): Define.
	(SUBTARGET_LINK_SPEC): Use LINUX_DYNAMIC_LINKER.
	* config/sparc/linux.h (GLIBC_DYNAMIC_LINKER,
	UCLIBC_DYNAMIC_LINKER, CHOOSE_DYNAMIC_LINKER,
	LINUX_DYNAMIC_LINKER): Define.
	(LINK_SPEC): Use LINUX_DYNAMIC_LINKER.
	(TARGET_C99_FUNCTIONS): Define to TARGET_GLIBC.
	* config/sparc/linux64.h (GLIBC_DYNAMIC_LINKER32,
	GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER32,
	UCLIBC_DYNAMIC_LINKER64, CHOOSE_DYNAMIC_LINKER,
	LINUX_DYNAMIC_LINKER32, LINUX_DYNAMIC_LINKER64): Define.
	(LINK_ARCH32_SPEC): Use LINUX_DYNAMIC_LINKER32.
	(LINK_ARCH64_SPEC, LINK_SPEC): Use LINUX_DYNAMIC_LINKER64.
	(TARGET_C99_FUNCTIONS): Define to TARGET_GLIBC.
	* config/xtensa/linux.h (GLIBC_DYNAMIC_LINKER): Define.
	(LINK_SPEC): Use LINUX_DYNAMIC_LINKER.
	* doc/invoke.texi (-muclibc): Remove caveat about supported
	targets.

testsuite:
	* gcc.dg/glibc-uclibc-1.c, gcc.dg/glibc-uclibc-2.c: New tests.

From-SVN: r111235
2006-02-18 11:12:51 +00:00
Grigory Zagorodnev be8ac3e243 cpp.texi (__TIMESTAMP__): Document.
2006-02-17  Grigory Zagorodnev <grigory_zagorodnev@linux.intel.com>

gcc/ChangeLog:
     * doc/cpp.texi (__TIMESTAMP__): Document.

libcpp/ChangeLog:
     * macro.c (_cpp_builtin_macro_text): Handle BT_TIMESTAMP.
     * files.c (_cpp_get_file_stat): New function.
     * include/cpplib.h (builtin_type): Add BT_TIMESTAMP.
     * init.c (builtin_array): Add support for __TIMESTAMP__/BT_TIMESTAMP.
     * internal.h (_cpp_get_file_stat): Prototype.
     (struct cpp_buffer): Add timestamp.

gcc/testsuite/ChangeLog:
     * gcc.dg/cpp/undef3.c: New test.
     * gcc.dg/cpp/trad/builtins2.c: New test.

From-SVN: r111232
2006-02-18 10:25:31 +01:00
Roger Sayle 8305d7868d re PR rtl-optimization/25600 (unsigned>>31?-1:0 should be optimized to int>>31)
PR middle-end/25600
	* fold-const.c (fold_binary): Fold (X >> C) != 0 into X < 0 when
	C is one less than the width of X (and related transformations).
	* simplify_rtx.c (simplify_unary_operation_1): Transform 
	(neg (lt x 0)) into either (ashiftrt X C) or (lshiftrt X C)
	depending on STORE_FLAG_VALUE, were C is one less then the
	width of X.

From-SVN: r111226
2006-02-18 05:22:46 +00:00
Daniel Berlin dd7b13d8f4 re PR tree-optimization/26341 (930217-1.c and 931013-3.c ICE at -O2 and above in add_virtual_operand)
2006-02-17  Daniel Berlin  <dberlin@dberlin.org>

	Fix PR tree-optimization/26341
	* tree-ssa-operands.c (add_virtual_operand): Remove assert 
	about NAME_MEMORY_TAG's.

From-SVN: r111217
2006-02-18 00:09:51 +00:00
John David Anglin 7e646101de re PR target/26255 (internal compiler error: in reload_cse_simplify_operands, at postreload.c:391)
PR target/26255
	* pa.md: Create separate HI and QI move patterns for 32-bit and 64-bit
	with hardware float support, and software float support.  Add fcpy
	alternative to hardware patterns.  Add alternatives to copy between
	general and floating-point registers to the 32-bit pattern.
	* pa.c (pa_secondary_reload): Don't abort if reload tries to find a
	secondary reload to load a QI or HI mode constant into a floating
	point register. 
	* pa32-regs.h (VALID_FP_MODE_P): Allow QImode and HImode.
	* pa64-regs.h (VALID_FP_MODE_P): Likewise.

From-SVN: r111214
2006-02-17 22:19:05 +00:00
Andrew Pinski d5b5b8bf92 re PR rtl-optimization/26272 (gcc.c-torture/execute/built-in-setjmp.c fails at -O2 and above on powerpc-darwin)
2006-02-17  Andrew Pinski  <pinskia@physics.uc.edu>

        PR target/26272
        * config/rs6000/darwin.md (load_macho_picbase_si): Add
        pc to the pattern.
        (load_macho_picbase_di): Likewise.

From-SVN: r111206
2006-02-17 11:52:28 -08:00
Jeff Law b16caf72c7 tree-vrp.c (set_value_range_to_nonnegative): New function.
* tree-vrp.c (set_value_range_to_nonnegative): New function.
	(vrp_expr_computes_nonnegative, ssa_name_nonnegative_p): Likewise.
	(ssa_name_nonzero_p): Likewise.
	(get_value_range): Return NULL if VRP is not running.
	(extract_range_from_expr): Fallback to tree_expr_XXX_p if
	VRP routines do not discover a range.
	(vrp_finalize): Clear VR_VALUE to indicate VRP is not running.
	* tree.h (ssa_name_nonzero_p, ssa_name_nonnegative_p): Prototype.
	* fold-const.c (tree_expr_nonzero_p): For SSA_NAMEs, query VRP.
	(tree_expr_nonnegative_p): Similarly.
	* tree-ssa-dom.c (nonzero_vars, nonzero_vars_stack): Remove.
	(restore_nonzero_vars_to_original_value): Remove.
	(unsafe_associative_fp_binop): Remove.
	(tree_ssa_dominator_optimize): Remove initialization and
	finalization of nonzero_vars and nonzero_vars_stack.
	(dom_opt_initialize_block): No longer push marker on
	nonzero_vars_stack.
	(dom_opt_finalize_block): No longer call
	restore_nonzero_vars_to_original_value.
	(record_equivalences_from_phis): No longer look for
	nonzero PHI arguments.
	(cprop_into_successor_phis): No longer propagate nonzero
	property into PHI arguments.  Lose unused argument.  Caller
	updated.
	(record_equivalences_from_stmt): No longer record nonzero
	values for SSA_NAMEs.
	(lookup_avail_expr): No longer use nonzero_vars.

	* gcc.dg/tree-ssa/vrp24.c: Update expected output.
	* gcc.dg/tree-ssa/vrp26.c: New test.

From-SVN: r111175
2006-02-16 21:15:32 -07:00
Jeff Law 7f18f91710 stor-layout.c (set_sizetype): Set TYPE_MAX_VALUE properly for sizetype when sizetype is unsigned.
* stor-layout.c (set_sizetype): Set TYPE_MAX_VALUE properly
        for sizetype when sizetype is unsigned.

From-SVN: r111170
2006-02-16 17:18:03 -07:00
Denis Nagorny d0236c3be1 re PR target/25603 (Miscompiled FORTRAN program)
2006-02-16  Denis Nagorny <denis_nagorny@linux.intel.com>

	PR rtl-optimization/25603
	* reload.c (reg_inc_found_and_valid_p): New. Check REG_INC note.
	(regno_clobbered_p): Use it. Reusing SETS argument for REG_INC case.
	* reload1.c (choose_reload_regs): Added call of regno_clobbered_p 
	with new meaning of SETS.

From-SVN: r111162
2006-02-16 16:03:06 -08:00
Joseph Myers 464aea9859 re PR target/20353 (uclibc does not provide C99 math functions)
gcc:
	PR target/20353
	PR target/24578
	PR target/24837
	* config/linux.opt: New file.
	* config/linux.h (CHOOSE_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER,
	LINUX_DYNAMIC_LINKER): Define.
	(TARGET_C99_FUNCTIONS): Define depending on TARGET_GLIBC.
	* config.gcc (*-*-linux*): Define extra_options.
	(*-*-*uclibc*): Define UCLIBC_DEFAULT.
	(arm*-*-linux-gnueabi): Change to arm*-*-linux-*eabi.
	* config/arm/linux-eabi.h (LINUX_TARGET_INTERPRETER): Change to
	GLIBC_DYNAMIC_LINKER.
	* config/arm/linux-elf.h (LINUX_TARGET_INTERPRETER): Likewise.
	(LINUX_TARGET_LINK_SPEC): Use LINUX_DYNAMIC_LINKER.
	* config/mips/linux.h (GLIBC_DYNAMIC_LINKER): Define.
	(LINK_SPEC): Use LINUX_DYNAMIC_LINKER.
	* doc/invoke.texi (GNU/Linux Options): New section.

gcc/testsuite:
	* gcc.dg/builtins-config.h (HAVE_C99_RUNTIME): Don't define if
	__UCLIBC__ is defined.

libstdc++-v3:
	PR libstdc++/14939
	* config/os/uclibc/ctype_base.h, config/os/uclibc/ctype_inline.h,
	config/os/uclibc/ctype_noninline.h, config/os/uclibc/os_defines.h:
	New.
	* acinclude.m4 (GLIBCXX_CONFIGURE): Test whether using uClibc.
	* configure.host: Use os/uclibc for uClibc.
	* crossconfig.m4 (*-linux*): Use link tests.  Don't hardcode
	presence of math functions.
	* configure: Regenerate.

From-SVN: r111160
2006-02-16 23:29:10 +00:00
Eric Botcazou e1e835dcbb sparc.md (setjmp): Rewrite.
* config/sparc/sparc.md (setjmp): Rewrite.
	(setjmp_32): Delete.
	(setjmp_64): Likewise.

From-SVN: r111154
2006-02-16 21:41:23 +00:00
Daniel Berlin 8afa305af6 tree-ssa-operands.c (access_can_touch_variable): Fix typo in previous change.
2006-02-16  Daniel Berlin <dberlin@dberlin.org>

	* tree-ssa-operands.c (access_can_touch_variable): Fix typo in
	 previous change.

From-SVN: r111148
2006-02-16 20:29:19 +00:00
Zdenek Dvorak b6c9b9bcca loop-invariant.c (invariant_for_use, [...]): Fail for read-write uses.
* loop-invariant.c (invariant_for_use, check_dependencies): Fail for
	read-write uses.

From-SVN: r111141
2006-02-16 15:59:00 +00:00
Zdenek Dvorak 28749cfbf3 re PR rtl-optimization/26296 (ACATS ICE cxg2007 cxg2012 verify_flow_info failed)
PR rtl-optimization/26296
	* Makefile.in (loop-invariant.c): Add except.h dependency.
	* loop-invariant.c: Include except.h.
	(find_invariant_insn): Ignore insns satisfying can_throw_internal.

From-SVN: r111139
2006-02-16 15:47:20 +00:00
Paul Brook b81ac2881e reload1.c (emit_reload_insns): Invalidate dead input registers used for reloads.
2005-02-16  Paul Brook  <paul@codesourcery.com>

	* reload1.c (emit_reload_insns): Invalidate dead input registers used
	for reloads.

From-SVN: r111137
2006-02-16 15:14:23 +00:00
Bernd Schmidt 1929b9988c re PR rtl-optimization/25636 (opts.c is being miscompiled, write to read only memory)
PR rtl-optimization/25636
	* local-alloc.c (update_equiv_regs): Lose a bogus rtx_equal_p test
	when deciding whether an insn is an initializing insn.

From-SVN: r111129
2006-02-16 01:26:54 +00:00
Daniel Berlin 3c0b6c4300 tree.c (init_ttree): Add STRUCT_FIELD_TAG handling.
2006-02-15 Daniel Berlin  <dberlin@dberlin.org>

	* tree.c (init_ttree): Add STRUCT_FIELD_TAG handling.
	(tree_code_size): Ditto.
	* tree.h (struct tree_memory_tag): Remove parent_var.
	(struct tree_struct_field_tag): New.
	(SFT_OFFSET): New.
	(SFT_SIZE): New.
	(union tree_node): Add sft member.
	* tree-ssa-alias.c (get_tmt_for): Don't handle TYPE_READONLY
	specially here.
	(create_sft): Add size and offset argument, set SFT_OFFSET and
	SFT_SIZE.
	(create_overlap_variables_for): Update for SFT_OFFSET/SFT_SIZE.
	* treestruct.def: Add TS_STRUCT_FIELD_TAG.
	* tree-flow-inline.h (get_subvar_at): Update for
	SFT_OFFSET/SFT_SIZE.
	(var_can_have_subvars): Ditto.
	(overlap_subvar): Ditto.
	* print-tree.c (print_node): Print out interesting things for
	SFT's.
	* tree-flow.h (struct subvar): Remove offset and size members.
	* tree-ssa-operands.c (get_expr_operands): Update for
	get_indirect_ref_operands changes.
	(get_indirect_ref_operands): Call add_virtual_operand instead of
	add_stmt_operand.  Only recurse on base var if requested.
	(access_can_touch_variable): New function.
	(add_stmt_operand): Split virtual operand handling into ...
	(add_virtual_operand): Here.  Add offset, size, and for_clobber
	arguments.  Prune alias sets.
	(add_call_clobber_ops): Call add_virtual_operand.

From-SVN: r111120
2006-02-15 22:09:45 +00:00
Jakub Jelinek 01ea23f3d2 re PR middle-end/26300 (ICE in trunc_int_for_mode)
PR middle-end/26300
	* combine.c (make_extraction): Bail out if ORIG_POS is negative.

	* gcc.c-torture/compile/20060215-1.c: New test.

From-SVN: r111116
2006-02-15 21:41:03 +01:00
Jakub Jelinek fb57dc0bf0 tree.h (struct tree_omp_clause): Use OMP_CLAUSE_CODE rather than TREE_CODE as index into omp_clause_num_ops array.
* tree.h (struct tree_omp_clause): Use OMP_CLAUSE_CODE rather
	than TREE_CODE as index into omp_clause_num_ops array.

From-SVN: r111115
2006-02-15 21:38:59 +01:00
Uttam Pawar f4daf7e44e re PR rtl-optimization/26184 (memory leaks in swing modulo scheduling function)
2006-02-15  Uttam Pawar  <uttamp@us.ibm.com>

        PR rtl-optimization/26184
        * modulo-sched.c (generate_reg_moves): Free bitmap vector
        uses_of_defs.
        * modulo-sched.c (sms_schedule): Free g_arr pointer.
        * modulo-sched.c (sms_schedule_by_order): Free bitmap pointers
        must_precede, must_follow and tobe_scheduled.

        PR other/26147
        * opts.c (common_handle_option): Free new_option pointer.
        * df-core.c (df_analyze): Free postorder pointer.

From-SVN: r111114
2006-02-15 14:33:33 -05:00
Rafael Espindola f7ca46d66f Makefile.in: Fix the examples about the use of stamps
* gcc/Makefile.in: Fix the examples about the use of stamps

M    gcc/ChangeLog
M    gcc/Makefile.in

From-SVN: r111113
2006-02-15 18:46:57 +00:00
Michael Matz d1a701eb17 re PR middle-end/22275 (bitfield layout change)
PR middle-end/22275

        * stor-layout.c (layout_decl): Zero-width bitfields aren't
        influenced by maximum_field_alignment or DECL_PACKED.
        (update_alignment_for_field): Ditto.
        (place_field): Ditto.
        * doc/extend.texi (<#pragma pack>, <Type Attributes>): Document
        this behaviour.

From-SVN: r111109
2006-02-15 12:19:49 +00:00
Paolo Bonzini 5b4fdb2060 cfg.c (dump_flow_info): Get dump flags as an additional parameter.
2006-02-15  Paolo Bonzini  <bonzini@gnu.org>

	* cfg.c (dump_flow_info): Get dump flags as an additional parameter.
	(debug_flow_info): Pass it.
	* alias.c (rest_of_handle_cfg): Adjust calls to dump_flow_info.
	* bb-reorder.c (reorder_basic_blocks): Likewise.
	* cfgcleanup.c (rest_of_handle_jump2): Likewise.
	* cse.c (rest_of_handle_cse, rest_of_handle_cse2): Likewise.
	* flow.c (life_analysis, recompute_reg_usage): Likewise.
	* gcse.c (gcse_main, bypass_jumps): Likewise.
	* ifcvt.c (rest_of_handle_if_conversion): Likewise.
	* local-alloc.c (rest_of_handle_local_alloc): Likewise.
	* loop-init.c (rtl_loop_init, rtl_loop_done): Likewise.
	* profile.c (compute_branch_probabilities, branch_prob): Likewise.
	* rtl.h (dump_flow_info): Adjust prototype.
	* tracer.c (rest_of_handle_tracer, tracer): Likewise.
	* var-tracking.c (variable_tracking_main): Likewise.
	* passes.c (execute_todo): Obey TDF_BLOCKS for RTL.
	* tree-dump.c (enable_rtl_dump_file): Enable the details and blocks
	options.

From-SVN: r111020
2006-02-15 09:15:56 +00:00
Marcin Dalecki bc4632d404 tree-ssa-dom.c (dom_thread_across_edge): fix tag expression construction.
2006-02-15  Marcin Dalecki <martin@dalecki.de>

	* tree-ssa-dom.c (dom_thread_across_edge): fix tag expression
	construction.

From-SVN: r111019
2006-02-15 08:58:22 +01:00
Zdenek Dvorak 43ec2467a8 re PR tree-optimization/26209 (Specific code causes g++ 4.1.0 dominance ICE when compiled with -O3)
PR tree-optimization/26209
	* tree-ssa-loop.c (pass_scev_cprop): Add TODO_cleanup_cfg.
	* tree-cfgcleanup.c (cleanup_control_flow): Remove dead
	eh edges.
	* tree-cfg.c (replace_uses_by): Do not alter cfg.

From-SVN: r110999
2006-02-14 23:55:22 +00:00
Roger Sayle 03bebcacbe re PR middle-end/23670 (Fold does not fold (a|b)&b to b likewise for (a&b) | b to b)
PR middle-end/23670
	* fold-const.c (fold_binary) <BIT_IOR_EXPR>: Optimize (X&Y)|Y into
	(X,Y) and the corresponding symmetry related transformations.
	(fold_binary) <BIT_AND_EXPR>: Likewise, optimize (X|Y)&Y into
	(X,Y) and its symmetry related transformations.

	* gcc.dg/tree-ssa/andor-2.c: New test case.

From-SVN: r110997
2006-02-14 21:08:52 +00:00
Roger Sayle fb9c6d49ff dojump.c (do_compare_rtx_and_jump): Also handle multi-word GTU and GEU.
* dojump.c (do_compare_rtx_and_jump): Also handle multi-word GTU
	and GEU.

From-SVN: r110992
2006-02-14 17:54:41 +00:00
Adam Nemet de7f492b61 * simplify-rtx.c (simplify_subreg): Combine SUBREG and TRUNCATE.
From-SVN: r110990
2006-02-14 17:45:55 +00:00
Rainer Orth 1cf0118daf re PR bootstrap/26053 (Misdetection of COMDAT group support with GNU as and non-GNU ld)
PR bootstrap/26053
	* configure.ac (HAVE_COMDAT_GROUP): Don't assume non-GNU linkers
	support COMDAT group.
	* configure: Regenerate.

From-SVN: r110985
2006-02-14 16:46:04 +00:00
Roger Sayle 1dc5d842d4 re PR middle-end/26279 (ICE in do_compare_rtx_and_jump)
PR middle-end/26279
	PR middle-end/26280
	PR middle-end/26283
	* dojump.c (do_compare_rtx_and_jump): Handle multi-word LE.

From-SVN: r110983
2006-02-14 16:26:16 +00:00
Daniel Berlin 98035a75ac re PR tree-optimization/26260 (PTA is slow with large structs (hits clisp))
2006-02-14  Daniel Berlin  <dberlin@dberlin.org>

	Fix PR tree-optimization/26260

	* doc/invoke.texi (max-fields-for-field-sensitive): Document
	param.
	* params.h (MAX_FIELDS_FOR_FIELD_SENSITIVE): New.
	* params.def (PARAM_MAX_FIELDS_FOR_FIELD_SENSITIVE): Ditto.
	* tree-ssa-structalias.c (create_variable_info_for): Use
	MAX_FIELDS_FOR_FIELD_SENSITIVE.

From-SVN: r110972
2006-02-14 14:49:13 +00:00
Zdenek Dvorak 1768461812 invoke.texi (-fprefetch-loop-arrays, [...]): Document.
* doc/invoke.texi (-fprefetch-loop-arrays, -fprefetch-loop-arrays-rtl):
	Document.
	* tree-ssa-loop-niter.c (number_of_iterations_ne,
	number_of_iterations_lt, number_of_iterations_cond): Remember the shape
	of the ending condition.
	* tree-ssa-loop-manip.c: Include params.h.
	(build_if_stmt, can_unroll_loop_p, determine_exit_conditions,
	tree_unroll_loop): New functions.
	* tree-pass.h (pass_loop_prefetch): Declare.
	* loop.c (rest_of_handle_loop_optimize): Test for
	-fprefetch-loop-arrays-rtl.
	* tree-scalar-evolution.h (affine_iv): Moved to tree-flow.h.
	* timevar.def (TV_TREE_PREFETCH): New timevar.
	* tree-ssa-loop.c (tree_ssa_loop_prefetch, gate_tree_ssa_loop_prefetch,
	pass_loop_prefetch): New.
	* tree-cfgcleanup.c: Include tree-scalar-evolution.h.
	(cleanup_tree_cfg_loop): Call scev_reset.
	* common.opt (fprefetch-loop-arrays-rtl): Add.
	* tree-ssa-loop-prefetch.c: New file.
	* tree-outof-ssa.c (struct value_expr_d): Add expr_vars field.
	(new_temp_expr_table): Initialize expr_vars.
	(free_temp_expr_table): Cleanup expr_vars.
	(check_replaceable, find_replaceable_in_bb): Prevent accumulating
	expressions from being merged into one.
	* tree-flow.h (affine_iv): Moved from tree-scalar-evolution.h.
	(struct tree_niter_desc): Add control, bound and cmp fields.
	(tree_ssa_prefetch_arrays, can_unroll_loop_p, tree_unroll_loop):
	Declare.
	* Makefile.in (tree-ssa-loop-prefetch.o): Add.
	(tree-cfgcleanup.o): Add SCEV_H dependency.
	(tree-ssa-loop-manip.o): Add PARAMS_H dependency.
	* passes.c (init_optimization_passes): Add pass_loop_prefetch.

From-SVN: r110964
2006-02-14 12:22:11 +00:00
Richard Guenther 0a4288d92e re PR tree-optimization/26258 (Wrong alias information for struct addresses in PHIs)
2006-02-14  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/26258
	* tree-ssa-structalias.c (find_func_aliases): Handle aggregates
	in PHI argument processing.

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

From-SVN: r110963
2006-02-14 09:58:57 +00:00
Adam Nemet e963b86613 simplify-rtx.c (simplify_unary_operation_1): Return new expression in the requested machine mode.
* simplify-rtx.c (simplify_unary_operation_1) <TRUNCATE>: Return
	new expression in the requested machine mode.

From-SVN: r110959
2006-02-14 07:10:35 +00:00
Roger Sayle 3bf78d3be2 optabs.c (expand_abs): Don't call do_jump_by_parts_greater_rtx directly...
* optabs.c (expand_abs): Don't call do_jump_by_parts_greater_rtx
	directly, instead let do_compare_rtx_and_jump handle this for us.
	* expr.c (expand_expr_real_1): Likewise.
	* dojump.c (do_jump_by_parts_greater_rtx): Make static.  Move
	before do_jump_by_parts_greater.
	(do_jump_by_parts_greater): Move after do_jump_by_parts_greater_rtx.
	* expr.h (do_jump_by_parts_greater_rtx): Delete prototype.

From-SVN: r110954
2006-02-14 02:59:42 +00:00
John David Anglin 0fe4610e61 quadlib.c: Use defines instead of enum qfcmp_magic.
* pa/quadlib.c: Use defines instead of enum qfcmp_magic.

From-SVN: r110947
2006-02-14 00:22:04 +00:00
Zdenek Dvorak 8e1409e877 re PR rtl-optimization/26235 (FAIL: gcc.c-torture/execute/ieee/fp-cmp-8l.c execution at -O1, -O2 and -Os)
PR rtl-optimization/26235
	* loop-invariant.c (hash_invariant_expr_1): Handle 'i' and 'n' formats.
	(invariant_expr_equal_p): Handle 'i' and 'n' formats.  Fail on unknown
	format.

From-SVN: r110939
2006-02-13 23:19:49 +00:00
Jeff Law 74290e83e7 tree-vrp.c (extract_range_from_binary_expr): Remove handling of TRUTH_XOR_EPR.
* tree-vrp.c (extract_range_from_binary_expr): Remove handling of
	TRUTH_XOR_EPR.

From-SVN: r110938
2006-02-13 16:08:00 -07:00
Jakub Jelinek 6f538523d1 re PR middle-end/26092 (ICE on const function pointer assigned to a builtin function)
PR middle-end/26092
	* gimplify.c (gimplify_call_expr): Don't call get_callee_fndecl
	twice if decl is a builtin.  When trying again, call get_callee_fndecl
	first to verify it is still a builtin.

	* gcc.c-torture/compile/20060208-1.c: New test.

From-SVN: r110927
2006-02-13 22:28:03 +01:00
Geoffrey Keating 7cdfcf600a Index: gcc/ChangeLog
2006-02-13  Geoffrey Keating  <geoffk@apple.com>

	* dwarf2out.c (base_type_die): Don't add AT_name here.
	(subrange_type_die): Don't add AT_name here.
	(modified_type_die): Rearrange code flow.  Do add AT_name here.

Index: gcc/testsuite/ChangeLog
2006-02-13  Geoffrey Keating  <geoffk@apple.com>

	* objc.dg/dwarf-1.m: New.

From-SVN: r110925
2006-02-13 21:17:59 +00:00
Zdenek Dvorak bd361d85c7 re PR rtl-optimization/26247 (gcc.dg/tree-ssa/gen-vect-26.c, 28 and 32. int_mode_for_mode ICE strict_low_part loop-invariant)
PR rtl-optimization/26247
	PR rtl-optimization/26248
	* loop-invariant.c (may_assign_reg_p): Do not allow VOIDmode.

From-SVN: r110924
2006-02-13 20:27:44 +00:00
Richard Sandiford 0977d3fedf floatunditf.c: Use if __LDBL_MANT_DIG__ == 113.
* config/floatunditf.c: Use if __LDBL_MANT_DIG__ == 113.
	* config/fixtfdi.c: Likewise.
	* config/fixunstfdi.c: Likewise.
	* config/floatditf.c: Likewise.

From-SVN: r110923
2006-02-13 19:56:21 +00:00
Roger Sayle 840992bdc2 re PR middle-end/24427 (missing optimization opportunity with binary operators)
PR middle-end/24427
	* fold-const.c (fold_binary) <BIT_IOR_EXPR>: Transform (X&C1)|C2
	into (X,C2) if C1 is a subset of the bits of C2.  Transform
	(X&C1)|C2 into X|C2 if C1|C2 == ~0.  Canonicalize (X&C1)|C2 as
	(X&(C1&~C2))|C2.
	<BIT_AND_EXPR>: Canonicalize (X|C1)&C2 as (X&C2)|(C1&C2).

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

From-SVN: r110918
2006-02-13 18:33:32 +00:00
Josh Conner 4c553323a6 re PR target/25376 (section attribute doesn't work on darwin)
PR target/25376
* varasm.c (function_section): Check for section name before
calling select_section on targets that define
USE_SELECT_SECTION_FOR_FUNCTIONS.  On other targets, use
unlikely_text_section instead of hot_function_section if
first_function_block_is_cold.
* gcc.dg/pr25376.c: New test.

* gcc.c-torture/compile/pr23237.c: Only compile test -- don't
assemble.
* lib/target-supports.exp (check_named_sections_available):
Only compile named-sections test -- don't assemble.

From-SVN: r110917
2006-02-13 18:12:17 +00:00
Joern Rennecke e98aa197b7 Add PR marker for:
PR middle-end/25335
	* reload1.c (gen_reload): Also use find_replacement in UNARY_P case.

From-SVN: r110916
2006-02-13 15:32:57 +00:00
J"orn Rennecke d0ab13fd8b * reload1.c (gen_reload): Also use find_replacement in UNARY_P case.
From-SVN: r110915
2006-02-13 15:31:31 +00:00
Zdenek Dvorak 3e8b04461f re PR rtl-optimization/26222 (build failuring in libjava)
PR rtl-optimization/26222
	* function.c (assign_stack_temp_for_type): Do not reuse stack slots
	after tree->rtl expansion.
	* loop-invariant.c (move_invariant_reg): Use force_operand on rhs
	before passing it to emit_move_insn.

From-SVN: r110912
2006-02-13 11:21:23 +00:00
Gabriel Dos Reis d539b114d4 invoke.texi (-Write-strings): Document that it is enabled by default.
2006-02-12  Gabriel Dos Reis  <gdr@integrable-solutions.net>

        * doc/invoke.texi (-Write-strings): Document that it is
	enabled by
        default. 
        * c.opt (-Wwrite-strings): Declare variable
	warn_write_strings.
        Clarify documentation.
        * c-common.h (warn_write_strings): Remove.
        * c-common.c (warn_write_strings): Likewise.
        * c-opts.c (c_common_init_options): Enable -Wwrite-strings by
        default for C++.

testsuite/
2006-02-12  Gabriel Dos Reis  <gdr@integrable-solutions.net>

        * g++.dg/warn/no-write-strings.C: New test.
        * g++.dg/warn/write-strings.C: Likewise.
        * g++.dg/warn/write-strings-default.C: Likewise.

From-SVN: r110907
2006-02-13 01:57:29 +00:00
Roger Sayle feb0478035 re PR middle-end/25724 (Emits call to __cmpdi2 for long long comparison in switches)
PR middle-end/25724
	* dojump.c (do_jump): Call do_compare_rtx_and_jump.
	(do_jump_parts_zero_rtx): New function renamed from
	do_jump_parts_equality_rtx.  Made static.  Add a mode argument.
	(do_jump_parts_equality_rtx): New function split out from
	do_jump_parts_equality.  Old implementation renamed as above.
	Call do_jump_parts_zero_rtx if either operand is zero.
	(do_jump_parts_equality): Call do_jump_parts_equality_rtx to
	do all of the heavy lifting.
	(do_compare_rtx_and_jump): Handle multi-word comparisons by
	calling either do_jump_by_parts_greater_rtx or
	do_jump_by_parts_equality_rtx.
	* expr.h (do_jump_by_parts_equality_rtx): Remove prototype.
	* expmed.c (do_cmp_and_jump): Now multi-word optimization has
	moved to do_compare_rtx_and_jump, call it directly.
	* stmt.c (do_jump_if_equal): Remove static prototype.  Add a
	mode argument.  Call do_compare_rtx_and_jump.
	(emit_case_nodes): Update calls to do_jump_if_equal.

From-SVN: r110906
2006-02-13 01:55:37 +00:00
Zdenek Dvorak 4b06592a97 re PR rtl-optimization/26225 (GCC error: in emit_move_multi_word, at expr.c:3053)
PR rtl-optimization/26225
	* loop-invariant.c (may_assign_reg_p): Do not allow BLKmode operands.

From-SVN: r110898
2006-02-13 00:02:37 +00:00