summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-11-10 17:34:04 +0000
committerDan Gohman <gohman@apple.com>2010-11-10 17:34:04 +0000
commit2577580967ba31ab6ae30307bcb1b4b1395d0f4f (patch)
tree10610ab005a0c5046f6d7cd170039fcebec00ef4 /llvm/lib/Transforms
parent3cd9145da6ae5b692d3f63172f1997588a9bb362 (diff)
downloadbcm5719-llvm-2577580967ba31ab6ae30307bcb1b4b1395d0f4f.tar.gz
bcm5719-llvm-2577580967ba31ab6ae30307bcb1b4b1395d0f4f.zip
Factor out the code for testing whether a function accesses
arbitrary memory into a helper function, and adjust some comments. llvm-svn: 118687
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/IPO/FunctionAttrs.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/IPO/FunctionAttrs.cpp b/llvm/lib/Transforms/IPO/FunctionAttrs.cpp
index 3b1b13d378f..2e3440066e6 100644
--- a/llvm/lib/Transforms/IPO/FunctionAttrs.cpp
+++ b/llvm/lib/Transforms/IPO/FunctionAttrs.cpp
@@ -131,9 +131,8 @@ bool FunctionAttrs::AddReadAttrs(const CallGraphSCC &SCC) {
AliasAnalysis::ModRefBehavior MRB = AA->getModRefBehavior(CS);
// If the call doesn't access arbitrary memory, we may be able to
// figure out something.
- if (!(MRB & AliasAnalysis::Anywhere &
- ~AliasAnalysis::ArgumentPointees)) {
- // If the call accesses argument pointees, check each argument.
+ if (AliasAnalysis::onlyAccessesArgPointees(MRB)) {
+ // If the call does access argument pointees, check each argument.
if (MRB & AliasAnalysis::AccessesArguments)
// Check whether all pointer arguments point to local memory, and
// ignore calls that only access local memory.
OpenPOWER on IntegriCloud