* builtins.c (expand_builtin_memmove): Optimize memmove (x, y, 1)
into memcpy (x, y, 1) if memcpy can be expanded inline.
* gcc.c-torture/execute/builtins/memmove.c (main_test): Formatting.
* gcc.c-torture/execute/builtins/memmove-2.c: New test.
* gcc.c-torture/execute/builtins/memmove-2-lib.c: New.
From-SVN: r87539
* tree-ssa-dom.c (avail_exprs_stack): New global varray.
(struct dom_walk_block_data): Remove avail_exprs member.
(tree_ssa_dominator_optimize): Initialize avail_exprs_stack.
(lookup_avail_expr): No longer need to pass in address of
the block local available exprs stack. All callers changed.
(simplify_cond_and_lookup_avail_expr): Similarly.
(simplify_switch_and_lookup_avail_expr): Similarly.
(get_eq_expr_value, record_cond): Likewise.
(record_dominating_conditions): Likewise.
(update_rhs_and_lookup_avail_expr): Likewise.
(record_equivalences_from_stmt): Likewise.
(dom_opt_initialize_block_local_data): No longer test state of
block local avail_exprs.
(dom_opt_initialize_block): Mark unwind point in the global
avail_expr stack.
(remove_expressions_from_table): Update to unwind to the
most recent unwind marker in the global avail_expr stack.
All callers changed.
(dom_opt_finalize_block): Mark unwind point in the global
avail_expr stack as needed.
(record_cond): Push elements into the global avail_exprs stack.
From-SVN: r87532
PR c++/17324
* mangle.c (partially_mangled_name): New variable.
(partially_mangled_name_len): Likewise.
(save_partially_mangled_name): New function.
(restore_partially_mangled_name): Likewise.
(write_encoding): Save and restore partially mangled names around
calls to get_mostly_instantiated_function_type.
(write_unqualified_name): Likewise.
PR c++/17324
* g++.dg/template/mangle1.C: New test.
From-SVN: r87530
PR tree-optimization/17252
* tree-ssa-alias.c (may_alias_p): Don't assume that a
pointer may not point to itself when using relaxed
aliasing rules.
testsuite/ChangeLog
PR tree-optimization/17252
* gcc.c-torture/execute/pr17252.c: New test.
From-SVN: r87529
2004-09-14 Andrew Pinski <apinski@apple.com>
* g++.dg/tree-ssa/pointer-reference-alias.C: New test.
2004-09-14 Andrew Pinski <apinski@apple.com>
* tree-ssa-copy.c (may_propagate_copy): Don't check the aliasing
sets of the pointers but the aliasing sets of what they point to.
From-SVN: r87527
PR rtl-optimization/9771
* regclass.c (CALL_REALLY_USED_REGNO_P): New macro to eliminate
conditional compilation in init_reg_sets_1.
(init_reg_sets_1): Let global_regs[i] take priority over the frame
(but not stack) pointer exceptions to regs_invalidated_by_call.
(globalize_reg): Globalizing a fixed register may need to update
regs_invalidated_by_call.
* gcc.dg/pr9771-1.c: New test case.
From-SVN: r87516
PR tree-optimization/15262
* tree-dfa.c (dump_variable): Also print the type of the
variable.
* tree-ssa-alias.c (compute_flow_insensitive_aliasing): If two
memory tags are of conflicting alias sets but have no aliased
symbols in common, add one tag to the alias set of the other.
(setup_pointers_and_addressables): Remove hack to deal with
programs with no aliased symbols.
(may_alias_p): Don't special case aggregate types.
testsuite/ChangeLog
PR tree-optimization/15262
* gcc.c-torture/execute/pr15262-1.c: New test.
* gcc.c-torture/execute/pr15262-2.c: New test.
From-SVN: r87515
2004-09-14 H.J. Lu <hongjiu.lu@intel.com>
PR libgcj/17465
* testsuite/lib/libffi-dg.exp: Don't use global ld_library_path.
Set up LD_LIBRARY_PATH, SHLIB_PATH, LD_LIBRARYN32_PATH,
LD_LIBRARY64_PATH, LD_LIBRARY_PATH_32, LD_LIBRARY_PATH_64 and
DYLD_LIBRARY_PATH.
From-SVN: r87511
2004-09-14 Nathan Myers <ncm@cantrip.org>
* include/bits/fstream.tcc (xsgetn): Slightly tweak the recent fix
for 11722: copy can replace move; the common case is __avail == 0.
From-SVN: r87501
2004-09-14 Paolo Carlini <pcarlini@suse.de>
* include/bits/cpp_type_traits.h: Rename __is_trivially_copyable
to __is_scalar, more clear and consistent with "tr1" naming.
* include/bits/stl_algobase.h: Update consistently throughout.
From-SVN: r87497
* tree-ssa-dom.c (stmts_to_rescan): Move from a block-local varray
to a global varray.
(tree_ssa_dominator_optimize): Allocate stmts_to_rescan.
(dom_opt_initialize_block_local_data): No longer test stmts_to_rescan's
state.
(dom_opt_finalize_block): Update due to change in scope of
stmts_to_rescan.
(optimize_stmt): Similarly.
From-SVN: r87494
* unroll.c: Removed.
* loop.h: Removed.
* Makefile.in (LOOP_H, unroll.o): Removed.
(toplev.o, passes.o, stmt.o, integrate.o, loop.o): Remove LOOP_H
dependency.
* alias.c (init_alias_analysis): Remove flag_old_unroll_loops
reference.
* cfgloop.h (LOOP_PREFETCH, loop_optimize): Moved from loop.h.
* common.opt (fold-unroll-loops, fold-unroll-all-loops): Removed.
* loop.c: Do not include loop.h.
(LOOP_INFO, LOOP_MOVABLES, LOOP_REGS, LOOP_IVS, INSN_LUID,
REGNO_FIRST_LUID, REGNO_LAST_LUID, enum g_types, struct induction,
struct iv_class, enum iv_mode, struct iv, REG_IV_TYPE, REG_IV_INFO,
REG_IV_CLASS, struct loop_ivs, struct loop_mem_info, struct loop_reg,
struct loop_regs, struct loop_movables, struct loop_info): Moved
from loop.h.
(back_branch_in_range_p, fold_rtx_mult_add, biv_total_increment,
reg_dead_after_loop, final_biv_value, loop_find_equiv_value,
find_common_reg_term, loop_iterations, final_giv_value): Moved
from unroll.c.
(uid_luid, uid_loop, max_uid_for_loop, max_reg_before_loop,
loop_dump_stream, for_each_insn_in_loop, express_from,
extend_value_for_giv, loop_iv_add_mult_emit_before,
loop_iv_add_mult_sink, loop_iv_add_mult_hoist,
loop_insn_first_p, get_condition_for_loop,
loop_insn_emit_before, loop_insn_hoist,
loop_insn_sink): Made static.
(loop_invariant_p): Made static. Removed flag_old_unroll_loops
reference.
(strength_reduce): Do not call unroller.
(record_giv): Do not initialize unrolled field.
(prescan_loop): Do not set loop_info->preconditioned.
* passes.c: Do not include loop.h.
(rest_of_handle_loop_optimize): Do not call unroller.
* predict.c: Do not include loop.h.
* rtl.h (NOTE_PRECONDITIONED): Removed.
* stmt.c: Do not include loop.h.
* toplev.c: Do not include loop.h.
(process_options): Do not handle flag_old_unroll_loops.
* doc/invoke.texi (fold-unroll-loops, fold-unroll-all-loops):
Documentation removed.
* doc/passes.texi (unroll.c, loop.h): Documentation removed.
From-SVN: r87485
* Makefile.in (STAGE1_CHECKING): New variable.
(stage1_build): Use it.
* tree-ssa.c (verify_ssa): Preserve state of dominance
information.
From-SVN: r87484
2004-09-13 Bud Davis <bdavis9659@comcast.net>
PR fortran/17090
* io/list_read.c (list_formatted_read): Handle trailing spaces
at end of line.
2004-09-13 Bud Davis <bdavis9659@comcast.net>
PR fortran/17090
* gfortran.dg/pr17090.f90: New test.
From-SVN: r87474
* Makefile.in (predict.o): Depend on tree-scalar-evolution.h
* predict.c: Include tree-scalar-evolution.h and cfgloop.h
(predict_loops): Use number_of_iterations_exit to predict
number of iterations on trees.
From-SVN: r87473