[llvm-branch-commits] [mlir] [mlir][Transforms][WIP] Dialect conversion: Make materializations optional (PR #104668)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Sat Aug 17 03:50:07 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 aad27bf534b59645f47a92f072af798687b1dd0d d20fdc5ea1821ae409e1ac57e51cc6932b8130ba --extensions h,cpp -- mlir/include/mlir/Transforms/DialectConversion.h mlir/lib/Conversion/ReconcileUnrealizedCasts/ReconcileUnrealizedCasts.cpp mlir/lib/Transforms/Utils/DialectConversion.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/mlir/lib/Transforms/Utils/DialectConversion.cpp b/mlir/lib/Transforms/Utils/DialectConversion.cpp
index bc58d7889b..77cb83efee 100644
--- a/mlir/lib/Transforms/Utils/DialectConversion.cpp
+++ b/mlir/lib/Transforms/Utils/DialectConversion.cpp
@@ -2424,8 +2424,8 @@ LogicalResult OperationConverter::convert(ConversionPatternRewriter &rewriter,
static LogicalResult
legalizeUnresolvedMaterialization(RewriterBase &rewriter,
- UnrealizedConversionCastOp op,
- UnresolvedMaterializationMetadata metadata) {
+ UnrealizedConversionCastOp op,
+ UnresolvedMaterializationMetadata metadata) {
assert(!op.use_empty() &&
"expected that dead materializations have already been DCE'd");
Operation::operand_range inputOperands = op.getOperands();
@@ -2516,7 +2516,8 @@ LogicalResult OperationConverter::convertOperations(ArrayRef<Operation *> ops) {
IRRewriter re2(rewriterImpl.context);
SmallVector<UnrealizedConversionCastOp> remainingCastOps;
- reconcileUnrealizedCasts(rewriterImpl.getUnresolvedMaterializations(), &remainingCastOps);
+ reconcileUnrealizedCasts(rewriterImpl.getUnresolvedMaterializations(),
+ &remainingCastOps);
for (UnrealizedConversionCastOp op : remainingCastOps)
if (failed(legalizeUnresolvedMaterialization(
re2, op,
``````````
</details>
https://github.com/llvm/llvm-project/pull/104668
More information about the llvm-branch-commits
mailing list