[llvm] r332455 - [llvm-exegesis] Fix unused variable warning in release mode.

Clement Courbet via llvm-commits llvm-commits at lists.llvm.org
Wed May 16 04:49:15 PDT 2018


Author: courbet
Date: Wed May 16 04:49:15 2018
New Revision: 332455

URL: http://llvm.org/viewvc/llvm-project?rev=332455&view=rev
Log:
[llvm-exegesis] Fix unused variable warning in release mode.

Modified:
    llvm/trunk/tools/llvm-exegesis/lib/Analysis.cpp

Modified: llvm/trunk/tools/llvm-exegesis/lib/Analysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-exegesis/lib/Analysis.cpp?rev=332455&r1=332454&r2=332455&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-exegesis/lib/Analysis.cpp (original)
+++ llvm/trunk/tools/llvm-exegesis/lib/Analysis.cpp Wed May 16 04:49:15 2018
@@ -45,9 +45,9 @@ void Analysis::printInstructionRow(const
   OS << kCsvSep;
   const auto OpcodeIt = MnemonicToOpcode_.find(Point.Key.OpcodeName);
   if (OpcodeIt != MnemonicToOpcode_.end()) {
-    const auto &SchedModel = SubtargetInfo_->getSchedModel();
     const unsigned SchedClassId = InstrInfo_->get(OpcodeIt->second).getSchedClass();
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
+    const auto &SchedModel = SubtargetInfo_->getSchedModel();
     const llvm::MCSchedClassDesc *const SCDesc =
        SchedModel.getSchedClassDesc(SchedClassId);
     writeCsvEscaped(OS, SCDesc->Name);




More information about the llvm-commits mailing list