This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Replace device kernel linkage with weak_odr
ClosedPublic

Authored by jhuber6 on Mar 24 2022, 4:33 PM.

Details

Summary

Currently the device kernels all have weak linkage to prevent linkage
errors on multiple defintions. However, this prevents some optimizations
from adequately analyzing them because of the nature of weak linkage.
This patch replaces the weak linkage with weak_odr linkage so we can
statically assert that multiple declarations of the same kernel will
have the same definition.

Diff Detail

Event Timeline

jhuber6 created this revision.Mar 24 2022, 4:33 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 24 2022, 4:33 PM
jhuber6 requested review of this revision.Mar 24 2022, 4:33 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 24 2022, 4:33 PM
This revision is now accepted and ready to land.Mar 24 2022, 5:42 PM
This revision was automatically updated to reflect the committed changes.