[Mlir-commits] [mlir] [mlir] Extend SCF loopUnrollByFactor to return the result loops (PR #114573)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Fri Nov 1 10:01:23 PDT 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 b5cc222d7429fe6f18c787f633d5262fac2e676f 6e779e649aee2ebcdf7594e469dc94da6d544380 --extensions h,cpp -- mlir/include/mlir/Dialect/SCF/Utils/Utils.h mlir/lib/Dialect/SCF/TransformOps/SCFTransformOps.cpp mlir/lib/Dialect/SCF/Utils/Utils.cpp
``````````

</details>

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

``````````diff
diff --git a/mlir/lib/Dialect/SCF/TransformOps/SCFTransformOps.cpp b/mlir/lib/Dialect/SCF/TransformOps/SCFTransformOps.cpp
index c84cb13f8b..0b82209d36 100644
--- a/mlir/lib/Dialect/SCF/TransformOps/SCFTransformOps.cpp
+++ b/mlir/lib/Dialect/SCF/TransformOps/SCFTransformOps.cpp
@@ -356,8 +356,7 @@ transform::LoopUnrollOp::applyToOne(transform::TransformRewriter &rewriter,
   if (scf::ForOp scfFor = dyn_cast<scf::ForOp>(op)) {
     auto resultLoops = loopUnrollByFactor(scfFor, getFactor());
     result = resultLoops.empty() ? failure() : success();
-  }
-  else if (AffineForOp affineFor = dyn_cast<AffineForOp>(op))
+  } else if (AffineForOp affineFor = dyn_cast<AffineForOp>(op))
     result = loopUnrollByFactor(affineFor, getFactor());
   else
     return emitSilenceableError()

``````````

</details>


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


More information about the Mlir-commits mailing list