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

login
register
mail settings
Submitter Jan Hubicka
Date June 12, 2011, 5:45 p.m.
Message ID <20110612174558.GA10123@kam.mff.cuni.cz>
Download mbox | patch
Permalink /patch/100110/
State New
Headers show

Comments

Jan Hubicka - June 12, 2011, 5:45 p.m.
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.

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)))