[PATCH] D142664: [NVPTX] Infer AS of pointers passed to kernels as integers.

Artem Belevich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 26 14:18:43 PST 2023


tra created this revision.
Herald added subscribers: mattd, gchakrabarti, asavonic, bixia, hiraditya.
Herald added a project: All.
tra updated this revision to Diff 492568.
tra added a comment.
tra added reviewers: jlebar, yaxunl.
tra published this revision for review.
Herald added subscribers: llvm-commits, jholewinski.
Herald added a project: LLVM.

Updated tests.


When pointers are passed within aggregates, we sometimes end up with IR that
loads them as integers and the converts them back to pointers. Typically it's
due to a memcpy or SROA.

Normally we treat all pointers passed to a CUDA kernel as global pointers and
the same treatment should be applied to the pointers we load/store as integers.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D142664

Files:
  llvm/lib/Target/NVPTX/NVPTXLowerArgs.cpp
  llvm/test/CodeGen/NVPTX/lower-args.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142664.492568.patch
Type: text/x-patch
Size: 4232 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230126/f81fb054/attachment.bin>


More information about the llvm-commits mailing list