summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/GlobalsModRef.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/GlobalsModRef.cpp
parent1b689da04e3f8f2c83b1365853a8af39a27b30ea (diff)
downloadbcm5719-llvm-0a16c228463ca58c7828b5fd9bdd10b3ba612bbf.tar.gz
bcm5719-llvm-0a16c228463ca58c7828b5fd9bdd10b3ba612bbf.zip
Use range algorithms instead of unpacking begin/end
No functionality change is intended. llvm-svn: 278417
Diffstat (limited to 'llvm/lib/Analysis/GlobalsModRef.cpp')
-rw-r--r--llvm/lib/Analysis/GlobalsModRef.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/Analysis/GlobalsModRef.cpp b/llvm/lib/Analysis/GlobalsModRef.cpp
index a7cf134960e..8289e585d27 100644
--- a/llvm/lib/Analysis/GlobalsModRef.cpp
+++ b/llvm/lib/Analysis/GlobalsModRef.cpp
@@ -857,22 +857,22 @@ ModRefInfo GlobalsAAResult::getModRefInfoForArgument(ImmutableCallSite CS,
if (CS.doesNotAccessMemory())
return MRI_NoModRef;
ModRefInfo ConservativeResult = CS.onlyReadsMemory() ? MRI_Ref : MRI_ModRef;
-
+
// Iterate through all the arguments to the called function. If any argument
// is based on GV, return the conservative result.
for (auto &A : CS.args()) {
SmallVector<Value*, 4> Objects;
GetUnderlyingObjects(A, Objects, DL);
-
+
// All objects must be identified.
- if (!std::all_of(Objects.begin(), Objects.end(), isIdentifiedObject) &&
+ if (!all_of(Objects, isIdentifiedObject) &&
// Try ::alias to see if all objects are known not to alias GV.
- !std::all_of(Objects.begin(), Objects.end(), [&](Value *V) {
+ !all_of(Objects, [&](Value *V) {
return this->alias(MemoryLocation(V), MemoryLocation(GV)) == NoAlias;
- }))
+ }))
return ConservativeResult;
- if (std::find(Objects.begin(), Objects.end(), GV) != Objects.end())
+ if (is_contained(Objects, GV))
return ConservativeResult;
}
OpenPOWER on IntegriCloud