Skip to content

[OpenMP] Cleanup synchronization primitives#177710

Merged
jhuber6 merged 1 commit intollvm:mainfrom
jhuber6:CleanupCommon
Jan 26, 2026
Merged

[OpenMP] Cleanup synchronization primitives#177710
jhuber6 merged 1 commit intollvm:mainfrom
jhuber6:CleanupCommon

Conversation

@jhuber6
Copy link
Contributor

@jhuber6 jhuber6 commented Jan 24, 2026

Summary:
These shouldn't be so different after we moved away from variants. It's
much simpler to define this in-line with a single preprocessor
definition. This should be equivalent less a few unnecessary function
definitions with the advantage that SPIR-V now has less work to do.

Summary:
These shouldn't be so different after we moved away from variants. It's
much simpler to define this in-line with a single preprocessor
definition. This should be equivalent less a few unnecessary function
definitions with the advantage that SPIR-V now has less work to do.
@llvmbot llvmbot added openmp:libomp OpenMP host runtime openmp:libomptarget OpenMP offload runtime labels Jan 24, 2026
#ifdef __NVPTX__
__nvvm_membar_sys();
#else
__scoped_atomic_thread_fence(Ordering, atomic::system);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thse builtins are not gonna be lowered on nvptx?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Someone in the NVPTX backend needs to work on handling memory scopes properly on all the builtins.

Copy link
Member

@sarnex sarnex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idea lgtm but not an expert in these functions

@jhuber6 jhuber6 merged commit 5597903 into llvm:main Jan 26, 2026
14 checks passed
@jhuber6 jhuber6 deleted the CleanupCommon branch January 26, 2026 20:20
ronlieb added a commit to ROCm/llvm-project that referenced this pull request Jan 27, 2026
ronlieb pushed a commit to ROCm/llvm-project that referenced this pull request Jan 28, 2026
Summary:
These shouldn't be so different after we moved away from variants. It's
much simpler to define this in-line with a single preprocessor
definition. This should be equivalent less a few unnecessary function
definitions with the advantage that SPIR-V now has less work to do.
ronlieb added a commit to ROCm/llvm-project that referenced this pull request Jan 28, 2026
Summary:
These shouldn't be so different after we moved away from variants. It's
much simpler to define this in-line with a single preprocessor
definition. This should be equivalent less a few unnecessary function
definitions with the advantage that SPIR-V now has less work to do.

Co-authored-by: Joseph Huber <huberjn@outlook.com>
stomfaig pushed a commit to stomfaig/llvm-project that referenced this pull request Jan 28, 2026
Summary:
These shouldn't be so different after we moved away from variants. It's
much simpler to define this in-line with a single preprocessor
definition. This should be equivalent less a few unnecessary function
definitions with the advantage that SPIR-V now has less work to do.
sshrestha-aa pushed a commit to sshrestha-aa/llvm-project that referenced this pull request Feb 4, 2026
Summary:
These shouldn't be so different after we moved away from variants. It's
much simpler to define this in-line with a single preprocessor
definition. This should be equivalent less a few unnecessary function
definitions with the advantage that SPIR-V now has less work to do.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

openmp:libomp OpenMP host runtime openmp:libomptarget OpenMP offload runtime

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants