On Wed, Sep 3, 2008 at 1:19 PM, Andrew Pinski <[EMAIL PROTECTED]> wrote:
> Maybe it is better to error out if -fgraphite is used even without
> optimization if the compiler does not have the required libraries.
>

Patch attached.

Sebastian
	* toplev.c (process_options): Fail and warn when graphite
	flags are used, but the compiler has not been configured
	with graphite libraries.
	* graphite.c (graphite_transform_loops): Remove printfs
	to dump_file for the case when graphite is not available.

Index: toplev.c
===================================================================
--- toplev.c	(revision 139940)
+++ toplev.c	(working copy)
@@ -1703,6 +1703,14 @@ process_options (void)
   else
     aux_base_name = "gccaux";
 
+#ifndef HAVE_cloog
+  if (flag_graphite
+      || flag_loop_block
+      || flag_loop_interchange
+      || flag_loop_strip_mine)
+    sorry ("Graphite loop optimizations cannot be used");
+#endif
+
   /* Unrolling all loops implies that standard loop unrolling must also
      be done.  */
   if (flag_unroll_all_loops)
Index: graphite.c
===================================================================
--- graphite.c	(revision 139940)
+++ graphite.c	(working copy)
@@ -4794,12 +4794,6 @@ graphite_transform_loops (void)
 void
 graphite_transform_loops (void)
 {
-  if (dump_file && (dump_flags & TDF_DETAILS))
-    {
-      fprintf (dump_file, "Graphite loop optimizations cannot be used.\n");
-      fprintf (dump_file, "GCC has not been configured with the required "
-	       "libraries for Graphite loop optimizations.");
-    }
   sorry ("Graphite loop optimizations cannot be used");
 }
 

Reply via email to