diff options
author | Juergen Ributzka <juergen@apple.com> | 2014-01-25 02:02:55 +0000 |
---|---|---|
committer | Juergen Ributzka <juergen@apple.com> | 2014-01-25 02:02:55 +0000 |
commit | f26beda7c706c2a090b6f1a4eacb2dceadb1ae94 (patch) | |
tree | 0dac4e55bcaf268403edb80569da621fd69352f3 /llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp | |
parent | 58b404398ed7eb4da3a73e37db29466e26bcd651 (diff) | |
download | bcm5719-llvm-f26beda7c706c2a090b6f1a4eacb2dceadb1ae94.tar.gz bcm5719-llvm-f26beda7c706c2a090b6f1a4eacb2dceadb1ae94.zip |
Revert "Revert "Add Constant Hoisting Pass" (r200034)"
This reverts commit r200058 and adds the using directive for
ARMTargetTransformInfo to silence two g++ overload warnings.
llvm-svn: 200062
Diffstat (limited to 'llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp b/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp index 38f587b2cc8..6acbd5eaa14 100644 --- a/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp +++ b/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp @@ -240,7 +240,7 @@ bool CodeGenPrepare::runOnFunction(Function &F) { bool CodeGenPrepare::EliminateFallThrough(Function &F) { bool Changed = false; // Scan all of the blocks in the function, except for the entry block. - for (Function::iterator I = ++F.begin(), E = F.end(); I != E; ) { + for (Function::iterator I = llvm::next(F.begin()), E = F.end(); I != E; ) { BasicBlock *BB = I++; // If the destination block has a single pred, then this is a trivial // edge, just collapse it. @@ -276,7 +276,7 @@ bool CodeGenPrepare::EliminateFallThrough(Function &F) { bool CodeGenPrepare::EliminateMostlyEmptyBlocks(Function &F) { bool MadeChange = false; // Note that this intentionally skips the entry block. - for (Function::iterator I = ++F.begin(), E = F.end(); I != E; ) { + for (Function::iterator I = llvm::next(F.begin()), E = F.end(); I != E; ) { BasicBlock *BB = I++; // If this block doesn't end with an uncond branch, ignore it. |