This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] (Partial) fix for PR middle-end/13392


On Wed, Jan 07, 2004 at 07:12:45AM -0700, Roger Sayle wrote:
> My completely uninformed opinion, is to avoid falling back to SCC
> entirely, then you'll no longer have to worry about the NOTES and

But then we risk that expand_builtin_expect_jump will not be able
to add branch probability note to the jump when it for some reason
does not understand what do_jump created.
This can happen e.g. for if (__builtin_expect (1, 1)),
if (__builtin_expect ((foo (), 0), 0)) (where it probably doesn't
matter if falling back or not setting probability note - the jump
is unconditional anyway), but perhaps could happen on some architectures
even on code where it does matter.

The question is what is worse, if possibly pessimizing the code
with SCC but ensuring the probability note is there (then e.g.
block reordering could make advantage of it) or emitting best
jump code but not emitting the note.

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]