http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58721

--- Comment #10 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
OK,
seems that the problem is with Fortran generating internally __builtin_expect
to control various construct.  I would make a lot more sense to use
GIMPLE_PREDICT for those cases. With GIMPLE_PREDICT one can have more fine
grained control over
the hint and handle it as separate predicter.

I wonder if some Fortran maintainer can look into this and update the lowering?
c/c-typeck.c:    add_stmt (build_predict_expr (PRED_CONTINUE, NOT_TAKEN));
cp/cp-gimplify.c:  tree pred = build_predict_expr (PRED_CONTINUE, NOT_TAKEN);

are examples how these are used.  Unlike builtin_expect you do not add it into
the expression, but you drop it on the unlikely code path.

Honza

Reply via email to