cgraphunit.c (decide_is_function_needed): Honor -fkeep-inline-functions.
authorJan Hubicka <jh@suse.cz>
Sat, 24 Feb 2007 19:02:40 +0000 (20:02 +0100)
committerJan Hubicka <hubicka@gcc.gnu.org>
Sat, 24 Feb 2007 19:02:40 +0000 (19:02 +0000)
* cgraphunit.c (decide_is_function_needed): Honor
-fkeep-inline-functions.

From-SVN: r122293

gcc/ChangeLog
gcc/cgraphunit.c

index 2e57a9bca7065d351799cc108bc0618162622654..84e83e40844cd69301ad5d9efe76f443362f2739 100644 (file)
@@ -1,3 +1,8 @@
+2007-02-24  Jan Hubicka  <jh@suse.cz>
+
+       * cgraphunit.c (decide_is_function_needed): Honor
+       -fkeep-inline-functions.
+
 2007-02-24  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        * builtins.c (fold_builtin_modf): New.
index 16c34aecfeb5b72c68a01f54a36ead22ff46d1a8..55b915d3ff433b1145293e046bd3ce2c2f8b70d8 100644 (file)
@@ -198,6 +198,13 @@ decide_is_function_needed (struct cgraph_node *node, tree decl)
       && TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)))
     return true;
 
+  /* With -fkeep-inline-functions we are keeping all inline functions except
+     for extern inline ones.  */
+  if (flag_keep_inline_functions
+      && DECL_DECLARED_INLINE_P (decl)
+      && !DECL_EXTERNAL (decl))
+     return true;
+
   /* If we decided it was needed before, but at the time we didn't have
      the body of the function available, then it's still needed.  We have
      to go back and re-check its dependencies now.  */