[JumpThreading] Move two PredValueInfoTy vectors to a scope closer to their usage...
authorCraig Topper <craig.topper@intel.com>
Mon, 16 Oct 2017 21:54:13 +0000 (21:54 +0000)
committerCraig Topper <craig.topper@intel.com>
Mon, 16 Oct 2017 21:54:13 +0000 (21:54 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315941 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/JumpThreading.cpp

index 33afc207a959a1287bfbc267238dc1d7c8e0b1b0..ade4fbbcb6f2f157fe7ff97bf4b3fb707ec66567 100644 (file)
@@ -648,8 +648,6 @@ bool JumpThreadingPass::ComputeValueKnownInPredecessors(
     return true;
   }
 
-  PredValueInfoTy LHSVals, RHSVals;
-
   // Handle some boolean conditions.
   if (I->getType()->getPrimitiveSizeInBits() == 1) {
     assert(Preference == WantInteger && "One-bit non-integer type?");
@@ -657,6 +655,8 @@ bool JumpThreadingPass::ComputeValueKnownInPredecessors(
     // X & false -> false
     if (I->getOpcode() == Instruction::Or ||
         I->getOpcode() == Instruction::And) {
+      PredValueInfoTy LHSVals, RHSVals;
+
       ComputeValueKnownInPredecessors(I->getOperand(0), BB, LHSVals,
                                       WantInteger, CxtI);
       ComputeValueKnownInPredecessors(I->getOperand(1), BB, RHSVals,