diff mbox

Use Alias in common.opt to make -ftree-loop-linear an alias of -floop-interchange.

Message ID 1296248259-10208-1-git-send-email-sebpop@gmail.com
State New
Headers show

Commit Message

Sebastian Pop Jan. 28, 2011, 8:57 p.m. UTC
Hi Joseph,

Here is the other change that you requested in your review.  I am
regstrapping this on amd64-linux.  This passed
make -k checkRUNTESTFLAGS=graphite.exp

Ok for trunk after full regstrap?

Thanks,
Sebastian

2011-01-28  Sebastian Pop  <sebastian.pop@amd.com>

	* common.opt (ftree-loop-linear): Use Alias to make it an alias of
	-floop-interchange.
	* invoke.texi (-ftree-loop-linear): Make it clear that this flag
	is an alias of -floop-interchange and that it requires the
	Graphite infrastructure.
	* toplev.c (process_options): flag_tree_loop_linear can be used
	only when HAVE_cloog is defined.
	* tree-ssa-loop.c (gate_graphite_transforms): Do not set
	flag_loop_interchange based on the value of flag_tree_loop_linear.
---
 gcc/ChangeLog       |   12 ++++++++++++
 gcc/common.opt      |    4 ++--
 gcc/doc/invoke.texi |    6 ++++--
 gcc/toplev.c        |    1 +
 gcc/tree-ssa-loop.c |    4 ----
 5 files changed, 19 insertions(+), 8 deletions(-)

Comments

Jack Howarth Jan. 29, 2011, 12:52 a.m. UTC | #1
On Fri, Jan 28, 2011 at 02:57:39PM -0600, Sebastian Pop wrote:
> Hi Joseph,
> 
> Here is the other change that you requested in your review.  I am
> regstrapping this on amd64-linux.  This passed
> make -k checkRUNTESTFLAGS=graphite.exp
> 
> Ok for trunk after full regstrap?

Sebastian,
   This fails to bootstrap on x86_64-apple-darwin10 with the failure...

gcc -c   -g -fkeep-inline-functions -DIN_GCC   -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wc++-compat -fno-common  -DHAVE_CONFIG_H -I. -I. -I../../gcc-4.6-20110128/gcc -I../../gcc-4.6-20110128/gcc/. -I../../gcc-4.6-20110128/gcc/../include -I../../gcc-4.6-20110128/gcc/../libcpp/include -I/sw/include -I/sw/include  -I../../gcc-4.6-20110128/gcc/../libdecnumber -I../../gcc-4.6-20110128/gcc/../libdecnumber/dpd -I../libdecnumber -I/sw/include  -I/sw/include -DCLOOG_INT_GMP -DCLOOG_ORG -I/sw/include ../../gcc-4.6-20110128/gcc/tree-ssa-phiopt.c -o tree-ssa-phiopt.o
../../gcc-4.6-20110128/gcc/tree-ssa-loop.c: In function 'gate_graphite_transforms':
../../gcc-4.6-20110128/gcc/tree-ssa-loop.c:269: error: 'flag_tree_loop_linear' undeclared (first use in this function)
../../gcc-4.6-20110128/gcc/tree-ssa-loop.c:269: error: (Each undeclared identifier is reported only once
../../gcc-4.6-20110128/gcc/tree-ssa-loop.c:269: error: for each function it appears in.)

using

  $ ../gcc-4.6-20110128/configure --prefix=/sw --prefix=/sw/lib/gcc4.6 --mandir=/sw/share/man --infodir=/sw/lib/gcc4.6/info --with-build-config=bootstrap-lto --enable-stage1-languages=c,lto --enable-languages=c,c++,fortran,lto,objc,obj-c++,java --with-gmp=/sw --with-libiconv-prefix=/sw --with-ppl=/sw --with-cloog=/sw --with-mpc=/sw --with-system-zlib --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib --program-suffix=-fsf-4.6 --enable-checking=yes --enable-cloog-backend=isl

          Jack

