mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-29 22:52:18 +00:00
if a function doesn't access memory at all, it definitely doesn't read it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20794 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8cfd24df54
commit
8eec644862
@ -214,7 +214,8 @@ public:
|
||||
bool onlyReadsMemory(Function *F) {
|
||||
/// FIXME: If the analysis returns more precise info, we can reduce it to
|
||||
/// this.
|
||||
return getModRefBehavior(F, CallSite()) == OnlyReadsMemory;
|
||||
ModRefBehavior MRB = getModRefBehavior(F, CallSite());
|
||||
return MRB == DoesNotAccessMemory || MRB == OnlyReadsMemory;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user