diff options
| author | Dan Gohman <gohman@apple.com> | 2010-08-16 16:31:39 +0000 |
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2010-08-16 16:31:39 +0000 |
| commit | c6dba7495f4cdac5a475d76c4e058a4a20a04133 (patch) | |
| tree | 67bec5ea39b5d50a0ee404f5c42d086d89028680 /lib | |
| parent | 718ff5667fb7f916a20158e128800d8bb02afc79 (diff) | |
| download | external_llvm-c6dba7495f4cdac5a475d76c4e058a4a20a04133.zip external_llvm-c6dba7495f4cdac5a475d76c4e058a4a20a04133.tar.gz external_llvm-c6dba7495f4cdac5a475d76c4e058a4a20a04133.tar.bz2 | |
Add a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111145 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/Analysis/ScalarEvolution.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp index 20b886e..81194ad 100644 --- a/lib/Analysis/ScalarEvolution.cpp +++ b/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; } |
