[PATCH] D155211: [NVPTX] Add initial support for '.alias' in PTX

Joseph Huber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 13 08:54:18 PDT 2023


jhuber6 created this revision.
jhuber6 added reviewers: tra, arsenm, jlebar, kushanam.
Herald added subscribers: mattd, gchakrabarti, asavonic, jeroen.dobbelaere, hiraditya.
Herald added a reviewer: aaron.ballman.
Herald added a project: All.
jhuber6 requested review of this revision.
Herald added subscribers: llvm-commits, cfe-commits, wangpc, wdng, jholewinski.
Herald added projects: clang, LLVM.

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.

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


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D155211

Files:
  clang/lib/Sema/SemaDeclAttr.cpp
  llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
  llvm/lib/Target/NVPTX/NVPTXAsmPrinter.h
  llvm/test/CodeGen/NVPTX/alias-errors.ll
  llvm/test/CodeGen/NVPTX/alias.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155211.540061.patch
Type: text/x-patch
Size: 6152 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230713/4543b121/attachment-0001.bin>


More information about the cfe-commits mailing list