[PATCH] D42209: [ModRefInfo] Return NoModRef for Must and NoModRef.
Sanjoy Das via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 18 11:06:30 PST 2018
sanjoy requested changes to this revision.
sanjoy added inline comments.
This revision now requires changes to proceed.
================
Comment at: lib/Analysis/AliasAnalysis.cpp:256
// CS2's arguments.
- if (onlyAccessesArgPointees(CS2B)) {
+ if (onlyAccessesArgPointees(CS2B) && doesAccessArgPointees(CS2B)) {
ModRefInfo R = ModRefInfo::NoModRef;
----------------
I'm a bit confused by this -- before if `onlyAccessesArgPointees` was true and `doesAccessArgPointees` was false then we'd directly return `ModRefInfo::NoModRef`. However, now if `onlyAccessesArgPointees` is true and `doesAccessArgPointees` is false we're going to return `Result` after falling through to the end. Is that equivalent? If so, can you please add an `assert(Result == NoModRef)` or something like that?
Repository:
rL LLVM
https://reviews.llvm.org/D42209
More information about the llvm-commits
mailing list