[all-commits] [llvm/llvm-project] 642481: [Clang][OpenCL][AMDGPU] Allow a kernel to call ano...

Aniket Lal via All-commits all-commits at lists.llvm.org
Mon Apr 7 21:59:51 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 642481a4286c9006958274531ee173b347866c50
      https://github.com/llvm/llvm-project/commit/642481a4286c9006958274531ee173b347866c50
  Author: Aniket Lal <lalaniket8 at gmail.com>
  Date:   2025-04-08 (Tue, 08 Apr 2025)

  Changed paths:
    M clang/include/clang/AST/Decl.h
    M clang/include/clang/AST/GlobalDecl.h
    M clang/lib/AST/Decl.cpp
    M clang/lib/AST/Expr.cpp
    M clang/lib/AST/ItaniumMangle.cpp
    M clang/lib/AST/Mangle.cpp
    M clang/lib/AST/MicrosoftMangle.cpp
    M clang/lib/CodeGen/CGCall.cpp
    M clang/lib/CodeGen/CGExpr.cpp
    M clang/lib/CodeGen/CodeGenFunction.cpp
    M clang/lib/CodeGen/CodeGenModule.cpp
    M clang/lib/CodeGen/CodeGenTypes.h
    M clang/lib/CodeGen/TargetInfo.cpp
    M clang/lib/CodeGen/TargetInfo.h
    M clang/lib/CodeGen/Targets/SPIR.cpp
    M clang/test/CodeGenOpenCL/addr-space-struct-arg.cl
    M clang/test/CodeGenOpenCL/amdgpu-abi-struct-arg-byref.cl
    M clang/test/CodeGenOpenCL/amdgpu-abi-struct-coerce.cl
    M clang/test/CodeGenOpenCL/amdgpu-enqueue-kernel.cl
    M clang/test/CodeGenOpenCL/amdgpu-printf.cl
    M clang/test/CodeGenOpenCL/cl-uniform-wg-size.cl
    M clang/test/CodeGenOpenCL/cl20-device-side-enqueue-attributes.cl
    M clang/test/CodeGenOpenCL/cl20-device-side-enqueue.cl
    M clang/test/CodeGenOpenCL/enqueue-kernel-non-entry-block.cl
    M clang/test/CodeGenOpenCL/implicit-addrspacecast-function-parameter.cl
    M clang/test/CodeGenOpenCL/kernel-arg-info.cl
    A clang/test/CodeGenOpenCL/opencl-kernel-call.cl
    M clang/test/CodeGenOpenCL/reflect.cl
    M clang/test/CodeGenOpenCL/sampler.cl
    M clang/test/CodeGenOpenCL/spir-calling-conv.cl
    M clang/test/CodeGenOpenCL/visibility.cl
    M clang/test/CodeGenOpenCLCXX/addrspace-of-this.clcpp
    M clang/test/Frontend/amdgcn-machine-analysis-remarks.cl

  Log Message:
  -----------
  [Clang][OpenCL][AMDGPU] Allow a kernel to call another kernel (#115821)

This feature is currently not supported in the compiler.
To facilitate this we emit a stub version of each kernel
function body with different name mangling scheme, and
replaces the respective kernel call-sites appropriately.
    
Fixes https://github.com/llvm/llvm-project/issues/60313
    
D120566 was an earlier attempt made to upstream a solution
for this issue.

---------

Co-authored-by: anikelal <anikelal at amd.com>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list