]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* ipa-inline.c (cgraph_early_inlining): Handle flattening too.
authorJan Hubicka <jh@suse.cz>
Sat, 17 Apr 2010 23:42:04 +0000 (01:42 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Sat, 17 Apr 2010 23:42:04 +0000 (23:42 +0000)
From-SVN: r158477

gcc/ChangeLog
gcc/ipa-inline.c

index 3906f65d40dcb8d9ab449cc69d8daed4323fe334..addc0942f8d8ce2a975d2fe6962e57d9e9996fa3 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
index 601695a3fdaacd3cb09b999b34e176a651e63be7..751966cefb21492e2450d616686376a7284012b2 100644 (file)
@@ -1667,6 +1667,17 @@ cgraph_early_inlining (void)
     }
   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)