This is an archive of the discontinued LLVM Phabricator instance.

[NVPTX] Set the atomic inling threshold when targeting NVPTX directly
ClosedPublic

Authored by jhuber6 on Mar 23 2023, 12:17 PM.

Details

Summary

Since Clang 16.0.0 users can target the NVPTX architecture directly
via --target=nvptx64-nvidia-cuda. However, this does not set the
atomic inlining size correctly. This leads to spurious warnings and
emission of runtime atomics that are never implemented. This patch
ensures that we set this to the appropriate pointer width. This will
always be 64 in the future as nvptx64 will only be supported moving
forward.

Fixes: https://github.com/llvm/llvm-project/issues/61410

Diff Detail

Event Timeline

jhuber6 created this revision.Mar 23 2023, 12:17 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 23 2023, 12:17 PM
jhuber6 requested review of this revision.Mar 23 2023, 12:17 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 23 2023, 12:17 PM
tra accepted this revision.Mar 23 2023, 2:08 PM
This revision is now accepted and ready to land.Mar 23 2023, 2:08 PM
This revision was landed with ongoing or failed builds.Mar 23 2023, 2:30 PM
This revision was automatically updated to reflect the committed changes.