[all-commits] [llvm/llvm-project] a2a280: [OpenMP] Fix __builtin_return_address calls for SP...
Rainer Orth via All-commits
all-commits at lists.llvm.org
Wed May 14 04:11:42 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a2a280e58c95f76185ab93c1b73cb1608318b699
https://github.com/llvm/llvm-project/commit/a2a280e58c95f76185ab93c1b73cb1608318b699
Author: Rainer Orth <ro at gcc.gnu.org>
Date: 2025-05-14 (Wed, 14 May 2025)
Changed paths:
M openmp/runtime/src/ompt-internal.h
M openmp/runtime/src/ompt-specific.h
Log Message:
-----------
[OpenMP] Fix __builtin_return_address calls for SPARC (#138520)
`libomp` uses `__builtin_return_address` in two places. However, on some
targets those calls need to wrapped in `___builtin_extract_return_addr`
to get at the actual return address. SPARC is among those targets and
the only one where `clang` actually implements this, cf. [[clang][Sparc]
Fix __builtin_extract_return_addr
etc.](https://reviews.llvm.org/D91607). `compiler-rt` needed the same
adjustment, cf. [[sanitizer_common][test] Enable tests on
SPARC](https://reviews.llvm.org/D91608). On other targets, this is a
no-op. However, there are more targets that have the same issue and
`gcc`, unlike `clang`, correctly implements it, so there might be issues
when building `libomp` with `gcc`.
This patch adds the necessary calls.
Tested on `sparcv9-sun-solaris2.11`, `sparc64-unknown-linux-gnu`,
`amd64-pc-solaris2.11`, and `x86_64-pc-linux-gnu`.
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