Fix aliases on AIX
Jan Hubicka
hubicka@ucw.cz
Wed Jul 9 16:03:00 GMT 2014
Hi,
this patch fixes the devirt10 and devirt15 failures - the problem was that we did not look into alias target
when estimating devirt benefit.
Bootstrapped/regtested rs6000-aix, comitted.
* ipa-cp.c (devirtualization_time_bonus): Walk through aliases.
* ipa-inline-analysis.c (estimate_edge_devirt_benefit): Likewise.
Index: ipa-cp.c
===================================================================
--- ipa-cp.c (revision 212394)
+++ ipa-cp.c (working copy)
@@ -1671,6 +1671,7 @@
{
struct cgraph_node *callee;
struct inline_summary *isummary;
+ enum availability avail;
tree target;
target = ipa_get_indirect_edge_target (ie, known_csts, known_binfos,
@@ -1683,6 +1684,9 @@
callee = cgraph_get_node (target);
if (!callee || !callee->definition)
continue;
+ callee = cgraph_function_node (callee, &avail);
+ if (avail < AVAIL_AVAILABLE)
+ continue;
isummary = inline_summary (callee);
if (!isummary->inlinable)
continue;
Index: ipa-inline-analysis.c
===================================================================
--- ipa-inline-analysis.c (revision 212394)
+++ ipa-inline-analysis.c (working copy)
@@ -2971,6 +2971,7 @@
tree target;
struct cgraph_node *callee;
struct inline_summary *isummary;
+ enum availability avail;
if (!known_vals.exists () && !known_binfos.exists ())
return false;
@@ -2991,6 +2992,9 @@
callee = cgraph_get_node (target);
if (!callee || !callee->definition)
return false;
+ callee = cgraph_function_node (callee, &avail);
+ if (avail < AVAIL_AVAILABLE)
+ return false;
isummary = inline_summary (callee);
return isummary->inlinable;
}
More information about the Gcc-patches
mailing list