Patchwork [trunk] improving graphite Cloog sorry messages

login
register
mail settings
Submitter Basile Starynkevitch
Date Feb. 2, 2011, 2:41 p.m.
Message ID <20110202144119.GA4419@ours.starynkevitch.net>
Download mbox | patch
Permalink /patch/81458/
State New
Headers show

Comments

Basile Starynkevitch - Feb. 2, 2011, 2:41 p.m.
Hello All,

I find quite confusing the error messages when asking for graphite related
optimization on a GCC where Cloog has been (inadvertently) disabled. I would
like the sorry message to explicitly mention Cloog in that case.


Here is a trivial patch to trunk 169524.


########### gcc/ChangeLog entry
2011-02-02 Basile Starynkevitch  <basile@starynkevitch.net>

	* toplevel.c (process_options): Mention Cloog in error message 
	when don't HAVE_cloog.

	* graphite.c (graphite_transform_loops): Likewise.
################
################################################################


Comments or Ok are welcome.

Regards.
Richard Guenther - Feb. 2, 2011, 3:23 p.m.
On Wed, Feb 2, 2011 at 3:41 PM, Basile Starynkevitch
<basile@starynkevitch.net> wrote:
> Hello All,
>
> I find quite confusing the error messages when asking for graphite related
> optimization on a GCC where Cloog has been (inadvertently) disabled. I would
> like the sorry message to explicitly mention Cloog in that case.

That does not help the user.  How about

"The Graphite loop optimization framework was disabled for this GCC
configuration"

that should redirect people to whoever configured GCC or to install.texi.

Richard.

>
> Here is a trivial patch to trunk 169524.
>
>
> ########### gcc/ChangeLog entry
> 2011-02-02 Basile Starynkevitch  <basile@starynkevitch.net>
>
>        * toplevel.c (process_options): Mention Cloog in error message
>        when don't HAVE_cloog.
>
>        * graphite.c (graphite_transform_loops): Likewise.
> ################
> Index: gcc/toplev.c
> ===================================================================
> --- gcc/toplev.c        (revision 169524)
> +++ gcc/toplev.c        (working copy)
> @@ -1323,7 +1323,7 @@ process_options (void)
>     sorry ("Graphite loop optimizations cannot be used (-fgraphite, "
>           "-fgraphite-identity, -floop-block, -floop-flatten, "
>           "-floop-interchange, -floop-strip-mine, -floop-parallelize-all, "
> -          "and -ftree-loop-linear)");
> +          "and -ftree-loop-linear) without Cloog");
>  #endif
>
>   /* Unrolling all loops implies that standard loop unrolling must also
> Index: gcc/graphite.c
> ===================================================================
> --- gcc/graphite.c      (revision 169524)
> +++ gcc/graphite.c      (working copy)
> @@ -283,7 +283,7 @@ graphite_transform_loops (void)
>  void
>  graphite_transform_loops (void)
>  {
> -  sorry ("Graphite loop optimizations cannot be used");
> +  sorry ("Graphite loop optimizations cannot be used without Cloog");
>  }
>
>  #endif
> ################################################################
>
>
> Comments or Ok are welcome.
>
> Regards.
>
>
> --
> Basile STARYNKEVITCH         http://starynkevitch.net/Basile/
> email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
> 8, rue de la Faiencerie, 92340 Bourg La Reine, France
> *** opinions {are only mines, sont seulement les miennes} ***
>
Basile Starynkevitch - Feb. 2, 2011, 6 p.m.
On Wed, 2 Feb 2011 16:23:59 +0100
Richard Guenther <richard.guenther@gmail.com> wrote:

> On Wed, Feb 2, 2011 at 3:41 PM, Basile Starynkevitch
> <basile@starynkevitch.net> wrote:
> > Hello All,
> >
> > I find quite confusing the error messages when asking for graphite related
> > optimization on a GCC where Cloog has been (inadvertently) disabled. I would
> > like the sorry message to explicitly mention Cloog in that case.
> 
> That does not help the user.  How about
> 
> "The Graphite loop optimization framework was disabled for this GCC
> configuration"
> 
> that should redirect people to whoever configured GCC or to install.texi.


But with your proposal, there is only a clue of a misconfiguration, but not of its nature.

Regards.
Richard Guenther - Feb. 3, 2011, 9:58 a.m.
On Wed, Feb 2, 2011 at 7:00 PM, Basile Starynkevitch
<basile@starynkevitch.net> wrote:
> On Wed, 2 Feb 2011 16:23:59 +0100
> Richard Guenther <richard.guenther@gmail.com> wrote:
>
>> On Wed, Feb 2, 2011 at 3:41 PM, Basile Starynkevitch
>> <basile@starynkevitch.net> wrote:
>> > Hello All,
>> >
>> > I find quite confusing the error messages when asking for graphite related
>> > optimization on a GCC where Cloog has been (inadvertently) disabled. I would
>> > like the sorry message to explicitly mention Cloog in that case.
>>
>> That does not help the user.  How about
>>
>> "The Graphite loop optimization framework was disabled for this GCC
>> configuration"
>>
>> that should redirect people to whoever configured GCC or to install.texi.
>
>
> But with your proposal, there is only a clue of a misconfiguration, but not of its nature.

The nature of the misconfiguration is not know at this point.  It can be
either missing cloog, missing ppl, wrong versions of cloog or ppl
or simply a --disable-graphite.  Your patch is not helpful in identifying
the problem (the user might just do rpm -q cloog and see he has
cloog installed).

Richard.

> Regards.
>
> --
> Basile STARYNKEVITCH         http://starynkevitch.net/Basile/
> email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
> 8, rue de la Faiencerie, 92340 Bourg La Reine, France
> *** opinions {are only mine, sont seulement les miennes} ***
>

Patch

Index: gcc/toplev.c
===================================================================
--- gcc/toplev.c	(revision 169524)
+++ gcc/toplev.c	(working copy)
@@ -1323,7 +1323,7 @@  process_options (void)
     sorry ("Graphite loop optimizations cannot be used (-fgraphite, "
 	   "-fgraphite-identity, -floop-block, -floop-flatten, "
 	   "-floop-interchange, -floop-strip-mine, -floop-parallelize-all, "
-	   "and -ftree-loop-linear)");
+	   "and -ftree-loop-linear) without Cloog");
 #endif
 
   /* Unrolling all loops implies that standard loop unrolling must also
Index: gcc/graphite.c
===================================================================
--- gcc/graphite.c	(revision 169524)
+++ gcc/graphite.c	(working copy)
@@ -283,7 +283,7 @@  graphite_transform_loops (void)
 void
 graphite_transform_loops (void)
 {
-  sorry ("Graphite loop optimizations cannot be used");
+  sorry ("Graphite loop optimizations cannot be used without Cloog");
 }
 
 #endif