[all-commits] [llvm/llvm-project] 247d21: [RFC] IR: Define noalias.addrspace metadata

Matt Arsenault via All-commits all-commits at lists.llvm.org
Tue Sep 24 12:03:09 PDT 2024


  Branch: refs/heads/users/arsenm/noalias-addrspace-metadata
  Home:   https://github.com/llvm/llvm-project
  Commit: 247d21e821f6e1783cdb07f3e852bd2b645d1f88
      https://github.com/llvm/llvm-project/commit/247d21e821f6e1783cdb07f3e852bd2b645d1f88
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2024-09-24 (Tue, 24 Sep 2024)

  Changed paths:
    M llvm/docs/LangRef.rst
    M llvm/docs/ReleaseNotes.rst
    M llvm/include/llvm/IR/FixedMetadataKinds.def
    M llvm/lib/IR/Verifier.cpp
    A llvm/test/Assembler/noalias-addrspace-md.ll
    A llvm/test/Verifier/noalias-addrspace.ll

  Log Message:
  -----------
  [RFC] IR: Define noalias.addrspace metadata

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.


  Commit: eb0cece6d7137790d5b1221f8e68721c8f12f1e8
      https://github.com/llvm/llvm-project/commit/eb0cece6d7137790d5b1221f8e68721c8f12f1e8
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2024-09-24 (Tue, 24 Sep 2024)

  Changed paths:
    M llvm/lib/IR/Verifier.cpp

  Log Message:
  -----------
  Use enum for range like metadata kinds


  Commit: b51424380d12150ff5eeff963faa834173bb5825
      https://github.com/llvm/llvm-project/commit/b51424380d12150ff5eeff963faa834173bb5825
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2024-09-24 (Tue, 24 Sep 2024)

  Changed paths:
    M llvm/docs/LangRef.rst

  Log Message:
  -----------
  Fix doc build


  Commit: b78279c17bc5650a65e84dd53212dca56a0e29c7
      https://github.com/llvm/llvm-project/commit/b78279c17bc5650a65e84dd53212dca56a0e29c7
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2024-09-24 (Tue, 24 Sep 2024)

  Changed paths:
    M llvm/test/Transforms/InstCombine/loadstore-metadata.ll
    M llvm/test/Transforms/SimplifyCFG/hoist-with-metadata.ll

  Log Message:
  -----------
  Add baseline tests for some optimization handling


  Commit: a4362726b30aef276fd5c50a40007e823595747f
      https://github.com/llvm/llvm-project/commit/a4362726b30aef276fd5c50a40007e823595747f
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2024-09-24 (Tue, 24 Sep 2024)

  Changed paths:
    M llvm/docs/LangRef.rst

  Log Message:
  -----------
  Add another comment


  Commit: fb9d412b2573d9a5bfa25fa3c6f7bebb3cc33ab6
      https://github.com/llvm/llvm-project/commit/fb9d412b2573d9a5bfa25fa3c6f7bebb3cc33ab6
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2024-09-24 (Tue, 24 Sep 2024)

  Changed paths:
    M llvm/docs/LangRef.rst

  Log Message:
  -----------
  Reword langref slightly


Compare: https://github.com/llvm/llvm-project/compare/29b8b60024fc...fb9d412b2573

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