aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-parloops.c
AgeCommit message (Collapse)AuthorFilesLines
2008-01-16tree-parloops (gen_parallel_loop): Revert my fix.Sebastian Pop1-1/+0
2008-01-15 Sebastian Pop <sebastian.pop@amd.com> * tree-parloops (gen_parallel_loop): Revert my fix. From-SVN: r131565
2008-01-16tree-parloops.c (gen_parallel_loop): Fix previous change, declare li.Sebastian Pop1-0/+1
2008-01-15 Sebastian Pop <sebastian.pop@amd.com> * tree-parloops.c (gen_parallel_loop): Fix previous change, declare li. From-SVN: r131564
2008-01-16tree-parloops.c (gen_parallel_loop): Fix ommision of declaration for ↵Jerry DeLisle1-0/+1
loop_iterator li from previous commit. 2008-01-15 Jerry DeLisle <jvdelisle@gcc.gnu.org> * tree-parloops.c (gen_parallel_loop): Fix ommision of declaration for loop_iterator li from previous commit. From-SVN: r131563
2008-01-16tree-parloops.c (gen_parallel_loop): Free loop bound estimations.Sebastian Pop1-0/+5
2008-01-12 Sebastian Pop <sebastian.pop@amd.com> * tree-parloops.c (gen_parallel_loop): Free loop bound estimations. From-SVN: r131562
2008-01-16tree-parloops.c (loop_has_blocks_with_irreducible_flag): New.Sebastian Pop1-0/+21
2008-01-12 Sebastian Pop <sebastian.pop@amd.com> * tree-parloops.c (loop_has_blocks_with_irreducible_flag): New. (parallelize_loops): Don't parallelize irreducible components. From-SVN: r131561
2008-01-12tree-parloops.c (transform_to_exit_first_loop): Cast nit to the correct type.Zdenek Dvorak1-0/+3
* tree-parloops.c (transform_to_exit_first_loop): Cast nit to the correct type. From-SVN: r131491
2007-12-19re PR tree-optimization/34355 (ICE: invariant not recomputed when ADDR_EXPR ↵Zdenek Dvorak1-26/+53
changed with -ftree-parallelize-loops) PR tree-optimization/34355 * tree-parloops.c (take_address_of): Handle expresions instead of just variables. (eliminate_local_variables_1): Force whole invariant address to ssa name. * g++.dg/tree-ssa/pr34355.C: New test. From-SVN: r131063
2007-12-18tree-parloops.c (reduiction_info): Change documentation of reduction_initial ↵Razya Ladelsky1-54/+23
field. 2007-12-18 Razya Ladelsky <razya@il.ibm.com> * tree-parloops.c (reduiction_info): Change documentation of reduction_initial field. (initialize_reductions): Remove creation of reduction_initial variable. (create_loads_for_reductions): don't join reduction_initial to the loaded value. From-SVN: r131035
2007-12-03re PR tree-optimization/33453 (ICE in build2_stat, at tree.c:3110 with ↵Jakub Jelinek1-6/+8
-ftree-parallelize-loops=4 -ftree-vectorize) PR tree-optimization/33453 * tree-data-ref.c (split_constant_offset): Use POINTER_PLUS_EXPR for pointer addition. * tree-parloops.c (canonicalize_loop_ivs): Likewise. (separate_decls_in_loop_name): Copy DECL_GIMPLE_REG_P from var to var_copy. * gcc.c-torture/compile/20071203-1.c: New test. From-SVN: r130588
2007-11-26PR 34081/C++Andreas Krebbel1-1/+1
2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com> PR 34081/C++ * c-decl.c (store_parm_decls): Pass 'false' for the new allocate_struct_function parameter. * cgraphunit.c (cgraph_build_static_cdtor): Likewise. * tree-parloops.c (create_loop_fn): Likewise. * function.c (push_function_context_to, push_struct_function, init_function_start): Likewise. (allocate_struct_function): Add boolean parameter. * tree.h (allocate_struct_function): Add boolean parameter. * function.h (struct function): Move returns_struct and returns_pcc_struct to the end of the structure definiton. 2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com> PR 34081/C++ * trans.c (Subprogram_Body_to_gnu, Compilation_Unit_to_gnu): Pass 'false' for the new allocate_struct_function parameter. * utils.c (build_function_stub): Likewise. 2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com> PR 34081/C++ * decl.c (finish_method): Pass 'false' for the new allocate_struct_function parameter. 2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com> PR 34081/C++ * treetree.c (tree_code_create_function_wrapup): Pass 'false' for the new allocate_struct_function parameter. 2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com> PR 34081/C++ * decl.c (start_preparsed_function): Pass processing_template_decl for the new allocate_struct_function parameter. 2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com> PR 34081/C++ * g++.dg/template/dependent-expr6.C: New testcase. From-SVN: r130441
2007-11-16tree-ssa-structalias.c (ipa_pta_execute): Rename 'cfun' to 'func'.Tom Tromey1-2/+2
* tree-ssa-structalias.c (ipa_pta_execute): Rename 'cfun' to 'func'. * tree-parloops.c (create_loop_fn): Use set_cfun. * gengtype.c (open_base_files): Emit #undef cfun. * ipa-struct-reorg.c (do_reorg_1): Use set_cfun. * function.h (cfun): New define. * function.c: Undefine cfun. From-SVN: r130213
2007-11-06tree-parloops.c (reduction_info): Remove reduction_init field.Razya Ladelsky1-200/+130
2007-11-04 Razya Ladelsky <razya@il.ibm.com> * tree-parloops.c (reduction_info): Remove reduction_init field. (initialize_reductions): Remove creation of the reduction_init variable. (struct data_arg): Remove. (add_field_for_reduction, create_stores_for_reduction): New functions. (add_field_for_name): Remove reduction handling. (separate_decls_in_loop): Call add_field_for_reduction, create_stores_for_reduction. From-SVN: r129923
2007-10-292007-09-23 Razya LadelskyRazya Ladelsky1-119/+799
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
2007-09-15tree-parloops.c: New file.Zdenek Dvorak1-0/+1148
* tree-parloops.c: New file. * tree-ssa-operands.h (free_stmt_operands): Declare. * tree-ssa-loop-manip.c (split_loop_exit_edge): Return the new basic block. * tree-pass.h (pass_parallelize_loops): Declare. * omp-low.c (expand_omp_parallel, expand_omp_for): Update SSA form for virtual operands. (build_omp_regions_1): Allow analysing just a single OMP region and its subregions. ( build_omp_regions_root, omp_expand_local): New functions. (build_omp_regions): Add argument to build_omp_regions_1 call. * builtins.def (DEF_GOMP_BUILTIN): Initialize OMP builtins when autoparallelization is run. * timevar.def (TV_TREE_PARALLELIZE_LOOPS): New. * tree-ssa-loop.c (gate_tree_parallelize_loops, tree_parallelize_loops, pass_parallelize_loops): New. * common.opt (ftree-parallelize-loops): New. * tree-flow.h (omp_expand_local, tree_duplicate_sese_tail, parallelize_loops): Declare. (add_phi_args_after_copy, split_loop_exit_edge): Declaration changed. * Makefile.in (tree-parloops.o): Added. * tree-cfg.c (add_phi_args_after_copy_edge, tree_duplicate_sese_tail): New functions. (add_phi_args_after_copy_bb): Use add_phi_args_after_copy_edge. (add_phi_args_after_copy): Call add_phi_args_after_copy_edge for one extra edge as well. (tree_duplicate_sese_region): Add argument to add_phi_args_after_copy. Use VEC_free to free doms vector. (move_block_to_fn): Update loop info. Remove phi nodes for virtual operands. Recompute operand caches in the new function. (move_sese_region_to_fn): Update loop info. * passes.c (init_optimization_passes): Add pass_parallelize_loops. * tree-ssa-operands.c (free_stmt_operands): New function. * doc/passes.texi: Document autoparallelization. * doc/invoke.texi (-ftree-parallelize-loops): New option. * gcc.dg/tree-ssa/parallelization-1.c: New test. From-SVN: r128517