OSDN Git Service

* cgraphunit.c (cgraph_process_new_functions): Fix ordering issue.
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 27 Apr 2011 16:03:03 +0000 (16:03 +0000)
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 27 Apr 2011 16:03:03 +0000 (16:03 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173039 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/cgraphunit.c

index f2e0546..46acb85 100644 (file)
@@ -1,3 +1,7 @@
+2011-04-27  Jan Hubicka  <jh@suse.cz>
+
+       * cgraphunit.c (cgraph_process_new_functions): Fix ordering issue.
+
 2011-04-27  Uros Bizjak  <ubizjak@gmail.com>
 
        * config/i386/predicates.md (avx_vpermilp_*_operand): Remove.
index 1d40d5a..aa2f2a1 100644 (file)
@@ -233,6 +233,7 @@ cgraph_process_new_functions (void)
          cgraph_finalize_function (fndecl, false);
          cgraph_mark_reachable_node (node);
          output = true;
+          cgraph_call_function_insertion_hooks (node);
          break;
 
        case CGRAPH_STATE_IPA:
@@ -258,12 +259,14 @@ cgraph_process_new_functions (void)
          free_dominance_info (CDI_DOMINATORS);
          pop_cfun ();
          current_function_decl = NULL;
+          cgraph_call_function_insertion_hooks (node);
          break;
 
        case CGRAPH_STATE_EXPANSION:
          /* Functions created during expansion shall be compiled
             directly.  */
          node->process = 0;
+          cgraph_call_function_insertion_hooks (node);
          cgraph_expand_function (node);
          break;
 
@@ -271,7 +274,6 @@ cgraph_process_new_functions (void)
          gcc_unreachable ();
          break;
        }
-      cgraph_call_function_insertion_hooks (node);
       varpool_analyze_pending_decls ();
     }
   return output;