This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Any way to do branch hints?
- From: Kean Johnston <jkj at sco dot com>
- To: GCC development group <gcc at gcc dot gnu dot org>
- Date: Tue, 25 May 2004 09:27:07 -0700
- Subject: Any way to do branch hints?
- Organization: The SCO Group
Hi everyone,
Does gcc have any way in which I can portably introduce
branch hints, and do any of the machine descriptions
(of most personal interest is i386.md) use them? What
I'd liket o be able to do is something like:
int myfunc (void)
{
int x = foo();
if (x == 0) __attribute__(branch-hint-not-taken)
error();
else {
do_some_work();
}
return x;
}
Armed with such information it would be great if the
code generated for a conditional jump would actually
include the hint prefix to the insn. I couldn't find
anything in the 3.4 docs, so I am guessing it doesn't
exist, but I may just have grepped for the wrong
things.
Kean