
norecurse function attr indicates the function is not called recursively directly or indirectly. Add norecurse to OpenCL functions, SYCL functions in device compilation and CUDA/HIP kernels. Although there is LLVM pass adding norecurse to functions, it only works for whole-program compilation. Also FE adding norecurse can make that pass run faster since functions with norecurse do not need to be checked again. Differential Revision: https://reviews.llvm.org/D73651
7 lines
191 B
Common Lisp
7 lines
191 B
Common Lisp
// RUN: %clang_cc1 -O0 -emit-llvm -o - %s | FileCheck %s
|
|
|
|
kernel void kernel1(int a) {}
|
|
// CHECK: define{{.*}}@kernel1{{.*}}#[[ATTR:[0-9]*]]
|
|
|
|
// CHECK: attributes #[[ATTR]] = {{.*}}norecurse
|