diff mbox

Cgraph alias reorg 15/14 (New infrastructure for same body aliases)

Message ID 20110612174558.GA10123@kam.mff.cuni.cz
State New
Headers show

Commit Message

Jan Hubicka June 12, 2011, 5:45 p.m. UTC
Hi,
this patch solves the bultin/strlen-3.c LTO linker plugin problem.
While removing alias code I was bit overactive and removed the check that makes us to implicitly
do -fwhole-program when resolution info is around.

It is not quite clear to me why in LTO we need -fwhole-program to get the testcase right.
Bootstrap/regtest in progress, will commit it once it passes.

        * ipa.c (cgraph_exernally_visible_p): Return accidentally removed check
        for LDPR_PREVAILING_DEF_IRONLY.
diff mbox

Patch

Index: ipa.c
===================================================================
--- ipa.c       (revision 174955)
+++ ipa.c       (working copy)
@@ -614,6 +614,8 @@ 
   /* If linker counts on us, we must preserve the function.  */
   if (cgraph_used_from_object_file_p (node))
     return true;
+  if (node->resolution == LDPR_PREVAILING_DEF_IRONLY)
+    return false;
   if (DECL_PRESERVE_P (node->decl))
     return true;
   if (lookup_attribute ("externally_visible", DECL_ATTRIBUTES (node->decl)))