summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-08-14 18:13:49 +0000
committerDan Gohman <gohman@apple.com>2008-08-14 18:13:49 +0000
commit8de6d22392196842f78cfca89ac22d5eccf3c6ab (patch)
tree457f54306be85c5a26837780eb7d7646816a4f94 /llvm/lib/Transforms
parent4801bd41cf2a3491f21dbd526dc91346e4d54c05 (diff)
downloadbcm5719-llvm-8de6d22392196842f78cfca89ac22d5eccf3c6ab.tar.gz
bcm5719-llvm-8de6d22392196842f78cfca89ac22d5eccf3c6ab.zip
Use empty() instead of begin() == end().
llvm-svn: 54780
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/IPO/LoopExtractor.cpp2
-rw-r--r--llvm/lib/Transforms/Scalar/LoopIndexSplit.cpp4
-rw-r--r--llvm/lib/Transforms/Utils/SimplifyCFG.cpp2
3 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/IPO/LoopExtractor.cpp b/llvm/lib/Transforms/IPO/LoopExtractor.cpp
index 10ec3065af7..8e55b3f0919 100644
--- a/llvm/lib/Transforms/IPO/LoopExtractor.cpp
+++ b/llvm/lib/Transforms/IPO/LoopExtractor.cpp
@@ -79,7 +79,7 @@ bool LoopExtractor::runOnFunction(Function &F) {
LoopInfo &LI = getAnalysis<LoopInfo>();
// If this function has no loops, there is nothing to do.
- if (LI.begin() == LI.end())
+ if (LI.empty())
return false;
DominatorTree &DT = getAnalysis<DominatorTree>();
diff --git a/llvm/lib/Transforms/Scalar/LoopIndexSplit.cpp b/llvm/lib/Transforms/Scalar/LoopIndexSplit.cpp
index 135ce33ee6f..1ab9a18cf6f 100644
--- a/llvm/lib/Transforms/Scalar/LoopIndexSplit.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopIndexSplit.cpp
@@ -1006,9 +1006,9 @@ bool LoopIndexSplit::updateLoopIterationSpace(SplitInfo &SD) {
// Remove split condition.
SD.SplitCondition->eraseFromParent();
- if (Op0->use_begin() == Op0->use_end())
+ if (Op0->use_empty())
Op0->eraseFromParent();
- if (Op1->use_begin() == Op1->use_end())
+ if (Op1->use_empty())
Op1->eraseFromParent();
BranchInst *ExitInsn =
diff --git a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
index d04fce6892a..efd17650f2d 100644
--- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
+++ b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
@@ -107,7 +107,7 @@ static bool CanPropagatePredecessorsForPHIs(BasicBlock *BB, BasicBlock *Succ) {
CommonPreds.insert(*PI);
// Shortcut, if there are no common predecessors, merging is always safe
- if (CommonPreds.begin() == CommonPreds.end())
+ if (CommonPreds.empty())
return true;
// Look at all the phi nodes in Succ, to see if they present a conflict when
OpenPOWER on IntegriCloud