forked from OSchip/llvm-project
fix a nasty iterator invalidation bug from my conversion from
std::map to DenseMap, exposed on release llvm-gcc bootstrap. llvm-svn: 85840
This commit is contained in:
parent
33ccd9e354
commit
b70ef3c8c7
|
@ -1079,8 +1079,7 @@ void SCCPSolver::visitShuffleVectorInst(ShuffleVectorInst &I) {
|
||||||
// can turn this into a getelementptr ConstantExpr.
|
// can turn this into a getelementptr ConstantExpr.
|
||||||
//
|
//
|
||||||
void SCCPSolver::visitGetElementPtrInst(GetElementPtrInst &I) {
|
void SCCPSolver::visitGetElementPtrInst(GetElementPtrInst &I) {
|
||||||
LatticeVal &IV = ValueState[&I];
|
if (ValueState[&I].isOverdefined()) return;
|
||||||
if (IV.isOverdefined()) return;
|
|
||||||
|
|
||||||
SmallVector<Constant*, 8> Operands;
|
SmallVector<Constant*, 8> Operands;
|
||||||
Operands.reserve(I.getNumOperands());
|
Operands.reserve(I.getNumOperands());
|
||||||
|
@ -1091,7 +1090,7 @@ void SCCPSolver::visitGetElementPtrInst(GetElementPtrInst &I) {
|
||||||
return; // Operands are not resolved yet.
|
return; // Operands are not resolved yet.
|
||||||
|
|
||||||
if (State.isOverdefined())
|
if (State.isOverdefined())
|
||||||
return markOverdefined(IV, &I);
|
return markOverdefined(&I);
|
||||||
|
|
||||||
assert(State.isConstant() && "Unknown state!");
|
assert(State.isConstant() && "Unknown state!");
|
||||||
Operands.push_back(State.getConstant());
|
Operands.push_back(State.getConstant());
|
||||||
|
|
Loading…
Reference in New Issue