This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 3/3] Add -ftree-loop-distribute-patterns.

 gcc/common.opt               |    4 ++++
 gcc/doc/invoke.texi          |    5 +++++
 gcc/tree-loop-distribution.c |    3 ++-
 3 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/gcc/common.opt b/gcc/common.opt
index 77cf58e..a9fcdd2 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -1341,6 +1341,10 @@ ftree-loop-distribute-memset-zero
 Common Report Var(flag_tree_loop_distribute_memset_zero) Optimization
 Enable loop distribution of initialization loops using memset zero
+Common Report Var(flag_tree_loop_distribute_patterns) Optimization
+Enable loop distribution of patterns code generated with calls to a library
 Common Report Var(flag_tree_loop_im) Init(1) Optimization
 Enable loop invariant motion on trees
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index ca3238c..b9b8b22 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -385,6 +385,7 @@ Objective-C and Objective-C++ Dialects}.
 -ftree-copyrename -ftree-dce -ftree-dominator-opts -ftree-dse @gol
 -ftree-forwprop -ftree-fre -ftree-loop-if-convert -ftree-loop-im @gol
 -ftree-phiprop -ftree-loop-distribution -ftree-loop-distribute-memset-zero @gol
+-ftree-loop-distribute-patterns @gol
 -ftree-loop-ivcanon -ftree-loop-linear -ftree-loop-optimize @gol
 -ftree-parallelize-loops=@var{n} -ftree-pre -ftree-pta -ftree-reassoc @gol
 -ftree-sink -ftree-sra -ftree-switch-conversion @gol
@@ -6946,6 +6947,10 @@ ENDDO
 and the initialization loop is transformed into a call to memset zero.
 This flag is enabled by default at @option{-O3}.
+@item -ftree-loop-distribute-patterns
+Perform loop distribution of patterns that can be code generated with
+calls to a library.  This enables @option{-ftree-loop-distribute-memset-zero}.
 @item -ftree-loop-im
 @opindex ftree-loop-im
 Perform loop invariant motion on trees.  This pass moves only invariants that
diff --git a/gcc/tree-loop-distribution.c b/gcc/tree-loop-distribution.c
index 920f744..c677ecb 100644
--- a/gcc/tree-loop-distribution.c
+++ b/gcc/tree-loop-distribution.c
@@ -1187,7 +1187,8 @@ tree_loop_distribution (void)
       /* If both flag_tree_loop_distribute_memset_zero and
 	 flag_tree_loop_distribution are set, then only memset_zero is
 	 executed.  */
-      if (flag_tree_loop_distribute_memset_zero)
+      if (flag_tree_loop_distribute_memset_zero
+	  || flag_tree_loop_distribute_patterns)
 	  /* With the following working list, we're asking
 	     distribute_loop to separate from the rest of the loop the

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]