This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] Fix PR37388: [graphite] No warn with "-O0 -fgraphite" when cloog or ppl are not present
- From: "Sebastian Pop" <sebpop at gmail dot com>
- To: "GCC Patches" <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 5 Sep 2008 16:31:47 -0500
- Subject: [patch] Fix PR37388: [graphite] No warn with "-O0 -fgraphite" when cloog or ppl are not present
Hi,
here is a patch that makes graphite flags warn at optimization level 0.
Okay for trunk?
Thanks,
Sebastian Pop
--
AMD - GNU Tools
* 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");
}