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!

llvm-svn: 185886
This commit is contained in:
Nadav Rotem 2013-07-08 23:31:13 +00:00
parent c1b648f6c0
commit c9c57518ab
1 changed files with 2 additions and 1 deletions

View File

@ -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: