]> gcc.gnu.org Git - gcc.git/commitdiff
cgraph.h (struct cgraph_node): Add finalized_by_frotnend flag.
authorJan Hubicka <jh@suse.cz>
Fri, 15 May 2009 17:09:13 +0000 (19:09 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Fri, 15 May 2009 17:09:13 +0000 (17:09 +0000)
2009-05-15  Jan Hubicka  <jh@suse.cz>

* cgraph.h (struct cgraph_node): Add finalized_by_frotnend flag.
* cgraphunit.c (cgraph_finalize_function): Set it.
(cgraph_expand_function): Use it.

From-SVN: r147586

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

index 28823304600c1795f4fdaa838c0e149de4d24f64..e45090d6092935b69dfcaaee0ed0d0a76b7347d1 100644 (file)
@@ -1,3 +1,9 @@
+2009-05-15  Jan Hubicka  <jh@suse.cz>
+
+       * cgraph.h (struct cgraph_node): Add finalized_by_frotnend flag.
+       * cgraphunit.c (cgraph_finalize_function): Set it.
+       (cgraph_expand_function): Use it.
+
 2009-05-15  Sandra Loosemore  <sandra@codesourcery.com>
 
        * real.c (encode_ieee_half): Define.
index 58ae06852cf2fa65bbb16e1faee17154b526ce48..6f1e052756f3bd146d3fc30e8f95476af9e085d6 100644 (file)
@@ -211,6 +211,8 @@ struct GTY((chain_next ("%h.next"), chain_prev ("%h.previous"))) cgraph_node {
   unsigned process : 1;
   /* Set for aliases once they got through assemble_alias.  */
   unsigned alias : 1;
+  /* Set for nodes that was constructed and finalized by frontend.  */
+  unsigned finalized_by_frontend : 1;
 
   /* In non-unit-at-a-time mode the function body of inline candidates is saved
      into clone before compiling so the function in original form can be
index a73eabc44e3c851a3685ea1adec209f30f08bff1..70b2682449fe6ceba669e8a58c4a0406266552d8 100644 (file)
@@ -510,6 +510,7 @@ cgraph_finalize_function (tree decl, bool nested)
   notice_global_symbol (decl);
   node->local.finalized = true;
   node->lowered = DECL_STRUCT_FUNCTION (decl)->cfg != NULL;
+  node->finalized_by_frontend = true;
   record_cdtor_fn (node->decl);
   if (node->nested)
     lower_nested_functions (decl);
@@ -1090,7 +1091,8 @@ cgraph_expand_function (struct cgraph_node *node)
   gcc_assert (node->lowered);
 
   /* Generate RTL for the body of DECL.  */
-  if (lang_hooks.callgraph.emit_associated_thunks)
+  if (lang_hooks.callgraph.emit_associated_thunks
+      && node->finalized_by_frontend)
     lang_hooks.callgraph.emit_associated_thunks (decl);
   tree_rest_of_compilation (decl);
 
This page took 0.281444 seconds and 5 git commands to generate.