toplev.c (process_options): Disable -fprefetch-loop-arrays with -Os and issue a warning.
authorJanis Johnson <janis187@us.ibm.com>
Wed, 23 Jan 2002 18:48:13 +0000 (18:48 +0000)
committerJanis Johnson <janis@gcc.gnu.org>
Wed, 23 Jan 2002 18:48:13 +0000 (18:48 +0000)
* toplev.c (process_options): Disable -fprefetch-loop-arrays with
-Os and issue a warning.

From-SVN: r49146

gcc/ChangeLog
gcc/toplev.c

index b643950bfb158e7b3051bda75bd88ebdf97244df..5b72996f819e2f3e2fe643f712dd66e7463f8147 100644 (file)
@@ -1,3 +1,8 @@
+2002-01-23  Janis Johnson  <janis187@us.ibm.com>
+
+       * toplev.c (process_options): Disable -fprefetch-loop-arrays with
+       -Os and issue a warning.
+
 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
 
        * doc/fragments.texi, doc/hostconfig.texi: Update to reflect
 2002-01-22  Janis Johnson  <janis187@us.ibm.com>
 
        * Makefile.in (loop.o): Depend on OPTABS_H.
-       * loop.c (expand_builtin_prefetch): Check the prefetch operand
+       * loop.c (emit_prefetch_instructions): Check the prefetch operand
        against the predicate.
 
        PR target/5379
index e8b6102d8d6c02ad0d49335f06e68d4c479fbf18..481c1923d39fea6dba042c3839576e6d4df530d3 100644 (file)
@@ -4988,6 +4988,14 @@ process_options ()
     }
 #endif
 
+  /* This combination of options isn't handled for i386 targets and doesn't
+     make much sense anyway, so don't allow it.  */
+  if (flag_prefetch_loop_arrays && optimize_size)
+    {
+      warning ("-fprefetch-loop-arrays is not supported with -Os");
+      flag_prefetch_loop_arrays = 0;
+    }
+
 #ifndef OBJECT_FORMAT_ELF
   if (flag_function_sections && write_symbols != NO_DEBUG)
     warning ("-ffunction-sections may affect debugging on some targets");