]> granicus.if.org Git - llvm/commitdiff
Inline a variable into debug section to fix unused variable warning.
authorRichard Trieu <rtrieu@google.com>
Wed, 29 May 2019 04:09:32 +0000 (04:09 +0000)
committerRichard Trieu <rtrieu@google.com>
Wed, 29 May 2019 04:09:32 +0000 (04:09 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@361927 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/MachinePipeliner.cpp

index 61441d909388d9a84b2ce0a5e0f202ded8674671..af159f1c45514169d32a2decc69a0e4f8d099909 100644 (file)
@@ -3963,10 +3963,10 @@ void ResourceManager::reserveResources(const MCInstrDesc *MID) {
                   STI->getWriteProcResEnd(SCDesc))) {
     if (!PRE.Cycles)
       continue;
-    const MCProcResourceDesc *ProcResource =
-        SM.getProcResource(PRE.ProcResourceIdx);
     ++ProcResourceCount[PRE.ProcResourceIdx];
     LLVM_DEBUG({
+      const MCProcResourceDesc *ProcResource =
+          SM.getProcResource(PRE.ProcResourceIdx);
       dbgs() << format(" %16s(%2d): Count: %2d, NumUnits:%2d, Cycles:%2d\n",
                        ProcResource->Name, PRE.ProcResourceIdx,
                        ProcResourceCount[PRE.ProcResourceIdx],