aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Utils/LCSSA.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2006-06-06 04:36:36 +0000
committerOwen Anderson <resistor@mac.com>2006-06-06 04:36:36 +0000
commite9d93d5d70a59f78f4ec726711e9363cfc6b1f4d (patch)
treed86231ace6ca513844d4f7dc79c436a1b6452974 /lib/Transforms/Utils/LCSSA.cpp
parent92deacf2f703b1882a30eee1e73b1c99a4b5eec5 (diff)
downloadexternal_llvm-e9d93d5d70a59f78f4ec726711e9363cfc6b1f4d.zip
external_llvm-e9d93d5d70a59f78f4ec726711e9363cfc6b1f4d.tar.gz
external_llvm-e9d93d5d70a59f78f4ec726711e9363cfc6b1f4d.tar.bz2
Fix some formatting, and use inLoop() when appropriate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28694 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/LCSSA.cpp')
-rw-r--r--lib/Transforms/Utils/LCSSA.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Transforms/Utils/LCSSA.cpp b/lib/Transforms/Utils/LCSSA.cpp
index 8d14979..061e548 100644
--- a/lib/Transforms/Utils/LCSSA.cpp
+++ b/lib/Transforms/Utils/LCSSA.cpp
@@ -78,7 +78,8 @@ namespace {
/// inLoop - returns true if the given block is within the current loop
const bool inLoop(BasicBlock* B) {
- return std::binary_search(LoopBlocks.begin(), LoopBlocks.end(), B); }
+ return std::binary_search(LoopBlocks.begin(), LoopBlocks.end(), B);
+ }
};
RegisterOpt<LCSSA> X("lcssa", "Loop-Closed SSA Form Pass");
@@ -242,8 +243,7 @@ SetVector<Instruction*> LCSSA::getLoopValuesUsedOutsideLoop(Loop *L) {
for (Value::use_iterator UI = I->use_begin(), E = I->use_end(); UI != E;
++UI) {
BasicBlock *UserBB = cast<Instruction>(*UI)->getParent();
- if (!std::binary_search(LoopBlocks.begin(), LoopBlocks.end(), UserBB))
- {
+ if (!inLoop(UserBB)) {
AffectedValues.insert(I);
break;
}