[llvm-commits] [llvm] r85840 - /llvm/trunk/lib/Transforms/Scalar/SCCP.cpp
Chris Lattner
sabre at nondot.org
Mon Nov 2 15:25:40 PST 2009
Author: lattner
Date: Mon Nov 2 17:25:39 2009
New Revision: 85840
URL: http://llvm.org/viewvc/llvm-project?rev=85840&view=rev
Log:
fix a nasty iterator invalidation bug from my conversion from
std::map to DenseMap, exposed on release llvm-gcc bootstrap.
Modified:
llvm/trunk/lib/Transforms/Scalar/SCCP.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/SCCP.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/SCCP.cpp?rev=85840&r1=85839&r2=85840&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/SCCP.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/SCCP.cpp Mon Nov 2 17:25:39 2009
@@ -1079,8 +1079,7 @@
// can turn this into a getelementptr ConstantExpr.
//
void SCCPSolver::visitGetElementPtrInst(GetElementPtrInst &I) {
- LatticeVal &IV = ValueState[&I];
- if (IV.isOverdefined()) return;
+ if (ValueState[&I].isOverdefined()) return;
SmallVector<Constant*, 8> Operands;
Operands.reserve(I.getNumOperands());
@@ -1091,7 +1090,7 @@
return; // Operands are not resolved yet.
if (State.isOverdefined())
- return markOverdefined(IV, &I);
+ return markOverdefined(&I);
assert(State.isConstant() && "Unknown state!");
Operands.push_back(State.getConstant());
More information about the llvm-commits
mailing list