[llvm] r314353 - Fix -Wunused-variable for Release build.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 27 15:03:15 PDT 2017
Author: ruiu
Date: Wed Sep 27 15:03:15 2017
New Revision: 314353
URL: http://llvm.org/viewvc/llvm-project?rev=314353&view=rev
Log:
Fix -Wunused-variable for Release build.
Modified:
llvm/trunk/lib/Transforms/Scalar/LoopUnrollPass.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/LoopUnrollPass.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopUnrollPass.cpp?rev=314353&r1=314352&r2=314353&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopUnrollPass.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopUnrollPass.cpp Wed Sep 27 15:03:15 2017
@@ -1298,7 +1298,6 @@ PreservedAnalyses LoopUnrollPass::run(Fu
// for unrolling is only needed to get optimization remarks emitted in
// a forward order.
Loop &L = *Worklist.pop_back_val();
- Loop *ParentL = L.getParentLoop();
// The API here is quite complex to call, but there are only two interesting
// states we support: partial and full (or "simple") unrolling. However, to
@@ -1320,6 +1319,7 @@ PreservedAnalyses LoopUnrollPass::run(Fu
// The parent must not be damaged by unrolling!
#ifndef NDEBUG
+ Loop *ParentL = L.getParentLoop();
if (Result != LoopUnrollResult::Unmodified && ParentL)
ParentL->verifyLoop();
#endif
More information about the llvm-commits
mailing list