diff options
author | David Majnemer <david.majnemer@gmail.com> | 2016-08-11 21:15:00 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2016-08-11 21:15:00 +0000 |
commit | 0a16c228463ca58c7828b5fd9bdd10b3ba612bbf (patch) | |
tree | 761d8030441a22b5acb0f154ff4586eb6679833f /llvm/lib/Analysis/ValueTracking.cpp | |
parent | 1b689da04e3f8f2c83b1365853a8af39a27b30ea (diff) | |
download | llvm-0a16c228463ca58c7828b5fd9bdd10b3ba612bbf.zip llvm-0a16c228463ca58c7828b5fd9bdd10b3ba612bbf.tar.gz llvm-0a16c228463ca58c7828b5fd9bdd10b3ba612bbf.tar.bz2 |
Use range algorithms instead of unpacking begin/end
No functionality change is intended.
llvm-svn: 278417
Diffstat (limited to 'llvm/lib/Analysis/ValueTracking.cpp')
-rw-r--r-- | llvm/lib/Analysis/ValueTracking.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp index c4403c6..ac7dabe 100644 --- a/llvm/lib/Analysis/ValueTracking.cpp +++ b/llvm/lib/Analysis/ValueTracking.cpp @@ -406,7 +406,7 @@ static bool isEphemeralValueOf(Instruction *I, const Value *E) { // The instruction defining an assumption's condition itself is always // considered ephemeral to that assumption (even if it has other // non-ephemeral users). See r246696's test case for an example. - if (std::find(I->op_begin(), I->op_end(), E) != I->op_end()) + if (is_contained(I->operands(), E)) return true; while (!WorkSet.empty()) { @@ -415,8 +415,7 @@ static bool isEphemeralValueOf(Instruction *I, const Value *E) { continue; // If all uses of this value are ephemeral, then so is this value. - if (std::all_of(V->user_begin(), V->user_end(), - [&](const User *U) { return EphValues.count(U); })) { + if (all_of(V->users(), [&](const User *U) { return EphValues.count(U); })) { if (V == E) return true; |