[all-commits] [llvm/llvm-project] 054931: [NVPTX] Infer AS of pointers passed to kernels as ...

Artem Belevich via All-commits all-commits at lists.llvm.org
Fri Jan 27 13:29:23 PST 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 054931dbf11687cb95576690d8f74ffd9b0da007
  Author: Artem Belevich <tra at google.com>
  Date:   2023-01-27 (Fri, 27 Jan 2023)

  Changed paths:
    M llvm/lib/Target/NVPTX/NVPTXLowerArgs.cpp
    M llvm/test/CodeGen/NVPTX/lower-args.ll

  Log Message:
  [NVPTX] Infer AS of pointers passed to kernels as integers.

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. E.g. https://godbolt.org/z/xM3n5daaa

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.

Differential Revision: https://reviews.llvm.org/D142664

More information about the All-commits mailing list