[Mlir-commits] [mlir] [MLIR] Clarify createOrFold as opportunistic eager folding (PR #160565)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Wed Sep 24 14:48:18 PDT 2025
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 -- mlir/include/mlir/IR/Builders.h
``````````
: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/mlir/include/mlir/IR/Builders.h b/mlir/include/mlir/IR/Builders.h
index e4a965d41..8f44c32a4 100644
--- a/mlir/include/mlir/IR/Builders.h
+++ b/mlir/include/mlir/IR/Builders.h
@@ -517,10 +517,10 @@ public:
/// the results of the operation.
///
/// Note: This performs opportunistic eager folding during IR construction.
- /// The folders are designed to operate efficiently on canonical IR, which this
- /// API does not enforce. Complete folding isn't only expected in the context
- /// of canonicalization which intertwine folders with pattern rewrites until
- /// fixed-point.
+ /// The folders are designed to operate efficiently on canonical IR, which
+ /// this API does not enforce. Complete folding isn't only expected in the
+ /// context of canonicalization which intertwine folders with pattern rewrites
+ /// until fixed-point.
template <typename OpTy, typename... Args>
void createOrFold(SmallVectorImpl<Value> &results, Location location,
Args &&...args) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/160565
More information about the Mlir-commits
mailing list