aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorNadav Rotem <nrotem@apple.com>2013-07-08 23:31:13 +0000
committerNadav Rotem <nrotem@apple.com>2013-07-08 23:31:13 +0000
commitf564efa59103f101e08c4016c9f6d78967b4960c (patch)
treec1a0f8cf9c51ea75e9479afb60dcd58fc81f8f12 /lib
parenta75b293e4fa702d3e233839dc347ebf565be2d4d (diff)
downloadexternal_llvm-f564efa59103f101e08c4016c9f6d78967b4960c.zip
external_llvm-f564efa59103f101e08c4016c9f6d78967b4960c.tar.gz
external_llvm-f564efa59103f101e08c4016c9f6d78967b4960c.tar.bz2
This patch changes the saved IRBuilder insert point from BasicBlock::iterator to AssertingVH.
Commit 185883 fixes a bug in the IRBuilder that should fix the ASan bot. AssertingVH can help in exposing some RAUW problems. Thanks Ben and Alexey! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185886 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Transforms/Vectorize/SLPVectorizer.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Transforms/Vectorize/SLPVectorizer.cpp b/lib/Transforms/Vectorize/SLPVectorizer.cpp
index 136eaff..cfb5be7 100644
--- a/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -66,7 +66,7 @@ private:
BuilderLocGuard(const BuilderLocGuard &);
BuilderLocGuard &operator=(const BuilderLocGuard &);
IRBuilder<> &Builder;
- BasicBlock::iterator Loc;
+ AssertingVH<Instruction> Loc;
};
/// A helper class for numbering instructions in multible blocks.
@@ -1217,6 +1217,7 @@ Value *BoUpSLP::vectorizeTree(TreeEntry *E) {
}
void BoUpSLP::vectorizeTree() {
+ Builder.SetInsertPoint(&F->getEntryBlock());
vectorizeTree(&VectorizableTree[0]);
// For each vectorized value: