[PATCH] D142581: [NVPTX] Do not addrspacecast AS-specific kernel arguments.

Artem Belevich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 25 14:33:34 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 492260.
tra added a comment.
tra edited the summary of this revision.
tra added reviewers: jlebar, yaxunl.
tra published this revision for review.
Herald added subscribers: llvm-commits, jholewinski.
Herald added a project: LLVM.

Cosmetic refactoring


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

The assumption that generic pointers passed to a CUDA kernel is CUDA-specific and should not be applied to non-CUDA compilations.
Addrspacecasts to global AS and back should never be applied to AS-specific pointers.

In order to make tests actually do the testing for non-CUDA compilation, we need to get
TargetMachine from the TargetPassConfig, instead of passing it explicitly as a pass constructor argument.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D142581

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142581.492260.patch
Type: text/x-patch
Size: 9238 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230125/91b34bab/attachment.bin>


More information about the llvm-commits mailing list