[Mlir-commits] [mlir] 23a84e1 - [MLIR] Fix build failures due to unused variables in non-debug builds.
Rahul Joshi
llvmlistbot at llvm.org
Thu May 13 18:43:13 PDT 2021
Author: Rahul Joshi
Date: 2021-05-13T18:42:48-07:00
New Revision: 23a84e1c602c9ed42f51653805ce9e7f4d49be2a
URL: https://github.com/llvm/llvm-project/commit/23a84e1c602c9ed42f51653805ce9e7f4d49be2a
DIFF: https://github.com/llvm/llvm-project/commit/23a84e1c602c9ed42f51653805ce9e7f4d49be2a.diff
LOG: [MLIR] Fix build failures due to unused variables in non-debug builds.
Differential Revision: https://reviews.llvm.org/D102458
Added:
Modified:
mlir/lib/Dialect/Linalg/Transforms/ComprehensiveBufferize.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/Linalg/Transforms/ComprehensiveBufferize.cpp b/mlir/lib/Dialect/Linalg/Transforms/ComprehensiveBufferize.cpp
index acac96ea88d7..758cde288031 100644
--- a/mlir/lib/Dialect/Linalg/Transforms/ComprehensiveBufferize.cpp
+++ b/mlir/lib/Dialect/Linalg/Transforms/ComprehensiveBufferize.cpp
@@ -491,9 +491,10 @@ static void propagateInPlace(const SmallVector<OpOperand *> &initalWorklist,
const DominanceInfo &domInfo) {
LLVM_DEBUG(DBGS() << "\n\n");
LLVM_DEBUG(DBGS() << "Start propagateInPlace from initial WL\n");
- for (OpOperand *operand : initalWorklist)
- LLVM_DEBUG(DBGS() << "WL item: " << operand->get() << " used by "
- << *operand->getOwner() << "\n");
+ LLVM_DEBUG(for (OpOperand *operand
+ : initalWorklist) DBGS()
+ << "WL item: " << operand->get() << " used by "
+ << *operand->getOwner() << "\n");
SmallVector<OpOperand *> worklist(initalWorklist);
for (unsigned idx = 0; idx < worklist.size(); ++idx) {
// TODO: bail on subtensor/subtensor_insert and vector.transfer_read/write
@@ -559,8 +560,7 @@ static void destructiveUpdateAnalysis(Block *block,
[&](Operation *op) { return op->getBlock() == block; });
LLVM_DEBUG(DBGS() << "Slice:\n");
- for (auto *op : slice)
- LLVM_DEBUG(DBGS() << *op << "\n");
+ LLVM_DEBUG(for (auto *op : slice) DBGS() << *op << "\n");
bool failedDetectingDestructiveUpdate =
// func / return inplace patterns.
@@ -705,8 +705,8 @@ static LogicalResult convertReturnOp(OpBuilder &b, ReturnOp returnOp,
OpBuilder::InsertionGuard g(b);
b.setInsertionPoint(returnOp);
- FuncOp funcOp = cast<FuncOp>(returnOp->getParentOp());
- assert(funcOp && "only support FuncOp parent for ReturnOp");
+ assert(isa<FuncOp>(returnOp->getParentOp()) &&
+ "only support FuncOp parent for ReturnOp");
for (OpOperand &operand : returnOp->getOpOperands()) {
auto tensorType = operand.get().getType().dyn_cast<TensorType>();
if (!tensorType)
More information about the Mlir-commits
mailing list