cgraphunit.c (analyze_functions): Use opt_for_fn.
authorJan Hubicka <hubicka@ucw.cz>
Mon, 17 Nov 2014 18:53:51 +0000 (19:53 +0100)
committerJan Hubicka <hubicka@gcc.gnu.org>
Mon, 17 Nov 2014 18:53:51 +0000 (18:53 +0000)
* cgraphunit.c (analyze_functions): Use opt_for_fn.
* cgraph.h (cgraph_node::optimize_for_size_p): Likewise.

From-SVN: r217668

gcc/ChangeLog
gcc/cgraph.h
gcc/cgraphunit.c

index f5a6ee4db970781237c1acd21c56a5aae9ecc1b1..4bc782694e1fabb7f5853a6eb1c82f93e1e9cd05 100644 (file)
@@ -1,3 +1,8 @@
+2014-11-17  Jan Hubicka  <hubicka@ucw.cz>
+
+       * cgraphunit.c (analyze_functions): Use opt_for_fn.
+       * cgraph.h (cgraph_node::optimize_for_size_p): Likewise.
+
 2014-11-17  Jan Hubicka  <hubicka@ucw.cz>
 
        * cgraph.c (symbol_table::create_edge): Use opt_for_fn.
index fc5fe82d1bec97f103561eac7ae96c5329062ac2..83181c472cbabd5f69c8d344c299cf68d6eb5a91 100644 (file)
@@ -2720,7 +2720,7 @@ cgraph_node::mark_force_output (void)
 inline bool
 cgraph_node::optimize_for_size_p (void)
 {
-  if (optimize_size)
+  if (opt_for_fn (decl, optimize_size))
     return true;
   if (frequency == NODE_FREQUENCY_UNLIKELY_EXECUTED)
     return true;
index 4fba9ff59ce4bccc2bd420121057d26b47589c52..6695ae3ed205cca51f146a9daec179a7a0a6a7a5 100644 (file)
@@ -1001,7 +1001,7 @@ analyze_functions (void)
              for (edge = cnode->callees; edge; edge = edge->next_callee)
                if (edge->callee->definition)
                   enqueue_node (edge->callee);
-             if (optimize && flag_devirtualize)
+             if (optimize && opt_for_fn (cnode->decl, flag_devirtualize))
                {
                  cgraph_edge *next;