diff options
author | Dan Gohman <gohman@apple.com> | 2010-11-10 17:34:04 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-11-10 17:34:04 +0000 |
commit | 432d08cbdb9ceaa333f1d6eab4f8b542fdddf9db (patch) | |
tree | e1aa716938b0d913cdca6e28aa412bd7fd2f11ad /lib/Transforms/IPO/FunctionAttrs.cpp | |
parent | 50bcaece670fea4c936c6730fab9f4d869d2ec67 (diff) |
Factor out the code for testing whether a function accesses
arbitrary memory into a helper function, and adjust some comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118687 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/IPO/FunctionAttrs.cpp')
-rw-r--r-- | lib/Transforms/IPO/FunctionAttrs.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Transforms/IPO/FunctionAttrs.cpp b/lib/Transforms/IPO/FunctionAttrs.cpp index 3b1b13d378..2e3440066e 100644 --- a/lib/Transforms/IPO/FunctionAttrs.cpp +++ b/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. |