summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/ScalarEvolution.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-08-16 16:31:39 +0000
committerDan Gohman <gohman@apple.com>2010-08-16 16:31:39 +0000
commitc29eeaecece5cc52ee717466e15ea707a9a792c6 (patch)
tree3c3eed9ac95600a55195d33affec8a549e9ac1b7 /llvm/lib/Analysis/ScalarEvolution.cpp
parent7eac4961d7d1835d0f466454f8e708c22a0ff246 (diff)
downloadbcm5719-llvm-c29eeaecece5cc52ee717466e15ea707a9a792c6.tar.gz
bcm5719-llvm-c29eeaecece5cc52ee717466e15ea707a9a792c6.zip
Add a comment.
llvm-svn: 111145
Diffstat (limited to 'llvm/lib/Analysis/ScalarEvolution.cpp')
-rw-r--r--llvm/lib/Analysis/ScalarEvolution.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp
index 20b886e4aa0..81194adb373 100644
--- a/llvm/lib/Analysis/ScalarEvolution.cpp
+++ b/llvm/lib/Analysis/ScalarEvolution.cpp
@@ -2468,6 +2468,11 @@ const SCEV *ScalarEvolution::getSCEV(Value *V) {
std::map<SCEVCallbackVH, const SCEV *>::const_iterator I = Scalars.find(V);
if (I != Scalars.end()) return I->second;
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));
return S;
}
OpenPOWER on IntegriCloud