This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: powerpc patch 4 of 9
- From: Geoff Keating <geoffk at geoffk dot org>
- To: Alan Modra <amodra at bigpond dot net dot au>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: 22 Feb 2002 18:16:04 -0800
- Subject: Re: powerpc patch 4 of 9
- References: <20020220110054.GK1054@bubble.sa.bigpond.net.au>
Alan Modra <amodra@bigpond.net.au> writes:
> It's best not to hint on PowerPC64 unless we're really sure; Static
> branch hints disable clever hardware branch history. Note that this
> changes PowerPC32 hint behaviour slightly for probabilies in the
> range 0.45 to 0.55. Previously we put out a "-" hint, now we give
> no hint. I don't think it matters either way..
If the branch is truly nearly 50/50, '-' will be faster then '+'; a
mispredicted-taken is more expensive then a mispredicted-not-taken,
because the first involves two extra icache fetches.
Note that there is no such thing on ppc as a branch with no hint.
There is only the default prediction (taken for backwards branches,
not-taken for forwards ones) and the other one; the idea is that
backwards branches are usually loops. GCC rearanges code enough that
the default is often wrong.
--
- Geoffrey Keating <geoffk@geoffk.org> <geoffk@redhat.com>