> 
> Thanks,
> Sebastian
> 
> 2011-01-28  Sebastian Pop  <sebastian.pop@amd.com>
> 
> 	* common.opt (ftree-loop-linear): Use Alias to make it an alias of
> 	-floop-interchange.
> 	* invoke.texi (-ftree-loop-linear): Make it clear that this flag
> 	is an alias of -floop-interchange and that it requires the
> 	Graphite infrastructure.
> 	* toplev.c (process_options): flag_tree_loop_linear can be used
> 	only when HAVE_cloog is defined.
> 	* tree-ssa-loop.c (gate_graphite_transforms): Do not set
> 	flag_loop_interchange based on the value of flag_tree_loop_linear.
> ---
>  gcc/ChangeLog       |   12 ++++++++++++
>  gcc/common.opt      |    4 ++--
>  gcc/doc/invoke.texi |    6 ++++--
>  gcc/toplev.c        |    1 +
>  gcc/tree-ssa-loop.c |    4 ----
>  5 files changed, 19 insertions(+), 8 deletions(-)
> 
> diff --git a/gcc/ChangeLog b/gcc/ChangeLog
> index 6d130d4..5b3aad3 100644
> --- a/gcc/ChangeLog
> +++ b/gcc/ChangeLog
> @@ -1,4 +1,16 @@
>  2011-01-28  Sebastian Pop  <sebastian.pop@amd.com>
> +
> +	* common.opt (ftree-loop-linear): Use Alias to make it an alias of
> +	-floop-interchange.
> +	* invoke.texi (-ftree-loop-linear): Make it clear that this flag
> +	is an alias of -floop-interchange and that it requires the
> +	Graphite infrastructure.
> +	* toplev.c (process_options): flag_tree_loop_linear can be used
> +	only when HAVE_cloog is defined.
> +	* tree-ssa-loop.c (gate_graphite_transforms): Do not set
> +	flag_loop_interchange based on the value of flag_tree_loop_linear.
> +
> +2011-01-28  Sebastian Pop  <sebastian.pop@amd.com>
>  	    Joseph Myers  <joseph@codesourcery.com>
>  
>  	* Makefile.in (hwint.o): Depend on DIAGNOSTIC_CORE_H.
> diff --git a/gcc/common.opt b/gcc/common.opt
> index 12f41b1..aed8dd1 100644
> --- a/gcc/common.opt
> +++ b/gcc/common.opt
> @@ -1903,8 +1903,8 @@ Common Report Var(flag_tree_loop_im) Init(1) Optimization
>  Enable loop invariant motion on trees
>  
>  ftree-loop-linear
> -Common Report Var(flag_tree_loop_linear) Optimization
> -Enable linear loop transforms on trees
> +Common Alias(floop-interchange)
> +Enable loop interchange transforms.  Same as -floop-interchange
>  
>  ftree-loop-ivcanon
>  Common Report Var(flag_tree_loop_ivcanon) Init(1) Optimization
> diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
> index f2e672a..989e304 100644
> --- a/gcc/doc/invoke.texi
> +++ b/gcc/doc/invoke.texi
> @@ -6870,8 +6870,10 @@ at @option{-O} and higher.
>  
>  @item -ftree-loop-linear
>  @opindex ftree-loop-linear
> -Perform linear loop transformations on tree.  This flag can improve cache
> -performance and allow further loop optimizations to take place.
> +Perform loop interchange transformations on tree.  Same as
> +@option{-floop-interchange}.  To use this code transformation, GCC has
> +to be configured with @option{--with-ppl} and @option{--with-cloog} to
> +enable the Graphite loop transformation infrastructure.
>  
>  @item -floop-interchange
>  @opindex floop-interchange
> diff --git a/gcc/toplev.c b/gcc/toplev.c
> index 78985cb..ab5a17c 100644
> --- a/gcc/toplev.c
> +++ b/gcc/toplev.c
> @@ -1316,6 +1316,7 @@ process_options (void)
>    if (flag_graphite
>        || flag_loop_block
>        || flag_loop_interchange
> +      || flag_tree_loop_linear
>        || flag_loop_strip_mine
>        || flag_graphite_identity
>        || flag_loop_parallelize_all)
> diff --git a/gcc/tree-ssa-loop.c b/gcc/tree-ssa-loop.c
> index 5534b6a..635c09f 100644
> --- a/gcc/tree-ssa-loop.c
> +++ b/gcc/tree-ssa-loop.c
> @@ -273,10 +273,6 @@ gate_graphite_transforms (void)
>        || flag_loop_flatten)
>      flag_graphite = 1;
>  
> -  /* Make flag_tree_loop_linear an alias of flag_loop_interchange.  */
> -  if (flag_tree_loop_linear)
> -    flag_loop_interchange = flag_tree_loop_linear;
> -
>    return flag_graphite != 0;
>  }
>  
> -- 
> 1.7.1
diff mbox

