[Mlir-commits] [mlir] aa48da3 - [mlir][Transform] NFC - Fix spurious reflows

Nicolas Vasilache llvmlistbot at llvm.org
Fri Mar 31 03:26:22 PDT 2023


Author: Nicolas Vasilache
Date: 2023-03-31T03:22:23-07:00
New Revision: aa48da3537c57d264aac1388f8b48da53a2f8e1c

URL: https://github.com/llvm/llvm-project/commit/aa48da3537c57d264aac1388f8b48da53a2f8e1c
DIFF: https://github.com/llvm/llvm-project/commit/aa48da3537c57d264aac1388f8b48da53a2f8e1c.diff

LOG: [mlir][Transform] NFC - Fix spurious reflows

Added: 
    

Modified: 
    mlir/lib/Dialect/Transform/IR/TransformInterfaces.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/Transform/IR/TransformInterfaces.cpp b/mlir/lib/Dialect/Transform/IR/TransformInterfaces.cpp
index a4986379994d..c9d28f9eef89 100644
--- a/mlir/lib/Dialect/Transform/IR/TransformInterfaces.cpp
+++ b/mlir/lib/Dialect/Transform/IR/TransformInterfaces.cpp
@@ -738,8 +738,8 @@ transform::TransformState::applyTransform(TransformOpInterface transform) {
   // Remember the results of the payload ops associated with the consumed
   // op handles or the ops defining the value handles so we can drop the
   // association with them later. This must happen here because the
-  // transformation may destroy or mutate them so we cannot traverse the
-  // payload IR after that.
+  // transformation may destroy or mutate them so we cannot traverse the payload
+  // IR after that.
   SmallVector<Value> origOpFlatResults;
   SmallVector<Operation *> origAssociatedOps;
   for (unsigned index : consumedOperands) {
@@ -771,16 +771,16 @@ transform::TransformState::applyTransform(TransformOpInterface transform) {
     return diag;
   }
 
-  // Compute the result but do not short-circuit the silenceable failure
-  // case as we still want the handles to propagate properly so the
-  // "suppress" mode can proceed on a best effort basis.
+  // Compute the result but do not short-circuit the silenceable failure case as
+  // we still want the handles to propagate properly so the "suppress" mode can
+  // proceed on a best effort basis.
   transform::TransformResults results(transform->getNumResults());
   DiagnosedSilenceableFailure result(transform.apply(results, *this));
   if (result.isDefiniteFailure())
     return result;
 
-  // If a silenceable failure was produced, some results may be unset, set
-  // them to empty lists.
+  // If a silenceable failure was produced, some results may be unset, set them
+  // to empty lists.
   if (result.isSilenceableFailure()) {
     for (OpResult opResult : transform->getResults()) {
       if (results.isSet(opResult.getResultNumber()))
@@ -795,8 +795,8 @@ transform::TransformState::applyTransform(TransformOpInterface transform) {
     }
   }
 
-  // Remove the mapping for the operand if it is consumed by the operation.
-  // This allows us to catch use-after-free with assertions later on.
+  // Remove the mapping for the operand if it is consumed by the operation. This
+  // allows us to catch use-after-free with assertions later on.
   for (unsigned index : consumedOperands) {
     Value operand = transform->getOperand(index);
     if (operand.getType().isa<TransformHandleTypeInterface>()) {
@@ -855,8 +855,8 @@ transform::TransformState::Extension::replacePayloadOp(Operation *op,
   if (failed(state.getHandlesForPayloadOp(op, handles)))
     return failure();
 
-  // TODO: we may need to invalidate handles to operations and values nested
-  // in the operation being replaced.
+  // TODO: we may need to invalidate handles to operations and values nested in
+  // the operation being replaced.
   return state.replacePayloadOp(op, replacement);
 }
 
@@ -1134,9 +1134,9 @@ LogicalResult transform::detail::mapPossibleTopLevelTransformOpBlockArguments(
 
 LogicalResult
 transform::detail::verifyPossibleTopLevelTransformOpTrait(Operation *op) {
-  // Attaching this trait without the interface is a misuse of the API, but
-  // it cannot be caught via a static_assert because interface registration
-  // is dynamic.
+  // Attaching this trait without the interface is a misuse of the API, but it
+  // cannot be caught via a static_assert because interface registration is
+  // dynamic.
   assert(isa<TransformOpInterface>(op) &&
          "should implement TransformOpInterface to have "
          "PossibleTopLevelTransformOpTrait");
@@ -1172,12 +1172,11 @@ transform::detail::verifyPossibleTopLevelTransformOpTrait(Operation *op) {
                  TransformValueHandleTypeInterface>())
       continue;
 
-    InFlightDiagnostic diag = op->emitOpError()
-                              << "expects trailing entry block arguments "
-                                 "to be of type implementing "
-                                 "TransformHandleTypeInterface, "
-                                 "TransformValueHandleTypeInterface or "
-                                 "TransformParamTypeInterface";
+    InFlightDiagnostic diag =
+        op->emitOpError()
+        << "expects trailing entry block arguments to be of type implementing "
+           "TransformHandleTypeInterface, TransformValueHandleTypeInterface or "
+           "TransformParamTypeInterface";
     diag.attachNote() << "argument #" << arg.getArgNumber() << " does not";
     return diag;
   }
@@ -1242,8 +1241,7 @@ DiagnosedSilenceableFailure transform::detail::transformWithPatternsApply(
     function_ref<void(RewritePatternSet &)> populatePatterns) {
   if (!target->hasTrait<OpTrait::IsIsolatedFromAbove>()) {
     return emitDefiniteFailure(transformOp)
-           << "applies only to isolated-from-above targets because it "
-              "needs to "
+           << "applies only to isolated-from-above targets because it needs to "
               "apply patterns greedily";
   }
   RewritePatternSet patterns(transformOp->getContext());


        


More information about the Mlir-commits mailing list