[Libomptarget] Add leaf attribute to vprintf declaration

Summary:
This patch adds the `leaf` attribute to the `vprintf` declaration in the
OpenMP runtime. This attribute allows us to determine that the `vprintf`
function will not call any functions within the translation unit,
allowing us to deduce `norecurse` attributes on the caller.
This commit is contained in:
Joseph Huber 2022-05-19 14:18:51 -04:00
parent cde083e010
commit eda4ef3add

View file

@ -36,7 +36,7 @@ int32_t omp_vprintf(const char *Format, void *Arguments, uint32_t);
#pragma omp begin declare variant match( \
device = {arch(nvptx, nvptx64)}, implementation = {extension(match_any)})
int32_t vprintf(const char *, void *);
int32_t __attribute__((leaf)) vprintf(const char *, void *);
namespace impl {
int32_t omp_vprintf(const char *Format, void *Arguments, uint32_t) {
return vprintf(Format, Arguments);