diff options
author | rdivacky <rdivacky@FreeBSD.org> | 2010-01-15 15:37:28 +0000 |
---|---|---|
committer | rdivacky <rdivacky@FreeBSD.org> | 2010-01-15 15:37:28 +0000 |
commit | 3fba7d16b41dfbefe3b1be6bc0ab94c017728f79 (patch) | |
tree | be5a687969f682edded4aa6f13594ffd9aa9030e /lib/Transforms/Scalar/SimplifyCFGPass.cpp | |
parent | a16c51cee9225a354c999dd1076d5dba2aa79807 (diff) | |
download | FreeBSD-src-3fba7d16b41dfbefe3b1be6bc0ab94c017728f79.zip FreeBSD-src-3fba7d16b41dfbefe3b1be6bc0ab94c017728f79.tar.gz |
Update LLVM to 93512.
Diffstat (limited to 'lib/Transforms/Scalar/SimplifyCFGPass.cpp')
-rw-r--r-- | lib/Transforms/Scalar/SimplifyCFGPass.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/Transforms/Scalar/SimplifyCFGPass.cpp b/lib/Transforms/Scalar/SimplifyCFGPass.cpp index a36da78..43447de 100644 --- a/lib/Transforms/Scalar/SimplifyCFGPass.cpp +++ b/lib/Transforms/Scalar/SimplifyCFGPass.cpp @@ -99,9 +99,8 @@ static bool MarkAliveBlocks(BasicBlock *BB, SmallVector<BasicBlock*, 128> Worklist; Worklist.push_back(BB); bool Changed = false; - while (!Worklist.empty()) { - BB = Worklist.back(); - Worklist.pop_back(); + do { + BB = Worklist.pop_back_val(); if (!Reachable.insert(BB)) continue; @@ -150,7 +149,7 @@ static bool MarkAliveBlocks(BasicBlock *BB, Changed |= ConstantFoldTerminator(BB); for (succ_iterator SI = succ_begin(BB), SE = succ_end(BB); SI != SE; ++SI) Worklist.push_back(*SI); - } + } while (!Worklist.empty()); return Changed; } |