Richard Guenther [Mon, 29 Oct 2007 18:27:38 +0000 (18:27 +0000)]
tree-flow-inline.h (get_subvar_at): Use binary search.
2007-10-29 Richard Guenther <rguenther@suse.de>
* tree-flow-inline.h (get_subvar_at): Use binary search.
(get_first_overlapping_subvar): New function to binary search
for the first overlapping subvar.
* tree-ssa-operands.c (add_vars_for_offset): Strip down to
just handle adding subvars for a pointed-to subvar. Optimize
and use get_first_overlapping_subvar.
(add_vars_for_bitmap): Fold into single caller.
(add_virtual_operand): Streamline, inherit add_vars_for_bitmap
and non pointed-to bits of add_vars_for_offset.
Paul Thomas [Mon, 29 Oct 2007 14:13:44 +0000 (14:13 +0000)]
[multiple changes]
2007-10-29 Paul Thomas <pault@gcc.gnu.org>
PR fortran/31217
PR fortran/33811
PR fortran/33686
* trans-array.c (gfc_conv_loop_setup): Send a complete type to
gfc_trans_create_temp_array if the temporary is character.
* trans-stmt.c (gfc_trans_assign_need_temp): Do likewise for
allocate_temp_for_forall_nest.
(forall_replace): New function.
(forall_replace_symtree): New function.
(forall_restore): New function.
(forall_restore_symtree): New function.
(forall_make_variable_temp): New function.
(check_forall_dependencies): New function.
(cleanup_forall_symtrees): New function.
gfc_trans_forall_1): Add and initialize pre and post blocks.
Call check_forall_dependencies to check for all dependencies
and either trigger second forall block to copy temporary or
copy lval, outside the forall construct and replace all
dependent references. After assignment clean-up and coalesce
the blocks at the end of the function.
* gfortran.h : Add prototypes for gfc_traverse_expr and
find_forall_index.
expr.c (gfc_traverse_expr): New function to traverse expression
and visit all subexpressions, under control of a logical flag,
a symbol and an integer pointer. The slave function is caller
defined and is only called on EXPR_VARIABLE.
(expr_set_symbols_referenced): Called by above to set symbols
referenced.
(gfc_expr_set_symbols_referenced): Rework of this function to
use two new functions above.
* resolve.c (find_forall_index): Rework with gfc_traverse_expr,
using forall_index.
(forall_index): New function used by previous.
* dependency.c (gfc_check_dependency): Use gfc_dep_resolver for
all references, not just REF_ARRAY.
(gfc_dep_resolver): Correct the logic for substrings so that
overlapping arrays are handled correctly.
2007-10-29 Paul Thomas <pault@gcc.gnu.org>
PR fortran/31217
PR fortran/33811
* gfortran.dg/forall_12.f90: New test.
PR fortran/33686
* gfortran.dg/forall_13.f90: New test.
Razya Ladelsky [Mon, 29 Oct 2007 11:57:39 +0000 (11:57 +0000)]
2007-10-29 Razya Ladelsky
Automatic parallelization reduction tests.
* testsuite/gcc.dg/tree-ssa/reduc-1.c: New test.
* testsuite/gcc.dg/tree-ssa/reduc-1char.c: New test.
* testsuite/gcc.dg/tree-ssa/reduc-1short.c: New test.
* testsuite/gcc.dg/tree-ssa/reduc-2.c: New test.
* testsuite/gcc.dg/tree-ssa/reduc-2char.c: New test.
* testsuite/gcc.dg/tree-ssa/reduc-2short.c: New test.
* testsuite/gcc.dg/tree-ssa/reduc-3.c: New test.
* testsuite/gcc.dg/tree-ssa/reduc-6.c: New test.
* testsuite/gcc.dg/tree-ssa/reduc-7.c: New test.
* testsuite/gcc.dg/tree-ssa/reduc-8.c: New test.
* testsuite/gcc.dg/tree-ssa/reduc-9.c: New test.
Razya Ladelsky [Mon, 29 Oct 2007 11:05:04 +0000 (11:05 +0000)]
2007-09-23 Razya Ladelsky
Zdenek Dvorak
OMP_ATOMIC Changes,
Reduction support for automatic parallelization.
* expr.c (expand_expr_real_1): Add cases for OMP_ATOMIC_LOAD,
OMP_ATOMIC_STORE.
* Makefile.in: Add dependencies to expr.o, tree-parloops.o, omp-low.o
* tree-pretty-print.c (dump_generic_node): Add OMP_ATOMIC_LOAD
and OMP_ATOMIC_STORE.
* tree.h (OMP_DIRECTIVE_P): Add OMP_ATOMIC_LOAD,
OMP_ATOMIC_STORE.
* gimple-low.c (lower_stmt): Same.
* gimplify.c (gimplify_expr): Same.
(gimplify_omp_atomic_fetch_op, gimplify_omp_atomic_pipeline,
gimplify_omp_atomic_mutex): Remove.
(gimplify_omp_atomic): Change it to simply gimplify the
statement instead of expanding it.
* omp-low.c: Add includes to optabs.h, cfgloop.h.
(expand_omp_atomic, expand_omp_atomic_pipeline,
goa_stabilize_expr, expand_omp_atomic_mutex,
expand_omp_atomic_fetch_op): New functions to implement
expansion of OMP_ATOMIC.
(expand_omp, build_omp_regions_1): Add support for
OMP_ATOMIC_LOAD/OMP_ATOMIC_STORE.
* tree-cfg.c (make_edges): add case for OMP_ATOMIC_LOAD,
OMP_ATOMIC_STORE.
* tree-gimple.c (is_gimple_stmt): Add OMP_ATOMIC_LOAD,
OMP_ATOMIC_STORE.
* tree-parloops.c: add include to tree-vectorizer.h.
(reduction_info): New structure for reduction.
(reduction_list): New list to represent list of reductions
per loop.
(struct data_arg): New helper structure for reduction.
(reduction_info_hash, reduction_info_eq, reduction_phi,
initialize_reductions,
create_call_for_reduction, create_phi_for_local_result,
create_call_for_reduction_1, create_loads_for_reductions,
create_final_loads_for_reduction): New functions.
(loop_parallel_p): Identify reductions, add reduction_list parameter.
(separate_decls_in_loop_name): Support reduction variables.
(separate_decls_in_loop): Add reduction_list and ld_st_data arguments,
call create_loads_for_reduction for each reduction.
(canonicalize_loop_ivs): Identify reductions, add reduction_list
parameter.
(transform_to_exit_first_loop): Add reduction support, add
reduction_list parameter.
(gen_parallel_loop): Add reduction_list parameter. Add call
separate_decls_in_loop with
the new argument. Traverse reductions and call
initialize_reductions, create_call_for_reduction.
(parallelize_loops): Create and delete the reduction list.
(add_field_for_name): Change use of data parameter. Add fields for
reductions.
* tree-vectorizer.h (vect_analyze_loop_form): Add declaration.
* tree-vect-analyze.c (vect_analyze_loop_form): export it.
* tree.def: Add definitions for OMP_ATOMIC_LOAD,
OMP_ATOMIC_STORE.
* tree-inline.c (estimate_num_insns_1): add cases for
OMP_ATOMIC_LOAD, OMP_ATOMIC_STORE.
* tree-cfg.c (make_edges): Add OMP_ATOMIC_LOAD,
OMP_ATOMIC_STORE.
* tree-ssa-operands.c (get_addr_dereference_operands):
New function. Subroutine of get_indirect_ref_operands.
(get_indirect_ref_operands): Call get_addr_dereference_operands.
(get_expr_operands): Support OMP_ATOMIC_LOAD, OMP_ATOMIC_STORE.
* config/cris/cris.c: Include df.h.
(cris_address_cost): Add gcc_assert for canonicalization
assumptions. For PLUS with MULT or register, correct
test for register in other arm. Tweak comments.
Richard Guenther [Sun, 28 Oct 2007 21:39:15 +0000 (21:39 +0000)]
tree-ssa-operands.c (add_vars_for_offset): Add parameter telling if the var is to be treated as points-to location.
2007-10-28 Richard Guenther <rguenther@suse.de>
* tree-ssa-operands.c (add_vars_for_offset): Add parameter
telling if the var is to be treated as points-to location.
(add_vars_for_bitmap): Pass true to add_vars_for_offset.
(add_virtual_operand): Only recurse into MPTs if aliases
is from a NMT.
Richard Guenther [Sun, 28 Oct 2007 19:03:05 +0000 (19:03 +0000)]
tree-ssa-operands.c (add_vars_for_offset): Clean and speed up.
2007-10-28 Richard Guenther <rguenther@suse.de>
* tree-ssa-operands.c (add_vars_for_offset): Clean and speed up.
(add_vars_for_bitmap): Do not recurse further. Only add vars
for pointed-to SFTs.
(add_virtual_operand): Re-instantiate loop to add operands for
aliases. Recurse into MPTs.
(get_indirect_ref_operands): If we fall back to use a pointers
SMT, make sure to not prune based on the access offset and size.
Andrew Pinski [Sun, 28 Oct 2007 17:00:54 +0000 (10:00 -0700)]
re PR middle-end/33589 (ICE on valid code at -O2: verify_flow_info failed)
2007-10-28 Andrew Pinski <pinskia@gmail.com>
PR tree-opt/33589
* tree-outof-ssa.c (rewrite_trees): If the statement changed, cleanup
the eh information on the statement.
2007-10-28 Andrew Pinski <pinskia@gmail.com>
PR tree-opt/33589
* g++.dg/torture/pr33589-1.C: New testcase.
* g++.dg/torture/pr33589-2.C: New testcase.
Paolo Carlini [Sun, 28 Oct 2007 16:03:06 +0000 (16:03 +0000)]
stl_uninitialized.h (uninitialized_copy): Use ::new and value_type per the letter of the standard.
2007-10-28 Paolo Carlini <pcarlini@suse.de>
* include/bits/stl_uninitialized.h (uninitialized_copy): Use
::new and value_type per the letter of the standard.
* testsuite/20_util/specialized_algorithms/uninitialized_copy/
move_iterators/1.cc: New.
Uros Bizjak [Sun, 28 Oct 2007 14:57:50 +0000 (15:57 +0100)]
re PR tree-optimization/33920 (Segfault in combine_blocks/tree-if-conv.c)
PR tree-optimization/33920
* tree-if-conv.c (tree_if_conversion): Force predicate of single
successor bb to true when predecessor bb has NULL predicate.
(find_phi_replacement_condition): Assert that tmp_cond is non-null.
testsuite/ChangeLog:
PR tree-optimization/33920
* gcc.dg/tree-ssa/pr33290.c: New test.
Uros Bizjak [Sat, 27 Oct 2007 16:17:49 +0000 (18:17 +0200)]
i386-2.C: Include bmmintrin.h.
* g++.dg/other/i386-2.C: Include bmmintrin.h. Add -msse5 to dg-options.
* gcc.target/i386/sse-13.c: Also include mm3dnow.h. Add
"-march=k8 -m3dnow" to check 3dnow and 3dnowA intrinsics.
* gcc.target/i386/sse-14.c: Ditto.
Tobias Burnus [Sat, 27 Oct 2007 14:43:53 +0000 (16:43 +0200)]
re PR fortran/33862 (Support .FTN file extension for Fortran fixed-format source files)
2007-10-27 Tobias Burnus <burnus@net-b.de>
PR fortran/33862
* lang-specs.h: Support .ftn and .FTN extension, use CPP for .FOR.
* options.c (form_from_filename): Support .ftn extension.
* gfortran.texi: Document support of .for and .ftn file extension.
Richard Guenther [Sat, 27 Oct 2007 11:10:09 +0000 (11:10 +0000)]
re PR tree-optimization/33870 (miscompiles sqlite)
2007-10-27 Richard Guenther <rguenther@suse.de>
PR tree-optimization/33870
* tree-ssa-operands.c (add_vars_for_offset): Reduce code
duplication. Remove redundant call to access_can_touch_variable.
(add_vars_for_bitmap): New helper for recursing over MPT contents.
(add_virtual_operand): Use it.
* gcc.dg/tree-ssa/alias-15.c: New testcase.
* gcc.c-torture/execute/pr33870.c: Likewise.
* doc/invoke.texi (Option Summary, optimizations): Remove
-fbounds-check. Add -fassociative-math, -freciprocal-math,
-ftree-vrp and -funit-at-a-time. Change -fno-split-wide-types to
-fsplit-wide-types to match later entry. Break up a long line.
(Option Summary, code gen options) Add -fno-stack-limit. Add
missing @gol to the end of a line.
(Optimization Options): Remove -fbounds-check, which is also
documented under Code Generation Options. Remove =n from
index entry for -ftree-parallelize-loops. Change -fno-cprop-registers
to -fcprop-registers to match other options, and say when it is
enabled rather than disabled. Remove extra index entry for
-fno-cx-limited-range. Add index entries for -fstack-protector
and -fstack-protector-all.
(Code Gen Options): Add index entry for -ftls-model.
Jason Merrill [Fri, 26 Oct 2007 19:54:10 +0000 (15:54 -0400)]
re PR c++/24791 (ICE on invalid instantiation of template's static member)
PR c++/24791
* pt.c (get_template_info): New fn.
(template_class_depth): Use it.
(push_template_decl_real): Check that the template args of the
definition match the args of the previous declaration.
Jakub Jelinek [Thu, 25 Oct 2007 20:25:12 +0000 (22:25 +0200)]
re PR libgomp/33275 (Transient libgomp.fortran/omp_parse3.f90 -O0 failure)
PR libgomp/33275
* testsuite/libgomp.fortran/omp_parse3.f90 (test_threadprivate):
Make x and y integers rather than (implicit) reals. Add private (j)
clause to the last omp parallel.
Johannes Singler [Thu, 25 Oct 2007 17:07:56 +0000 (17:07 +0000)]
multiway_merge.h: Removed Timing<inactive_tag>
2007-10-25 Johannes Singler <singler@ira.uka.de>
* include/parallel/multiway_merge.h: Removed Timing<inactive_tag>
* include/parallel/random_shuffle.h: Same
* include/parallel/set_operations.h: Same
* include/parallel/tree.h: Same
* include/parallel/multiway_mergesort.h: Same
* include/parallel/timing.h: Removed completely
Ira Rosen [Thu, 25 Oct 2007 16:41:45 +0000 (16:41 +0000)]
re PR tree-optimization/33833 (ICE in build2_stat, at tree.c:3110 at -O3, tree-vectorizer)
PR tree-optimization/33833
* tree-vect-analyze.c (vect_analyze_data_refs): Use POINTER_PLUS_EXPR
and convert init to sizetype in inner_base construction.
Richard Guenther [Thu, 25 Oct 2007 12:38:38 +0000 (12:38 +0000)]
tree-flow.h (mem_sym_stats): Remove.
2007-10-25 Richard Guenther <rguenther@suse.de>
* tree-flow.h (mem_sym_stats): Remove.
(dump_mem_sym_stats_for_var): Declare.
* tree-dfa.c (dump_variable): Call dump_mem_sym_stats_for_var.
(mem_sym_stats): Move ...
* tree-ssa-alias.c (mem_sym_stats): ... here and make it static.
(mem_sym_score): Rename from ...
(pscore): ... this. Remove.
(dump_mem_sym_stats_for_var): New function. Dump the score, but
not the frequencies.
(compare_mp_info_entries): Make sort stable by disambiguating
on DECL_UID.
Ira Rosen [Thu, 25 Oct 2007 07:25:55 +0000 (07:25 +0000)]
re PR tree-optimization/33866 (ICE in vect_get_vec_def_for_stmt_copy, at tree-vect-transform.c:1937)
PR tree-optimization/33866
* tree-vect-transform.c (vectorizable_store): Check operands of all the
stmts in the group of strided accesses. Get def stmt type for each store
in the group and pass it to vect_get_vec_def_for_stmt_copy ().
re PR target/33755 (Gcc 4.2.2 broken for mips linux kernel builds)
gcc/
PR target/33755
* config/mips/mips.c (mips_lo_sum_offset): New structure.
(mips_hash_base, mips_lo_sum_offset_hash, mips_lo_sum_offset_eq)
(mips_lo_sum_offset_lookup, mips_record_lo_sum)
(mips_orphaned_high_part_p: New functions.
(mips_avoid_hazard): Don't check INSN_P here.
(mips_avoid_hazards): Rename to...
(mips_reorg_process_insns): ...this. Cope with
!TARGET_EXPLICIT_RELOCS. Delete orphaned high-part relocations,
or turn them into nops.
(mips_reorg): Remove TARGET_EXPLICIT_RELOCS check from calls to
dbr_schedule and mips_avoid_hazards/mips_reorg_process_insns.
(mips_set_mips16_mode): Don't set flag_delayed_branch here.
(mips_override_options): Set flag_delayed_branch to 0.
gcc/testsuite/
PR target/33755
* gcc.target/mips/pr33755.c: New test.
mips.h (MOVE_MAX): Use UNITS_PER_WORD and describe MIPS-specific implementation details.
gcc/
* config/mips/mips.h (MOVE_MAX): Use UNITS_PER_WORD and describe
MIPS-specific implementation details.
(MIPS_MAX_MOVE_BYTES_PER_LOOP_ITER): New macro.
(MIPS_MAX_MOVE_BYTES_STRAIGHT): Likewise.
(MOVE_RATIO): Define to MIPS_MAX_MOVE_BYTES_STRAIGHT / UNITS_PER_WORD
for targets with movmemsi.
(MOVE_BY_PIECES_P): Define.
* config/mips/mips.c (MAX_MOVE_REGS, MAX_MOVE_BYTES): Delete.
(mips_block_move_loop): Add a bytes_per_iter argument.
(mips_expand_block_move): Use MIPS_MAX_MOVE_BYTES_STRAIGHT.
Update call to mips_block_move_loop.
Paolo Carlini [Wed, 24 Oct 2007 15:21:22 +0000 (15:21 +0000)]
array (_M_instance): Align naturally.
2007-10-24 Paolo Carlini <pcarlini@suse.de>
* include/tr1_impl/array (_M_instance): Align naturally.
* testsuite/ext/array_allocator/1.cc: Use ext/vstring,
more solid than our current basic_string vs alignment.
* testsuite/ext/array_allocator/2.cc: Likewise.
* testsuite/ext/array_allocator/3.cc: Likewise.
Michael Matz [Wed, 24 Oct 2007 12:54:24 +0000 (12:54 +0000)]
re PR debug/33868 (Gross memory usage of var-tracking)
PR debug/33868
* var-tracking.c (variable_union): Don't break after one loop
* iteration
but only when a difference is found.
(dump_variable): Also print DECL_UID.
ipa-type-escape.h: Expose function is_array_access_through_pointer_and_index.
2007-10-24 Olga Golovanevsky <olga@il.ibm.com>
* ipa-type-escape.h: Expose function
is_array_access_through_pointer_and_index.
* ipa-type-escape.c
(is_array_access_through_pointer_and_index):
Add three new parameters. Add support of
POINTER_PLUS_EXPR tree code.
Ira Rosen [Wed, 24 Oct 2007 09:35:00 +0000 (09:35 +0000)]
re PR tree-optimization/33804 (ICE in vect_transform_stmt, at tree-vect-transform.c:6131 with -ftree-vectorize)
PR tree-optimization/33804
* tree-vect-transform.c (vectorizable_operation): Remove the
checks that the vectorization is worthwhile from the transformation
phase.
Ira Rosen [Wed, 24 Oct 2007 07:51:09 +0000 (07:51 +0000)]
tree-vect-analyze.c (vect_build_slp_tree): Return false if vectype cannot be determined for the scalar type.
* tree-vect-analyze.c (vect_build_slp_tree): Return false if
vectype cannot be determined for the scalar type.
(vect_analyze_slp_instance): Likewise.
* tree-vect-transform.c (vect_model_reduction_cost): Change the
return type to bool. Return false if vectype cannot be determined
for the scalar type.
(vect_get_constant_vectors): Return false if vectype cannot be
determined for the scalar type.
(get_initial_def_for_induction, vect_get_vec_def_for_operand,
get_initial_def_for_reduction, vect_create_epilog_for_reduction,
vectorizable_reduction): Likewise.
Jason Merrill [Wed, 24 Oct 2007 03:45:37 +0000 (23:45 -0400)]
PR c++/25950 (DR 391)
PR c++/25950 (DR 391)
* call.c (struct conversion): Remove check_copy_constructor_p.
(reference_binding): Always bind a reference directly to a
compatible class rvalue. Pass down LOOKUP_NO_TEMP_BIND during
temporary creation.
(check_constructor_callable): Remove.
(convert_like_real): Don't call it.
(initialize_reference): Don't call check_constructor_callable.
(standard_conversion): Check LOOKUP_NO_CONVERSION instead of
LOOKUP_CONSTRUCTOR_CALLABLE. Don't require a temporary for base
conversions if LOOKUP_NO_TEMP_BIND.
(implicit_conversion): Pass through LOOKUP_NO_TEMP_BIND.
(build_user_type_conversion_1): Pass through LOOKUP_NO_TEMP_BIND for
second conversion.
* cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): Remove.
Craig Rodrigues [Tue, 23 Oct 2007 23:53:31 +0000 (23:53 +0000)]
config.gcc: For a FreeBSD target...
* config.gcc: For a FreeBSD target, parse the value of ${target}
to determine the value of FBSD_MAJOR, instead of adding an
explicit check for every possible FreeBSD major version.
Dorit Nuzman [Tue, 23 Oct 2007 19:50:18 +0000 (19:50 +0000)]
re PR tree-optimization/33860 (ICE in vectorizable_load, at tree-vect-transform.c:5503)
PR tree-optimization/33860
* tree-vect-transform.c (vect_analyze_data_ref_access): Don't allow
interleaved accesses in case the dr is inside the inner-loop during
outer-loop vectorization.