[llvm] r315941 - [JumpThreading] Move two PredValueInfoTy vectors to a scope closer to their usage. NFCI
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 16 14:54:13 PDT 2017
Author: ctopper
Date: Mon Oct 16 14:54:13 2017
New Revision: 315941
URL: http://llvm.org/viewvc/llvm-project?rev=315941&view=rev
Log:
[JumpThreading] Move two PredValueInfoTy vectors to a scope closer to their usage. NFCI
Modified:
llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp?rev=315941&r1=315940&r2=315941&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp Mon Oct 16 14:54:13 2017
@@ -648,8 +648,6 @@ bool JumpThreadingPass::ComputeValueKnow
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::ComputeValueKnow
// 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,
More information about the llvm-commits
mailing list