OSDN Git Service

* flags.h (flag_really_no_inline): Remove.
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 29 Jul 2008 11:00:58 +0000 (11:00 +0000)
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 29 Jul 2008 11:00:58 +0000 (11:00 +0000)
* cgraph.c (cgraph_function_possibly_inlined_p): Simplify.
* toplev.c (flag_really_no_inline): Remove.
* c-cppbuiltin.c (c_cpp_builtins): Use flag_no_inline.
* ipa-inline.c (cgraph_decide_inlining): Do not check flag_no_inline.
(cgraph_decide_inlining_incrementally): Likewise.
(compute_inline_parameters): Likewise.
* opts.c (decode_options): Simplify.
* c-opts.c (c_common_post_options): Do not set flag_no_inline.
* common.opt (finline): Initialize to 1.
* tree-inline.c (inlinable_function_p): Check flag_no_inline.

* lang.c (java_post_options): Remove handling of flag_no_inline.

* misc.c (gnat_post_options): Do not set flag_no_inline.

* options.c (gfc_post_options): Do not set flag_no_inline.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@138238 138bc75d-0d04-0410-961f-82ee72b054a4

18 files changed:
gcc/ChangeLog
gcc/ada/ChangeLog
gcc/ada/misc.c
gcc/c-cppbuiltin.c
gcc/c-opts.c
gcc/cgraph.c
gcc/common.opt
gcc/flags.h
gcc/fortran/ChangeLog
gcc/fortran/options.c
gcc/ipa-inline.c
gcc/java/ChangeLog
gcc/java/lang.c
gcc/opts.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/20040206-1.c
gcc/toplev.c
gcc/tree-inline.c

