Hahnfeld added a comment.

In https://reviews.llvm.org/D47849#1190997, @gtbercea wrote:

> Don't we want to use device specific math functions?
>  It's not just about avoiding some the host specific assembly, it's also 
> about getting an implementation tailored to the device.


Ok, so you are already talking about performance. I think we should fix 
correctness first, in particular the compiler shouldn't complain whenever 
`<math.h>` is included.

I experimented with adding only a minimum of target defines (`__amd64__` and 
`__x86_64__`): While I think this is a step into the right direction it still 
fails when including `<fenv.h>`.

Btw the GCC folks don't have a complete solution either: If you compile with 
`-O2` you get the same complaints once the code starts calling `signbit`. Maybe 
Clang should also implement lazy Sema checking for device side compilation?


Repository:
  rC Clang

https://reviews.llvm.org/D47849



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to