OSDN Git Service

[llvm-exegesis] Fix unused variable warning in release mode.
authorClement Courbet <courbet@google.com>
Wed, 16 May 2018 11:49:15 +0000 (11:49 +0000)
committerClement Courbet <courbet@google.com>
Wed, 16 May 2018 11:49:15 +0000 (11:49 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@332455 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llvm-exegesis/lib/Analysis.cpp

index da1e468..e026308 100644 (file)
@@ -45,9 +45,9 @@ void Analysis::printInstructionRow(const size_t ClusterId, const size_t PointId,
   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);