diff options
author | Zdenek Dvorak <ook@ucw.cz> | 2007-09-15 23:53:45 +0200 |
---|---|---|
committer | Zdenek Dvorak <rakdver@gcc.gnu.org> | 2007-09-15 21:53:45 +0000 |
commit | 5f40b3cbe2e4164e80252cc4f2234cdb5ea6da39 (patch) | |
tree | b06c39b94a477f65f57a3ea35196956c8f6f74b1 /gcc/doc | |
parent | 2ae88ecd925ebe2d24884b474a1f19c89948a6f7 (diff) | |
download | gcc-5f40b3cbe2e4164e80252cc4f2234cdb5ea6da39.zip gcc-5f40b3cbe2e4164e80252cc4f2234cdb5ea6da39.tar.gz gcc-5f40b3cbe2e4164e80252cc4f2234cdb5ea6da39.tar.bz2 |
tree-parloops.c: New file.
* 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
Diffstat (limited to 'gcc/doc')
-rw-r--r-- | gcc/doc/invoke.texi | 10 | ||||
-rw-r--r-- | gcc/doc/passes.texi | 3 |
2 files changed, 12 insertions, 1 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index af58bfe..228be52 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -358,7 +358,7 @@ Objective-C and Objective-C++ Dialects}. -fvariable-expansion-in-unroller -ftree-reassoc @gol -ftree-pre -ftree-ccp -ftree-dce -ftree-loop-optimize @gol -ftree-loop-linear -ftree-loop-im -ftree-loop-ivcanon -fivopts @gol --fcheck-data-deps @gol +-fcheck-data-deps -ftree-parallelize-loops @gol -ftree-dominator-opts -ftree-dse -ftree-copyrename -ftree-sink @gol -ftree-ch -ftree-sra -ftree-ter -ftree-fre -ftree-vectorize @gol -ftree-vect-loop-version -fvect-cost-model -ftree-salias -fipa-pta -fweb @gol @@ -5744,6 +5744,14 @@ in connection with unrolling. Perform induction variable optimizations (strength reduction, induction variable merging and induction variable elimination) on trees. +@item -ftree-parallelize-loops=n +@opindex ftree-parallelize-loops=n +Parallelize loops, i.e., split their iteration space to run in n threads. +This is only possible for loops whose iterations are independent +and can be arbitrarily reordered. The optimization is only +profitable on multiprocessor machines, for loops that are CPU-intensive, +rather than constrained e.g. by memory bandwidth. + @item -ftree-sra Perform scalar replacement of aggregates. This pass replaces structure references with scalars to prevent committing structures to memory too diff --git a/gcc/doc/passes.texi b/gcc/doc/passes.texi index b4eef60..2f35439 100644 --- a/gcc/doc/passes.texi +++ b/gcc/doc/passes.texi @@ -438,6 +438,9 @@ The pass is implemented in @file{tree-vectorizer.c} (the main driver and general utilities), @file{tree-vect-analyze.c} and @file{tree-vect-transform.c}. Analysis of data references is in @file{tree-data-ref.c}. +Autoparallelization. This pass splits the loop iteration space to run +into several threads. The pass is implemented in @file{tree-parloops.c}. + @item Tree level if-conversion for vectorizer This pass applies if-conversion to simple loops to help vectorizer. |