Patch

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 6d130d4..5b3aad3 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,4 +1,16 @@ 
 2011-01-28  Sebastian Pop  <sebastian.pop@amd.com>
+
+	* common.opt (ftree-loop-linear): Use Alias to make it an alias of
+	-floop-interchange.
+	* invoke.texi (-ftree-loop-linear): Make it clear that this flag
+	is an alias of -floop-interchange and that it requires the
+	Graphite infrastructure.
+	* toplev.c (process_options): flag_tree_loop_linear can be used
+	only when HAVE_cloog is defined.
+	* tree-ssa-loop.c (gate_graphite_transforms): Do not set
+	flag_loop_interchange based on the value of flag_tree_loop_linear.
+
+2011-01-28  Sebastian Pop  <sebastian.pop@amd.com>
 	    Joseph Myers  <joseph@codesourcery.com>
 
 	* Makefile.in (hwint.o): Depend on DIAGNOSTIC_CORE_H.
diff --git a/gcc/common.opt b/gcc/common.opt
index 12f41b1..aed8dd1 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -1903,8 +1903,8 @@  Common Report Var(flag_tree_loop_im) Init(1) Optimization
 Enable loop invariant motion on trees
 
 ftree-loop-linear
-Common Report Var(flag_tree_loop_linear) Optimization
-Enable linear loop transforms on trees
+Common Alias(floop-interchange)
+Enable loop interchange transforms.  Same as -floop-interchange
 
 ftree-loop-ivcanon
 Common Report Var(flag_tree_loop_ivcanon) Init(1) Optimization
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index f2e672a..989e304 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -6870,8 +6870,10 @@  at @option{-O} and higher.
 
 @item -ftree-loop-linear
 @opindex ftree-loop-linear
-Perform linear loop transformations on tree.  This flag can improve cache
-performance and allow further loop optimizations to take place.
+Perform loop interchange transformations on tree.  Same as
+@option{-floop-interchange}.  To use this code transformation, GCC has
+to be configured with @option{--with-ppl} and @option{--with-cloog} to
+enable the Graphite loop transformation infrastructure.
 
 @item -floop-interchange
 @opindex floop-interchange
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 78985cb..ab5a17c 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -1316,6 +1316,7 @@  process_options (void)
   if (flag_graphite
       || flag_loop_block
       || flag_loop_interchange
+      || flag_tree_loop_linear
       || flag_loop_strip_mine
       || flag_graphite_identity
       || flag_loop_parallelize_all)
diff --git a/gcc/tree-ssa-loop.c b/gcc/tree-ssa-loop.c
index 5534b6a..635c09f 100644
--- a/gcc/tree-ssa-loop.c
+++ b/gcc/tree-ssa-loop.c
@@ -273,10 +273,6 @@  gate_graphite_transforms (void)
       || flag_loop_flatten)
     flag_graphite = 1;
 
-  /* Make flag_tree_loop_linear an alias of flag_loop_interchange.  */
-  if (flag_tree_loop_linear)
-    flag_loop_interchange = flag_tree_loop_linear;
-
   return flag_graphite != 0;
 }