OSDN Git Service

PR tree-optimize/44063
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 11 May 2010 15:15:48 +0000 (15:15 +0000)
committerMasaki Muranaka <monaka@monami-software.com>
Sun, 23 May 2010 05:05:07 +0000 (14:05 +0900)
* ipa-inline.c (cgraph_edge_badness): Move always inlines to top of queue.
(cgraph_decide_inlining_of_small_function): Skip check when disrgarding
limits.
(estimate_function_body_sizes): Compute sizes even when disregarding.
* gcc.c-torture/compile/pr44063.c: New testcase.

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

gcc/ChangeLog
gcc/ipa-inline.c
gcc/testsuite/ChangeLog

index 92220ec..70e5809 100644 (file)
@@ -1,3 +1,11 @@
+2010-05-11  Jan Hubicka  <jh@suse.cz>
+
+       PR tree-optimize/44063
+       * ipa-inline.c (cgraph_edge_badness): Move always inlines to top of queue.
+       (cgraph_decide_inlining_of_small_function): Skip check when disrgarding
+       limits.
+       (estimate_function_body_sizes): Compute sizes even when disregarding.
+
 2010-05-11  Kai Tietz  <kai.tietz@onevision.com>
 
        * collect2.c (maybe_lto_object_file): Add x64-coff magic and check.
index 8b73210..6f189a6 100644 (file)
@@ -541,6 +541,9 @@ cgraph_edge_badness (struct cgraph_edge *edge, bool dump)
     (cgraph_estimate_size_after_inlining (1, edge->caller, edge->callee)
      - edge->caller->global.size);
 
+  if (edge->callee->local.disregard_inline_limits)
+    return INT_MIN;
+
   if (dump)
     {
       fprintf (dump_file, "    Badness calculcation for %s -> %s\n",
@@ -1068,12 +1071,14 @@ cgraph_decide_inlining_of_small_functions (void)
            }
        }
 
-      if (!cgraph_maybe_hot_edge_p (edge))
+      if (edge->callee->local.disregard_inline_limits)
+       ;
+      else if (!cgraph_maybe_hot_edge_p (edge))
        not_good = CIF_UNLIKELY_CALL;
-      if (!flag_inline_functions
+      else if (!flag_inline_functions
          && !DECL_DECLARED_INLINE_P (edge->callee->decl))
        not_good = CIF_NOT_DECLARED_INLINED;
-      if (optimize_function_for_size_p (DECL_STRUCT_FUNCTION(edge->caller->decl)))
+      else if (optimize_function_for_size_p (DECL_STRUCT_FUNCTION(edge->caller->decl)))
        not_good = CIF_OPTIMIZING_FOR_SIZE;
       if (not_good && growth > 0 && cgraph_estimate_growth (edge->callee) > 0)
        {
@@ -1833,17 +1838,6 @@ estimate_function_body_sizes (struct cgraph_node *node)
   int freq;
   tree funtype = TREE_TYPE (node->decl);
 
-  if (node->local.disregard_inline_limits)
-    {
-      if (dump_file)
-       fprintf (dump_file, "Disregarding inline limits.\n");
-      inline_summary (node)->self_time = 0;
-      inline_summary (node)->self_size = 0;
-      inline_summary (node)->time_inlining_benefit = 0;
-      inline_summary (node)->size_inlining_benefit = 0;
-      return;
-    }
-
   if (dump_file)
     fprintf (dump_file, "Analyzing function body size: %s\n",
             cgraph_node_name (node));
index 6035e5a..c664140 100644 (file)
@@ -1,3 +1,8 @@
+2010-05-11  Jan Hubicka  <jh@suse.cz>
+
+       PR tree-optimize/44063
+       * gcc.c-torture/compile/pr44063.c: New testcase.
+
 2010-05-11  Jakub Jelinek  <jakub@redhat.com>
 
        PR debug/44023