[PATCH] D16749: [OpenMP] Map clause codegeneration.

Samuel Antao via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 21 11:47:33 PDT 2016


sfantao added a comment.

In http://reviews.llvm.org/D16749#378969, @ABataev wrote:

> Samuel, this is true for device part of codegen. But what about host? If 
>  this code must be executed on host, will it be handled correctly?


Hi Alexey,

Yes, it will be handled correctly. The map clause doesn't change the way codegen is done for the host. The host always takes the original references regardless the map clause and its modifiers. Even for the device side, map clause won't have any effect in the code generation of the outlined target function. This behavior is what ensures that everything works seamlessly in a system that has a shared address space for host and device.

In any case, I added a new regression tests (CK25) that ensures that the lambda gets the same captures regardless the map clause.


http://reviews.llvm.org/D16749





More information about the cfe-commits mailing list