[Patch, Fortran] Use __builtin_expect in libgfortran

Tobias Burnus burnus@net-b.de
Sun Aug 3 16:59:00 GMT 2008


Andrew Thomas Pinski wrote:
> On Aug 3, 2008, at 3:36, Tobias Burnus 
> <tobias.burnus@physik.fu-berlin.de> wrote:
>>  if (unlikely fulfilled condition)
>> by
>>  if (__builtin_expect (unlikely fulfilled condition, 0))
> If rutime_error is marked as noreturn, gcc already does this internally.
Great! That reduces the patch size a lot (at least in terms of changed 
lines). Attached an updated version of the patch. Additional to removing 
the not needed __builtin_expected, I added __attribute__ ((format 
(printf...))) to two functions in libgfortran.h to improve compile-time 
error checking.

Build on x86-64-linux. OK for the trunk?

Tobias
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: built-expect3.diff
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20080803/63795337/attachment.ksh>


More information about the Gcc-patches mailing list