Add a comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111145 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman 2010-08-16 16:31:39 +00:00
parent 8d9c7a6701
commit 619d3324bd

View File

@ -2468,6 +2468,11 @@ const SCEV *ScalarEvolution::getSCEV(Value *V) {
std::map<SCEVCallbackVH, const SCEV *>::const_iterator I = Scalars.find(V); std::map<SCEVCallbackVH, const SCEV *>::const_iterator I = Scalars.find(V);
if (I != Scalars.end()) return I->second; if (I != Scalars.end()) return I->second;
const SCEV *S = createSCEV(V); const SCEV *S = createSCEV(V);
// The process of creating a SCEV for V may have caused other SCEVs
// to have been created, so it's necessary to insert the new entry
// from scratch, rather than trying to remember the insert position
// above.
Scalars.insert(std::make_pair(SCEVCallbackVH(V, this), S)); Scalars.insert(std::make_pair(SCEVCallbackVH(V, this), S));
return S; return S;
} }