[all-commits] [llvm/llvm-project] a8e131: [RFC] IR: Define noalias.addrspace metadata (#102461)
Matt Arsenault via All-commits
all-commits at lists.llvm.org
Mon Oct 7 12:22:03 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a8e1311a1c4f7f67d8d8d7575f595da4f0a5873c
https://github.com/llvm/llvm-project/commit/a8e1311a1c4f7f67d8d8d7575f595da4f0a5873c
Author: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: 2024-10-07 (Mon, 07 Oct 2024)
Changed paths:
M llvm/docs/LangRef.rst
M llvm/docs/ReleaseNotes.md
M llvm/include/llvm/IR/FixedMetadataKinds.def
M llvm/lib/IR/Verifier.cpp
A llvm/test/Assembler/noalias-addrspace-md.ll
M llvm/test/Transforms/InstCombine/loadstore-metadata.ll
M llvm/test/Transforms/SimplifyCFG/hoist-with-metadata.ll
A llvm/test/Verifier/noalias-addrspace.ll
Log Message:
-----------
[RFC] IR: Define noalias.addrspace metadata (#102461)
This is intended to solve a problem with lowering atomics in
OpenMP and C++ common to AMDGPU and NVPTX.
In OpenCL and CUDA, it is undefined behavior for an atomic instruction
to modify an object in thread private memory. In OpenMP, it is defined.
Correspondingly, the hardware does not handle this correctly. For
AMDGPU,
32-bit atomics work and 64-bit atomics are silently dropped. We
therefore
need to codegen this by inserting a runtime address space check,
performing
the private case without atomics, and fallback to issuing the real
atomic
otherwise. This metadata allows us to avoid this extra check and branch.
Handle this by introducing metadata intended to be applied to atomicrmw,
indicating they cannot access the forbidden address space.
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