OSDN Git Service

* ipa-inline.c (cgraph_early_inlining): Handle flattening too.
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 17 Apr 2010 23:42:04 +0000 (23:42 +0000)
committerMasaki Muranaka <monaka@monami-software.com>
Sun, 23 May 2010 01:05:05 +0000 (10:05 +0900)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158477 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/ipa-inline.c

index 3906f65..addc094 100644 (file)
@@ -1,3 +1,7 @@
+2010-04-17  Jan Hubicka  <jh@suse.cz>
+
+       * ipa-inline.c (cgraph_early_inlining): Handle flattening too.
+
 2010-04-17  Richard Earnshaw  <rearnsha@arm.com>
 
        * arm.md (negdi2): Remove redundant code to force values into a
 2010-04-17  Richard Earnshaw  <rearnsha@arm.com>
 
        * arm.md (negdi2): Remove redundant code to force values into a
index 601695a..751966c 100644 (file)
@@ -1667,6 +1667,17 @@ cgraph_early_inlining (void)
     }
   else
     {
     }
   else
     {
+      if (lookup_attribute ("flatten",
+                           DECL_ATTRIBUTES (node->decl)) != NULL)
+       {
+         if (dump_file)
+           fprintf (dump_file,
+                    "Flattening %s\n", cgraph_node_name (node));
+         cgraph_flatten (node);
+         timevar_push (TV_INTEGRATION);
+         todo |= optimize_inline_calls (current_function_decl);
+         timevar_pop (TV_INTEGRATION);
+       }
       /* We iterate incremental inlining to get trivial cases of indirect
         inlining.  */
       while (iterations < PARAM_VALUE (PARAM_EARLY_INLINER_MAX_ITERATIONS)
       /* We iterate incremental inlining to get trivial cases of indirect
         inlining.  */
       while (iterations < PARAM_VALUE (PARAM_EARLY_INLINER_MAX_ITERATIONS)