This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP][deviceRTLs] Added `[[clang::loader_uninitialized]]` explicitly
ClosedPublic

Authored by tianshilei1992 on Jan 27 2021, 11:11 AM.

Details

Summary

[[clang::loader_uninitialized]] is in macro SHARED but it doesn't
work for array like parallelLevel, so the variable will be zero initialized.
There is also a similar issue for omptarget_nvptx_device_State which is in
global address space. Its c'tor is also generated, which was not in the past when
building the deviceRTLs with CUDA. In this patch, we added the attribute to
the two variables explicitly.

Diff Detail

Event Timeline

tianshilei1992 requested review of this revision.Jan 27 2021, 11:11 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 27 2021, 11:11 AM
This revision is now accepted and ready to land.Jan 27 2021, 11:19 AM

rebase to triger a new round of test

This revision was landed with ongoing or failed builds.Jan 28 2021, 5:13 AM
This revision was automatically updated to reflect the committed changes.