[Mlir-commits] [mlir] [MLIR] Add no-inline attribute (PR #117392)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Fri Dec 13 12:02:55 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 76f0ff8210d56a050d2679926a2fdddd3a8c16d6 691eb770a65e4ad1e66d6f711d3fe92f360e4317 --extensions cpp -- mlir/lib/Dialect/Func/Extensions/InlinerExtension.cpp
``````````

</details>

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

``````````diff
diff --git a/mlir/lib/Dialect/Func/Extensions/InlinerExtension.cpp b/mlir/lib/Dialect/Func/Extensions/InlinerExtension.cpp
index 59e108c5b6..3e29ef5fd6 100644
--- a/mlir/lib/Dialect/Func/Extensions/InlinerExtension.cpp
+++ b/mlir/lib/Dialect/Func/Extensions/InlinerExtension.cpp
@@ -23,7 +23,7 @@ namespace {
 struct FuncInlinerInterface : public DialectInlinerInterface {
   using DialectInlinerInterface::DialectInlinerInterface;
 
-  static constexpr const char* NoInlineAttrName = "noinline";
+  static constexpr const char *NoInlineAttrName = "noinline";
 
   //===--------------------------------------------------------------------===//
   // Analysis Hooks
@@ -32,7 +32,8 @@ struct FuncInlinerInterface : public DialectInlinerInterface {
   /// All call operations can be inlined.
   bool isLegalToInline(Operation *call, Operation *callable,
                        bool wouldBeCloned) const final {
-    return !call->hasAttr(NoInlineAttrName) && !callable->hasAttr(NoInlineAttrName);
+    return !call->hasAttr(NoInlineAttrName) &&
+           !callable->hasAttr(NoInlineAttrName);
   }
 
   /// All operations can be inlined.

``````````

</details>


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


More information about the Mlir-commits mailing list