lto-cgraph.c (compute_ltrans_boundary, [...]): Fix handling of inline thunks
authorJan Hubicka <hubicka@ucw.cz>
Mon, 16 May 2016 09:55:14 +0000 (11:55 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Mon, 16 May 2016 09:55:14 +0000 (09:55 +0000)
* lto-cgraph.c (compute_ltrans_boundary, output_symtab): Fix handling
of inline thunks
* lto-partition.c (add_symbol_to_partition_1): Likewise.

From-SVN: r236270

gcc/ChangeLog
gcc/lto-cgraph.c
gcc/lto/ChangeLog
gcc/lto/lto-partition.c

index 4b7aeb535c818a7bb381998e0c87b64a61db0f77..2bbd60e12c82b739e45d196520a92d1823e9d080 100644 (file)
@@ -1,3 +1,8 @@
+2016-05-16  Jan Hubicka  <hubicka@ucw.cz>
+
+       * lto-cgraph.c (compute_ltrans_boundary, output_symtab): Fix handling
+       of inline thunks
+
 2016-05-16  Matthew Wahab  <matthew.wahab@arm.com>
            Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
            Jiong Wang  <jiong.wang@arm.com>
index 14302138efa050a69bb9d1250715cd6947fb9ffe..11d440b7b74d6bf538dae17737303d0d216df3f9 100644 (file)
@@ -972,7 +972,7 @@ compute_ltrans_boundary (lto_symtab_encoder_t in_encoder)
       if (node->alias && node->analyzed)
        create_references (encoder, node);
       if (cnode
-         && cnode->thunk.thunk_p)
+         && cnode->thunk.thunk_p && !cnode->global.inlined_to)
        add_node_to (encoder, cnode->callees->callee, false);
       while (node->transparent_alias && node->analyzed)
        {
@@ -1028,7 +1028,7 @@ output_symtab (void)
     {
       node = dyn_cast <cgraph_node *> (lto_symtab_encoder_deref (encoder, i));
       if (node
-         && (node->thunk.thunk_p
+         && ((node->thunk.thunk_p && !node->global.inlined_to)
              || lto_symtab_encoder_in_partition_p (encoder, node)))
        {
          output_outgoing_cgraph_edges (node->callees, ob, encoder);
index 80ffba329ad3b25d9058851b747854f55ef685a6..06458d46033e414612c82f42aeee3038693108c3 100644 (file)
@@ -1,3 +1,7 @@
+2016-05-16  Jan Hubicka  <hubicka@ucw.cz>
+
+       * lto-partition.c (add_symbol_to_partition_1): Likewise.
+
 2016-05-03  Jan Hubicka  <hubicka@ucw.cz>
 
        * lto-symtab.c (lto_cgraph_replace_node): Initialize inline_failed.
index c191d24b497306554967c3e1c0c6afc64ab9616b..453343a84717d010c6dbe60b178b63fa18f3908a 100644 (file)
@@ -163,7 +163,7 @@ add_symbol_to_partition_1 (ltrans_partition part, symtab_node *node)
 
       /* Add all thunks associated with the function.  */
       for (e = cnode->callers; e; e = e->next_caller)
-       if (e->caller->thunk.thunk_p)
+       if (e->caller->thunk.thunk_p && !e->caller->global.inlined_to)
          add_symbol_to_partition_1 (part, e->caller);
 
       /* Instrumented version is actually the same function.