This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Do not create offloading entries for internal or hidden symbols
ClosedPublic

Authored by jhuber6 on Mar 23 2022, 2:10 PM.

Details

Summary

Currently we create offloading entries to register device variables with
the host. When we register a variable we will look up the symbol in the
device image and map the device address to the host address. This is a
problem when the symbol is declared with hidden visibility or internal
linkage. This means the symbol is not accessible externally and we
cannot get its address. We should still allow static variables to be
declared on the device, but ew should not create an offloading entry for
them so they exist independently on the host and device.

Fixes #54309

Diff Detail

Event Timeline

jhuber6 created this revision.Mar 23 2022, 2:10 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 23 2022, 2:10 PM
jhuber6 requested review of this revision.Mar 23 2022, 2:10 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 23 2022, 2:10 PM
jhuber6 updated this revision to Diff 417751.Mar 23 2022, 2:37 PM

Adding new test

This revision is now accepted and ready to land.Mar 23 2022, 2:44 PM

Sounds good to me too, thanks!