* Makefile.in (tree-ssa-forwprop.o): Depend on langhooks.h.
* tree-ssa-forwprop.c: Include langhooks.h.
(forward_propagate_addr_expr_into_variable_array_index): New.
(forward_propagate_addr_expr): New.
(tree_ssa_forward_propagate_single_use_vars): Loop over all
the statements in the block instead of just the last statement.
Call forward_propagate_addr_expr as needed.
(pass_forwprop): Update the SSA graph after forward propagation is
complete.
* g++.dg/tree-ssa/pr18414.C: New test.
* gcc.dg/tree-ssa/pr18414.C: New test.
* gcc.dg/tree-ssa/pr17141-1.C: New test.
* gcc.dg/tree-ssa/pr17141-2.C: New test.
From-SVN: r99837
2005-05-17 Richard Guenther <rguenth@gcc.gnu.org>
* gcc.dg/compat/generate-random.c: Do not include
libiberty.h.
* gcc.dg/compat/generate-random_r.c: Likewise.
From-SVN: r99832
* read-rtl.c (struct macro_traverse_data): Add unknown_mode_attr
field.
(mode_attr_index): Remove check for defined attribute. Remove
infile parameter. Change all callers.
(apply_mode_maps): Add unknown parameter. Change caller. Always
return after finding attribute.
(apply_macro_to_rtx): Add unknown_mode_attr parameter. Change
callers.
(apply_macro_traverse): Set mtd->unknown_mode_attr.
(read_rtx): Use mtd.unknown_mode_attr to check for an undefined
attribute used for a mode.
From-SVN: r99829
2005-05-17 Paolo Bonzini <bonzini@gnu.org>
* Makefile.am (Makefile.deps): Do not create native.list and
bytecodes.list.
(all_native_compiled_dirs, all_java_dirs): Compute dir list here.
From-SVN: r99827
gcc:
2005-05-17 Paolo Bonzini <bonzini@gnu.org>
* Makefile.in: Add tree-ssa-math-opts.c.
* expr.c (expand_expr_real_1) <case RDIV_EXPR>: Never emit as a*(1/b).
* fold-const.c (distribute_real_division): New.
(fold_binary) <case PLUS_EXPR, case MINUS_EXPR>: Use it.
* tree-pass.h (pass_cse_reciprocals): New.
* tree-optimize.c (init_tree_optimization_passes): Run it.
* tree-ssa-math-opts.c: New file.
* doc/passes.texi: Document the new pass.
gcc/testsuite:
2005-05-17 Paolo Bonzini <bonzini@gnu.org>
* gcc.dg/fold-div-1.c, gcc.dg/recip-1.c, gcc.dg/recip-2.c: New.
From-SVN: r99826
PR middle-end/21492
* cfgcleanup.c (try_crossjump_to_edge): update_forwarder_flag for
src2 if src2 has been split.
* g++.dg/opt/crossjump1.C: New test.
From-SVN: r99816
* varasm.c (struct constant_descriptor_tree): Add hash field.
(const_desc_hash): Just return hash field.
(const_desc_eq): If hash values are different, return 0 immediately.
(output_constant_def): Compute hash field of temporary key, use
htab_find_slot_with_hash instead of htab_find_slot. Set hash in
newly built constant descriptor.
(lookup_constant_def): Compute hash field of temporary key, use
htab_find_with_hash instead of htab_find.
From-SVN: r99813
PR fortran/15080
* trans-stmt.c (generate_loop_for_temp_to_lhs): Remove SIZE and COUNT2
arguments. If LSS is gfc_ss_terminator, increment COUNT1 by 1, instead
of incrementing COUNT2 and using COUNT1+COUNT2 increment COUNT1 and use
just that as index.
(generate_loop_for_rhs_to_temp): Likewise.
(compute_overall_iter_number): Add INNER_SIZE_BODY argument.
It non-NULL, add it to body.
(allocate_temp_for_forall_nest_1): New function, split from
allocate_temp_for_forall_nest.
(allocate_temp_for_forall_nest): Add INNER_SIZE_BODY argument,
propagate it down to compute_overall_iter_number. Use
allocate_temp_for_forall_nest_1.
(gfc_trans_assign_need_temp): Remove COUNT2. Call
compute_inner_temp_size into a new stmtblock_t. Adjust calls to
allocate_temp_for_forall_nest, generate_loop_for_rhs_to_temp
and generate_loop_for_temp_to_lhs.
(gfc_trans_pointer_assign_need_temp): Adjust calls to
allocate_temp_for_forall_nest.
(gfc_evaluate_where_mask): Call compute_inner_temp_size into a new
stmtblock_t. Call compute_overall_iter_number just once, then
allocate_temp_for_forall_nest_1 twice with the same size.
Initialize mask indexes if nested_forall_info != NULL.
(gfc_trans_where_2): Initialize mask indexes before calling
gfc_trans_nested_forall_loop.
* gfortran.fortran-torture/execute/forall_3.f90: Remove comment
about the test failing.
* gfortran.fortran-torture/execute/where_7.f90: New test.
* gfortran.fortran-torture/execute/where_8.f90: New test.
From-SVN: r99812
* gcc.dg/compat/generate-random.c (config.h): Do not include.
(limits.h): Include unconditionally.
(stdlib.h): Likewise.
* gcc.dg/compat/generate-random_r.c (config.h): Do not include.
(limits.h): Include unconditionally.
(stdlib.h): Likewise.
* gcc.dg/compat/struct-layout-1.exp: Do not link with libiberty.
* gcc.dg/compat/struct-layout-1_generate.c (config.h): Do not include.
(limits.h): Include unconditionally.
(stdlib.h): Likewise.
(hashtab.h): Do not include.
(getopt.h): Likewise.
(stddef.h): Include.
(hashval_t): Define.
(struct entry): Add "next" field.
(HASH_SIZE): New macro.
(hash_table): New variable.
(switchfiles): Do not use xmalloc.
(mix): New macro.
(iterative_hash): New function.
(hasht): Remove.
(e_exists): New function.
(e_insert): Likewise.
(output): Use, instead of libiberty hashtable functions.
(main): Do not use getopt. Do not call htab_create.
From-SVN: r99799
2005-05-16 Caroline Tice <ctice@apple.com>
* bb-reorder.c (verify_hot_cold_block_grouping): Replace
internal_error with gcc_assert.
* dwarf2out.c (dwarf2out_switch_text_section): Likewise.
* function.h (struct function): Remove space between "*" and
struct field names.
* varasm.c (initialize_cold_section_name): Add gcc_assert;
modify to use alloca.
(unlikely_text_section): Add check for flag_function_sections.
(assemble_start_function): Move call to resolve_section, so it
comes before first call to unlikely_text_section.
(assemble_end_function): Add test and call to function_section
if appropriate.
From-SVN: r99796
* c-common.c (c_common_truthvalue_conversion): Use fold_build2
instead of build_binary_op when performing code transformations
to avoid error messages about constructs not it the user's code.
From-SVN: r99791
* tree-data-ref.c (compute_all_dependences): Change the type
of dependence_relations to VEC(ddr_p,heap)**.
(compute_data_dependences_for_loop): Change the type of
allrelations to VEC(ddr_p,heap)*.
From-SVN: r99778
* dwarf2out.c (used_rtx_varray): Rename to used_rtx_array.
Change the type to VEC(rtx,gc)*.
(mem_loc_descriptor, add_const_value_attributes,
dwarf2out_init): Adjust uses of used_rtx_varray.
From-SVN: r99777
* getpwd.c: Remove unneeded prototype getcwd and move getwd so
that it's only declared if needed.
* getopt1.c: Change order of includes so that __GNU_LIBRARY__ is
defined.
From-SVN: r99775
* Makefile.in (options.c): Tell optc-gen.awk to include config.h,
system.h, coretypes.h and tm.h.
(options.o): Update dependencies accordingly.
* optc-gen.awk: Allow header_name to be a list of filenames.
Handle the "Condition" flag.
* opts.h (CL_DISABLED): New flag.
* opts.c (handle_option): Print an error for CL_DISABLED options.
* doc/options.texi: Document the "Condition" option flag.
From-SVN: r99774
* tree-scalar-evolution.c (set_nb_iterations_in_loop): Only
check for TREE_OVERFLOW on INTEGER_CST trees.
* tree-chrec.c (chrec_convert): Only clear TREE_OVERFLOW on
CONSTANT_CLASS_P tree nodes.
From-SVN: r99765
2005-05-15 Daniel Berlin <dberlin@dberlin.org>
Fix PR tree-optimization/21576
* tree-ssa-pre.c (expression_node_pool): New pool.
(comparison_node_pool): Ditto.
(list_node_pool): Ditto.
(pool_copy_list): New function.
(phi_translate): Handle CALL_EXPR.
(valid_in_set): Ditto.
(create_expression_by_pieces): Ditto.
(insert_into_preds_of_block): Ditto.
(insert_aux): Ditto.
(compute_avail): Ditto.
(create_value_expr_from): Handle TREE_LIST and CALL_EXPR.
(can_value_number_call): New function.
(find_leader): Update comment.
(init_pre): Create new pools.
(fini_pre): Free new pools.
(pass_pre): Add TODO_update_ssa for the future when we are going
to need vops.
* tree-vn.c (expressions_equal_p): Handle TREE_LIST.
(set_value_handle): Ditto.
(get_value_handle): Ditto.
From-SVN: r99759
2005-05-16 David Billinghurst <David.Billinghurst@riotinto.com>
PR libstdc++/21526
* lib/target-supports.exp (check_mkfifo_available):
Return 0 for cygwin as mkfifo support incomplete on platform.
Fix typos in comments.
From-SVN: r99757