aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2007-02-24 20:02:40 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2007-02-24 19:02:40 +0000
commita1d3118773f6510ecedb0d382030bb8bdb966d48 (patch)
tree9e3a2dbb0ddb5d1afef5ee56704ab6f59da22a45
parent3d577eafa1d67958e22cae9a27d8194fd47bd22f (diff)
downloadgcc-a1d3118773f6510ecedb0d382030bb8bdb966d48.zip
gcc-a1d3118773f6510ecedb0d382030bb8bdb966d48.tar.gz
gcc-a1d3118773f6510ecedb0d382030bb8bdb966d48.tar.bz2
cgraphunit.c (decide_is_function_needed): Honor -fkeep-inline-functions.
* cgraphunit.c (decide_is_function_needed): Honor -fkeep-inline-functions. From-SVN: r122293
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/cgraphunit.c7
2 files changed, 12 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 2e57a9b..84e83e4 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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.
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
index 16c34ae..55b915d 100644
--- a/gcc/cgraphunit.c
+++ b/gcc/cgraphunit.c
@@ -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. */