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

login
register
mail settings
Submitter Sebastian Pop
Date Jan. 29, 2011, 6:37 a.m.
Message ID <AANLkTi=6QCmgaRbP-2JaM8UrSxjG5aw1ipLC95ihwJ4s@mail.gmail.com>
Download mbox | patch
Permalink /patch/80921/
State New
Headers show

Comments

Sebastian Pop - Jan. 29, 2011, 6:37 a.m.
On Fri, Jan 28, 2011 at 18:52, Jack Howarth <howarth@bromo.med.uc.edu> wrote:
> 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...

Attached is a patch that passed regstrap on amd64-linux.

Sebastian
Richard Guenther - Jan. 31, 2011, 12:17 p.m.
On Sat, Jan 29, 2011 at 7:37 AM, Sebastian Pop <sebpop@gmail.com> wrote:
> On Fri, Jan 28, 2011 at 18:52, Jack Howarth <howarth@bromo.med.uc.edu> wrote:
>> 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...
>
> Attached is a patch that passed regstrap on amd64-linux.

Ok.

Thanks,
Richard.

> Sebastia
>

Patch

From 3100be87583a14d7568b9d26458cc2e9e1e2c0fa Mon Sep 17 00:00:00 2001
From: Sebastian Pop <sebpop@gmail.com>
Date: Fri, 28 Jan 2011 14:42:41 -0600
Subject: [PATCH] Use Alias in common.opt to make -ftree-loop-linear an alias of -floop-interchange.

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.
	* tree-ssa-loop.c (gate_graphite_transforms): Do not set
	flag_loop_interchange based on the value of flag_tree_loop_linear.
---
 gcc/ChangeLog       |   10 ++++++++++
 gcc/common.opt      |    4 ++--
 gcc/doc/invoke.texi |    6 ++++--
 gcc/tree-ssa-loop.c |    5 -----
 4 files changed, 16 insertions(+), 9 deletions(-)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 6d130d4..70722dc 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,4 +1,14 @@ 
 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.
+	* 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/tree-ssa-loop.c b/gcc/tree-ssa-loop.c
index 5534b6a..656d2b6 100644
--- a/gcc/tree-ssa-loop.c
+++ b/gcc/tree-ssa-loop.c
@@ -266,17 +266,12 @@  gate_graphite_transforms (void)
      is turned on.  */
   if (flag_loop_block
       || flag_loop_interchange
-      || flag_tree_loop_linear
       || flag_loop_strip_mine
       || flag_graphite_identity
       || flag_loop_parallelize_all
       || 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