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.
From-SVN: r129716
* 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.
From-SVN: r129713
cp/
2007-10-28 Paolo Carlini <pcarlini@suse.de>
Mark Mitchell <mark@codesourcery.com>
PR c++/30659
* pt.c (do_decl_instantiation): If the VAR_DECL is not a
class member error out and return.
testsuite/
2007-10-28 Paolo Carlini <pcarlini@suse.de>
Mark Mitchell <mark@codesourcery.com>
PR c++/30659
* g++.dg/template/crash71.C: New.
Co-Authored-By: Mark Mitchell <mark@codesourcery.com>
From-SVN: r129710
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.
From-SVN: r129704
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.
From-SVN: r129702
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.
From-SVN: r129700
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.
From-SVN: r129696
2007-10-28 Andreas Krebbel <krebbel1@de.ibm.com>
* dce.c (delete_unmarked_insns): Just delete the RETVAL and
LIBCALL notes if they are about to be moved to the same insn.
From-SVN: r129693
2007-10-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/31306
* decl.c (char_len_param_value): Add check for conflicting attributes of
function argument.
From-SVN: r129685
* 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.
From-SVN: r129684
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.
From-SVN: r129680
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.
From-SVN: r129675
* 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.
From-SVN: r129664
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.
From-SVN: r129660
2007-10-26 Douglas Gregor <doug.gregor@gmail.com>
PR c++/33601
* tree.c (build_offset_type): Build canonical type based on the
TYPE_MAIN_VARIANT of the base type.
2007-10-26 Douglas Gregor <doug.gregor@gmail.com>
* g++.dg/other/pr33601.C: New.
From-SVN: r129659
cp/
2007-10-26 Paolo Carlini <pcarlini@suse.de>
PR c++/31988
* decl2.c (coerce_new_type): Do not allow a default argument for
the first parameter.
testsuite/
2007-10-26 Paolo Carlini <pcarlini@suse.de>
PR c++/31988
* g++.dg/init/new25.C: New.
From-SVN: r129657
2007-10-26 Douglas Gregor <doug.gregor@gmail.com>
PR c++/33839
* parser.c (cp_parser_decltype): Return ERROR_MARK_NODE if we
don't see the leading '('. Only lookup names if we get an
IDENTIFIER_NODE.
2007-10-26 Douglas Gregor <doug.gregor@gmail.com>
* g++.dg/cpp0x/pr33839.C: New.
From-SVN: r129656
PR c++/33744
* parser.c (cp_parser_parenthesized_expression_list): Set
greater_than_is_operator_p to true in between the parens.
* g++.dg/template/arg6.C: New test.
From-SVN: r129648
cp/
2007-10-26 Paolo Carlini <pcarlini@suse.de>
PR c++/31747
* decl.c (grokdeclarator): In case of conflicting specifiers
just return error_mark_node.
testsuite/
2007-10-26 Paolo Carlini <pcarlini@suse.de>
PR c++/31747
* g++.dg/parse/crash39.C: New.
From-SVN: r129647
* g++.dg/tree-ssa/ivopts-1.C: Remove xfail on the search for
"&x\\\[5\\\]" pattern. Search for "offset: 0x0f+fc" insetad of
"offset: -4B".
From-SVN: r129646