This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Another AIX Bootstrap failure
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: David Edelsohn <dje dot gcc at gmail dot com>
- Cc: Jan Hubicka <hubicka at ucw dot cz>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 16 Jun 2014 23:44:33 +0200
- Subject: Re: Another AIX Bootstrap failure
- Authentication-results: sourceware.org; auth=none
- References: <CAGWvnykZKOiQhM-N6TTCPa_E0d0TCK_PYs9bL_YZTJ7E193eUQ at mail dot gmail dot com> <20140616043557 dot GA6530 at kam dot mff dot cuni dot cz> <CAGWvnyn2ewzYhaAY=KAixxaqwsfzk9f9ScVkNeCVg+yVe6NRqA at mail dot gmail dot com> <20140616150801 dot GA12467 at kam dot mff dot cuni dot cz> <CAGWvnymGawsoHSfwuzuBV0U=HXbmV1xe88-zFZSe6XzW4Wa-KQ at mail dot gmail dot com>
> Honza,
>
> FYI, your bootstrap on gcc111 is hung in the exact same place as I
> have observed: all of the stage2 gen* programs spinning.
Yes (will kill it now), I was tracking down what change it is.
It is actually the inliner hunk that is independent of rest of changes
(and one that should be obviously safe, as famous last words):
Index: ipa-inline-analysis.c
===================================================================
--- ipa-inline-analysis.c (revision 211488)
+++ ipa-inline-analysis.c (working copy)
@@ -3877,7 +3877,7 @@ do_estimate_growth (struct cgraph_node *
/* COMDAT functions are very often not shared across multiple units
since they come from various template instantiations.
Take this into account. */
- else if (DECL_COMDAT (node->decl)
+ else if (node->externally_visible && node->get_comdat_group ()
&& cgraph_can_remove_if_no_direct_calls_p (node))
d.growth -= (info->size
* (100 - PARAM_VALUE (PARAM_COMDAT_SHARING_PROBABILITY))
@@ -3928,7 +3928,7 @@ growth_likely_positive (struct cgraph_no
&& (ret = node_growth_cache[node->uid]))
return ret > 0;
if (!cgraph_will_be_removed_from_program_if_no_direct_calls (node)
- && (!DECL_COMDAT (node->decl)
+ && (!node->externally_visible || !node->get_comdat_group ()
|| !cgraph_can_remove_if_no_direct_calls_p (node)))
return true;
max_callers = inline_summary (node)->size * 4 / edge_growth + 2;
This hunk promotes more inlining of COMDAT functions in anticipation that
if they get inlined in each module independently, they will be optimized out
and that in C++ high percentage of comdat functions is actually used by
one unit only.
The change disables this heuristic tweek for targets without comdat support,
like AIX is. Here we do not want to compute probability of section sharing,
becuase there are no comdat sections (and if there is other mechanism, we should
let middle-end know). The main motviation was however COMDAT locals on ELF
(introduced by cdtor decloning) where we want to handle them as statics
rather than COMDATs.
No mater of what these functions return, the final program should be correct-
they only affect inlining decisions, not correctness of the inliner. We ought
to debug this. Do you have any clue what goes wrong?
If you don't mind, I would like to commit back the rest of changes (reset_section)
cleanups after testing on AIX + testing the aforementioned ARM testcase.
I will also make more AIX firendly version of this patch. But please, lets debug
the problem, so we don't have random wrong code issues here.
Honza