[Mlir-commits] [flang] [llvm] [mlir] [flang][cuda] Support non-allocatable module-level managed variables (PR #188526)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Wed Mar 25 20:15:20 PDT 2026


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff origin/main HEAD --extensions h,cpp -- flang-rt/lib/cuda/registration.cpp flang/include/flang/Evaluate/tools.h flang/include/flang/Runtime/CUDA/registration.h flang/lib/Optimizer/CodeGen/CodeGen.cpp flang/lib/Optimizer/Transforms/CUDA/CUFAddConstructor.cpp flang/lib/Optimizer/Transforms/CUDA/CUFOpConversionLate.cpp mlir/lib/Target/LLVMIR/Dialect/NVVM/NVVMToLLVMIRTranslation.cpp --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/flang/lib/Optimizer/Transforms/CUDA/CUFAddConstructor.cpp b/flang/lib/Optimizer/Transforms/CUDA/CUFAddConstructor.cpp
index a63c95d2d..411d250a5 100644
--- a/flang/lib/Optimizer/Transforms/CUDA/CUFAddConstructor.cpp
+++ b/flang/lib/Optimizer/Transforms/CUDA/CUFAddConstructor.cpp
@@ -209,8 +209,8 @@ struct CUFAddConstructor
         mlir::func::FuncOp initFunc =
             fir::runtime::getRuntimeFunc<mkRTKey(CUFInitModule)>(loc, builder);
         auto initFTy = initFunc.getFunctionType();
-        llvm::SmallVector<mlir::Value> initArgs{
-            fir::runtime::createArguments(builder, loc, initFTy, registeredMod)};
+        llvm::SmallVector<mlir::Value> initArgs{fir::runtime::createArguments(
+            builder, loc, initFTy, registeredMod)};
         fir::CallOp::create(builder, loc, initFunc, initArgs);
       }
     }

``````````

</details>


https://github.com/llvm/llvm-project/pull/188526


More information about the Mlir-commits mailing list