[cfe-dev] [RFC] Delayed target-specific diagnostic when compiling for the devices.

John McCall via cfe-dev cfe-dev at lists.llvm.org
Tue Jan 15 15:00:56 PST 2019


On 15 Jan 2019, at 17:58, Alexey Bataev wrote:
> __host__ __device__ functions are still device functions and it means 
> that they must be emitted when you compile for the device. You know, 
> that the user marked those functions as the device functions. In 
> OpenMP, you cannot say before the codegen phase whether the function 
> is used on the device or not. We should not emit all the functions 
> available, only those, which are used (implicitly or explicitly, 
> directly or indirectly) in the target regions.

I don't see why you couldn't do that analysis in Sema.

John.


More information about the cfe-dev mailing list