re PR bootstrap/58186 (LTO profiledbootstrap fails in stage feedback for fortran...
authorJan Hubicka <jh@suse.cz>
Tue, 20 Aug 2013 21:41:36 +0000 (23:41 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Tue, 20 Aug 2013 21:41:36 +0000 (21:41 +0000)
PR bootstrap/58186
* cgraph.c (cgraph_add_edge_to_call_site_hash): Overwrite hash
entry for direct edges.
(cgraph_turn_edge_to_speculative): Fix setting of can_throw_external.

From-SVN: r201891

gcc/ChangeLog
gcc/cgraph.c

index fa97b87157ce32ead1e0f94c67f4b4cb4ec869d8..77dd86cf9c81d68be2b5b11fd9efd9dcbebf7e2b 100644 (file)
@@ -1,3 +1,10 @@
+2013-08-20  Jan Hubicka  <jh@suse.cz>
+
+       PR bootstrap/58186
+       * cgraph.c (cgraph_add_edge_to_call_site_hash): Overwrite hash
+       entry for direct edges.
+       (cgraph_turn_edge_to_speculative): Fix setting of can_throw_external.
+
 2013-08-20  David Malcolm  <dmalcolm@redhat.com>
 
        Revert my last two changes, r201865 and r201864:
index c6850c60c316481d9bd31c6ee439ce19ce29cd2f..19e64b7977629a085448dc7b191eb054a0a48a81 100644 (file)
@@ -701,6 +701,8 @@ cgraph_add_edge_to_call_site_hash (struct cgraph_edge *e)
   if (*slot)
     {
       gcc_assert (((struct cgraph_edge *)*slot)->speculative);
+      if (e->callee)
+       *slot = e;
       return;
     }
   gcc_assert (!*slot || e->speculative);
@@ -1083,8 +1085,10 @@ cgraph_turn_edge_to_speculative (struct cgraph_edge *e,
   e2 = cgraph_create_edge (n, n2, e->call_stmt, direct_count, direct_frequency);
   initialize_inline_failed (e2);
   e2->speculative = true;
-  e2->call_stmt = e->call_stmt;
-  e2->can_throw_external = e->can_throw_external;
+  if (TREE_NOTHROW (n2->symbol.decl))
+    e2->can_throw_external = false;
+  else
+    e2->can_throw_external = e->can_throw_external;
   e2->lto_stmt_uid = e->lto_stmt_uid;
   e->count -= e2->count;
   e->frequency -= e2->frequency;