This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH 8/9] shrink-wrap: shrink-wrapping for separate concerns
- From: Bernd Schmidt <bschmidt at redhat dot com>
- To: Segher Boessenkool <segher at kernel dot crashing dot org>
- Cc: gcc-patches at gcc dot gnu dot org, dje dot gcc at gmail dot com
- Date: Mon, 18 Jul 2016 19:03:04 +0200
- Subject: Re: [PATCH 8/9] shrink-wrap: shrink-wrapping for separate concerns
- Authentication-results: sourceware.org; auth=none
- References: <firstname.lastname@example.org> <email@example.com> <firstname.lastname@example.org> <20160718163411.GA5741@gate.crashing.org>
On 07/18/2016 06:34 PM, Segher Boessenkool wrote:
+ /* The frequency of executing the prologue for this BB and all BBs
+ dominated by it. */
+ gcov_type cost;
Is this frequency consideration the only thing that attempts to prevent
placing prologue insns into loops?
Yes. The algorithm makes sure the prologues are executed as infrequently
as possible. If a block that would get a prologue has the same frequency
as a predecessor does, and that predecessor always has that first block as
eventual successor, the prologue is moved to the earlier block (this
handles the case where both have a frequency of zero, and other cases
where the range of freq is too limited).
Ugh, that is really scaring me. I'd much prefer a classification of
valid blocks based on cfg structure alone - I'll need serious convincing
that the frequency data is reliable enough for what you are trying to do.