Skip to content

[OpenMP] Fix __builtin_return_address calls for SPARC #138520

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion openmp/runtime/src/ompt-internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ void ompt_pre_init(void);
void ompt_post_init(void);
void ompt_fini(void);

#define OMPT_GET_RETURN_ADDRESS(level) __builtin_return_address(level)
#define OMPT_GET_RETURN_ADDRESS(level) \
__builtin_extract_return_addr(__builtin_return_address(level))
#define OMPT_GET_FRAME_ADDRESS(level) __builtin_frame_address(level)
#define OMPT_FRAME_FLAGS_APP (ompt_frame_application | ompt_frame_cfa)
#define OMPT_FRAME_FLAGS_RUNTIME (ompt_frame_runtime | ompt_frame_cfa)
Expand Down
7 changes: 4 additions & 3 deletions openmp/runtime/src/ompt-specific.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,16 @@ inline void *__ompt_load_return_address(int gtid) {
if (ompt_enabled.enabled && gtid >= 0 && __kmp_threads[gtid] && \
!__kmp_threads[gtid]->th.ompt_thread_info.return_address) \
__kmp_threads[gtid]->th.ompt_thread_info.return_address = \
__builtin_return_address(0)*/
__builtin_extract_return_addr(__builtin_return_address(0))*/
#define OMPT_STORE_RETURN_ADDRESS(gtid) \
OmptReturnAddressGuard ReturnAddressGuard{gtid, __builtin_return_address(0)};
OmptReturnAddressGuard ReturnAddressGuard{ \
gtid, __builtin_extract_return_addr(__builtin_return_address(0))};
#define OMPT_LOAD_RETURN_ADDRESS(gtid) __ompt_load_return_address(gtid)
#define OMPT_LOAD_OR_GET_RETURN_ADDRESS(gtid) \
((ompt_enabled.enabled && gtid >= 0 && __kmp_threads[gtid] && \
__kmp_threads[gtid]->th.ompt_thread_info.return_address) \
? __ompt_load_return_address(gtid) \
: __builtin_return_address(0))
: __builtin_extract_return_addr(__builtin_return_address(0)))

#define OMPT_GET_DISPATCH_CHUNK(chunk, lb, ub, incr) \
do { \
Expand Down
Loading