[all-commits] [llvm/llvm-project] b4d7d3: [mlir][NVVM] Add nvvm.membar operation (#166698)

Valentin Clement (バレンタイン クレメン) via All-commits all-commits at lists.llvm.org
Fri Nov 7 10:39:22 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b4d7d3f745aa7647cd7085b3a03ba15e7c21aa8b
      https://github.com/llvm/llvm-project/commit/b4d7d3f745aa7647cd7085b3a03ba15e7c21aa8b
  Author: Valentin Clement (バレンタイン クレメン) <clementval at gmail.com>
  Date:   2025-11-07 (Fri, 07 Nov 2025)

  Changed paths:
    M mlir/include/mlir/Dialect/LLVMIR/NVVMOps.td
    M mlir/lib/Target/LLVMIR/Dialect/NVVM/NVVMToLLVMIRTranslation.cpp
    A mlir/test/Target/LLVMIR/nvvm/membar.mlir

  Log Message:
  -----------
  [mlir][NVVM] Add nvvm.membar operation (#166698)

Add nvvm.membar operation with level as defined in
https://docs.nvidia.com/cuda/parallel-thread-execution/#parallel-synchronization-and-communication-instructions-membar

This will be used to replace direct intrinsic call in CUDA Fortran for
`threadfence()`, `threadfence_block` and `thread fence_system()`
currently lowered here:
https://github.com/llvm/llvm-project/blob/e700f157026bf8b4d58f936c5db8f152e269d77f/flang/lib/Optimizer/Builder/CUDAIntrinsicCall.cpp#L1310

The nvvm membar intrsinsic are also used in CUDA C/C++
(https://github.com/llvm/llvm-project/blob/49f55f4991227f3c7a2b8161bbf45c74b7023944/clang/lib/Headers/__clang_cuda_device_functions.h#L528)



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