This is an archive of the discontinued LLVM Phabricator instance.

[NVPTX] Add initial support for '.alias' in PTX
ClosedPublic

Authored by jhuber6 on Jul 13 2023, 8:54 AM.

Details

Summary

This patch adds initial support for using aliases when targeting PTX. We
perform a pretty strict conversion from the globals referenced to the
expected output. as described in the PTX documentation at
https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#kernel-and-function-directives-alias

These cannot currently be used due to a bug in the nvlink
implementation that causes aliases to pruned functions to crash the
linker.

Diff Detail

Event Timeline

jhuber6 created this revision.Jul 13 2023, 8:54 AM
jhuber6 requested review of this revision.Jul 13 2023, 8:54 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJul 13 2023, 8:54 AM
jhuber6 updated this revision to Diff 540062.Jul 13 2023, 8:55 AM

Remove changes in clang that I forgot to remove to keep this restricted to the codegen. Afterwards we can remove the sema in clang and test it there.

jhuber6 edited the summary of this revision. (Show Details)Jul 13 2023, 9:17 AM
tra accepted this revision.Jul 21 2023, 2:39 PM
This revision is now accepted and ready to land.Jul 21 2023, 2:39 PM
This revision was automatically updated to reflect the committed changes.