OSDN Git Service

PR c++/47132
[pf3gnuchains/gcc-fork.git] / gcc / cgraphbuild.c
index 935462e..eb9da7f 100644 (file)
@@ -33,6 +33,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree-pass.h"
 #include "ipa-utils.h"
 #include "except.h"
+#include "ipa-inline.h"
 
 /* Context of record_reference.  */
 struct record_reference_ctx
@@ -207,16 +208,7 @@ reset_inline_failed (struct cgraph_node *node)
   for (e = node->callers; e; e = e->next_caller)
     {
       e->callee->global.inlined_to = NULL;
-      if (!node->analyzed)
-       e->inline_failed = CIF_BODY_NOT_AVAILABLE;
-      else if (node->local.redefined_extern_inline)
-       e->inline_failed = CIF_REDEFINED_EXTERN_INLINE;
-      else if (!node->local.inlinable)
-       e->inline_failed = CIF_FUNCTION_NOT_INLINABLE;
-      else if (e->call_stmt_cannot_inline_p)
-       e->inline_failed = CIF_MISMATCHED_ARGUMENTS;
-      else
-       e->inline_failed = CIF_FUNCTION_NOT_CONSIDERED;
+      initialize_inline_failed (e);
     }
 }
 
@@ -362,12 +354,11 @@ build_cgraph_edges (void)
              decl = gimple_call_fndecl (stmt);
              if (decl)
                cgraph_create_edge (node, cgraph_get_create_node (decl),
-                                   stmt, bb->count, freq, bb->loop_depth);
+                                   stmt, bb->count, freq);
              else
                cgraph_create_indirect_edge (node, stmt,
                                             gimple_call_flags (stmt),
-                                            bb->count, freq,
-                                            bb->loop_depth);
+                                            bb->count, freq);
            }
          walk_stmt_load_store_addr_ops (stmt, node, mark_load,
                                         mark_store, mark_address);
@@ -472,12 +463,11 @@ rebuild_cgraph_edges (void)
              decl = gimple_call_fndecl (stmt);
              if (decl)
                cgraph_create_edge (node, cgraph_get_create_node (decl), stmt,
-                                   bb->count, freq, bb->loop_depth);
+                                   bb->count, freq);
              else
                cgraph_create_indirect_edge (node, stmt,
                                             gimple_call_flags (stmt),
-                                            bb->count, freq,
-                                            bb->loop_depth);
+                                            bb->count, freq);
            }
          walk_stmt_load_store_addr_ops (stmt, node, mark_load,
                                         mark_store, mark_address);