[all-commits] [llvm/llvm-project] 86407a: [AMDGPU][Verifier] Mark calls to entry functions a...

Shilei Tian via All-commits all-commits at lists.llvm.org
Fri Apr 11 10:14:56 PDT 2025


  Branch: refs/heads/users/shiltian/dont-allow-call-to-amdgpu-kernel
  Home:   https://github.com/llvm/llvm-project
  Commit: 86407ad80265b6e5c7ba5361165ea41b468f08aa
      https://github.com/llvm/llvm-project/commit/86407ad80265b6e5c7ba5361165ea41b468f08aa
  Author: Shilei Tian <i at tianshilei.me>
  Date:   2025-04-11 (Fri, 11 Apr 2025)

  Changed paths:
    M llvm/include/llvm/IR/CallingConv.h
    M llvm/lib/IR/Verifier.cpp
    M llvm/test/Bitcode/calling-conventions.3.2.ll
    M llvm/test/Bitcode/calling-conventions.3.2.ll.bc
    M llvm/test/CodeGen/AMDGPU/attributor-flatscratchinit.ll
    R llvm/test/CodeGen/AMDGPU/call-to-kernel-undefined.ll
    R llvm/test/CodeGen/AMDGPU/call-to-kernel.ll
    M llvm/test/Other/spir_cc.ll
    M llvm/test/Verifier/amdgpu-cc.ll
    A llvm/test/Verifier/call-to-non-callable-functions.ll

  Log Message:
  -----------
  [AMDGPU][Verifier] Mark calls to entry functions as invalid in the IR verifier

For AMDGPU, calls to entry functions are invalid. Previously, due to certain
limitations, this restriction was not enforced by the IR verifier. These
limitations have now been resolved, enabling us to enforce this check.

Adding target-dependent checks directly into the IR verifier is not ideal.
However, a cleaner solution, such as a dedicated target-dependent IR verifier,
is underway (e.g., https://github.com/llvm/llvm-project/pull/123609). Once that
or similar code is merged, we can move this check accordingly.



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