[llvm] r204013 - Remove some dead assignements found by scan-build
Arnaud A. de Grandmaison
arnaud.adegm at gmail.com
Sat Mar 15 15:13:16 PDT 2014
Author: aadg
Date: Sat Mar 15 17:13:15 2014
New Revision: 204013
URL: http://llvm.org/viewvc/llvm-project?rev=204013&view=rev
Log:
Remove some dead assignements found by scan-build
Modified:
llvm/trunk/lib/Analysis/ScalarEvolution.cpp
llvm/trunk/lib/CodeGen/MachineInstr.cpp
llvm/trunk/lib/CodeGen/RegisterCoalescer.cpp
llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp
Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolution.cpp?rev=204013&r1=204012&r2=204013&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/ScalarEvolution.cpp (original)
+++ llvm/trunk/lib/Analysis/ScalarEvolution.cpp Sat Mar 15 17:13:15 2014
@@ -6155,7 +6155,6 @@ ScalarEvolution::isKnownPredicateWithRan
default:
llvm_unreachable("Unexpected ICmpInst::Predicate value!");
case ICmpInst::ICMP_SGT:
- Pred = ICmpInst::ICMP_SLT;
std::swap(LHS, RHS);
case ICmpInst::ICMP_SLT: {
ConstantRange LHSRange = getSignedRange(LHS);
@@ -6167,7 +6166,6 @@ ScalarEvolution::isKnownPredicateWithRan
break;
}
case ICmpInst::ICMP_SGE:
- Pred = ICmpInst::ICMP_SLE;
std::swap(LHS, RHS);
case ICmpInst::ICMP_SLE: {
ConstantRange LHSRange = getSignedRange(LHS);
@@ -6179,7 +6177,6 @@ ScalarEvolution::isKnownPredicateWithRan
break;
}
case ICmpInst::ICMP_UGT:
- Pred = ICmpInst::ICMP_ULT;
std::swap(LHS, RHS);
case ICmpInst::ICMP_ULT: {
ConstantRange LHSRange = getUnsignedRange(LHS);
@@ -6191,7 +6188,6 @@ ScalarEvolution::isKnownPredicateWithRan
break;
}
case ICmpInst::ICMP_UGE:
- Pred = ICmpInst::ICMP_ULE;
std::swap(LHS, RHS);
case ICmpInst::ICMP_ULE: {
ConstantRange LHSRange = getUnsignedRange(LHS);
@@ -6597,7 +6593,7 @@ ScalarEvolution::HowManyLessThans(const
IsSigned ? APIntOps::smin(getSignedRange(RHS).getSignedMax(), Limit)
: APIntOps::umin(getUnsignedRange(RHS).getUnsignedMax(), Limit);
- const SCEV *MaxBECount = getCouldNotCompute();
+ const SCEV *MaxBECount;
if (isa<SCEVConstant>(BECount))
MaxBECount = BECount;
else
@@ -7114,7 +7110,6 @@ public:
Operands.push_back(Expr->getOperand(i));
}
} else {
- FoundGCDTerm = false;
const SCEV *PartialGCD = One;
for (int i = 0, e = Expr->getNumOperands(); i < e; ++i) {
if (PartialGCD == GCD) {
Modified: llvm/trunk/lib/CodeGen/MachineInstr.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineInstr.cpp?rev=204013&r1=204012&r2=204013&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineInstr.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineInstr.cpp Sat Mar 15 17:13:15 2014
@@ -317,7 +317,6 @@ void MachineOperand::print(raw_ostream &
OS << "tied";
if (TiedTo != 15)
OS << unsigned(TiedTo - 1);
- NeedComma = true;
}
OS << '>';
}
@@ -1687,7 +1686,7 @@ void MachineInstr::print(raw_ostream &OS
}
}
} else if (!debugLoc.isUnknown() && MF) {
- if (!HaveSemi) OS << ";"; HaveSemi = true;
+ if (!HaveSemi) OS << ";";
OS << " dbg:";
printDebugLoc(debugLoc, MF, OS);
}
Modified: llvm/trunk/lib/CodeGen/RegisterCoalescer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegisterCoalescer.cpp?rev=204013&r1=204012&r2=204013&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/RegisterCoalescer.cpp (original)
+++ llvm/trunk/lib/CodeGen/RegisterCoalescer.cpp Sat Mar 15 17:13:15 2014
@@ -282,7 +282,6 @@ bool CoalescerPair::setRegisters(const M
if (SrcSub) {
Dst = TRI.getMatchingSuperReg(Dst, SrcSub, MRI.getRegClass(Src));
if (!Dst) return false;
- SrcSub = 0;
} else if (!MRI.getRegClass(Src)->contains(Dst)) {
return false;
}
Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=204013&r1=204012&r2=204013&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Sat Mar 15 17:13:15 2014
@@ -7506,7 +7506,6 @@ X86TargetLowering::LowerVECTOR_SHUFFLE(S
CommuteVectorShuffleMask(M, NumElems);
std::swap(V1, V2);
std::swap(V1IsSplat, V2IsSplat);
- Commuted = false;
if (isUNPCKLMask(M, VT, HasInt256))
return getTargetShuffleNode(X86ISD::UNPCKL, dl, VT, V1, V2, DAG);
Modified: llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp?rev=204013&r1=204012&r2=204013&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp Sat Mar 15 17:13:15 2014
@@ -422,7 +422,7 @@ void Formula::print(raw_ostream &OS) con
OS << ')';
}
if (UnfoldedOffset != 0) {
- if (!First) OS << " + "; else First = false;
+ if (!First) OS << " + ";
OS << "imm(" << UnfoldedOffset << ')';
}
}
More information about the llvm-commits
mailing list