This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: [cygnus.project.sid] branch probability hinting
- To: Tom Tromey <tromey at redhat dot com>
- Subject: Re: [cygnus.project.sid] branch probability hinting
- From: Jeff Sturm <jsturm at one-point dot com>
- Date: Mon, 5 Mar 2001 23:56:06 -0500 (EST)
- cc: "Boehm, Hans" <hans_boehm at hp dot com>, "'Andrew Haley'" <aph at redhat dot com>, Java Discuss List <java at gcc dot gnu dot org>
On 5 Mar 2001, Tom Tromey wrote:
> Hans> How do you tell gcc that the branch probability is around 50-50
> Hans> if it already believes otherwise? (E.g. half the child pointers
> Hans> in a binary tree are NULL.)
>
> I don't think there is a way. Maybe this should be reported as a gcc
> bug. Maybe you ought to be able to tell __builtin_expect the
> probability that the branch is taken.
If I understand right, GCC takes branch probabilities into account
during a basic block reordering pass. 50-50 cannot be expressed by
simple reordering.
Out of curiosity, are there any targets that can make use of a 50-50
branch probability? IA-64 perhaps?
Jeff