index 296b562..8f51561 100644 (file)
@@ -1,4 +1,18 @@
-2008-07-29  Jan HUbicka  <jh@suse.cz>
+2008-07-29  Jan Hubicka  <jh@suse.cz>
+
+       * flags.h (flag_really_no_inline): Remove.
+       * cgraph.c (cgraph_function_possibly_inlined_p): Simplify.
+       * toplev.c (flag_really_no_inline): Remove.
+       * c-cppbuiltin.c (c_cpp_builtins): Use flag_no_inline.
+       * ipa-inline.c (cgraph_decide_inlining): Do not check flag_no_inline.
+       (cgraph_decide_inlining_incrementally): Likewise.
+       (compute_inline_parameters): Likewise.
+       * opts.c (decode_options): Simplify.
+       * c-opts.c (c_common_post_options): Do not set flag_no_inline.
+       * common.opt (finline): Initialize to 1.
+       * tree-inline.c (inlinable_function_p): Check flag_no_inline.
+
+2008-07-29  Jan Hubicka  <jh@suse.cz>
 
        * predict.c (always_optimize_for_size_p): New function.
        (optimize_bb_for_size_p, optimize_bb_for_speed_p,
index a4859fd..611311c 100644 (file)
@@ -1,3 +1,7 @@
+2008-07-28  Jan Hubicka  <jh@suse.cz>
+
+       * misc.c (gnat_post_options): Do not set flag_no_inline.
+
 2008-07-28  Richard Guenther  <rguenther@suse.de>
 
        Merge from gimple-tuples-branch.
index 006da96..02397d7 100644 (file)
@@ -340,9 +340,6 @@ gnat_post_options (const char **pfilename ATTRIBUTE_UNUSED)
   /* ??? The warning machinery is outsmarted by Ada.  */
   warn_unused_parameter = 0;
 
-  if (!flag_no_inline)
-    flag_no_inline = 1;
-
   /* Force eliminate_unused_debug_types to 0 unless an explicit positive
      -f has been passed.  This forces the default to 0 for Ada, which might
      differ from the common default.  */
index 57d0058..2d951fe 100644 (file)
@@ -636,7 +636,7 @@ c_cpp_builtins (cpp_reader *pfile)
 
   if (fast_math_flags_set_p ())
     cpp_define (pfile, "__FAST_MATH__");
-  if (flag_really_no_inline)
+  if (flag_no_inline)
     cpp_define (pfile, "__NO_INLINE__");
   if (flag_signaling_nans)
     cpp_define (pfile, "__SUPPORT_SNAN__");
index 258101c..8b31b88 100644 (file)
@@ -1018,10 +1018,6 @@ c_common_post_options (const char **pfilename)
   C_COMMON_OVERRIDE_OPTIONS;
 #endif
 
-  /* Use tree inlining.  */
-  if (!flag_no_inline)
-    flag_no_inline = 1;
-
   /* By default we use C99 inline semantics in GNU99 or C99 mode.  C99
      inline semantics are not supported in GNU89 or C89 mode.  */
   if (flag_gnu89_inline == -1)
@@ -1075,13 +1071,6 @@ c_common_post_options (const char **pfilename)
   if (warn_overlength_strings == -1 || c_dialect_cxx ())
     warn_overlength_strings = 0;
 
-  /* Adjust various flags for C++ based on command-line settings.  */
-  if (c_dialect_cxx ())
-    {
-      if (!flag_no_inline)
-       flag_no_inline = 1;
-    } 
-
   /* In C, -Wconversion enables -Wsign-conversion (unless disabled
      through -Wno-sign-conversion). While in C++,
      -Wsign-conversion needs to be requested explicitly.  */
index 51181cb..b5564b6 100644 (file)
@@ -1149,7 +1149,7 @@ bool
 cgraph_function_possibly_inlined_p (tree decl)
 {
   if (!cgraph_global_info_ready)
-    return !DECL_UNINLINABLE (decl) && !flag_really_no_inline;
+    return !DECL_UNINLINABLE (decl);
   return DECL_POSSIBLY_INLINED (decl);
 }
 
index 5d730a8..08f95c2 100644 (file)
@@ -581,7 +581,7 @@ Perform indirect inlining
 ; only when actually used.  Used in conjunction with -g.  Also
 ; does the right thing with #pragma interface.
 finline
-Common Report Var(flag_no_inline,0) Init(2)
+Common Report Var(flag_no_inline,0) Init(0)
 Pay attention to the \"inline\" keyword
 
 finline-small-functions
index f4cc3ac..e797d95 100644 (file)
@@ -169,11 +169,6 @@ extern int flag_pcc_struct_return;
 
 extern int flag_complex_method;
 
-/* Nonzero means that we don't want inlining by virtue of -fno-inline,
-   not just because the tree inliner turned us off.  */
-
-extern int flag_really_no_inline;
-
 /* Nonzero if we are only using compiler to check syntax errors.  */
 
 extern int rtl_dump_and_exit;
index b15bcfb..872678d 100644 (file)
@@ -1,3 +1,7 @@
+2008-07-29  Jan Hubicka  <jh@suse.cz>
+
+       * options.c (gfc_post_options): Do not set flag_no_inline.
+
 2008-07-29  Daniel Kraft  <d@domob.eu>
 
        PR fortran/36403
index 1f05f35..7b7916d 100644 (file)
@@ -294,10 +294,6 @@ gfc_post_options (const char **pfilename)
        gfc_warning_now ("'-fd-lines-as-code' has no effect in free form");
     }
 
-  /* Use tree inlining.  */
-  if (!flag_no_inline)
-    flag_no_inline = 1;
-
   /* If -pedantic, warn about the use of GNU extensions.  */
   if (pedantic && (gfc_option.allow_std & GFC_STD_GNU) != 0)
     gfc_option.warn_std |= GFC_STD_GNU;
index 0ccaa6b..ec3a271 100644 (file)
@@ -1159,16 +1159,14 @@ cgraph_decide_inlining (void)
                 overall_insns - old_insns);
     }
 
-  if (!flag_really_no_inline)
-    cgraph_decide_inlining_of_small_functions ();
+  cgraph_decide_inlining_of_small_functions ();
 
   /* After this point, any edge discovery performed by indirect inlining is no
      good so let's give up. */
   if (flag_indirect_inlining)
     free_all_ipa_structures_after_iinln ();
 
