diff options
author | Andrew Trick <atrick@apple.com> | 2013-01-14 21:00:37 +0000 |
---|---|---|
committer | Andrew Trick <atrick@apple.com> | 2013-01-14 21:00:37 +0000 |
commit | 1ba5769676bb14078ddbdb9760523619726800c0 (patch) | |
tree | 59b75cf60476f38c1a7ba25bd2256e8e2b2217cb /include/llvm/Analysis/ScalarEvolutionExpander.h | |
parent | eb3ac4518e46ffaea978d40daf2b4b34b13c48dd (diff) | |
download | external_llvm-1ba5769676bb14078ddbdb9760523619726800c0.zip external_llvm-1ba5769676bb14078ddbdb9760523619726800c0.tar.gz external_llvm-1ba5769676bb14078ddbdb9760523619726800c0.tar.bz2 |
SCEVExpander fix. RAUW needs to update the InsertedExpressions cache.
Note that this bug is only exposed because LTO fails to use TTI.
Fixes self-LTO of clang. rdar://13007381.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172462 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis/ScalarEvolutionExpander.h')
-rw-r--r-- | include/llvm/Analysis/ScalarEvolutionExpander.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/llvm/Analysis/ScalarEvolutionExpander.h b/include/llvm/Analysis/ScalarEvolutionExpander.h index 1708ccc..00779fc 100644 --- a/include/llvm/Analysis/ScalarEvolutionExpander.h +++ b/include/llvm/Analysis/ScalarEvolutionExpander.h @@ -40,8 +40,10 @@ namespace llvm { // New instructions receive a name to identifies them with the current pass. const char* IVName; - std::map<std::pair<const SCEV *, Instruction *>, AssertingVH<Value> > + // InsertedExpressions caches Values for reuse, so must track RAUW. + std::map<std::pair<const SCEV *, Instruction *>, TrackingVH<Value> > InsertedExpressions; + // InsertedValues only flags inserted instructions so needs no RAUW. std::set<AssertingVH<Value> > InsertedValues; std::set<AssertingVH<Value> > InsertedPostIncValues; |