[Mlir-commits] [mlir] c080c1f - [mlir][GPU] Fix incorrect API usage in RewritePatterns

Matthias Springer llvmlistbot at llvm.org
Thu Feb 23 09:20:47 PST 2023


Author: Matthias Springer
Date: 2023-02-23T18:20:37+01:00
New Revision: c080c1f4821274dbb358f6a6911055d9d8b6dbed

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

LOG: [mlir][GPU] Fix incorrect API usage in RewritePatterns

Incorrect API usage was detected by D144552.

Differential Revision: https://reviews.llvm.org/D144637

Added: 
    

Modified: 
    mlir/lib/Dialect/GPU/IR/GPUDialect.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/GPU/IR/GPUDialect.cpp b/mlir/lib/Dialect/GPU/IR/GPUDialect.cpp
index a64e5e4d74707..159892e7bd09a 100644
--- a/mlir/lib/Dialect/GPU/IR/GPUDialect.cpp
+++ b/mlir/lib/Dialect/GPU/IR/GPUDialect.cpp
@@ -1333,7 +1333,7 @@ struct EraseRedundantGpuWaitOpPairs : public OpRewritePattern<WaitOp> {
         continue;
       validOperands.push_back(operand);
     }
-    op->setOperands(validOperands);
+    rewriter.updateRootInPlace(op, [&]() { op->setOperands(validOperands); });
     return success();
   }
 };


        


More information about the Mlir-commits mailing list