-  if (!flag_really_no_inline
-      && flag_inline_functions_called_once)
+  if (flag_inline_functions_called_once)
     {
       if (dump_file)
        fprintf (dump_file, "\nDeciding on functions called once:\n");
@@ -1407,9 +1405,7 @@ cgraph_decide_inlining_incrementally (struct cgraph_node *node,
     }
 
   /* Now do the automatic inlining.  */
-  if (!flag_really_no_inline
-      && mode != INLINE_ALL
-      && mode != INLINE_ALWAYS_INLINE)
+  if (mode != INLINE_ALL && mode != INLINE_ALWAYS_INLINE)
     for (e = node->callees; e; e = e->next_callee)
       {
        if (!e->callee->local.inlinable
@@ -1596,8 +1592,6 @@ compute_inline_parameters (struct cgraph_node *node)
   if (node->local.inlinable && !node->local.disregard_inline_limits)
     node->local.disregard_inline_limits
       = DECL_DISREGARD_INLINE_LIMITS (current_function_decl);
-  if (flag_really_no_inline && !node->local.disregard_inline_limits)
-    node->local.inlinable = 0;
   /* Inlining characteristics are maintained by the cgraph_mark_inline.  */
   node->global.insns = inline_summary (node)->self_insns;
   return 0;
index a2c3cca..022cff0 100644 (file)
@@ -1,3 +1,7 @@
+2008-07-29  Jan Hubicka  <jh@suse.cz>
+
+       * lang.c (java_post_options): Remove handling of flag_no_inline.
+
 2008-07-28  Richard Guenther  <rguenther@suse.de>
 
        Merge from gimple-tuples-branch.
index dde1b76..2738376 100644 (file)
@@ -532,10 +532,6 @@ java_post_options (const char **pfilename)
 {
   const char *filename = *pfilename;
 
-  /* Use tree inlining.  */
-  if (!flag_no_inline)
-    flag_no_inline = 1;
-
   /* An absolute requirement: if we're not using indirect dispatch, we
      must always verify everything.  */
   if (! flag_indirect_dispatch)
index 2a88ce2..13a7de1 100644 (file)
@@ -1072,24 +1072,14 @@ decode_options (unsigned int argc, const char **argv)
        flag_pic = flag_pie;
       if (flag_pic && !flag_pie)
        flag_shlib = 1;
-
-      if (flag_no_inline == 2)
-       flag_no_inline = 0;
-      else
-       flag_really_no_inline = flag_no_inline;
     }
 
-  /* Set flag_no_inline before the post_options () hook.  The C front
-     ends use it to determine tree inlining defaults.  FIXME: such
-     code should be lang-independent when all front ends use tree
-     inlining, in which case it, and this condition, should be moved
-     to the top of process_options() instead.  */
   if (optimize == 0)
     {
       /* Inlining does not work if not optimizing,
         so force it not to be done.  */
-      flag_no_inline = 1;
       warn_inline = 0;
+      flag_no_inline = 1;
 
       /* The c_decode_option function and decode_option hook set
         this to `2' if -Wall is used, so we can avoid giving out
@@ -1099,9 +1089,6 @@ decode_options (unsigned int argc, const char **argv)
                 "-Wuninitialized is not supported without -O");
     }
 
-  if (flag_really_no_inline == 2)
-    flag_really_no_inline = flag_no_inline;
-
   /* The optimization to partition hot and cold basic blocks into separate
      sections of the .o and executable files does not work (currently)
      with exception handling.  This is because there is no support for
index ed53441..cba3ac0 100644 (file)
@@ -1,3 +1,7 @@
+2008-07-29  Jan Hubicka  <jh@suse.cz>
+
+       * gcc.dg/20040206-1.c: Expect frontend warning now.
+
 2008-07-29  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
 
        PR 34985
index b4b509b..c9c776f 100644 (file)
@@ -7,5 +7,5 @@
     The warning about "no return statement in function
     returning non-void" is PR 13000. */
 
-static int foo (int a __attribute__((unused)) ) { } /* { dg-warning "control reaches end of non-void" } */
+static int foo (int a __attribute__((unused)) ) { } /* { dg-warning "no return statement" } */
 int main (void) { return foo (0); }
index d021eee..d717eba 100644 (file)
@@ -245,11 +245,6 @@ int flag_pcc_struct_return = DEFAULT_PCC_STRUCT_RETURN;
 
 int flag_complex_method = 1;
 
-/* Nonzero means that we don't want inlining by virtue of -fno-inline,
-   not just because the tree inliner turned us off.  */
-
-int flag_really_no_inline = 2;
-
 /* Nonzero means we should be saving declaration info into a .X file.  */
 
 int flag_gen_aux_info = 0;
index 511270b..a105861 100644 (file)
@@ -2554,7 +2554,7 @@ inlinable_function_p (tree fn)
 
   always_inline = lookup_attribute ("always_inline", DECL_ATTRIBUTES (fn));
 
-  if (flag_really_no_inline
+  if (flag_no_inline
       && always_inline == NULL)
     {
       if (do_warning)