[Mlir-commits] [mlir] [mlir][gpu] Adding the ELF section to the NVVMTargetAttr, to propagate to the gpu.binary Op (PR #119440)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Tue Dec 10 11:35:51 PST 2024


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 e0f3410be9ae7e62a4ec7c3676e46afc81120dbb d62fa8dc4d60c960bdc58bffbc3c251573490703 --extensions cpp -- mlir/lib/Dialect/GPU/Transforms/NVVMAttachTarget.cpp mlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp mlir/lib/Target/LLVM/NVVM/Target.cpp
``````````

</details>

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

``````````diff
diff --git a/mlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp b/mlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp
index 696cab52d4..9d6d9d3cf6 100644
--- a/mlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp
+++ b/mlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp
@@ -1185,8 +1185,8 @@ LogicalResult NVVMDialect::verifyRegionArgAttribute(Operation *op,
 LogicalResult
 NVVMTargetAttr::verify(function_ref<InFlightDiagnostic()> emitError,
                        int optLevel, StringRef triple, StringRef chip,
-                       StringRef features, StringAttr elfSection, DictionaryAttr flags,
-                       ArrayAttr files) {
+                       StringRef features, StringAttr elfSection,
+                       DictionaryAttr flags, ArrayAttr files) {
   if (optLevel < 0 || optLevel > 3) {
     emitError() << "The optimization level must be a number between 0 and 3.";
     return failure();
diff --git a/mlir/lib/Target/LLVM/NVVM/Target.cpp b/mlir/lib/Target/LLVM/NVVM/Target.cpp
index 82ead37442..152d2dd632 100644
--- a/mlir/lib/Target/LLVM/NVVM/Target.cpp
+++ b/mlir/lib/Target/LLVM/NVVM/Target.cpp
@@ -669,10 +669,9 @@ NVVMTargetAttrImpl::createObject(Attribute attribute, Operation *module,
     properties.push_back(
         builder.getNamedAttr("O", builder.getI32IntegerAttr(target.getO())));
 
-  if (StringAttr section = target.getSection())   
-    properties.push_back(
-        builder.getNamedAttr("section", section));
-  
+  if (StringAttr section = target.getSection())
+    properties.push_back(builder.getNamedAttr("section", section));
+
   if (!properties.empty())
     objectProps = builder.getDictionaryAttr(properties);
 

``````````

</details>


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


More information about the Mlir-commits mailing list