[PATCH] D9913: Mark libm builtins as such.

Renato Golin renato.golin at linaro.org
Fri Jul 10 05:31:50 PDT 2015


rengolin added a comment.

In http://reviews.llvm.org/D9913#202491, @hfinkel wrote:

> > That's my point. If this patch makes sense on its own, we should mark them all.
>
>
> I agree.


Ok, let's just do it then. I believe this is clearly a typo/forgotten kind of thing.

Charlie, can you mark all of the affected builtins with "F"?

> I don't understand this part of the conversation. include/clang/Basic/Builtins.def says:

> 

>   //  F -> this is a libc/libm function with a '__builtin_' prefix added.

>   //  f -> this is a libc/libm function without the '__builtin_' prefix. It can

>   //       be followed by ':headername:' to state which header this function

>   //       comes from.

>    

> 

> this patch does not mark these with 'f', but with 'F', and they are indeed libm functions with __builtin_ added.


That's the point. "f" is for libc functions that don't get overriden by the compiler with a "__builtin_" prefix. All of these *do* have prefix, so they need to be marked as "F".

The point here being that __builtin_isnan, for instance, is a builtin that can be either lowered as a sequence of instructions, or as a libc call to isnan, depending on the target. This is precisely the meaning of "F".

cheers,
--renato


http://reviews.llvm.org/D9913







More information about the cfe-commits mailing list