[patch, libfortran] Mark some codepaths as likely/unlikely

Thomas Koenig tkoenig@netcologne.de
Wed Oct 15 12:31:00 GMT 2008


On Wed, 2008-10-15 at 13:53 +0200, Tobias Burnus wrote:
> Hi Thomas,
> 
> Thomas Koenig wrote:
> > - A codepath that reaches generate_error() is assumed to be unlikely
> >   
> 
> I think this is not needed. Functions which are marked as not returning
> ("__attribute__ ((noreturn))") are automatically regarded as unlikely
> and I believe both in the library and in the front end, we properly tag
> such functions.

generate_error() isn't thus tagged, and it should not be, because it
does return when ERR or IOSTAT are set.

As for Janne's comment:  I don't have benchmarks, but I think this is of
the "can't hurt, may help" category.

However, if it is the consensus to forget about this patch, that's fine
with me :-)

	Thomas



More information about the Fortran mailing list