diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2012-02-02 18:52:15 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2012-02-02 18:52:15 +0000 |
commit | ded681d2725907c7de9db53d59cee0c51fad6fcb (patch) | |
tree | bb1acdb8b7e1daba59e0770299b57bfed4051a0c /lib/Transforms/Vectorize | |
parent | 35564dc3ae1c377abad425cb09928eaf676dcb3c (diff) |
BBVectorize: Simplify code, no functionality change.
Also silences warnings about bodyless for loops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149612 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Vectorize')
-rw-r--r-- | lib/Transforms/Vectorize/BBVectorize.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/lib/Transforms/Vectorize/BBVectorize.cpp b/lib/Transforms/Vectorize/BBVectorize.cpp index dc88e2c85f..ce6e994c46 100644 --- a/lib/Transforms/Vectorize/BBVectorize.cpp +++ b/lib/Transforms/Vectorize/BBVectorize.cpp @@ -1591,9 +1591,7 @@ namespace { std::multimap<Value *, Value *> &LoadMoveSet, Instruction *I, Instruction *J) { // Skip to the first instruction past I. - BasicBlock::iterator L = BB.begin(); - for (; cast<Instruction>(L) != I; ++L); - ++L; + BasicBlock::iterator L = llvm::next(BasicBlock::iterator(I)); DenseSet<Value *> Users; AliasSetTracker WriteSet(*AA); @@ -1613,9 +1611,7 @@ namespace { Instruction *&InsertionPt, Instruction *I, Instruction *J) { // Skip to the first instruction past I. - BasicBlock::iterator L = BB.begin(); - for (; cast<Instruction>(L) != I; ++L); - ++L; + BasicBlock::iterator L = llvm::next(BasicBlock::iterator(I)); DenseSet<Value *> Users; AliasSetTracker WriteSet(*AA); @@ -1643,9 +1639,7 @@ namespace { std::multimap<Value *, Value *> &LoadMoveSet, Instruction *I) { // Skip to the first instruction past I. - BasicBlock::iterator L = BB.begin(); - for (; cast<Instruction>(L) != I; ++L); - ++L; + BasicBlock::iterator L = llvm::next(BasicBlock::iterator(I)); DenseSet<Value *> Users; AliasSetTracker WriteSet(*AA); |