This is an archive of the discontinued LLVM Phabricator instance.

[libomptarget][nfc] Explicitly static function scope shared variables
ClosedPublic

Authored by JonChesterfield on Mar 24 2020, 10:01 AM.

Details

Summary

[libomptarget][nfc] Explicitly static function scope shared variables

__shared__ in CUDA implies static in function scope. See e.g. D.2.1.1
in CUDA_C_Programming_Guide.pdf,
http://developer.download.nvidia.com/compute/DevZone/docs/html/C/doc/

This is surprising for non-cuda developers, see e.g. D73239 where I thought
local variables would be thread local.

Tested by IR diff of libomptarget.bc (no change), running in tree tests,
and binary diff of the nvcc static archives (no significant change).

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptMar 24 2020, 10:01 AM
This revision is now accepted and ready to land.Mar 24 2020, 11:30 AM
This revision was automatically updated to reflect the committed changes.