On 18/11/2022 17:41, Tobias Burnus wrote:
Attached is the updated/rediffed version, which now uses the builtin instead of the 'asm("s8").

The code in principle works; that is: If no private stack variables are copied, it works.

Or in other words: reverse-offload target regions that don't use firstprivate or mapping work, the rest would crash. That's avoided by not accepting reverse offload inside GOMP_OFFLOAD_get_num_devices for now.

To get it working, the manual stack allocation patch + the trivial update to that get_num_devices func is needed, but no change to the attached patch.

In order to reduce local patches, I would love to have it on mainline – otherwise, I have at least the current version in gcc-patches@.

OK with me.

Andrew

Reply via email to