aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/InstructionSimplify.cpp
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2016-08-11 21:15:00 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2016-08-11 21:15:00 +0000
commit0a16c228463ca58c7828b5fd9bdd10b3ba612bbf (patch)
tree761d8030441a22b5acb0f154ff4586eb6679833f /llvm/lib/Analysis/InstructionSimplify.cpp
parent1b689da04e3f8f2c83b1365853a8af39a27b30ea (diff)
downloadllvm-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/InstructionSimplify.cpp')
-rw-r--r--llvm/lib/Analysis/InstructionSimplify.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Analysis/InstructionSimplify.cpp b/llvm/lib/Analysis/InstructionSimplify.cpp
index e6aed6d..95273a78 100644
--- a/llvm/lib/Analysis/InstructionSimplify.cpp
+++ b/llvm/lib/Analysis/InstructionSimplify.cpp
@@ -2104,8 +2104,8 @@ computePointerICmp(const DataLayout &DL, const TargetLibraryInfo *TLI,
GetUnderlyingObjects(RHS, RHSUObjs, DL);
// Is the set of underlying objects all noalias calls?
- auto IsNAC = [](SmallVectorImpl<Value *> &Objects) {
- return std::all_of(Objects.begin(), Objects.end(), isNoAliasCall);
+ auto IsNAC = [](ArrayRef<Value *> Objects) {
+ return all_of(Objects, isNoAliasCall);
};
// Is the set of underlying objects all things which must be disjoint from
@@ -2114,8 +2114,8 @@ computePointerICmp(const DataLayout &DL, const TargetLibraryInfo *TLI,
// live with the compared-to allocation). For globals, we exclude symbols
// that might be resolve lazily to symbols in another dynamically-loaded
// library (and, thus, could be malloc'ed by the implementation).
- auto IsAllocDisjoint = [](SmallVectorImpl<Value *> &Objects) {
- return std::all_of(Objects.begin(), Objects.end(), [](Value *V) {
+ auto IsAllocDisjoint = [](ArrayRef<Value *> Objects) {
+ return all_of(Objects, [](Value *V) {
if (const AllocaInst *AI = dyn_cast<AllocaInst>(V))
return AI->getParent() && AI->getFunction() && AI->isStaticAlloca();
if (const GlobalValue *GV = dyn_cast<GlobalValue>(V))