diff --git a/mlir/lib/Analysis/VectorAnalysis.cpp b/mlir/lib/Analysis/VectorAnalysis.cpp index 7c0176d94ed8..e1d31ad1d2bf 100644 --- a/mlir/lib/Analysis/VectorAnalysis.cpp +++ b/mlir/lib/Analysis/VectorAnalysis.cpp @@ -197,6 +197,7 @@ bool mlir::matcher::operatesOnSuperVectorsOf(Operation &op, /// TODO(ntv): there should be a single function for all ops to do this so we /// do not have to special case. Maybe a trait, or just a method, unclear atm. bool mustDivide = false; + (void)mustDivide; VectorType superVectorType; if (auto read = dyn_cast(op)) { superVectorType = read.getResultType(); diff --git a/mlir/lib/Transforms/DmaGeneration.cpp b/mlir/lib/Transforms/DmaGeneration.cpp index 00ae92bdbc88..6452346a6d10 100644 --- a/mlir/lib/Transforms/DmaGeneration.cpp +++ b/mlir/lib/Transforms/DmaGeneration.cpp @@ -211,7 +211,8 @@ static bool getFullMemRefAsRegion(Operation *opInst, unsigned numParamLoopIVs, return true; } -static InFlightDiagnostic emitRemarkForBlock(Block &block) { +static InFlightDiagnostic LLVM_ATTRIBUTE_UNUSED +emitRemarkForBlock(Block &block) { auto *op = block.getContainingOp(); return op ? op->emitRemark() : block.getFunction()->emitRemark(); }