From 02d3499a46cc0f5b52af5f94c951acaad2a6ccdc Mon Sep 17 00:00:00 2001 From: Stella Laurenzo Date: Sat, 21 May 2022 21:30:01 -0700 Subject: [PATCH] NFC: Silence two warnings for unused bufferization symbols in release mode. Differential Revision: https://reviews.llvm.org/D126182 --- mlir/lib/Dialect/Bufferization/Transforms/Bufferize.cpp | 2 ++ .../Dialect/Bufferization/Transforms/OneShotModuleBufferize.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/mlir/lib/Dialect/Bufferization/Transforms/Bufferize.cpp b/mlir/lib/Dialect/Bufferization/Transforms/Bufferize.cpp index 0ef56d2a5ab4..c4ce22c4539f 100644 --- a/mlir/lib/Dialect/Bufferization/Transforms/Bufferize.cpp +++ b/mlir/lib/Dialect/Bufferization/Transforms/Bufferize.cpp @@ -389,6 +389,8 @@ private: DenseSet &toMemrefOps; /// The bufferization options. + /// Used for debug modes. + LLVM_ATTRIBUTE_UNUSED const BufferizationOptions &options; }; } // namespace diff --git a/mlir/lib/Dialect/Bufferization/Transforms/OneShotModuleBufferize.cpp b/mlir/lib/Dialect/Bufferization/Transforms/OneShotModuleBufferize.cpp index fec5cb6b56a2..c9b941c6a34c 100644 --- a/mlir/lib/Dialect/Bufferization/Transforms/OneShotModuleBufferize.cpp +++ b/mlir/lib/Dialect/Bufferization/Transforms/OneShotModuleBufferize.cpp @@ -105,6 +105,8 @@ static FuncAnalysisState &getFuncAnalysisState(AnalysisState &state) { } /// Return the state (phase) of analysis of the FuncOp. +/// Used for debug modes. +LLVM_ATTRIBUTE_UNUSED static FuncOpAnalysisState getFuncOpAnalysisState(const AnalysisState &state, func::FuncOp funcOp) { const FuncAnalysisState &funcState = getFuncAnalysisState(state);