[all-commits] [llvm/llvm-project] ec1b3b: [flang][cuda] Add cuf.on_device op and lower to it...

Valentin Clement (バレンタイン クレメン) via All-commits all-commits at lists.llvm.org
Mon Sep 28 19:57:36 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ec1b3b10a71c2181b0dfb90f1178e2e739680e02
      https://github.com/llvm/llvm-project/commit/ec1b3b10a71c2181b0dfb90f1178e2e739680e02
  Author: Valentin Clement (バレンタイン クレメン) <clementval at gmail.com>
  Date:   2026-09-28 (Mon, 28 Sep 2026)

  Changed paths:
    M flang/include/flang/Optimizer/Builder/CUDAIntrinsicCall.h
    M flang/include/flang/Optimizer/Builder/CUFCommon.h
    M flang/include/flang/Optimizer/Dialect/CUF/CUFOps.td
    M flang/include/flang/Optimizer/Transforms/Passes.td
    M flang/lib/Optimizer/Builder/CUDAIntrinsicCall.cpp
    M flang/lib/Optimizer/Builder/CUFCommon.cpp
    M flang/lib/Optimizer/Transforms/CMakeLists.txt
    R flang/lib/Optimizer/Transforms/CUDA/CUFFunctionRewrite.cpp
    M flang/lib/Optimizer/Transforms/CUDA/CUFOpConversion.cpp
    M flang/lib/Optimizer/Transforms/CUDA/CUFOpConversionLate.cpp
    R flang/test/Fir/CUDA/cuda-function-rewrite.mlir
    A flang/test/Fir/CUDA/cuda-on-device.mlir
    M flang/test/Fir/cuf.mlir
    A flang/test/Lower/CUDA/cuda-on-device.cuf

  Log Message:
  -----------
  [flang][cuda] Add cuf.on_device op and lower to it (#227089)

Replace the CUFFunctionRewrite pass, which matched fir.call names and
folded them to constants, with a cuf.on_device operation emitted when
the intrinsic is lowered. CUFOpConversion folds the operation once the
code is in its host or device context, and leaves the host copy of an
OpenACC routine unfolded so the device clone is not baked to false. Any
operation that remains is folded by the late CUF conversion, and the
rewrite pass is dropped from the pipeline.



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