[Mlir-commits] [mlir] acce3b8 - [mlir] Mark variable as maybe_unused.

llvmlistbot at llvm.org llvmlistbot at llvm.org
Wed Feb 12 05:59:23 PST 2025


Author: Christian Sigg
Date: 2025-02-12T14:59:18+01:00
New Revision: acce3b808d69b6a75b0b7c7d5eea5a81e416dc6c

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

LOG: [mlir] Mark variable as maybe_unused.

Added: 
    

Modified: 
    mlir/lib/Dialect/Mesh/IR/MeshOps.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/Mesh/IR/MeshOps.cpp b/mlir/lib/Dialect/Mesh/IR/MeshOps.cpp
index 12e1ec6d717ea..304ede195c762 100644
--- a/mlir/lib/Dialect/Mesh/IR/MeshOps.cpp
+++ b/mlir/lib/Dialect/Mesh/IR/MeshOps.cpp
@@ -334,7 +334,8 @@ void mlir::mesh::maybeInsertSourceShardingAnnotation(MeshSharding sharding,
   Operation *operandSrcOp = operandValue.getDefiningOp();
   bool isBlockArg = !operandSrcOp;
   {
-    auto opType = dyn_cast<mlir::RankedTensorType>(operandValue.getType());
+    [[maybe_unused]] auto opType =
+        dyn_cast<mlir::RankedTensorType>(operandValue.getType());
     assert(!opType || opType.getRank() > 0 || isFullReplication(sharding));
   }
   if (!isa<RankedTensorType>(operandValue.getType()) && operandSrcOp &&


        


More information about the Mlir-commits mailing list