summaryrefslogtreecommitdiffstats
path: root/llvm/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
commitac601b4c4b3f6ff79f3bd99da6bb33d25ceb4e17 (patch)
tree8d9737d9f6b0e926ccf9ab78e1c6528576efa44b /llvm/lib/Transforms/Utils/LCSSA.cpp
parent9e81c1bb0396c76d5b10b8a7b3380ff5ed7fbe69 (diff)
downloadbcm5719-llvm-ac601b4c4b3f6ff79f3bd99da6bb33d25ceb4e17.tar.gz
bcm5719-llvm-ac601b4c4b3f6ff79f3bd99da6bb33d25ceb4e17.zip
Fix some formatting, and use inLoop() when appropriate.
llvm-svn: 28694
Diffstat (limited to 'llvm/lib/Transforms/Utils/LCSSA.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/LCSSA.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Utils/LCSSA.cpp b/llvm/lib/Transforms/Utils/LCSSA.cpp
index 8d1497939da..061e548e708 100644
--- a/llvm/lib/Transforms/Utils/LCSSA.cpp
+++ b/llvm/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;
}
OpenPOWER on IntegriCloud